deps: add @quartz-community/utils dependency

This commit is contained in:
saberzero1 2026-04-03 19:33:39 +02:00
parent a6e5fbe6d1
commit ac42396d41
No known key found for this signature in database
6 changed files with 33 additions and 11 deletions

View file

@ -1,9 +1,7 @@
import { classNames } from '@quartz-community/utils/lang';
import { jsx } from 'preact/jsx-runtime';
// src/util/lang.ts
function classNames(...classes) {
return classes.filter(Boolean).join(" ");
}
var ArticleTitle = ({ fileData, displayClass }) => {
const title = fileData.frontmatter?.title;
if (title) {

View file

@ -1 +1 @@
{"version":3,"sources":["../../src/util/lang.ts","../../src/components/ArticleTitle.tsx"],"names":[],"mappings":";;;AAAO,SAAS,cAAc,OAAA,EAAwD;AACpF,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;ACKA,IAAM,YAAA,GAAgC,CAAC,EAAE,QAAA,EAAU,cAAa,KAA4B;AAC1F,EAAA,MAAM,KAAA,GAAS,SAAS,WAAA,EAAgD,KAAA;AACxE,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,2BAAQ,IAAA,EAAA,EAAG,KAAA,EAAO,WAAW,YAAA,EAAc,eAAe,GAAI,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,EACtE,CAAA,MAAO;AACL,IAAA,OAAO,IAAA;AAAA,EACT;AACF,CAAA;AAEA,YAAA,CAAa,GAAA,GAAM;AAAA;AAAA;AAAA;AAAA,CAAA;AAMnB,IAAO,wBAAS,MAAM,YAAA","file":"index.js","sourcesContent":["export function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\n\nconst ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {\n const title = (fileData.frontmatter as { title?: string } | undefined)?.title;\n if (title) {\n return <h1 class={classNames(displayClass, \"article-title\")}>{title}</h1>;\n } else {\n return null;\n }\n};\n\nArticleTitle.css = `\n.article-title {\n margin: 2rem 0 0 0;\n}\n`;\n\nexport default (() => ArticleTitle) satisfies QuartzComponentConstructor;\n"]}
{"version":3,"sources":["../../src/components/ArticleTitle.tsx"],"names":[],"mappings":";;;;AAOA,IAAM,YAAA,GAAgC,CAAC,EAAE,QAAA,EAAU,cAAa,KAA4B;AAC1F,EAAA,MAAM,KAAA,GAAS,SAAS,WAAA,EAAgD,KAAA;AACxE,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,2BAAQ,IAAA,EAAA,EAAG,KAAA,EAAO,WAAW,YAAA,EAAc,eAAe,GAAI,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,EACtE,CAAA,MAAO;AACL,IAAA,OAAO,IAAA;AAAA,EACT;AACF,CAAA;AAEA,YAAA,CAAa,GAAA,GAAM;AAAA;AAAA;AAAA;AAAA,CAAA;AAMnB,IAAO,wBAAS,MAAM,YAAA","file":"index.js","sourcesContent":["import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\n\nconst ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {\n const title = (fileData.frontmatter as { title?: string } | undefined)?.title;\n if (title) {\n return <h1 class={classNames(displayClass, \"article-title\")}>{title}</h1>;\n } else {\n return null;\n }\n};\n\nArticleTitle.css = `\n.article-title {\n margin: 2rem 0 0 0;\n}\n`;\n\nexport default (() => ArticleTitle) satisfies QuartzComponentConstructor;\n"]}

4
dist/index.js vendored
View file

@ -1,9 +1,7 @@
import { classNames } from '@quartz-community/utils/lang';
import { jsx } from 'preact/jsx-runtime';
// src/util/lang.ts
function classNames(...classes) {
return classes.filter(Boolean).join(" ");
}
var ArticleTitle = ({ fileData, displayClass }) => {
const title = fileData.frontmatter?.title;
if (title) {

2
dist/index.js.map vendored
View file

@ -1 +1 @@
{"version":3,"sources":["../src/util/lang.ts","../src/components/ArticleTitle.tsx"],"names":[],"mappings":";;;AAAO,SAAS,cAAc,OAAA,EAAwD;AACpF,EAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,OAAO,CAAA,CAAE,KAAK,GAAG,CAAA;AACzC;ACKA,IAAM,YAAA,GAAgC,CAAC,EAAE,QAAA,EAAU,cAAa,KAA4B;AAC1F,EAAA,MAAM,KAAA,GAAS,SAAS,WAAA,EAAgD,KAAA;AACxE,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,2BAAQ,IAAA,EAAA,EAAG,KAAA,EAAO,WAAW,YAAA,EAAc,eAAe,GAAI,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,EACtE,CAAA,MAAO;AACL,IAAA,OAAO,IAAA;AAAA,EACT;AACF,CAAA;AAEA,YAAA,CAAa,GAAA,GAAM;AAAA;AAAA;AAAA;AAAA,CAAA;AAMnB,IAAO,wBAAS,MAAM,YAAA","file":"index.js","sourcesContent":["export function classNames(...classes: (string | undefined | null | false)[]): string {\n return classes.filter(Boolean).join(\" \");\n}\n","import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\n\nconst ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {\n const title = (fileData.frontmatter as { title?: string } | undefined)?.title;\n if (title) {\n return <h1 class={classNames(displayClass, \"article-title\")}>{title}</h1>;\n } else {\n return null;\n }\n};\n\nArticleTitle.css = `\n.article-title {\n margin: 2rem 0 0 0;\n}\n`;\n\nexport default (() => ArticleTitle) satisfies QuartzComponentConstructor;\n"]}
{"version":3,"sources":["../src/components/ArticleTitle.tsx"],"names":[],"mappings":";;;;AAOA,IAAM,YAAA,GAAgC,CAAC,EAAE,QAAA,EAAU,cAAa,KAA4B;AAC1F,EAAA,MAAM,KAAA,GAAS,SAAS,WAAA,EAAgD,KAAA;AACxE,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,2BAAQ,IAAA,EAAA,EAAG,KAAA,EAAO,WAAW,YAAA,EAAc,eAAe,GAAI,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,EACtE,CAAA,MAAO;AACL,IAAA,OAAO,IAAA;AAAA,EACT;AACF,CAAA;AAEA,YAAA,CAAa,GAAA,GAAM;AAAA;AAAA;AAAA;AAAA,CAAA;AAMnB,IAAO,wBAAS,MAAM,YAAA","file":"index.js","sourcesContent":["import type {\n QuartzComponent,\n QuartzComponentProps,\n QuartzComponentConstructor,\n} from \"@quartz-community/types\";\nimport { classNames } from \"../util/lang\";\n\nconst ArticleTitle: QuartzComponent = ({ fileData, displayClass }: QuartzComponentProps) => {\n const title = (fileData.frontmatter as { title?: string } | undefined)?.title;\n if (title) {\n return <h1 class={classNames(displayClass, \"article-title\")}>{title}</h1>;\n } else {\n return null;\n }\n};\n\nArticleTitle.css = `\n.article-title {\n margin: 2rem 0 0 0;\n}\n`;\n\nexport default (() => ArticleTitle) satisfies QuartzComponentConstructor;\n"]}

29
package-lock.json generated
View file

@ -9,7 +9,8 @@
"version": "0.1.0",
"license": "MIT",
"dependencies": {
"@quartz-community/types": "github:quartz-community/types"
"@quartz-community/types": "github:quartz-community/types",
"@quartz-community/utils": "github:quartz-community/utils"
},
"devDependencies": {
"@types/hast": "^3.0.4",
@ -1057,6 +1058,31 @@
}
}
},
"node_modules/@quartz-community/utils": {
"version": "0.1.0",
"resolved": "git+ssh://git@github.com/quartz-community/utils.git#cf1450b6f744755c16ca0d301db08c2ade6cfb67",
"license": "MIT",
"dependencies": {
"@quartz-community/types": "github:quartz-community/types"
},
"engines": {
"node": ">=22",
"npm": ">=10.9.2"
},
"peerDependencies": {
"github-slugger": "^2.0.0",
"hast-util-to-jsx-runtime": "^2.3.6",
"preact": "^10.0.0"
},
"peerDependenciesMeta": {
"github-slugger": {
"optional": true
},
"hast-util-to-jsx-runtime": {
"optional": true
}
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.57.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.57.1.tgz",
@ -3303,7 +3329,6 @@
"version": "10.28.3",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.28.3.tgz",
"integrity": "sha512-tCmoRkPQLpBeWzpmbhryairGnhW9tKV6c6gr/w+RhoRoKEJwsjzipwp//1oCpGPOchvSLaAPlpcJi9MwMmoPyA==",
"dev": true,
"license": "MIT",
"funding": {
"type": "opencollective",

View file

@ -58,7 +58,8 @@
}
},
"dependencies": {
"@quartz-community/types": "github:quartz-community/types"
"@quartz-community/types": "github:quartz-community/types",
"@quartz-community/utils": "github:quartz-community/utils"
},
"devDependencies": {
"@types/hast": "^3.0.4",