@nanisoft/prism-llms 0.4.0 → 0.5.1
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 +4037 -386
- 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 +299 -156
- package/dist/index.d.ts +12 -7
- package/dist/index.js +9 -7
- package/dist/llms-full.txt +8248 -2013
- package/dist/llms.txt +98 -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 +98 -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 +107 -0
- package/dist/md/blocks/settings-panel-01.md +146 -0
- package/dist/md/blocks/site-footer.md +103 -11
- package/dist/md/blocks/site-header.md +107 -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 +244 -0
- package/dist/md/changelogs/prism-mcp-server.md +95 -0
- package/dist/md/changelogs/prism-tokens.md +126 -0
- package/dist/md/changelogs/prism-ui.md +467 -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 +114 -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/docs-shell.md +210 -15
- 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/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/README.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# @nanisoft/prism-llms
|
|
2
|
+
|
|
3
|
+
Prism's agent-facing corpus. One build-fresh `dist/` is read three ways:
|
|
4
|
+
|
|
5
|
+
| Lane | Consumer | What it reads |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| npm | a downstream tool | the published `dist/` |
|
|
8
|
+
| site | `@nanisoft/site` | a local build of `dist/` |
|
|
9
|
+
| MCP | `@nanisoft/prism-mcp-server` | the bundled `dist/data.json`, at build time only |
|
|
10
|
+
|
|
11
|
+
The generator is deterministic and `dist/` is never committed. The corpus is a
|
|
12
|
+
projection, not a source: it is assembled from the checked catalogue, the
|
|
13
|
+
hand-written MDX pages, the emitted `@nanisoft/prism-ui` declarations, the
|
|
14
|
+
verbatim demo source and the emitted token cascade. Nothing here is hand-edited.
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
pnpm --filter @nanisoft/prism-llms build # compile the library and emit the corpus
|
|
20
|
+
pnpm --filter @nanisoft/prism-llms check # the eight-invariant drift gate
|
|
21
|
+
pnpm --filter @nanisoft/prism-llms test # the Vitest floor
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`build` writes the library with `tsc` and then the corpus with
|
|
25
|
+
`scripts/build.mjs`. `emit(outDir)` is exported so the drift gate can emit twice
|
|
26
|
+
into temporary directories and byte-compare. The gate never writes `dist/`.
|
|
27
|
+
|
|
28
|
+
## Output
|
|
29
|
+
|
|
30
|
+
The build writes exactly these paths into `dist/`:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
data.json
|
|
34
|
+
llms.txt
|
|
35
|
+
llms-full.txt
|
|
36
|
+
prism-skill.md
|
|
37
|
+
md/**
|
|
38
|
+
demo-graph.d.ts
|
|
39
|
+
demo-graph.js
|
|
40
|
+
extractor.d.ts
|
|
41
|
+
extractor.js
|
|
42
|
+
index.d.ts
|
|
43
|
+
index.js
|
|
44
|
+
markdown.d.ts
|
|
45
|
+
markdown.js
|
|
46
|
+
store.d.ts
|
|
47
|
+
store.js
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`md/<section>/<slug>.md` is the per-item Markdown mirror for `section` in
|
|
51
|
+
`overview`, `foundation`, `content`, `components`, `blocks`, `pages`,
|
|
52
|
+
`changelogs`. A content page's mirror keeps the shape of the content tree it was
|
|
53
|
+
read from, at any depth: a page at `content/foundation/tokens/spacing-scale.mdx`
|
|
54
|
+
is emitted at `md/foundation/tokens/spacing-scale.md` and is linked as
|
|
55
|
+
`/foundation/tokens/spacing-scale.md`. A page's route comes from where it sits
|
|
56
|
+
in that tree, not from a Section-and-file-name join, so nesting a page publishes
|
|
57
|
+
it rather than losing it. `data.json` is the `PrismDocsStore`; it is never copied
|
|
58
|
+
into the site export and is bundled into the Worker instead.
|
|
59
|
+
|
|
60
|
+
The content walk is `collectContentPages` in `scripts/build.mjs`, and it is the
|
|
61
|
+
only thing that decides which content pages exist. A Section that is declared and
|
|
62
|
+
not on disk throws rather than being skipped, because a skipped Section is a
|
|
63
|
+
whole Section deleted from every agent surface with a green build.
|
|
64
|
+
|
|
65
|
+
## The store
|
|
66
|
+
|
|
67
|
+
`PrismDocsStore` is declared in `src/store.ts` and exported from the package
|
|
68
|
+
root. `parsePrismDocsStore(raw: unknown)` is the one runtime guard; it narrows
|
|
69
|
+
structurally, validates `kind` through a local list tied to the catalogue's
|
|
70
|
+
closed union, and throws with the offending path. The MCP server inherits both
|
|
71
|
+
the type and the guard.
|
|
72
|
+
|
|
73
|
+
## The per-item spec
|
|
74
|
+
|
|
75
|
+
Each mirror is generated to one fixed shape: the H1, the catalogue description,
|
|
76
|
+
the import fence, the hand-written prose body, the demo, then a literal
|
|
77
|
+
`## Props` heading followed by a one-entry-per-line definition list (or
|
|
78
|
+
`## Composition` for a Block or a Page), with cross-references last. The
|
|
79
|
+
definition-list format is load-bearing: the MCP server's regular expression keys
|
|
80
|
+
on the literal `## Props` heading.
|
|
81
|
+
|
|
82
|
+
## The drift gate
|
|
83
|
+
|
|
84
|
+
`scripts/check.mjs` fails the build on any of eight invariants: coverage (every
|
|
85
|
+
catalogue item, and every content page at any depth, has a mirror), the demo
|
|
86
|
+
contract, cross-references, descriptions, the store type round-trip, link and
|
|
87
|
+
mirror completeness, byte-for-byte determinism, and the README's declared output
|
|
88
|
+
list equalling the emitted set.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The Prism packages (`@nanisoft/prism-tokens`, `@nanisoft/prism-ui`,
|
|
4
|
+
`@nanisoft/prism-llms`, `@nanisoft/prism-mcp-server`) are MIT-licensed. See
|
|
5
|
+
[`LICENSE`](./LICENSE). This file covers the third-party works the packages and
|
|
6
|
+
the site depend on or redistribute. It is attribution, not a grant: each work
|
|
7
|
+
remains under its own license.
|
|
8
|
+
|
|
9
|
+
## Runtime dependencies
|
|
10
|
+
|
|
11
|
+
The direct runtime dependencies below are MIT-licensed unless noted. License
|
|
12
|
+
texts ship with their packages and are available from the corresponding npm
|
|
13
|
+
package or repository.
|
|
14
|
+
|
|
15
|
+
| Package | Used by | License |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| `@base-ui/react` | `@nanisoft/prism-ui` (internal accessibility behaviour) | MIT, copyright the MUI Team and contributors |
|
|
18
|
+
| `@modelcontextprotocol/sdk` | `@nanisoft/prism-mcp-server` | MIT, copyright Anthropic, PBC and contributors |
|
|
19
|
+
| `zod` | `@nanisoft/prism-mcp-server` | MIT, copyright Colin McDonnell |
|
|
20
|
+
| `react`, `react-dom` | `@nanisoft/prism-ui` (peer), the site | MIT, copyright Meta Platforms, Inc. and affiliates |
|
|
21
|
+
| `next` | the site | MIT, copyright Vercel, Inc. |
|
|
22
|
+
| `fumadocs-core`, `fumadocs-mdx` | the site | MIT, copyright Fuma Nama |
|
|
23
|
+
| `agents` | the site (MCP transport) | MIT, copyright Cloudflare, Inc. |
|
|
24
|
+
| `class-variance-authority` | `@nanisoft/prism-ui` (internal variant recipes, not re-exported) | Apache-2.0 |
|
|
25
|
+
| `clsx` | `@nanisoft/prism-ui` (internal class composition) | MIT, copyright Luke Edwards |
|
|
26
|
+
| `tailwind-merge` | `@nanisoft/prism-ui` (internal class composition) | MIT |
|
|
27
|
+
| `lucide-react` | `@nanisoft/prism-ui` and the site (icons) | ISC, copyright the Lucide contributors, with portions copyright Cole Bemis 2013 to 2023 as part of Feather (MIT) |
|
|
28
|
+
| `tailwindcss` | `@nanisoft/prism-ui` and the site (internal build dependency) | MIT, copyright Tailwind Labs, Inc. |
|
|
29
|
+
|
|
30
|
+
Tailwind 4 is not a consumer dependency. It runs only in Prism's build, and its
|
|
31
|
+
compiled output is part of the component package's precompiled `styles.css`.
|
|
32
|
+
|
|
33
|
+
## Fonts
|
|
34
|
+
|
|
35
|
+
The documentation site self-hosts Inter under `apps/site/src/fonts/`, loaded
|
|
36
|
+
through `next/font/local`. The shipped files are `InterVariable.woff2` and
|
|
37
|
+
`InterVariable-Italic.woff2` from the official Inter release 4.1, and the site
|
|
38
|
+
is the only consumer. Inter is licensed under the **SIL Open Font License,
|
|
39
|
+
Version 1.1**; the license text is committed at
|
|
40
|
+
`apps/site/src/fonts/LICENSE.txt`. Inter is copyright The Inter Project Authors
|
|
41
|
+
(rsms.me/inter).
|
|
42
|
+
|
|
43
|
+
## Build and development toolchain
|
|
44
|
+
|
|
45
|
+
TypeScript, Vitest, Turbo, pnpm, changesets, oxlint, Style Dictionary, publint
|
|
46
|
+
and Wrangler are development and build dependencies. They are not redistributed
|
|
47
|
+
with Prism artifacts and carry their own package licenses. Style Dictionary is
|
|
48
|
+
Apache-2.0; the rest ship their own license text with their packages.
|