@nanisoft/prism-llms 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -0
- package/THIRD-PARTY-NOTICES.md +48 -0
- package/dist/data.json +3996 -387
- package/dist/demo-graph.d.ts +21 -12
- package/dist/demo-graph.js +37 -21
- package/dist/extractor.d.ts +24 -17
- package/dist/extractor.js +269 -153
- package/dist/index.d.ts +12 -7
- package/dist/index.js +9 -7
- package/dist/llms-full.txt +7968 -2013
- package/dist/llms.txt +97 -93
- package/dist/markdown.d.ts +69 -23
- package/dist/markdown.js +131 -72
- package/dist/md/blocks/app-shell-01.md +135 -0
- package/dist/md/blocks/auth-form-01.md +135 -0
- package/dist/md/blocks/cta-01.md +88 -0
- package/dist/md/blocks/data-table-01.md +196 -0
- package/dist/md/blocks/feature-grid-01.md +92 -0
- package/dist/md/blocks/hero-01.md +90 -0
- package/dist/md/blocks/instrument-panel-01.md +109 -0
- package/dist/md/blocks/logo-strip-01.md +97 -0
- package/dist/md/blocks/note-grid-01.md +102 -0
- package/dist/md/blocks/page-header-01.md +97 -0
- package/dist/md/blocks/pricing-01.md +91 -0
- package/dist/md/blocks/process-rail-01.md +106 -0
- package/dist/md/blocks/product-grid-01.md +113 -0
- package/dist/md/blocks/settings-panel-01.md +148 -0
- package/dist/md/blocks/site-footer.md +103 -11
- package/dist/md/blocks/site-header.md +111 -11
- package/dist/md/blocks/stack-grid-01.md +108 -0
- package/dist/md/blocks/stats-01.md +89 -0
- package/dist/md/blocks/status-ledger-01.md +121 -0
- package/dist/md/changelogs/prism-llms.md +206 -0
- package/dist/md/changelogs/prism-mcp-server.md +88 -0
- package/dist/md/changelogs/prism-tokens.md +126 -0
- package/dist/md/changelogs/prism-ui.md +429 -0
- package/dist/md/components/accordion.md +108 -0
- package/dist/md/components/alert.md +90 -7
- package/dist/md/components/avatar.md +89 -7
- package/dist/md/components/badge.md +74 -7
- package/dist/md/components/breadcrumb.md +84 -7
- package/dist/md/components/button.md +90 -7
- package/dist/md/components/card.md +90 -7
- package/dist/md/components/checkbox.md +101 -7
- package/dist/md/components/cta-link.md +98 -0
- package/dist/md/components/diagram.md +124 -0
- package/dist/md/components/dialog.md +128 -0
- package/dist/md/components/dropdown-menu.md +125 -0
- package/dist/md/components/fact-list.md +85 -0
- package/dist/md/components/field.md +116 -0
- package/dist/md/components/input.md +86 -7
- package/dist/md/components/kbd.md +77 -0
- package/dist/md/components/pagination.md +95 -7
- package/dist/md/components/popover.md +95 -7
- package/dist/md/components/product-mark.md +123 -0
- package/dist/md/components/product-switcher.md +88 -0
- package/dist/md/components/progress.md +88 -7
- package/dist/md/components/prose.md +91 -0
- package/dist/md/components/radio-group.md +111 -0
- package/dist/md/components/section.md +91 -0
- package/dist/md/components/select.md +143 -7
- package/dist/md/components/separator.md +77 -0
- package/dist/md/components/skeleton.md +71 -7
- package/dist/md/components/slider.md +90 -7
- package/dist/md/components/switch.md +104 -7
- package/dist/md/components/table.md +104 -7
- package/dist/md/components/tabs.md +105 -7
- package/dist/md/components/textarea.md +101 -0
- package/dist/md/components/tooltip.md +95 -7
- package/dist/md/components/typography.md +82 -7
- package/dist/md/content/about-content.md +36 -0
- package/dist/md/content/audience.md +43 -0
- package/dist/md/content/glossary.md +69 -0
- package/dist/md/content/product-vocabulary.md +53 -0
- package/dist/md/content/voice.md +52 -0
- package/dist/md/content/writing-mechanics.md +58 -0
- package/dist/md/foundation/colors.md +10 -0
- package/dist/md/foundation/iconography.md +14 -0
- package/dist/md/foundation/motion.md +10 -0
- package/dist/md/foundation/radii.md +9 -0
- package/dist/md/foundation/shadows.md +9 -0
- package/dist/md/foundation/spacings.md +8 -0
- package/dist/md/foundation/typography.md +9 -0
- package/dist/md/foundation/variables.md +9 -0
- package/dist/md/overview/architecture.md +76 -0
- package/dist/md/overview/brand.md +41 -0
- package/dist/md/overview/composition.md +77 -0
- package/dist/md/overview/quickstart.md +97 -0
- package/dist/md/overview/theming.md +89 -0
- package/dist/md/overview/using-llms.md +83 -0
- package/dist/md/pages/auth-page.md +149 -0
- package/dist/md/pages/blog-post-page.md +136 -0
- package/dist/md/pages/dashboard-page.md +241 -0
- package/dist/md/pages/marketing-page.md +199 -0
- package/dist/md/pages/not-found-page.md +105 -0
- package/dist/md/pages/settings-page.md +206 -0
- package/dist/prism-skill.md +50 -0
- package/dist/store.d.ts +203 -0
- package/dist/store.js +317 -0
- package/package.json +29 -26
- package/dist/demo-graph.d.ts.map +0 -1
- package/dist/demo-graph.js.map +0 -1
- package/dist/extractor.d.ts.map +0 -1
- package/dist/extractor.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown.d.ts.map +0 -1
- package/dist/markdown.js.map +0 -1
- package/dist/md/blocks/component-demo.md +0 -19
- package/dist/md/blocks/page-header.md +0 -19
- package/dist/md/components/affix.md +0 -14
- package/dist/md/components/anchor.md +0 -14
- package/dist/md/components/auto-complete.md +0 -14
- package/dist/md/components/back-top.md +0 -14
- package/dist/md/components/border-beam.md +0 -14
- package/dist/md/components/calendar.md +0 -14
- package/dist/md/components/carousel.md +0 -14
- package/dist/md/components/cascader.md +0 -14
- package/dist/md/components/col.md +0 -14
- package/dist/md/components/collapse.md +0 -14
- package/dist/md/components/color-picker.md +0 -14
- package/dist/md/components/date-picker.md +0 -14
- package/dist/md/components/descriptions.md +0 -14
- package/dist/md/components/display-title.md +0 -20
- package/dist/md/components/divider.md +0 -14
- package/dist/md/components/drawer.md +0 -14
- package/dist/md/components/dropdown.md +0 -14
- package/dist/md/components/empty.md +0 -14
- package/dist/md/components/flex.md +0 -14
- package/dist/md/components/float-button.md +0 -14
- package/dist/md/components/form.md +0 -14
- package/dist/md/components/grid.md +0 -14
- package/dist/md/components/image.md +0 -14
- package/dist/md/components/input-number.md +0 -14
- package/dist/md/components/layout.md +0 -14
- package/dist/md/components/list.md +0 -14
- package/dist/md/components/listy.md +0 -14
- package/dist/md/components/masonry.md +0 -14
- package/dist/md/components/mentions.md +0 -14
- package/dist/md/components/menu.md +0 -14
- package/dist/md/components/modal.md +0 -14
- package/dist/md/components/popconfirm.md +0 -14
- package/dist/md/components/qrcode.md +0 -14
- package/dist/md/components/radio.md +0 -14
- package/dist/md/components/rate.md +0 -14
- package/dist/md/components/result.md +0 -14
- package/dist/md/components/row.md +0 -14
- package/dist/md/components/segmented.md +0 -14
- package/dist/md/components/space.md +0 -14
- package/dist/md/components/spin.md +0 -14
- package/dist/md/components/splitter.md +0 -14
- package/dist/md/components/statistic.md +0 -14
- package/dist/md/components/steps.md +0 -14
- package/dist/md/components/tag.md +0 -14
- package/dist/md/components/time-picker.md +0 -14
- package/dist/md/components/timeline.md +0 -14
- package/dist/md/components/tour.md +0 -14
- package/dist/md/components/transfer.md +0 -14
- package/dist/md/components/tree-select.md +0 -14
- package/dist/md/components/tree.md +0 -14
- package/dist/md/components/upload.md +0 -14
- package/dist/md/components/watermark.md +0 -14
- package/dist/md/docs/brand.md +0 -41
- package/dist/md/pages/blog-layout.md +0 -19
- package/dist/md/pages/docs-shell.md +0 -23
- package/dist/md/theme/blue-dark.md +0 -127
- package/dist/md/theme/blue-light.md +0 -129
- package/dist/md/theme/green-dark.md +0 -127
- package/dist/md/theme/green-light.md +0 -129
- package/dist/md/theme/lavender-dark.md +0 -127
- package/dist/md/theme/lavender-light.md +0 -129
- package/dist/md/theme/peach-dark.md +0 -127
- package/dist/md/theme/peach-light.md +0 -129
- package/dist/md/theme/rose-dark.md +0 -127
- package/dist/md/theme/rose-light.md +0 -129
package/dist/demo-graph.d.ts
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The demo contract
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The demo contract.
|
|
3
|
+
*
|
|
4
|
+
* Each example is one self-contained `.tsx`: a default export that imports only
|
|
5
|
+
* from `@nanisoft/prism-ui/*`, `react` or `lucide-react`, and never from a
|
|
6
|
+
* relative path. `lucide-react` is allowed because the public Block API surfaces
|
|
7
|
+
* its `LucideIcon` type (a demo that composes a Block must pass an icon), so the
|
|
8
|
+
* example a consumer copies has to name the same import.
|
|
9
|
+
*
|
|
10
|
+
* This module is the contract's single enforcement point: the generator reuses
|
|
11
|
+
* the import scan for its composition and cross-references, and the check
|
|
12
|
+
* reuses the validator.
|
|
7
13
|
*/
|
|
8
14
|
export interface DemoViolation {
|
|
9
15
|
readonly file: string;
|
|
10
16
|
readonly reason: string;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
13
|
-
* Validate one demo's source
|
|
14
|
-
*
|
|
15
|
-
* missing default export.
|
|
19
|
+
* Validate one demo's source. Returns the violations (empty means compliant):
|
|
20
|
+
* a relative or non-allowlisted import, or a missing default export.
|
|
16
21
|
*/
|
|
17
22
|
export declare function validateDemoSource(source: string): DemoViolation[];
|
|
23
|
+
export interface PrismImport {
|
|
24
|
+
readonly specifier: string;
|
|
25
|
+
readonly names: readonly string[];
|
|
26
|
+
}
|
|
18
27
|
/**
|
|
19
|
-
* The prism-ui
|
|
20
|
-
*
|
|
21
|
-
* type-only specifiers, which reference supporting types, not items.
|
|
28
|
+
* The prism-ui bindings a demo imports, with their module specifier. Type-only
|
|
29
|
+
* specifiers reference supporting types, not runtime items.
|
|
22
30
|
*/
|
|
31
|
+
export declare function scanPrismImportsWithSource(source: string): PrismImport[];
|
|
32
|
+
/** The prism-ui value export names a demo imports, sorted and de-duplicated. */
|
|
23
33
|
export declare function scanPrismImports(source: string): string[];
|
|
24
|
-
//# sourceMappingURL=demo-graph.d.ts.map
|
package/dist/demo-graph.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The demo contract
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* The demo contract.
|
|
3
|
+
*
|
|
4
|
+
* Each example is one self-contained `.tsx`: a default export that imports only
|
|
5
|
+
* from `@nanisoft/prism-ui/*`, `react` or `lucide-react`, and never from a
|
|
6
|
+
* relative path. `lucide-react` is allowed because the public Block API surfaces
|
|
7
|
+
* its `LucideIcon` type (a demo that composes a Block must pass an icon), so the
|
|
8
|
+
* example a consumer copies has to name the same import.
|
|
9
|
+
*
|
|
10
|
+
* This module is the contract's single enforcement point: the generator reuses
|
|
11
|
+
* the import scan for its composition and cross-references, and the check
|
|
12
|
+
* reuses the validator.
|
|
7
13
|
*/
|
|
8
14
|
/** Module specifiers a demo may import. Everything else fails the contract. */
|
|
9
|
-
const ALLOWED_IMPORTS = [/^@nanisoft\/prism-ui(\/[\w.-]+)*$/, /^react$/];
|
|
15
|
+
const ALLOWED_IMPORTS = [/^@nanisoft\/prism-ui(\/[\w.-]+)*$/, /^react$/, /^lucide-react$/];
|
|
10
16
|
/**
|
|
11
|
-
* Validate one demo's source
|
|
12
|
-
*
|
|
13
|
-
* missing default export.
|
|
17
|
+
* Validate one demo's source. Returns the violations (empty means compliant):
|
|
18
|
+
* a relative or non-allowlisted import, or a missing default export.
|
|
14
19
|
*/
|
|
15
20
|
export function validateDemoSource(source) {
|
|
16
21
|
const violations = [];
|
|
@@ -23,34 +28,45 @@ export function validateDemoSource(source) {
|
|
|
23
28
|
violations.push({
|
|
24
29
|
file: '',
|
|
25
30
|
reason: specifier.startsWith('.')
|
|
26
|
-
? `relative import '${specifier}'
|
|
27
|
-
: `import from '${specifier}'
|
|
31
|
+
? `relative import '${specifier}': demos must be self-contained`
|
|
32
|
+
: `import from '${specifier}': demos import only from '@nanisoft/prism-ui/*', 'react' and 'lucide-react'`,
|
|
28
33
|
});
|
|
29
34
|
}
|
|
30
35
|
if (!/export\s+default/.test(source)) {
|
|
31
|
-
violations.push({ file: '', reason: 'no default export
|
|
36
|
+
violations.push({ file: '', reason: 'no default export: each demo default-exports its example' });
|
|
32
37
|
}
|
|
33
38
|
return violations;
|
|
34
39
|
}
|
|
35
40
|
/**
|
|
36
|
-
* The prism-ui
|
|
37
|
-
*
|
|
38
|
-
* type-only specifiers, which reference supporting types, not items.
|
|
41
|
+
* The prism-ui bindings a demo imports, with their module specifier. Type-only
|
|
42
|
+
* specifiers reference supporting types, not runtime items.
|
|
39
43
|
*/
|
|
40
|
-
export function
|
|
41
|
-
const
|
|
42
|
-
const importPattern = /(?:^|\n)\s*import\s+(
|
|
44
|
+
export function scanPrismImportsWithSource(source) {
|
|
45
|
+
const found = [];
|
|
46
|
+
const importPattern = /(?:^|\n)\s*import\s+(type\s+)?\{([^}]*)\}\s+from\s+["'](@nanisoft\/prism-ui[^"']*)["']/g;
|
|
43
47
|
let match;
|
|
44
48
|
while ((match = importPattern.exec(source)) !== null) {
|
|
45
|
-
|
|
49
|
+
if (match[1])
|
|
50
|
+
continue;
|
|
51
|
+
const names = [];
|
|
52
|
+
for (const raw of (match[2] ?? '').split(',')) {
|
|
46
53
|
const trimmed = raw.trim();
|
|
47
54
|
if (!trimmed || trimmed.startsWith('type '))
|
|
48
55
|
continue;
|
|
49
56
|
const name = trimmed.split(/\s+as\s+/)[0]?.trim();
|
|
50
57
|
if (name)
|
|
51
|
-
names.
|
|
58
|
+
names.push(name);
|
|
52
59
|
}
|
|
60
|
+
found.push({ specifier: match[3] ?? '', names });
|
|
61
|
+
}
|
|
62
|
+
return found;
|
|
63
|
+
}
|
|
64
|
+
/** The prism-ui value export names a demo imports, sorted and de-duplicated. */
|
|
65
|
+
export function scanPrismImports(source) {
|
|
66
|
+
const names = new Set();
|
|
67
|
+
for (const binding of scanPrismImportsWithSource(source)) {
|
|
68
|
+
for (const name of binding.names)
|
|
69
|
+
names.add(name);
|
|
53
70
|
}
|
|
54
71
|
return [...names].sort();
|
|
55
72
|
}
|
|
56
|
-
//# sourceMappingURL=demo-graph.js.map
|
package/dist/extractor.d.ts
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The one props extractor
|
|
3
|
-
* surface — TSDoc preserved — and returns the Prism-added props. Homed here
|
|
4
|
-
* and exported (`@nanisoft/prism-llms/extractor`) for the site's API tables;
|
|
5
|
-
* one extractor, two consumers. Runs after `^build`, so it reads declarations,
|
|
6
|
-
* never TS source.
|
|
2
|
+
* The one props extractor.
|
|
7
3
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
4
|
+
* It reads `@nanisoft/prism-ui`'s emitted declarations, never its TypeScript
|
|
5
|
+
* source, and it is deliberately compiler-API-free: a small structural scanner
|
|
6
|
+
* for the declaration shapes this repository emits. Ticket 12 section 2 fixes
|
|
7
|
+
* the seam at the emitted `.d.ts`, so a compiler bump cannot break the corpus.
|
|
8
|
+
*
|
|
9
|
+
* The shapes it understands:
|
|
10
|
+
* - a named props type (`export type XProps = { ... }` or
|
|
11
|
+
* `export interface XProps extends Y { ... }`), referenced by a function;
|
|
12
|
+
* - an inline props object on the function parameter;
|
|
13
|
+
* - `ComponentProps<'tag'>`, recorded as an inherited base rather than
|
|
14
|
+
* expanded, so a native-backed component reports its element;
|
|
15
|
+
* - `VariantProps<typeof recipe>`, expanded from the emitted `cva` declaration
|
|
16
|
+
* into the recipe's `variant` and `size` rows.
|
|
17
|
+
*
|
|
18
|
+
* One extractor, two renderers: the corpus's `## Props` definition list and the
|
|
19
|
+
* site's API reference table. There is no second extraction.
|
|
15
20
|
*/
|
|
16
21
|
export interface ExtractedProp {
|
|
17
22
|
readonly name: string;
|
|
@@ -24,14 +29,16 @@ export interface ExtractedProp {
|
|
|
24
29
|
readonly defaultValue?: string;
|
|
25
30
|
}
|
|
26
31
|
export interface ExtractedInterface {
|
|
32
|
+
/** The public export name this interface describes. */
|
|
27
33
|
readonly typeName: string;
|
|
28
|
-
/** The
|
|
34
|
+
/** The inherited base, when the annotation is not wholly Prism-authored. */
|
|
29
35
|
readonly extendsType?: string;
|
|
30
36
|
readonly props: readonly ExtractedProp[];
|
|
31
37
|
}
|
|
38
|
+
/** Extract every exported `*Props` interface from a declaration, in source order. */
|
|
39
|
+
export declare function extractProps(source: string): ExtractedInterface[];
|
|
32
40
|
/**
|
|
33
|
-
* Extract
|
|
34
|
-
*
|
|
41
|
+
* Extract the props of the named exports from one declaration file's text.
|
|
42
|
+
* Exports with no declaration are reported with an empty prop list.
|
|
35
43
|
*/
|
|
36
|
-
export declare function
|
|
37
|
-
//# sourceMappingURL=extractor.d.ts.map
|
|
44
|
+
export declare function extractExports(source: string, exportNames: readonly string[]): ExtractedInterface[];
|