@nanisoft/prism-llms 0.3.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 +3998 -375
- 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 +7988 -1989
- package/dist/llms.txt +97 -91
- 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 +111 -0
- package/dist/md/blocks/site-header.md +119 -0
- 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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
The multi-line text control for a form.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Textarea } from '@nanisoft/prism-ui/components/textarea'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
A Textarea is the multi-line text control. It renders a native `<textarea>` with
|
|
12
|
+
a minimum height and a resize grip, so a reader can see more than one line of
|
|
13
|
+
what they have written.
|
|
14
|
+
|
|
15
|
+
It shares the Input's focus treatment: a full-strength ring on focus and a
|
|
16
|
+
destructive border and ring when the control is marked with `aria-invalid`. The
|
|
17
|
+
height follows the content where the browser supports field sizing, and `rows`
|
|
18
|
+
remains the fallback.
|
|
19
|
+
|
|
20
|
+
## Guidelines
|
|
21
|
+
|
|
22
|
+
### When to use
|
|
23
|
+
|
|
24
|
+
Use a Textarea for free-form text that runs past a line: a note, a comment, a
|
|
25
|
+
bio, a support message, a release description.
|
|
26
|
+
|
|
27
|
+
Pair it with a Field label and a helper line, and set `rows` to a height that
|
|
28
|
+
shows the expected answer rather than one line.
|
|
29
|
+
|
|
30
|
+
### When not to use
|
|
31
|
+
|
|
32
|
+
Do not use a Textarea for a single-line value. A name or a search term does not
|
|
33
|
+
need a resize grip.
|
|
34
|
+
|
|
35
|
+
Do not use one for structured data the product can model as separate fields. If
|
|
36
|
+
the parts have names, they deserve their own controls and validation.
|
|
37
|
+
|
|
38
|
+
Do not use a Textarea for rich text. Formatting, links and embeds need an
|
|
39
|
+
editor the design system does not ship.
|
|
40
|
+
|
|
41
|
+
### Best practices
|
|
42
|
+
|
|
43
|
+
- Set a minimum height that matches the expected answer. A box that shows one
|
|
44
|
+
line suggests the answer is one line.
|
|
45
|
+
- Keep the label above the control and the helper line below it, exactly as an
|
|
46
|
+
Input does, so a form reads as one pattern.
|
|
47
|
+
- Leave the resize grip available. Readers with motor or vision differences
|
|
48
|
+
often size the box to the draft they are writing.
|
|
49
|
+
- Show the current and maximum length next to the field when there is a limit,
|
|
50
|
+
and count down rather than up so the remaining space is obvious.
|
|
51
|
+
- Mark a failed field with `aria-invalid` and put the reason in a FieldError.
|
|
52
|
+
The border is not the message.
|
|
53
|
+
|
|
54
|
+
### Content guidelines
|
|
55
|
+
|
|
56
|
+
- A helper line may state the limit or the format: "Up to 500 characters",
|
|
57
|
+
"Plain text only".
|
|
58
|
+
- A placeholder may sketch the expected answer, and should be shorter than the
|
|
59
|
+
label it sits under.
|
|
60
|
+
- Do not repeat the label inside the placeholder. The two are read together by
|
|
61
|
+
a screen reader.
|
|
62
|
+
|
|
63
|
+
**A textarea with a label and helper line, plus a disabled one.**
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import {
|
|
67
|
+
Field,
|
|
68
|
+
FieldDescription,
|
|
69
|
+
FieldLabel,
|
|
70
|
+
} from '@nanisoft/prism-ui/components/field'
|
|
71
|
+
import { Textarea } from '@nanisoft/prism-ui/components/textarea'
|
|
72
|
+
|
|
73
|
+
/** A textarea with a label and helper line, plus a disabled one. */
|
|
74
|
+
export default function TextareaDemo() {
|
|
75
|
+
return (
|
|
76
|
+
<div className="flex max-w-measure-narrow flex-col gap-4">
|
|
77
|
+
<Field>
|
|
78
|
+
<FieldLabel htmlFor="textarea-note">Release note</FieldLabel>
|
|
79
|
+
<Textarea
|
|
80
|
+
id="textarea-note"
|
|
81
|
+
rows={4}
|
|
82
|
+
placeholder="What changed, and who it affects."
|
|
83
|
+
/>
|
|
84
|
+
<FieldDescription>Plain text. Markdown is added later.</FieldDescription>
|
|
85
|
+
</Field>
|
|
86
|
+
<Field>
|
|
87
|
+
<FieldLabel htmlFor="textarea-summary">Generated summary</FieldLabel>
|
|
88
|
+
<Textarea
|
|
89
|
+
id="textarea-summary"
|
|
90
|
+
defaultValue="Written by the pipeline."
|
|
91
|
+
disabled
|
|
92
|
+
/>
|
|
93
|
+
</Field>
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Props
|
|
100
|
+
|
|
101
|
+
> Extends: the native `<textarea>` element. No additional Prism-specific props.
|
|
@@ -1,14 +1,102 @@
|
|
|
1
1
|
# Tooltip
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The short label shown on hover or focus beside a control.
|
|
4
4
|
|
|
5
|
-
```
|
|
6
|
-
import { Tooltip } from '@nanisoft/prism-ui/components'
|
|
5
|
+
```tsx
|
|
6
|
+
import { Tooltip, TooltipTrigger, TooltipContent } from '@nanisoft/prism-ui/components/tooltip'
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Overview
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
A Tooltip is a short label that appears on hover or focus beside the control it
|
|
12
|
+
explains. It ships as `Tooltip`, `TooltipTrigger` and `TooltipContent`, all from
|
|
13
|
+
the same module. The trigger stays focusable, and the tooltip opens on keyboard
|
|
14
|
+
focus as well as on hover, so it is not a mouse-only affordance.
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
The content is positioned by the library and flips when there is no room on the
|
|
17
|
+
chosen side. Escape dismisses it. Because it is unavailable on touch, a tooltip
|
|
18
|
+
never carries the only copy of information a reader needs.
|
|
19
|
+
|
|
20
|
+
## Guidelines
|
|
21
|
+
|
|
22
|
+
### When to use
|
|
23
|
+
|
|
24
|
+
Use a Tooltip to name or briefly explain a control that is already visible: an
|
|
25
|
+
icon-only button, an abbreviated label, or a term a reader may not know.
|
|
26
|
+
|
|
27
|
+
### When not to use
|
|
28
|
+
|
|
29
|
+
Do not put essential content in a Tooltip. Keyboard and pointer users can reach
|
|
30
|
+
it, but touch users cannot, so anything required belongs in visible text.
|
|
31
|
+
|
|
32
|
+
Do not use a Tooltip for a form field's validation message. Errors need to be
|
|
33
|
+
persistent and programmatically tied to the field; a tooltip disappears.
|
|
34
|
+
|
|
35
|
+
Do not use one for rich content such as a form or a menu. That is a Popover.
|
|
36
|
+
|
|
37
|
+
### Best practices
|
|
38
|
+
|
|
39
|
+
- Keep the content to a short phrase. A sentence is the ceiling; a paragraph
|
|
40
|
+
belongs in a Popover or on the page.
|
|
41
|
+
- Attach the Tooltip to a focusable trigger. A tooltip on a plain span is
|
|
42
|
+
unreachable by keyboard.
|
|
43
|
+
- Give an icon-only trigger an `aria-label` as well. The tooltip is visual help;
|
|
44
|
+
the accessible name must stand on its own.
|
|
45
|
+
- Choose a side that does not cover the content the reader is looking at, and
|
|
46
|
+
let the library flip it near an edge.
|
|
47
|
+
- Do not nest interactive content in a Tooltip. It opens on focus and closes on
|
|
48
|
+
blur, so anything inside it is hard to reach.
|
|
49
|
+
|
|
50
|
+
### Content guidelines
|
|
51
|
+
|
|
52
|
+
- Write a noun phrase or one short sentence that adds information, not a repeat
|
|
53
|
+
of the trigger's label.
|
|
54
|
+
- Use sentence case and no closing period on a fragment; use one on a full
|
|
55
|
+
sentence.
|
|
56
|
+
- Never make the tooltip the first place a key term appears. Explain the term
|
|
57
|
+
where it is introduced, and let the tooltip remind.
|
|
58
|
+
|
|
59
|
+
**Tooltips on a text trigger and on an icon-only control.**
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
'use client'
|
|
63
|
+
|
|
64
|
+
import {
|
|
65
|
+
Tooltip,
|
|
66
|
+
TooltipContent,
|
|
67
|
+
TooltipTrigger,
|
|
68
|
+
} from '@nanisoft/prism-ui/components/tooltip'
|
|
69
|
+
|
|
70
|
+
/** Tooltips on a text trigger and on an icon-only control. */
|
|
71
|
+
export default function TooltipDemo() {
|
|
72
|
+
return (
|
|
73
|
+
<div className="flex flex-wrap items-center gap-8 text-sm">
|
|
74
|
+
<Tooltip>
|
|
75
|
+
<TooltipTrigger className="underline decoration-dotted underline-offset-4">
|
|
76
|
+
Beta feature
|
|
77
|
+
</TooltipTrigger>
|
|
78
|
+
<TooltipContent>Not covered by the uptime target.</TooltipContent>
|
|
79
|
+
</Tooltip>
|
|
80
|
+
<Tooltip>
|
|
81
|
+
<TooltipTrigger aria-label="Copy link" className="font-medium">
|
|
82
|
+
Copy link
|
|
83
|
+
</TooltipTrigger>
|
|
84
|
+
<TooltipContent side="bottom">Copies the current page URL.</TooltipContent>
|
|
85
|
+
</Tooltip>
|
|
86
|
+
</div>
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Props
|
|
92
|
+
|
|
93
|
+
**`open`** `boolean` · optional · default: — — The controlled open state.
|
|
94
|
+
**`defaultOpen`** `boolean` · optional · default: — — The initially open state, for an uncontrolled tooltip.
|
|
95
|
+
**`onOpenChange`** `(open: boolean) => void` · optional · default: — — Called when the open state changes.
|
|
96
|
+
**`disabled`** `boolean` · optional · default: — — Whether the tooltip is disabled.
|
|
97
|
+
**`children`** `React.ReactNode` · optional · default: — — The trigger and content.
|
|
98
|
+
**`delay`** `number` · optional · default: `600` — How long to wait before opening on hover, in milliseconds.
|
|
99
|
+
**`closeDelay`** `number` · optional · default: `0` — How long to wait before closing, in milliseconds.
|
|
100
|
+
**`side`** `'top' | 'right' | 'bottom' | 'left'` · optional · default: `top` — Which side of the trigger the tooltip is placed on.
|
|
101
|
+
**`align`** `'start' | 'center' | 'end'` · optional · default: `center` — How the tooltip aligns against the trigger.
|
|
102
|
+
**`sideOffset`** `number` · optional · default: `4` — The distance in pixels between the trigger and the tooltip.
|
|
@@ -1,14 +1,89 @@
|
|
|
1
1
|
# Typography
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The text and heading components that apply the type scale.
|
|
4
4
|
|
|
5
|
-
```
|
|
6
|
-
import {
|
|
5
|
+
```tsx
|
|
6
|
+
import { Text, Heading } from '@nanisoft/prism-ui/components/typography'
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Overview
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Typography is the pair of text exports that apply the type scale. `Heading`
|
|
12
|
+
renders a document heading and `Text` renders a run of body copy, both from the
|
|
13
|
+
same module.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
`Heading` separates the element from the visual step. The `as` prop chooses the
|
|
16
|
+
outline, and `size` chooses the scale, so a section that needs an `h2` attuned
|
|
17
|
+
to a compact card keeps the outline while taking a smaller visual size. `Text`
|
|
18
|
+
offers `size` and a `tone`, where `tone="muted"` is the supporting copy that
|
|
19
|
+
sits beside a heading.
|
|
20
|
+
|
|
21
|
+
## Guidelines
|
|
22
|
+
|
|
23
|
+
### When to use
|
|
24
|
+
|
|
25
|
+
Use `Heading` and `Text` for long-form content and documentation, where the
|
|
26
|
+
outline and the scale are the structure the reader navigates by.
|
|
27
|
+
|
|
28
|
+
Use the `as` and `size` split when a heading's place in the outline and its
|
|
29
|
+
visual weight are not the same decision.
|
|
30
|
+
|
|
31
|
+
### When not to use
|
|
32
|
+
|
|
33
|
+
Do not use Typography for a control label or a card title. Components such as
|
|
34
|
+
Button and CardTitle own their own text treatment, and restyling them from the
|
|
35
|
+
outside is the override the system forbids.
|
|
36
|
+
|
|
37
|
+
Do not use `Heading` to make text bigger. A paragraph that is important is still
|
|
38
|
+
a paragraph; emphasis comes from placement and copy.
|
|
39
|
+
|
|
40
|
+
Do not use Typography to fix spacing. Rhythm comes from the container, not from
|
|
41
|
+
a text size chosen to close a gap.
|
|
42
|
+
|
|
43
|
+
### Best practices
|
|
44
|
+
|
|
45
|
+
- Choose `as` by the document outline and `size` by the layout. One page has one
|
|
46
|
+
`h1`, and the levels below it never skip a step.
|
|
47
|
+
- Let `Heading` default to `h2`. A block or an article body is composed under a
|
|
48
|
+
page heading, so the surrounding document already owns the top level.
|
|
49
|
+
- Keep a prose measure near the container token. A line that runs the full
|
|
50
|
+
window is hard to track back to its start.
|
|
51
|
+
- Use `tone="muted"` for supporting copy and keep it to a sentence or two. If
|
|
52
|
+
the muted text carries the point, promote it.
|
|
53
|
+
- Keep headings in sentence case and leave the full stop off. A heading is a
|
|
54
|
+
label, not a sentence.
|
|
55
|
+
- Do not scale text with `className`. Size is a token decision, and a one-off
|
|
56
|
+
value breaks the scale for the next reader.
|
|
57
|
+
|
|
58
|
+
**The scale: a display heading, a subheading and both text tones.**
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import {
|
|
62
|
+
Heading,
|
|
63
|
+
Text,
|
|
64
|
+
} from '@nanisoft/prism-ui/components/typography'
|
|
65
|
+
|
|
66
|
+
/** The scale: a display heading, a subheading and both text tones. */
|
|
67
|
+
export default function TypographyDemo() {
|
|
68
|
+
return (
|
|
69
|
+
<div className="flex max-w-measure flex-col gap-3">
|
|
70
|
+
<Heading as="h3" size="3xl">
|
|
71
|
+
Release notes
|
|
72
|
+
</Heading>
|
|
73
|
+
<Text tone="muted">What shipped in the last two weeks, in reading order.</Text>
|
|
74
|
+
<Heading as="h4" size="xl">
|
|
75
|
+
Fixes
|
|
76
|
+
</Heading>
|
|
77
|
+
<Text>Three defects in the table toolbar and one in the theme switcher.</Text>
|
|
78
|
+
<Text as="span" size="sm" tone="muted">
|
|
79
|
+
Updated 12 August.
|
|
80
|
+
</Text>
|
|
81
|
+
</div>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Props
|
|
87
|
+
|
|
88
|
+
**`size`** `"sm" | "lg" | "base" | null | undefined` · optional · default: —
|
|
89
|
+
**`tone`** `"default" | "muted" | null | undefined` · optional · default: —
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# About content
|
|
2
|
+
|
|
3
|
+
What "content" means at NaniSoft, and the scope of this section.
|
|
4
|
+
|
|
5
|
+
Content is the information in a user interface that works alongside the visual
|
|
6
|
+
design. It includes every string a person reads inside a product: labels,
|
|
7
|
+
headings, helper text, button text, empty states, error messages, tooltips,
|
|
8
|
+
notifications and confirmation dialogs.
|
|
9
|
+
|
|
10
|
+
RULE: Content is product text. It is not marketing copy, and it does not live on
|
|
11
|
+
this documentation site.
|
|
12
|
+
|
|
13
|
+
## Who this section is for
|
|
14
|
+
|
|
15
|
+
This section is for anyone at NaniSoft who writes text a customer will read:
|
|
16
|
+
designers writing labels, engineers writing empty states and errors, product
|
|
17
|
+
managers writing release notes, and support staff writing help text.
|
|
18
|
+
|
|
19
|
+
RULE: Anyone who writes product copy MUST follow this section. It applies to
|
|
20
|
+
first drafts as much as to reviews.
|
|
21
|
+
|
|
22
|
+
## What this section is not
|
|
23
|
+
|
|
24
|
+
This section is not a style guide for source code, commit messages or internal
|
|
25
|
+
documents. Those have their own conventions. It is also not the design system's
|
|
26
|
+
vocabulary; that is the [Glossary](/content/glossary).
|
|
27
|
+
|
|
28
|
+
## The register
|
|
29
|
+
|
|
30
|
+
RULE: This section MUST use RFC 2119 keywords (MUST, SHOULD, MAY) so a rule can
|
|
31
|
+
be read unambiguously, and it MUST prefix each rule line with `RULE:` so the
|
|
32
|
+
rules are machine-greppable.
|
|
33
|
+
|
|
34
|
+
Outside this section, Prism write in plain language and avoid those keywords.
|
|
35
|
+
The difference is deliberate: a rule that a reader must follow is stated as a
|
|
36
|
+
rule, and everything else is explanation.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Audience
|
|
2
|
+
|
|
3
|
+
The three people NaniSoft product copy serves, and what each one needs from a sentence.
|
|
4
|
+
|
|
5
|
+
Product copy serves three audiences. A piece of text MUST land for the person who
|
|
6
|
+
reads it in that moment, and the three do not always want the same thing.
|
|
7
|
+
|
|
8
|
+
## The operator
|
|
9
|
+
|
|
10
|
+
The operator uses the product to finish a job, often repeatedly. They know the
|
|
11
|
+
interface and resent being told what they already know, but they need
|
|
12
|
+
confirmation that a consequential action will do what they expect.
|
|
13
|
+
|
|
14
|
+
- They read errors, confirmations and destructive-action warnings closely.
|
|
15
|
+
- They skip onboarding and explanation.
|
|
16
|
+
- RULE: For the operator, be brief and specific. State the consequence, not the
|
|
17
|
+
mechanism.
|
|
18
|
+
|
|
19
|
+
## The evaluator
|
|
20
|
+
|
|
21
|
+
The evaluator is deciding whether the product does what they need. They meet the
|
|
22
|
+
product once, with a task in mind, and they are quick to leave.
|
|
23
|
+
|
|
24
|
+
- They read empty states, first-run text and headings.
|
|
25
|
+
- They need the next step to be obvious.
|
|
26
|
+
- RULE: For the evaluator, name the outcome and give exactly one clear next
|
|
27
|
+
action.
|
|
28
|
+
|
|
29
|
+
## The builder
|
|
30
|
+
|
|
31
|
+
The builder integrates NaniSoft into something they own. They read documentation
|
|
32
|
+
more than product copy, but the two meet in import errors, configuration screens
|
|
33
|
+
and generated code.
|
|
34
|
+
|
|
35
|
+
- They need exact names: packs, tokens, props and package paths.
|
|
36
|
+
- They are unforgiving of a label that does not match the API.
|
|
37
|
+
- RULE: For the builder, use the exact, cased term from the glossary. Do not
|
|
38
|
+
paraphrase a name of anything.
|
|
39
|
+
|
|
40
|
+
## Reading level
|
|
41
|
+
|
|
42
|
+
RULE: Write for a general professional audience. Prefer common words, active
|
|
43
|
+
voice and a single idea per sentence.
|
|
@@ -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" />
|