mirror of
https://github.com/quartz-community/note-properties.git
synced 2026-07-22 02:50:26 +00:00
fix: add build-time deps for DTS generation
Peer dependencies needed at build time for TypeScript declaration file generation were missing from devDependencies. Without them, the DTS build fails silently, producing no index.d.ts.
This commit is contained in:
parent
8ac59ae70d
commit
2d29fc5c07
5 changed files with 171 additions and 2 deletions
8
dist/components/index.d.ts
vendored
Normal file
8
dist/components/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { QuartzComponent } from '@quartz-community/types';
|
||||
|
||||
interface NotePropertiesComponentOptions {
|
||||
collapsed?: boolean;
|
||||
}
|
||||
declare const _default: (opts?: NotePropertiesComponentOptions) => QuartzComponent;
|
||||
|
||||
export { _default as NotePropertiesComponent, type NotePropertiesComponentOptions };
|
||||
42
dist/index.d.ts
vendored
Normal file
42
dist/index.d.ts
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
import { FullSlug, QuartzTransformerPlugin } from '@quartz-community/types';
|
||||
export { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps, QuartzTransformerPlugin } from '@quartz-community/types';
|
||||
import { NotePropertiesOptions } from './types.js';
|
||||
export { NotePropertiesComponent, NotePropertiesComponentOptions } from './components/index.js';
|
||||
|
||||
declare const NoteProperties: QuartzTransformerPlugin<Partial<NotePropertiesOptions>>;
|
||||
declare module "vfile" {
|
||||
interface DataMap {
|
||||
aliases: FullSlug[];
|
||||
frontmatter: {
|
||||
[key: string]: unknown;
|
||||
} & {
|
||||
title: string;
|
||||
} & Partial<{
|
||||
tags: string[];
|
||||
aliases: string[];
|
||||
modified: string;
|
||||
created: string;
|
||||
published: string;
|
||||
description: string;
|
||||
socialDescription: string;
|
||||
publish: boolean | string;
|
||||
draft: boolean | string;
|
||||
lang: string;
|
||||
enableToc: string;
|
||||
cssclasses: string[];
|
||||
socialImage: string;
|
||||
comments: boolean | string;
|
||||
}>;
|
||||
frontmatterLinks: string[];
|
||||
noteProperties: {
|
||||
properties: Record<string, unknown>;
|
||||
hideView: boolean;
|
||||
/** Per-note override: true = show, false = hide, undefined = follow config */
|
||||
showProperties?: boolean;
|
||||
/** Per-note override: true = collapsed, false = expanded, undefined = follow component option */
|
||||
collapseProperties?: boolean;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export { NoteProperties, NotePropertiesOptions };
|
||||
18
dist/types.d.ts
vendored
Normal file
18
dist/types.d.ts
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
export { BuildCtx, CSSResource, ChangeEvent, FilePath, FullSlug, JSResource, PageGenerator, PageMatcher, ProcessedContent, QuartzEmitterPlugin, QuartzEmitterPluginInstance, QuartzFilterPlugin, QuartzFilterPluginInstance, QuartzPageTypePlugin, QuartzPageTypePluginInstance, QuartzPluginData, QuartzTransformerPlugin, QuartzTransformerPluginInstance, StaticResources, VirtualPage } from '@quartz-community/types';
|
||||
|
||||
interface NotePropertiesOptions {
|
||||
/** Include all frontmatter properties in the display. When false, only `includedProperties` are shown. */
|
||||
includeAll: boolean;
|
||||
/** Properties to include when `includeAll` is false. Ignored when `includeAll` is true. */
|
||||
includedProperties: string[];
|
||||
/** Properties to exclude from display. Applied after inclusion logic. */
|
||||
excludedProperties: string[];
|
||||
/** Hide the visual properties panel while still processing frontmatter and resolving links. */
|
||||
hidePropertiesView: boolean;
|
||||
/** Frontmatter delimiters. Defaults to "---". */
|
||||
delimiters: string | [string, string];
|
||||
/** Frontmatter language. Defaults to "yaml". */
|
||||
language: "yaml" | "toml";
|
||||
}
|
||||
|
||||
export type { NotePropertiesOptions };
|
||||
99
package-lock.json
generated
99
package-lock.json
generated
|
|
@ -23,7 +23,9 @@
|
|||
"eslint-config-prettier": "^9.1.0",
|
||||
"preact": "^10.28.2",
|
||||
"prettier": "^3.6.2",
|
||||
"remark-frontmatter": "^5.0.0",
|
||||
"sass": "^1.97.3",
|
||||
"toml": "^3.0.0",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^2.1.9"
|
||||
|
|
@ -2631,6 +2633,20 @@
|
|||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fault": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fault/-/fault-2.0.1.tgz",
|
||||
"integrity": "sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"format": "^0.2.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/wooorm"
|
||||
}
|
||||
},
|
||||
"node_modules/file-entry-cache": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
|
||||
|
|
@ -2707,6 +2723,15 @@
|
|||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/format": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz",
|
||||
"integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.4.x"
|
||||
}
|
||||
},
|
||||
"node_modules/fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
|
|
@ -3289,6 +3314,38 @@
|
|||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-frontmatter": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-2.0.1.tgz",
|
||||
"integrity": "sha512-LRqI9+wdgC25P0URIJY9vwocIzCcksduHQ9OF2joxQoyTNVduwLAFUzjoopuRJbJAReaKrNQKAZKL3uCMugWJA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"devlop": "^1.0.0",
|
||||
"escape-string-regexp": "^5.0.0",
|
||||
"mdast-util-from-markdown": "^2.0.0",
|
||||
"mdast-util-to-markdown": "^2.0.0",
|
||||
"micromark-extension-frontmatter": "^2.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-frontmatter/node_modules/escape-string-regexp": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
|
||||
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/mdast-util-mdx-expression": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/mdast-util-mdx-expression/-/mdast-util-mdx-expression-2.0.1.tgz",
|
||||
|
|
@ -3476,6 +3533,23 @@
|
|||
"micromark-util-types": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/micromark-extension-frontmatter": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/micromark-extension-frontmatter/-/micromark-extension-frontmatter-2.0.0.tgz",
|
||||
"integrity": "sha512-C4AkuM3dA58cgZha7zVnuVxBhDsbttIMiytjgsM2XbHAB2faRVaHRle40558FBN+DJcrLNCoqG5mlrpdU4cRtg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fault": "^2.0.0",
|
||||
"micromark-util-character": "^2.0.0",
|
||||
"micromark-util-symbol": "^2.0.0",
|
||||
"micromark-util-types": "^2.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/micromark-factory-destination": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/micromark-factory-destination/-/micromark-factory-destination-2.0.1.tgz",
|
||||
|
|
@ -4164,6 +4238,7 @@
|
|||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
|
|
@ -4306,6 +4381,23 @@
|
|||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
},
|
||||
"node_modules/remark-frontmatter": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/remark-frontmatter/-/remark-frontmatter-5.0.0.tgz",
|
||||
"integrity": "sha512-XTFYvNASMe5iPN0719nPrdItC9aU0ssC4v14mH1BCi1u0n1gAocqcujWUrByftZTbLhRtiKRyjYTSIOcr69UVQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/mdast": "^4.0.0",
|
||||
"mdast-util-frontmatter": "^2.0.0",
|
||||
"micromark-extension-frontmatter": "^2.0.0",
|
||||
"unified": "^11.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/unified"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve-from": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
|
||||
|
|
@ -4784,6 +4876,13 @@
|
|||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/toml": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz",
|
||||
"integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tree-kill": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||
|
|
|
|||
|
|
@ -102,10 +102,12 @@
|
|||
"eslint-config-prettier": "^9.1.0",
|
||||
"preact": "^10.28.2",
|
||||
"prettier": "^3.6.2",
|
||||
"remark-frontmatter": "^5.0.0",
|
||||
"sass": "^1.97.3",
|
||||
"vitest": "^2.1.9",
|
||||
"toml": "^3.0.0",
|
||||
"tsup": "^8.5.0",
|
||||
"typescript": "^5.9.3"
|
||||
"typescript": "^5.9.3",
|
||||
"vitest": "^2.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22",
|
||||
|
|
|
|||
Loading…
Reference in a new issue