@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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Glossary
|
|
2
|
+
|
|
3
|
+
Definitions for the terms used across Prism. The terms come from CONTEXT.md and this page hosts them.
|
|
4
|
+
|
|
5
|
+
These definitions are the design system's vocabulary. They are the same terms
|
|
6
|
+
the repository's `CONTEXT.md` defines, and they are the reason the docs and the
|
|
7
|
+
code use one word for one thing.
|
|
8
|
+
|
|
9
|
+
## Theming
|
|
10
|
+
|
|
11
|
+
- **Pack**: one of the authored palettes, the neutral base `default` and the
|
|
12
|
+
five pastels Blush, Mint, Lavender, Sky and Peach. A pack owns a generated
|
|
13
|
+
OKLCH ramp family and its own radius.
|
|
14
|
+
- **Mode**: the appearance of a pack, `light` or `dark`.
|
|
15
|
+
- **Theme**: one pack in one mode. A theme is a fully resolved token set, not an
|
|
16
|
+
object and not an API.
|
|
17
|
+
- **Pack id**: the string that selects a pack at runtime, such as `blush`.
|
|
18
|
+
Absence of a pack id means the default pack.
|
|
19
|
+
|
|
20
|
+
## Tokens
|
|
21
|
+
|
|
22
|
+
- **Foundation token**: a raw ramp value that carries no meaning.
|
|
23
|
+
- **Semantic token**: a named intent, authored as an alias into the foundation
|
|
24
|
+
tier. Its name is emitted verbatim as a CSS custom property.
|
|
25
|
+
- **Token contract**: the set of semantic names emitted as CSS custom
|
|
26
|
+
properties, byte for byte identical to shadcn's variable contract.
|
|
27
|
+
- **Token**: a value in the DTCG source, either foundation or semantic.
|
|
28
|
+
|
|
29
|
+
## Composition
|
|
30
|
+
|
|
31
|
+
- **Component**: a focused, accessible, product-agnostic export with one job,
|
|
32
|
+
and a catalogue item of kind `component`.
|
|
33
|
+
- **Block**: a pre-composed, product-agnostic section assembled from Components.
|
|
34
|
+
A Block takes its content as props and fetches no application data.
|
|
35
|
+
- **Page**: a complete structural composition of Blocks and Components that
|
|
36
|
+
models a whole screen.
|
|
37
|
+
- **Item**: one entry in the catalogue, of any kind.
|
|
38
|
+
- **Kind**: the closed discriminator on an item: `component`, `block` or `page`.
|
|
39
|
+
- **Category**: one of the seven role groups a Component is assigned to. A Block
|
|
40
|
+
or a Page has no category.
|
|
41
|
+
|
|
42
|
+
## Catalogue and source
|
|
43
|
+
|
|
44
|
+
- **Catalogue**: the checked list of every Component, Block and Page, and the
|
|
45
|
+
single source for navigation, item documentation, the corpus and the agent
|
|
46
|
+
surface.
|
|
47
|
+
- **Registry**: the shadcn registry inside the component package. It is an
|
|
48
|
+
internal integrity artifact, never a public install lane.
|
|
49
|
+
- **Owned source**: Prism-authored code a consumer composes through documented
|
|
50
|
+
package exports.
|
|
51
|
+
- **Internal dependency**: a dependency used inside a package to provide
|
|
52
|
+
behaviour or structure, such as Base UI. It is never public API.
|
|
53
|
+
- **Provider**: the optional client module that carries pack and mode through
|
|
54
|
+
context and writes the two document-element attributes.
|
|
55
|
+
|
|
56
|
+
## Agents
|
|
57
|
+
|
|
58
|
+
- **Corpus**: the deterministic projection of the catalogue and the
|
|
59
|
+
documentation into `llms.txt`, the Markdown mirror and the store.
|
|
60
|
+
- **Store**: the type-checked projection of the corpus that the MCP server reads
|
|
61
|
+
at runtime. It is generated, never hand-edited.
|
|
62
|
+
- **Agent surface**: the corpus and the read-only MCP endpoint through which an
|
|
63
|
+
agent reads the same catalogue, props, examples and tokens as this site.
|
|
64
|
+
|
|
65
|
+
## Words retired
|
|
66
|
+
|
|
67
|
+
These words are historical and MUST NOT be revived: primitive (as a unit noun),
|
|
68
|
+
colourway, variant (as a unit noun), beam-dark, pass-through, wrapper, agent
|
|
69
|
+
door, internal primitive, catalog (in prose) and layer (as a unit noun).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Product vocabulary
|
|
2
|
+
|
|
3
|
+
The preferred spelling and casing of NaniSoft product terms, and the terms to avoid.
|
|
4
|
+
|
|
5
|
+
Vocabulary is not standardised across sources. Use the spelling and casing on
|
|
6
|
+
this page, and do not guess from another document.
|
|
7
|
+
|
|
8
|
+
RULE: Always use the spelling and capitalisation shown here in every product
|
|
9
|
+
string and in every piece of documentation.
|
|
10
|
+
|
|
11
|
+
## Sentence case
|
|
12
|
+
|
|
13
|
+
RULE: Write these terms lowercase in descriptions and body text.
|
|
14
|
+
|
|
15
|
+
- pack: one of Prism's authored palettes, such as Blush or Sky.
|
|
16
|
+
- mode: the appearance of a pack, `light` or `dark`.
|
|
17
|
+
- token: a value in the DTCG source.
|
|
18
|
+
- component, block and page: the three composition units, in prose. See the
|
|
19
|
+
[Glossary](/content/glossary) for their definitions.
|
|
20
|
+
|
|
21
|
+
## Title case
|
|
22
|
+
|
|
23
|
+
RULE: Write these terms in title case in every context.
|
|
24
|
+
|
|
25
|
+
- Prism
|
|
26
|
+
- NaniSoft
|
|
27
|
+
- Blush, Mint, Lavender, Sky, Peach: the five pastel pack names, as proper nouns.
|
|
28
|
+
|
|
29
|
+
## Product terms
|
|
30
|
+
|
|
31
|
+
- **Prism**: NaniSoft's design system. Never "the Prism system" or "Prism UI".
|
|
32
|
+
- **pack**: a palette. Never "theme" for a palette; a theme is a pack in a mode.
|
|
33
|
+
- **mode**: `light` or `dark`, written in code font when naming the value.
|
|
34
|
+
- **semantic token**: a named intent that aliases into the foundation tier.
|
|
35
|
+
- **foundation token**: a raw ramp value that carries no meaning.
|
|
36
|
+
|
|
37
|
+
## Terms to avoid
|
|
38
|
+
|
|
39
|
+
RULE: Never use a term in the left column. Use the replacement in the right
|
|
40
|
+
column instead.
|
|
41
|
+
|
|
42
|
+
| Avoid | Use instead |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| colourway, color scheme, skin | pack |
|
|
45
|
+
| beam-dark, appearance | dark mode, or the mode |
|
|
46
|
+
| theme id | pack id |
|
|
47
|
+
| primitive, base value | foundation token, or Component |
|
|
48
|
+
| wrapper, pass-through | Component |
|
|
49
|
+
| catalog (in prose) | catalogue |
|
|
50
|
+
| admin panel, admin console | the page's real name |
|
|
51
|
+
| pop up, popup, pop-up | dialog |
|
|
52
|
+
| login (as a noun) | sign-in |
|
|
53
|
+
| e-mail | email |
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Voice
|
|
2
|
+
|
|
3
|
+
NaniSoft's fixed voice qualities, and how tone shifts by context.
|
|
4
|
+
|
|
5
|
+
Voice is fixed. It does not change from feature to feature or from screen to
|
|
6
|
+
screen. Every piece of product copy MUST be clear, human and helpful. All three,
|
|
7
|
+
always.
|
|
8
|
+
|
|
9
|
+
Tone is the part that moves. The same voice sounds different in an error than in
|
|
10
|
+
a success message, and the context chooses the tone.
|
|
11
|
+
|
|
12
|
+
## Clear
|
|
13
|
+
|
|
14
|
+
Write like a knowledgeable colleague explaining something, not a manual.
|
|
15
|
+
|
|
16
|
+
- RULE: Use plain words.
|
|
17
|
+
- RULE: Be as short as the meaning allows.
|
|
18
|
+
- RULE: Say exactly what to do or where to go.
|
|
19
|
+
|
|
20
|
+
## Human
|
|
21
|
+
|
|
22
|
+
Write to a person, in the first and second person.
|
|
23
|
+
|
|
24
|
+
- RULE: Use "you" for the reader and "we" for NaniSoft.
|
|
25
|
+
- RULE: Use contractions where they read naturally.
|
|
26
|
+
- RULE: Avoid jargon unless the glossary defines it, and define it on first use.
|
|
27
|
+
|
|
28
|
+
## Helpful
|
|
29
|
+
|
|
30
|
+
Every message has a job. If it has no job, delete it.
|
|
31
|
+
|
|
32
|
+
- RULE: Tell the reader what happened and what to do next.
|
|
33
|
+
- RULE: Never blame the reader.
|
|
34
|
+
- RULE: Never leave a dead end. Every error MUST name a recovery.
|
|
35
|
+
|
|
36
|
+
## Choosing the tone
|
|
37
|
+
|
|
38
|
+
| Context | Reader's state | Tone | Example |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| Errors, failures, empty states | Frustrated or confused | Matter-of-fact and direct | "No projects found. Change or clear your filters." |
|
|
41
|
+
| Completed setup, saved work | Pleased | Plainly positive, no celebration | "Your changes are saved." |
|
|
42
|
+
| Destructive actions | Cautious | Explicit and calm | "Delete this project? This cannot be undone." |
|
|
43
|
+
| First run, onboarding | Curious | Brief and encouraging | "Add your first project to see it here." |
|
|
44
|
+
|
|
45
|
+
RULE: A success message MUST state what changed, not congratulate the reader.
|
|
46
|
+
RULE: A destructive confirmation MUST name the thing and the consequence.
|
|
47
|
+
|
|
48
|
+
## Judgment
|
|
49
|
+
|
|
50
|
+
These qualities are principles. Apply them with judgment, and use
|
|
51
|
+
[Writing mechanics](/content/writing-mechanics) for the concrete rules on
|
|
52
|
+
capitalisation, punctuation and length.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Writing mechanics
|
|
2
|
+
|
|
3
|
+
Capitalisation, punctuation, grammar and structure rules for NaniSoft product copy.
|
|
4
|
+
|
|
5
|
+
These are the mechanical rules. They are narrower than voice and tone, and they
|
|
6
|
+
are the ones a reviewer can check without judgment.
|
|
7
|
+
|
|
8
|
+
## Capitalisation
|
|
9
|
+
|
|
10
|
+
RULE: Write sentences and UI labels in sentence case. Capitalise the first word
|
|
11
|
+
and proper nouns only.
|
|
12
|
+
|
|
13
|
+
RULE: Use title case only for the product's own name and for a pack name when it
|
|
14
|
+
is a proper noun in a heading.
|
|
15
|
+
|
|
16
|
+
RULE: Do not capitalise a generic word to make it look important. "Dashboard",
|
|
17
|
+
"settings" and "project" are lowercase in a sentence.
|
|
18
|
+
|
|
19
|
+
## Punctuation
|
|
20
|
+
|
|
21
|
+
RULE: Use the serial comma in a list of three or more items.
|
|
22
|
+
|
|
23
|
+
RULE: Use periods in complete sentences and in helper text that is a sentence.
|
|
24
|
+
Omit the period in a label, a button, a heading and a short fragment.
|
|
25
|
+
|
|
26
|
+
RULE: Never use an exclamation mark twice in one message, and never use one in an
|
|
27
|
+
error.
|
|
28
|
+
|
|
29
|
+
RULE: Use a colon to introduce a list, and a semicolon when two independent
|
|
30
|
+
clauses are close enough to share a sentence.
|
|
31
|
+
|
|
32
|
+
RULE: Do not use em dashes or en dashes. Use a period, a comma, a colon or a
|
|
33
|
+
plain hyphen.
|
|
34
|
+
|
|
35
|
+
## Grammar
|
|
36
|
+
|
|
37
|
+
RULE: Write in the active voice.
|
|
38
|
+
|
|
39
|
+
RULE: Address the reader as "you". Refer to NaniSoft as "we".
|
|
40
|
+
|
|
41
|
+
RULE: Use the present tense for what the product does, and the past tense only
|
|
42
|
+
for something that already happened.
|
|
43
|
+
|
|
44
|
+
RULE: Keep one idea per sentence, and keep a sentence under 25 words where the
|
|
45
|
+
meaning allows.
|
|
46
|
+
|
|
47
|
+
## Syntax and structure
|
|
48
|
+
|
|
49
|
+
RULE: Lead each screen or dialog with the outcome, then the action.
|
|
50
|
+
|
|
51
|
+
RULE: Put the most important information first, and the next step last.
|
|
52
|
+
|
|
53
|
+
RULE: Use a numbered list when order matters, and a bulleted list when it does
|
|
54
|
+
not.
|
|
55
|
+
|
|
56
|
+
RULE: Prefer plain language. Replace a jargon word with a common one unless the
|
|
57
|
+
jargon word is a defined product term in the
|
|
58
|
+
[Product vocabulary](/content/product-vocabulary).
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Colors
|
|
2
|
+
|
|
3
|
+
The semantic colour contract and the foundation ramps behind it.
|
|
4
|
+
|
|
5
|
+
Prism ships two colour families: a set of semantic roles whose names are the
|
|
6
|
+
shadcn variable contract, and the foundation ramps those roles alias into. A
|
|
7
|
+
component consumes a semantic utility, never a ramp step, which is what makes
|
|
8
|
+
theming automatic at runtime.
|
|
9
|
+
|
|
10
|
+
<ColorTokens />
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Iconography
|
|
2
|
+
|
|
3
|
+
Prism uses Lucide for interface icons, sized on the spacing scale.
|
|
4
|
+
|
|
5
|
+
Prism does not ship an icon font or a bespoke icon set. Interface icons come from
|
|
6
|
+
Lucide, which the component package already depends on, and a component that
|
|
7
|
+
needs an icon imports it from `lucide-react`.
|
|
8
|
+
|
|
9
|
+
Icons are sized with `size-4` (1rem) in a control and `size-5` (1.25rem) in a
|
|
10
|
+
tile. Both resolve through the authored spacing scale, so an icon stays in step
|
|
11
|
+
with the control it sits in. Decorative icons carry `aria-hidden`, and an
|
|
12
|
+
icon-only control carries an accessible name.
|
|
13
|
+
|
|
14
|
+
<IconographyGrid />
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Motion
|
|
2
|
+
|
|
3
|
+
State feedback only, by token, with no entrance or scroll animation.
|
|
4
|
+
|
|
5
|
+
Motion is state feedback. It is never decorative, there are no keyframes, and a
|
|
6
|
+
component names a duration token and an easing token rather than a value.
|
|
7
|
+
Spatial movement is guarded with `motion-safe:` so a reduced-motion preference
|
|
8
|
+
removes it.
|
|
9
|
+
|
|
10
|
+
<TokenTable group="motion" />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Radii
|
|
2
|
+
|
|
3
|
+
One base radius drives the whole scale, derived as calc() multipliers.
|
|
4
|
+
|
|
5
|
+
A single `--radius` token is the source, and the scale is derived from it. Each
|
|
6
|
+
pack overrides the base, so changing a pack changes every rounded corner
|
|
7
|
+
together.
|
|
8
|
+
|
|
9
|
+
<TokenTable group="radius" />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Shadows
|
|
2
|
+
|
|
3
|
+
Exactly three authored elevation steps, all mode-independent.
|
|
4
|
+
|
|
5
|
+
Elevation is authored, not borrowed. There are three shadow steps, all black
|
|
6
|
+
alpha with a real vertical offset and a soft blur. `xs` sits under a filled
|
|
7
|
+
control, `sm` under a card, and `md` under the one element that means lifted.
|
|
8
|
+
|
|
9
|
+
<TokenTable group="shadow" />
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Spacings
|
|
2
|
+
|
|
3
|
+
The authored spacing scale both layout and section rhythm use.
|
|
4
|
+
|
|
5
|
+
Spacing is authored once and reaches CSS as `--spacing` and its steps. `Section`
|
|
6
|
+
owns the page rhythm, and a gutter is a spacing token rather than a literal.
|
|
7
|
+
|
|
8
|
+
<TokenTable group="spacing" />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Typography
|
|
2
|
+
|
|
3
|
+
Inter for the interface, the platform monospace stack for machine values.
|
|
4
|
+
|
|
5
|
+
Inter is the one interface face. The platform monospace stack annotates
|
|
6
|
+
machine-readable values. Sizes are authored as size and line-height pairs, and
|
|
7
|
+
leading, tracking and weight are authored tokens too.
|
|
8
|
+
|
|
9
|
+
<TokenTable group="typography" />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Variables
|
|
2
|
+
|
|
3
|
+
The full token browser: every semantic custom property and every foundation group.
|
|
4
|
+
|
|
5
|
+
This is the token inventory. It reads the emitted JSON rather than a hardcoded
|
|
6
|
+
table, so it is the same data the stylesheet is compiled from. Colours are shown
|
|
7
|
+
as light and dark pairs; the mode-independent groups are shown once.
|
|
8
|
+
|
|
9
|
+
<TokenBrowser />
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
How Prism keeps tokens, the component library, the docs site and the agent surface on one source of truth.
|
|
4
|
+
|
|
5
|
+
Prism is owned source. It uses Base UI for accessible interaction behavior
|
|
6
|
+
internally, then applies its own props, anatomy, tokens and composition
|
|
7
|
+
patterns. None of the internal dependency is public API.
|
|
8
|
+
|
|
9
|
+
## The package boundary
|
|
10
|
+
|
|
11
|
+
`@nanisoft/prism-ui` is the only UI package an application imports. It ships
|
|
12
|
+
compiled JavaScript and declarations, and its `exports` map is the public
|
|
13
|
+
surface. The token package, `@nanisoft/prism-tokens`, is a pure data package;
|
|
14
|
+
you normally do not import it directly because the compiled CSS reaches you
|
|
15
|
+
through the one stylesheet.
|
|
16
|
+
|
|
17
|
+
That boundary gives a consuming project three guarantees:
|
|
18
|
+
|
|
19
|
+
1. No direct dependency on a second component library.
|
|
20
|
+
2. No upstream visual defaults leaking into your product.
|
|
21
|
+
3. One version line for behavior, design, documentation and machine-readable
|
|
22
|
+
source.
|
|
23
|
+
|
|
24
|
+
## Three composition layers
|
|
25
|
+
|
|
26
|
+
- **Component**: a focused, accessible, product-agnostic export with one job.
|
|
27
|
+
Compound parts, such as the pieces of a card, stay inside the parent module.
|
|
28
|
+
- **Block**: a pre-composed, product-agnostic section assembled from Components.
|
|
29
|
+
It takes its content as props and fetches nothing.
|
|
30
|
+
- **Page**: a complete structural composition of Blocks and Components that
|
|
31
|
+
models a whole screen and receives application-owned data.
|
|
32
|
+
|
|
33
|
+
The dependency direction is one-way. Sibling layers do not import each other,
|
|
34
|
+
and shared UI moves downward.
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
Pages -> Blocks -> Components -> semantic tokens
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## The catalogue
|
|
41
|
+
|
|
42
|
+
The catalogue is one checked module, `packages/ui/src/catalog.ts`, exposed as
|
|
43
|
+
`@nanisoft/prism-ui/catalog`. It is the only list. Navigation, the generated
|
|
44
|
+
item documentation, the corpus and the agent surface all consume it, and none
|
|
45
|
+
keeps a second list. An entry carries the item's name, slug, kind, category,
|
|
46
|
+
description, source, public exports and status.
|
|
47
|
+
|
|
48
|
+
The internal shadcn registry is derived from, or validated against, the
|
|
49
|
+
catalogue. It is an integrity artifact and is never a public install lane.
|
|
50
|
+
|
|
51
|
+
## The styling contract
|
|
52
|
+
|
|
53
|
+
Prism ships one precompiled stylesheet and semantic custom properties. A
|
|
54
|
+
component consumes semantic utilities only (`bg-background`,
|
|
55
|
+
`text-muted-foreground`), never a ramp step and never a raw value. Because the
|
|
56
|
+
semantic names are shadcn's variable contract, an unmodified shadcn block or
|
|
57
|
+
theme works against the packs with no rename.
|
|
58
|
+
|
|
59
|
+
There is no override path. A consumer composes, passes content and data, and
|
|
60
|
+
chooses a pack and a mode. When Prism lacks something, it is requested upstream
|
|
61
|
+
rather than patched locally.
|
|
62
|
+
|
|
63
|
+
## Source to corpus
|
|
64
|
+
|
|
65
|
+
The corpus is a deterministic projection of the same inputs the site renders:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
catalogue + emitted declarations + authored MDX + demo sources
|
|
69
|
+
|
|
|
70
|
+
v
|
|
71
|
+
llms.txt, the Markdown mirror, and the MCP store
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The agent surface and the documentation site therefore cannot disagree about
|
|
75
|
+
what an item is: both read the catalogue, the types and the same demo files.
|
|
76
|
+
The detailed pipeline is in [Using LLMs](/overview/using-llms).
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Brand policy
|
|
2
|
+
|
|
3
|
+
What the MIT licence covers, what it does not, and how the Prism and NaniSoft names may be used.
|
|
4
|
+
|
|
5
|
+
The Prism packages are MIT-licensed, copyright NaniSoft, 2026. The code is yours
|
|
6
|
+
to use, study, modify and redistribute, including commercially. Attribution and
|
|
7
|
+
third-party notices live in the repository's `THIRD-PARTY-NOTICES.md`.
|
|
8
|
+
|
|
9
|
+
A code licence grants rights in the code. It does not grant rights in the brand,
|
|
10
|
+
and this page, not the licence, is where the brand rules live.
|
|
11
|
+
|
|
12
|
+
## What is ours
|
|
13
|
+
|
|
14
|
+
The names **Prism** and **NaniSoft**, the Prism wordmark, and the six pack names
|
|
15
|
+
(`default`, `blush`, `mint`, `lavender`, `sky` and `peach`) identify Prism as
|
|
16
|
+
built by NaniSoft.
|
|
17
|
+
|
|
18
|
+
## What you may do
|
|
19
|
+
|
|
20
|
+
- Say, accurately, that your product is *built with* Prism, and link here.
|
|
21
|
+
- Fork, modify and redistribute the code under MIT, including shipping your own
|
|
22
|
+
packs, as long as you do not present the result as Prism or as originating
|
|
23
|
+
from or endorsed by NaniSoft.
|
|
24
|
+
- Reference Prism in prose, talks and comparisons to identify the project, the
|
|
25
|
+
way any trademark is used to name the thing it names.
|
|
26
|
+
|
|
27
|
+
## What you may not do
|
|
28
|
+
|
|
29
|
+
- Distribute a modified or repackaged version under the Prism or NaniSoft names,
|
|
30
|
+
or with the Prism wordmark.
|
|
31
|
+
- Use the names or the wordmark as your product, domain or package name, or in a
|
|
32
|
+
way that implies NaniSoft endorsement or certification.
|
|
33
|
+
|
|
34
|
+
## Status
|
|
35
|
+
|
|
36
|
+
These marks are not registered, and they are protected by the licence's honesty
|
|
37
|
+
and by common-law rights. If you are unsure whether a use is fine, ask before
|
|
38
|
+
you ship, and if you spot a use of the brand that looks off, tell us.
|
|
39
|
+
|
|
40
|
+
A pack of your own is welcome and encouraged. It needs its own name: the six
|
|
41
|
+
pack names identify Prism, so a fork's palette takes a new one.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Composition
|
|
2
|
+
|
|
3
|
+
Choose the smallest Prism layer that owns the job, and promote repetition upward only when it earns it.
|
|
4
|
+
|
|
5
|
+
Prism's three layers answer three different questions. The skill is starting at
|
|
6
|
+
the bottom and moving up only when the product asks for it.
|
|
7
|
+
|
|
8
|
+
## Start with a Component
|
|
9
|
+
|
|
10
|
+
Reach for a Component when the product needs one accessible control or one
|
|
11
|
+
visual responsibility.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { Button } from '@nanisoft/prism-ui/components/button'
|
|
15
|
+
|
|
16
|
+
<Button onClick={save}>Save changes</Button>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Do not build a local button variant when the action differs only by consequence.
|
|
20
|
+
The `variant` prop already encodes the action hierarchy, and a local variant is
|
|
21
|
+
the start of a second design system.
|
|
22
|
+
|
|
23
|
+
## Promote repetition into a Block
|
|
24
|
+
|
|
25
|
+
A Block earns its place when the same section appears across routes or products.
|
|
26
|
+
It is pre-composed and product-agnostic, so the copy and the data stay at your
|
|
27
|
+
call site.
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { Stats01 } from '@nanisoft/prism-ui/blocks/stats-01'
|
|
31
|
+
|
|
32
|
+
<Stats01
|
|
33
|
+
title="This month"
|
|
34
|
+
stats={[
|
|
35
|
+
{ label: 'Active projects', value: '1,284', delta: 12, hint: 'vs last month' },
|
|
36
|
+
{ label: 'On track', value: '47.2%', delta: -3, hint: 'vs last month' },
|
|
37
|
+
]}
|
|
38
|
+
/>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Good Block candidates are sections that repeat: a hero, a metric row, a pricing
|
|
42
|
+
comparison, a closing call to action. A section that appears once is a local
|
|
43
|
+
composition, not a Block.
|
|
44
|
+
|
|
45
|
+
## Compose a Page last
|
|
46
|
+
|
|
47
|
+
A Page coordinates regions and a whole screen. It does not recreate component
|
|
48
|
+
behavior; it arranges what the lower layers already own.
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { Pricing01 } from '@nanisoft/prism-ui/blocks/pricing-01'
|
|
52
|
+
|
|
53
|
+
export function Plans() {
|
|
54
|
+
return (
|
|
55
|
+
<Pricing01
|
|
56
|
+
title="Pick a plan"
|
|
57
|
+
plans={plans}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## The composition rules
|
|
64
|
+
|
|
65
|
+
- Dependencies point downward: Pages, then Blocks, then Components.
|
|
66
|
+
- Keep behavior in the lowest layer that owns it.
|
|
67
|
+
- Keep brand colour in tokens, not in page CSS.
|
|
68
|
+
- Keep application data and routing in the application.
|
|
69
|
+
- Prefer a documented prop over a chain of local class overrides.
|
|
70
|
+
- Pass the heading level explicitly when a Block is the page's top-level
|
|
71
|
+
heading, and leave it at its default when a Block is composed under one.
|
|
72
|
+
|
|
73
|
+
## Where to go next
|
|
74
|
+
|
|
75
|
+
- Browse the [Components](/components) for the controls.
|
|
76
|
+
- Browse the [Blocks](/blocks) for the sections.
|
|
77
|
+
- Read [Theming](/overview/theming) before restyling anything.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Quickstart
|
|
2
|
+
|
|
3
|
+
Install Prism, load one stylesheet, choose a pack, and render your first Component and Block.
|
|
4
|
+
|
|
5
|
+
Prism is one npm boundary for tokens, components, blocks and pages. This guide
|
|
6
|
+
takes you from an empty project to a rendered block, and it names the one
|
|
7
|
+
stylesheet and the two attributes that do the theming.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @nanisoft/prism-ui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
React stays your application's dependency. Prism's Base UI runtime and Tailwind
|
|
16
|
+
are internal dependencies of the package; you install neither, and you import
|
|
17
|
+
neither.
|
|
18
|
+
|
|
19
|
+
## Load the one stylesheet
|
|
20
|
+
|
|
21
|
+
Import Prism's stylesheet once, beside your own global CSS. It carries the token
|
|
22
|
+
custom properties, all six packs, both modes, and every utility the components
|
|
23
|
+
use.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import '@nanisoft/prism-ui/styles.css'
|
|
27
|
+
import './globals.css'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If your project uses Tailwind, Prism's stylesheet is still a separate import.
|
|
31
|
+
Prism is not a Tailwind plugin, and it is not merged into your Tailwind build.
|
|
32
|
+
|
|
33
|
+
## Choose a pack and a mode
|
|
34
|
+
|
|
35
|
+
Theming is two markup attributes, and it works without JavaScript. `data-pack`
|
|
36
|
+
selects the palette, and the `dark` class selects the mode. The neutral base
|
|
37
|
+
pack is the absence of `data-pack`.
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
// app/layout.tsx
|
|
41
|
+
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
42
|
+
return (
|
|
43
|
+
<html lang="en" data-pack="lavender">
|
|
44
|
+
<body>{children}</body>
|
|
45
|
+
</html>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
To persist a choice and switch at runtime, mount `PrismProvider` and use
|
|
51
|
+
`usePrismTheme`. The provider is optional; the declarative attributes above need
|
|
52
|
+
no client runtime. See [Theming](/overview/theming) for the full model.
|
|
53
|
+
|
|
54
|
+
## Render the first Component
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
import { Button } from '@nanisoft/prism-ui/components/button'
|
|
58
|
+
|
|
59
|
+
export function SaveAction() {
|
|
60
|
+
return <Button onClick={save}>Save changes</Button>
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
A component is imported from its own subpath. The curated root barrel
|
|
65
|
+
(`@nanisoft/prism-ui`) is convenient for an app that uses most of the set, but a
|
|
66
|
+
single import is the smaller pull. The [Button page](/components/button) shows
|
|
67
|
+
its live demo and generated props table.
|
|
68
|
+
|
|
69
|
+
## Compose the first Block
|
|
70
|
+
|
|
71
|
+
A Block is a pre-composed section that takes its content as props. It ships no
|
|
72
|
+
copy of its own, so the heading, the actions and the numbers all come from you.
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { Cta01 } from '@nanisoft/prism-ui/blocks/cta-01'
|
|
76
|
+
|
|
77
|
+
export function Closing() {
|
|
78
|
+
return (
|
|
79
|
+
<Cta01
|
|
80
|
+
title="Start with one block"
|
|
81
|
+
description="Keep the tokens and reshape the rest."
|
|
82
|
+
action={{ label: 'Read the guides', href: '/guides' }}
|
|
83
|
+
/>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The block's own page lists the props it accepts and renders the same component
|
|
89
|
+
live. A Page composes blocks and components into a whole screen; see
|
|
90
|
+
[Composition](/overview/composition) for when to reach for each layer.
|
|
91
|
+
|
|
92
|
+
## What is next
|
|
93
|
+
|
|
94
|
+
- [Architecture](/overview/architecture) explains the package boundary and the
|
|
95
|
+
catalogue.
|
|
96
|
+
- [Theming](/overview/theming) covers packs, modes and flash-free switching.
|
|
97
|
+
- [Using LLMs](/overview/using-llms) wires an agent to the same source.
|