@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.
Files changed (175) hide show
  1. package/README.md +88 -0
  2. package/THIRD-PARTY-NOTICES.md +48 -0
  3. package/dist/data.json +3996 -387
  4. package/dist/demo-graph.d.ts +21 -12
  5. package/dist/demo-graph.js +37 -21
  6. package/dist/extractor.d.ts +24 -17
  7. package/dist/extractor.js +269 -153
  8. package/dist/index.d.ts +12 -7
  9. package/dist/index.js +9 -7
  10. package/dist/llms-full.txt +7968 -2013
  11. package/dist/llms.txt +97 -93
  12. package/dist/markdown.d.ts +69 -23
  13. package/dist/markdown.js +131 -72
  14. package/dist/md/blocks/app-shell-01.md +135 -0
  15. package/dist/md/blocks/auth-form-01.md +135 -0
  16. package/dist/md/blocks/cta-01.md +88 -0
  17. package/dist/md/blocks/data-table-01.md +196 -0
  18. package/dist/md/blocks/feature-grid-01.md +92 -0
  19. package/dist/md/blocks/hero-01.md +90 -0
  20. package/dist/md/blocks/instrument-panel-01.md +109 -0
  21. package/dist/md/blocks/logo-strip-01.md +97 -0
  22. package/dist/md/blocks/note-grid-01.md +102 -0
  23. package/dist/md/blocks/page-header-01.md +97 -0
  24. package/dist/md/blocks/pricing-01.md +91 -0
  25. package/dist/md/blocks/process-rail-01.md +106 -0
  26. package/dist/md/blocks/product-grid-01.md +113 -0
  27. package/dist/md/blocks/settings-panel-01.md +148 -0
  28. package/dist/md/blocks/site-footer.md +103 -11
  29. package/dist/md/blocks/site-header.md +111 -11
  30. package/dist/md/blocks/stack-grid-01.md +108 -0
  31. package/dist/md/blocks/stats-01.md +89 -0
  32. package/dist/md/blocks/status-ledger-01.md +121 -0
  33. package/dist/md/changelogs/prism-llms.md +206 -0
  34. package/dist/md/changelogs/prism-mcp-server.md +88 -0
  35. package/dist/md/changelogs/prism-tokens.md +126 -0
  36. package/dist/md/changelogs/prism-ui.md +429 -0
  37. package/dist/md/components/accordion.md +108 -0
  38. package/dist/md/components/alert.md +90 -7
  39. package/dist/md/components/avatar.md +89 -7
  40. package/dist/md/components/badge.md +74 -7
  41. package/dist/md/components/breadcrumb.md +84 -7
  42. package/dist/md/components/button.md +90 -7
  43. package/dist/md/components/card.md +90 -7
  44. package/dist/md/components/checkbox.md +101 -7
  45. package/dist/md/components/cta-link.md +98 -0
  46. package/dist/md/components/diagram.md +124 -0
  47. package/dist/md/components/dialog.md +128 -0
  48. package/dist/md/components/dropdown-menu.md +125 -0
  49. package/dist/md/components/fact-list.md +85 -0
  50. package/dist/md/components/field.md +116 -0
  51. package/dist/md/components/input.md +86 -7
  52. package/dist/md/components/kbd.md +77 -0
  53. package/dist/md/components/pagination.md +95 -7
  54. package/dist/md/components/popover.md +95 -7
  55. package/dist/md/components/product-mark.md +123 -0
  56. package/dist/md/components/product-switcher.md +88 -0
  57. package/dist/md/components/progress.md +88 -7
  58. package/dist/md/components/prose.md +91 -0
  59. package/dist/md/components/radio-group.md +111 -0
  60. package/dist/md/components/section.md +91 -0
  61. package/dist/md/components/select.md +143 -7
  62. package/dist/md/components/separator.md +77 -0
  63. package/dist/md/components/skeleton.md +71 -7
  64. package/dist/md/components/slider.md +90 -7
  65. package/dist/md/components/switch.md +104 -7
  66. package/dist/md/components/table.md +104 -7
  67. package/dist/md/components/tabs.md +105 -7
  68. package/dist/md/components/textarea.md +101 -0
  69. package/dist/md/components/tooltip.md +95 -7
  70. package/dist/md/components/typography.md +82 -7
  71. package/dist/md/content/about-content.md +36 -0
  72. package/dist/md/content/audience.md +43 -0
  73. package/dist/md/content/glossary.md +69 -0
  74. package/dist/md/content/product-vocabulary.md +53 -0
  75. package/dist/md/content/voice.md +52 -0
  76. package/dist/md/content/writing-mechanics.md +58 -0
  77. package/dist/md/foundation/colors.md +10 -0
  78. package/dist/md/foundation/iconography.md +14 -0
  79. package/dist/md/foundation/motion.md +10 -0
  80. package/dist/md/foundation/radii.md +9 -0
  81. package/dist/md/foundation/shadows.md +9 -0
  82. package/dist/md/foundation/spacings.md +8 -0
  83. package/dist/md/foundation/typography.md +9 -0
  84. package/dist/md/foundation/variables.md +9 -0
  85. package/dist/md/overview/architecture.md +76 -0
  86. package/dist/md/overview/brand.md +41 -0
  87. package/dist/md/overview/composition.md +77 -0
  88. package/dist/md/overview/quickstart.md +97 -0
  89. package/dist/md/overview/theming.md +89 -0
  90. package/dist/md/overview/using-llms.md +83 -0
  91. package/dist/md/pages/auth-page.md +149 -0
  92. package/dist/md/pages/blog-post-page.md +136 -0
  93. package/dist/md/pages/dashboard-page.md +241 -0
  94. package/dist/md/pages/marketing-page.md +199 -0
  95. package/dist/md/pages/not-found-page.md +105 -0
  96. package/dist/md/pages/settings-page.md +206 -0
  97. package/dist/prism-skill.md +50 -0
  98. package/dist/store.d.ts +203 -0
  99. package/dist/store.js +317 -0
  100. package/package.json +29 -26
  101. package/dist/demo-graph.d.ts.map +0 -1
  102. package/dist/demo-graph.js.map +0 -1
  103. package/dist/extractor.d.ts.map +0 -1
  104. package/dist/extractor.js.map +0 -1
  105. package/dist/index.d.ts.map +0 -1
  106. package/dist/index.js.map +0 -1
  107. package/dist/markdown.d.ts.map +0 -1
  108. package/dist/markdown.js.map +0 -1
  109. package/dist/md/blocks/component-demo.md +0 -19
  110. package/dist/md/blocks/page-header.md +0 -19
  111. package/dist/md/components/affix.md +0 -14
  112. package/dist/md/components/anchor.md +0 -14
  113. package/dist/md/components/auto-complete.md +0 -14
  114. package/dist/md/components/back-top.md +0 -14
  115. package/dist/md/components/border-beam.md +0 -14
  116. package/dist/md/components/calendar.md +0 -14
  117. package/dist/md/components/carousel.md +0 -14
  118. package/dist/md/components/cascader.md +0 -14
  119. package/dist/md/components/col.md +0 -14
  120. package/dist/md/components/collapse.md +0 -14
  121. package/dist/md/components/color-picker.md +0 -14
  122. package/dist/md/components/date-picker.md +0 -14
  123. package/dist/md/components/descriptions.md +0 -14
  124. package/dist/md/components/display-title.md +0 -20
  125. package/dist/md/components/divider.md +0 -14
  126. package/dist/md/components/drawer.md +0 -14
  127. package/dist/md/components/dropdown.md +0 -14
  128. package/dist/md/components/empty.md +0 -14
  129. package/dist/md/components/flex.md +0 -14
  130. package/dist/md/components/float-button.md +0 -14
  131. package/dist/md/components/form.md +0 -14
  132. package/dist/md/components/grid.md +0 -14
  133. package/dist/md/components/image.md +0 -14
  134. package/dist/md/components/input-number.md +0 -14
  135. package/dist/md/components/layout.md +0 -14
  136. package/dist/md/components/list.md +0 -14
  137. package/dist/md/components/listy.md +0 -14
  138. package/dist/md/components/masonry.md +0 -14
  139. package/dist/md/components/mentions.md +0 -14
  140. package/dist/md/components/menu.md +0 -14
  141. package/dist/md/components/modal.md +0 -14
  142. package/dist/md/components/popconfirm.md +0 -14
  143. package/dist/md/components/qrcode.md +0 -14
  144. package/dist/md/components/radio.md +0 -14
  145. package/dist/md/components/rate.md +0 -14
  146. package/dist/md/components/result.md +0 -14
  147. package/dist/md/components/row.md +0 -14
  148. package/dist/md/components/segmented.md +0 -14
  149. package/dist/md/components/space.md +0 -14
  150. package/dist/md/components/spin.md +0 -14
  151. package/dist/md/components/splitter.md +0 -14
  152. package/dist/md/components/statistic.md +0 -14
  153. package/dist/md/components/steps.md +0 -14
  154. package/dist/md/components/tag.md +0 -14
  155. package/dist/md/components/time-picker.md +0 -14
  156. package/dist/md/components/timeline.md +0 -14
  157. package/dist/md/components/tour.md +0 -14
  158. package/dist/md/components/transfer.md +0 -14
  159. package/dist/md/components/tree-select.md +0 -14
  160. package/dist/md/components/tree.md +0 -14
  161. package/dist/md/components/upload.md +0 -14
  162. package/dist/md/components/watermark.md +0 -14
  163. package/dist/md/docs/brand.md +0 -41
  164. package/dist/md/pages/blog-layout.md +0 -19
  165. package/dist/md/pages/docs-shell.md +0 -23
  166. package/dist/md/theme/blue-dark.md +0 -127
  167. package/dist/md/theme/blue-light.md +0 -129
  168. package/dist/md/theme/green-dark.md +0 -127
  169. package/dist/md/theme/green-light.md +0 -129
  170. package/dist/md/theme/lavender-dark.md +0 -127
  171. package/dist/md/theme/lavender-light.md +0 -129
  172. package/dist/md/theme/peach-dark.md +0 -127
  173. package/dist/md/theme/peach-light.md +0 -129
  174. package/dist/md/theme/rose-dark.md +0 -127
  175. 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.