@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,90 @@
|
|
|
1
|
+
# Hero01
|
|
2
|
+
|
|
3
|
+
A centered marketing hero with an optional eyebrow and one or two actions.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Hero01 } from '@nanisoft/prism-ui/blocks/hero-01'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Hero01 is the opening band of a marketing page: an optional eyebrow, a headline,
|
|
12
|
+
an optional supporting line, and up to two actions. The `01` suffix is the
|
|
13
|
+
variant ordinal of the hero family, and this one is the centered form.
|
|
14
|
+
|
|
15
|
+
Every string is a prop. The block ships no eyebrow and no headline, because a
|
|
16
|
+
hero with hardcoded copy makes every consumer inherit a claim about their own
|
|
17
|
+
product.
|
|
18
|
+
|
|
19
|
+
## Guidelines
|
|
20
|
+
|
|
21
|
+
### When to use
|
|
22
|
+
|
|
23
|
+
Use Hero01 as the first band of a page whose purpose is to introduce a product
|
|
24
|
+
or a release. It works when there is one clear headline and one clear next
|
|
25
|
+
action.
|
|
26
|
+
|
|
27
|
+
### When not to use
|
|
28
|
+
|
|
29
|
+
Do not use Hero01 inside an application screen. It is a marketing composition,
|
|
30
|
+
and its centered, generous layout competes with the task the screen exists to
|
|
31
|
+
support.
|
|
32
|
+
|
|
33
|
+
Do not use it twice on one page. A second hero splits the reader's attention and
|
|
34
|
+
leaves two claims competing for the same position.
|
|
35
|
+
|
|
36
|
+
Do not use it when the headline is really a section heading. Use `SectionHeading`
|
|
37
|
+
inside `Section` instead.
|
|
38
|
+
|
|
39
|
+
### Best practices
|
|
40
|
+
|
|
41
|
+
- Pass one primary action and at most one supporting action. More than two
|
|
42
|
+
actions turn a decision into a menu.
|
|
43
|
+
- Give the first action `default` and the second `outline`. The block already
|
|
44
|
+
defaults to that order.
|
|
45
|
+
- Set `headingLevel="h1"` when the hero is the page's top-level heading. Use the
|
|
46
|
+
default `h2` when the page already owns an `h1`.
|
|
47
|
+
- Pass an eyebrow only when it is true and current. It renders nothing when
|
|
48
|
+
absent, so the honest state is no eyebrow.
|
|
49
|
+
|
|
50
|
+
### Content guidelines
|
|
51
|
+
|
|
52
|
+
- Keep the headline under about eight words and let it wrap to two lines at
|
|
53
|
+
most.
|
|
54
|
+
- Write the headline as an outcome, not a feature name.
|
|
55
|
+
- The description is one sentence and states who the product is for or what
|
|
56
|
+
changes if the reader continues.
|
|
57
|
+
|
|
58
|
+
**The centered hero, with a heading level that nests under the page.**
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { Hero01 } from '@nanisoft/prism-ui/blocks/hero-01'
|
|
62
|
+
|
|
63
|
+
/** The centered hero, with a heading level that nests under the page. */
|
|
64
|
+
export default function Hero01Demo() {
|
|
65
|
+
return (
|
|
66
|
+
<Hero01
|
|
67
|
+
headingLevel="h3"
|
|
68
|
+
eyebrow="Preview"
|
|
69
|
+
title="A headline that fits on two lines"
|
|
70
|
+
description="One or two sentences of supporting copy, so you can judge the measure and the spacing around it."
|
|
71
|
+
actions={[{ label: 'Primary action' }, { label: 'Secondary', variant: 'outline' }]}
|
|
72
|
+
/>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Props
|
|
78
|
+
|
|
79
|
+
**`eyebrow`** `string` · optional · default: — — Optional label above the headline. Intentionally has no default: an earlier version shipped a hardcoded "Now in open beta" pill, which meant every consumer who installed this block inherited a status badge making a claim about their product. Pass one if you mean it.
|
|
80
|
+
**`title`** `string` · required · default: —
|
|
81
|
+
**`description`** `string` · optional · default: —
|
|
82
|
+
**`actions`** `HeroAction[]` · optional · default: —
|
|
83
|
+
**`align`** `'center' | 'left'` · optional · default: `'center'` — Whether the copy is centered in the band or set flush to the left edge of the container. This is the hero's own alignment and not `SectionHeading`'s, because the two are not the same decision: a left-aligned hero is nearly always the left half of a two-column band with a panel or an instrument beside it, and that column is narrower than the container, so the alignment has to be the hero's before the container can be anything. Three of the four NaniSoft sites compose a left-aligned hero, each beside a panel, and each wrote the alignment by hand because this Block was the centered form only. It has no visual effect on its own, which is the point: it aligns the copy inside whatever width it is given.
|
|
84
|
+
**`headingLevel`** `HeadingLevel` · optional · default: — — Heading level for the title. Defaults to `h2` because a block is composed, not a page: it installs into a consumer's layout and renders inside catalog previews, so the surrounding document already owns the `h1`. A page that uses this block as its top-level heading opts in with `headingLevel="h1"`; a document that already names this section in its own heading passes one level deeper. See `HeadingLevel`.
|
|
85
|
+
|
|
86
|
+
## Composition
|
|
87
|
+
|
|
88
|
+
**`exports`** `Hero01` — the public runtime names this Block promises
|
|
89
|
+
**`source`** `packages/ui/src/blocks/hero-01/index.tsx` — the file this Block is defined in
|
|
90
|
+
**`dependencies`** `Button, Section` — the public Prism exports this item composes
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# InstrumentPanel01
|
|
2
|
+
|
|
3
|
+
A bordered panel with a titled bar, a state dot with the words beside it, and a slot for the instrument.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { InstrumentPanel01 } from '@nanisoft/prism-ui/blocks/instrument-panel-01'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
InstrumentPanel01 is a bordered panel with a titled bar: the frame a live view of
|
|
12
|
+
something is shown in, beside the copy that explains it.
|
|
13
|
+
|
|
14
|
+
Three of the four NaniSoft sites compose this as the right half of their hero,
|
|
15
|
+
and each one wrote the same four things by hand: a bordered panel, a bar across
|
|
16
|
+
the top with a small state dot on the left, the name of the view in the middle and
|
|
17
|
+
something on the right, the instrument below, and a footnote under it. Each also
|
|
18
|
+
gave the panel a definite height, because an instrument whose height is whatever
|
|
19
|
+
its content is makes the hero beside it jump while it loads.
|
|
20
|
+
|
|
21
|
+
**The panel owns the frame, never the instrument.** What goes inside is whatever
|
|
22
|
+
you composed, and that is not a limitation: an instrument is the one thing in this
|
|
23
|
+
system Prism cannot draw, because it is a view of your data and every product's
|
|
24
|
+
data is a different drawing.
|
|
25
|
+
|
|
26
|
+
## Guidelines
|
|
27
|
+
|
|
28
|
+
### When to use
|
|
29
|
+
|
|
30
|
+
Use InstrumentPanel01 where a reader needs to see a view of something and the
|
|
31
|
+
words beside it, and the two are one unit: a hero, a documentation sidebar, a
|
|
32
|
+
dashboard panel.
|
|
33
|
+
|
|
34
|
+
Use `state` when the content updates on its own, or when a reader would otherwise
|
|
35
|
+
think it does. A panel showing a static snapshot and one showing a live view look
|
|
36
|
+
identical otherwise, and the difference is the whole reason to publish the panel.
|
|
37
|
+
|
|
38
|
+
### When not to use
|
|
39
|
+
|
|
40
|
+
Do not use it for a static illustration. A picture with a caption is a `Card` with
|
|
41
|
+
`CardContent`, and a panel bar saying "live" above a still image is a lie.
|
|
42
|
+
|
|
43
|
+
Do not use it as a modal or a drawer. That is `Dialog`.
|
|
44
|
+
|
|
45
|
+
Do not use `state="paused"` to mean "loading". A state is a claim about the
|
|
46
|
+
content, and a spinner is a claim about the fetch.
|
|
47
|
+
|
|
48
|
+
### Best practices
|
|
49
|
+
|
|
50
|
+
- **The state dot is `aria-hidden` and the words beside it are not.** All three
|
|
51
|
+
sites that draw a dot write the state in words, and that is the rule: a dot is a
|
|
52
|
+
shape, and a reader who cannot see `success` has learned nothing from it. The
|
|
53
|
+
block throws if you pass a state with no `stateLabel`.
|
|
54
|
+
- Use the `actions` slot for a control the panel does not own: a range selector, a
|
|
55
|
+
pause button, a link to the full view.
|
|
56
|
+
- Give the panel a definite height from your side. The frame does not set one,
|
|
57
|
+
because the instrument's height is the instrument's business.
|
|
58
|
+
- Use `caption` when the panel stands alone on a page. It is the figure's
|
|
59
|
+
accessible name and no visible text.
|
|
60
|
+
|
|
61
|
+
### Content guidelines
|
|
62
|
+
|
|
63
|
+
- Keep `label` to one line. It is a bar, and a label that wraps is a bar with two
|
|
64
|
+
lines in it.
|
|
65
|
+
- Write `stateLabel` in the product's own vocabulary: "live view", "snapshot",
|
|
66
|
+
"paused". Prism does not decide what a system is doing.
|
|
67
|
+
- Use `footnote` for what a reader needs to know before trusting the view: where
|
|
68
|
+
the data came from, how fresh it is, what is not shown.
|
|
69
|
+
|
|
70
|
+
**The frame around an instrument: a titled bar, a state, a slot and a footnote.**
|
|
71
|
+
|
|
72
|
+
```tsx
|
|
73
|
+
import { InstrumentPanel01 } from '@nanisoft/prism-ui/blocks/instrument-panel-01'
|
|
74
|
+
|
|
75
|
+
/** The frame around an instrument: a titled bar, a state, a slot and a footnote. */
|
|
76
|
+
export default function InstrumentPanel01Demo() {
|
|
77
|
+
return (
|
|
78
|
+
<InstrumentPanel01
|
|
79
|
+
label="The estate, as one graph"
|
|
80
|
+
state="live"
|
|
81
|
+
stateLabel="live view"
|
|
82
|
+
caption="The access graph"
|
|
83
|
+
footnote="Edges are the paths a person can actually take, not the ones they might."
|
|
84
|
+
actions={<span className="font-mono">last 60s</span>}
|
|
85
|
+
>
|
|
86
|
+
<div className="text-muted-foreground flex h-32 items-center justify-center rounded-lg border border-dashed text-xs">
|
|
87
|
+
The instrument goes here: a graph, a chart, a canvas, your own markup.
|
|
88
|
+
</div>
|
|
89
|
+
</InstrumentPanel01>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Props
|
|
95
|
+
|
|
96
|
+
**`label`** `string` · required · default: — — What the panel shows, in one phrase: "the estate, as one graph", "the loop, live". It is the panel's title and the only visible text the Block adds, so it is required.
|
|
97
|
+
**`state`** `PanelState` · optional · default: `'neutral'` — The state the title bar claims about the content. `neutral` renders a quiet dot and no words; `live` and `paused` require `stateLabel` with them, because the words are what a reader is told and the dot is only what a reader sees.
|
|
98
|
+
**`stateLabel`** `string` · optional · default: — — The words for the state, in the product's own vocabulary. Required whenever `state` is `live` or `paused`: "live view", "paused", "snapshotting" and "verified" are four different claims about four different systems, and none of them is Prism's to choose.
|
|
99
|
+
**`actions`** `ReactNode` · optional · default: — — A slot on the right of the title bar, for a control the panel does not own: a range selector, a pause button, a link to the full view. A slot rather than a prop, because every one of those is application state.
|
|
100
|
+
**`children`** `ReactNode` · required · default: — — The instrument. Any node the consumer composes: a graph, a chart, a table, a canvas, a placeholder in a static export. The Block draws the frame and the bar and nothing else.
|
|
101
|
+
**`footnote`** `ReactNode` · optional · default: — — The line under the instrument, for what a reader needs to know before trusting it: where the data came from, how fresh it is, what is not shown.
|
|
102
|
+
**`caption`** `string` · optional · default: — — A caption for the panel as a whole, published as the frame's accessible name and as no visible text. It is how a reader navigating by figure knows which figure they have landed on.
|
|
103
|
+
**`className`** `string` · optional · default: — — Layout only, exactly as on every Component. Changing a Prism-owned visual property from here is prohibited.
|
|
104
|
+
|
|
105
|
+
## Composition
|
|
106
|
+
|
|
107
|
+
**`exports`** `InstrumentPanel01` — the public runtime names this Block promises
|
|
108
|
+
**`source`** `packages/ui/src/blocks/instrument-panel-01/index.tsx` — the file this Block is defined in
|
|
109
|
+
**`dependencies`** `—` — the public Prism exports this item composes
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# LogoStrip01
|
|
2
|
+
|
|
3
|
+
A single line of short phrases: the transition band between a hero and the section that follows it.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { LogoStrip01 } from '@nanisoft/prism-ui/blocks/logo-strip-01'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
LogoStrip01 is a single line of short items: the transition band between a hero
|
|
12
|
+
and the section that follows it.
|
|
13
|
+
|
|
14
|
+
All four NaniSoft sites compose this band, immediately after the hero and before
|
|
15
|
+
the first numbered section, and each one wrote it as the same thing: a row of
|
|
16
|
+
three to six short phrases in muted text, with no heading at all. Four
|
|
17
|
+
hand-written strips, four sets of site CSS, and one question each of them
|
|
18
|
+
answered differently - whether the strip is a list, a paragraph with separators,
|
|
19
|
+
or a decorative row of spans.
|
|
20
|
+
|
|
21
|
+
It is a `ul`, so a screen reader hears how many items there are before it hears
|
|
22
|
+
the first one. That is the whole answer to the question: a strip whose items are
|
|
23
|
+
spans in a `div` is announced as one run of text with no count, and a reader
|
|
24
|
+
deciding whether to keep listening has nothing to weigh.
|
|
25
|
+
|
|
26
|
+
## Guidelines
|
|
27
|
+
|
|
28
|
+
### When to use
|
|
29
|
+
|
|
30
|
+
Use LogoStrip01 immediately after a hero, to say in one quiet line what the hero
|
|
31
|
+
did not have room for.
|
|
32
|
+
|
|
33
|
+
Use it for three to eight short phrases. Fewer is a sentence, and more is a
|
|
34
|
+
paragraph.
|
|
35
|
+
|
|
36
|
+
### When not to use
|
|
37
|
+
|
|
38
|
+
Do not use it for logos. This block takes strings and renders them as text, at the
|
|
39
|
+
same size as the body. A row of marks is a `ProductGrid01` and a row of images is
|
|
40
|
+
neither of these.
|
|
41
|
+
|
|
42
|
+
Do not use it as a marquee. **The strip does not move.** A band of items that
|
|
43
|
+
slides is an entrance animation, and this system has none: motion is state
|
|
44
|
+
feedback only. What the four sites wanted from their strips was a second, quieter
|
|
45
|
+
statement of what the product is, and repeating the type does that without
|
|
46
|
+
anything moving.
|
|
47
|
+
|
|
48
|
+
Do not use it with more than about eight items. It wraps onto three lines on a
|
|
49
|
+
phone and stops being a band; a longer set belongs in a `StackGrid01`.
|
|
50
|
+
|
|
51
|
+
### Best practices
|
|
52
|
+
|
|
53
|
+
- Give it a `label`, which is required. It is the accessible name and no visible
|
|
54
|
+
text, so a reader navigating by list knows what they have landed on, and the
|
|
55
|
+
word is yours because a Block that ships no copy ships no reader-facing copy.
|
|
56
|
+
- Keep every item to one or two words. The strip is scanned, not read.
|
|
57
|
+
- Place it once per page, between the hero and the first section.
|
|
58
|
+
|
|
59
|
+
### Content guidelines
|
|
60
|
+
|
|
61
|
+
- Write items as names, not as claims. A strip of adjectives is a slogan.
|
|
62
|
+
- Keep the register even across the items. One long item among four short ones
|
|
63
|
+
makes the long one the only one read.
|
|
64
|
+
- Do not repeat the hero's own words. The strip is the second statement, not the
|
|
65
|
+
first one again.
|
|
66
|
+
|
|
67
|
+
**The transition band: one line of short phrases, as a list.**
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
import { LogoStrip01 } from '@nanisoft/prism-ui/blocks/logo-strip-01'
|
|
71
|
+
|
|
72
|
+
/** The transition band: one line of short phrases, as a list. */
|
|
73
|
+
export default function LogoStrip01Demo() {
|
|
74
|
+
return (
|
|
75
|
+
<LogoStrip01
|
|
76
|
+
label="Data sources"
|
|
77
|
+
items={['Fyers v3', 'yfinance', 'nselib / nse-xbrl', 'NSE filings']}
|
|
78
|
+
/>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Props
|
|
84
|
+
|
|
85
|
+
**`items`** `readonly LogoStripItem[]` · required · default: — — The items, in the order a reader should meet them. Order is the caller's because it is a claim about which item matters first.
|
|
86
|
+
**`label`** `string` · required · default: — — The strip's accessible name, for a strip that is not inside a region the reader can already name. It is rendered as the list's name and as no visible text, because the items are the visible content and a heading above them would be a heading about a heading. It is required because it is a word a reader hears. A Block that ships no copy ships no reader-facing copy either, so "Highlights" is not this Block's to choose: on one site the strip is a list of data sources and on another it is a list of capabilities, and the word that says which is the caller's.
|
|
87
|
+
**`eyebrow`** `string` · optional · default: — — Optional label above the section title. See the No-Default-Eyebrow Rule.
|
|
88
|
+
**`title`** `string` · optional · default: — — The section title. Omit it for a strip composed under its own heading.
|
|
89
|
+
**`description`** `string` · optional · default: — — One or two sentences under the title.
|
|
90
|
+
**`headingLevel`** `HeadingLevel` · optional · default: — — Heading level for the section title. See `HeadingLevel`.
|
|
91
|
+
**`className`** `string` · optional · default: — — Layout only, exactly as on every Component. Changing a Prism-owned visual property from here is prohibited.
|
|
92
|
+
|
|
93
|
+
## Composition
|
|
94
|
+
|
|
95
|
+
**`exports`** `LogoStrip01` — the public runtime names this Block promises
|
|
96
|
+
**`source`** `packages/ui/src/blocks/logo-strip-01/index.tsx` — the file this Block is defined in
|
|
97
|
+
**`dependencies`** `Section` — the public Prism exports this item composes
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# NoteGrid01
|
|
2
|
+
|
|
3
|
+
A grid of short points: a title and a sentence or two, with no tile and no icon.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { NoteGrid01 } from '@nanisoft/prism-ui/blocks/note-grid-01'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
NoteGrid01 is a grid of short points: a title and a sentence or two, on a hairline
|
|
12
|
+
above each one, with no tile and no icon.
|
|
13
|
+
|
|
14
|
+
Three of the four NaniSoft sites compose this section, immediately after the
|
|
15
|
+
process rail and before the next numbered band, and each one drew it as the same
|
|
16
|
+
thing: a multi-column set of short points, each a bold title and a short
|
|
17
|
+
paragraph, with no card and no icon. All three also composed it *twice* - once
|
|
18
|
+
under the rail and once under a different section - so three hand-written grids
|
|
19
|
+
became six, each with its own column count and its own spacing.
|
|
20
|
+
|
|
21
|
+
It is a `dl` rather than a grid of `div`s, because each note is a term and its
|
|
22
|
+
explanation and a definition list is what says so.
|
|
23
|
+
|
|
24
|
+
## Guidelines
|
|
25
|
+
|
|
26
|
+
### When to use
|
|
27
|
+
|
|
28
|
+
Use NoteGrid01 where a section needs to make several points that each need a
|
|
29
|
+
sentence, and the points are peers.
|
|
30
|
+
|
|
31
|
+
Use it where a card would be too tight for the words. That is the whole
|
|
32
|
+
difference from `FeatureGrid01`: a card carries a title and a fragment, and a
|
|
33
|
+
note carries a title and a paragraph.
|
|
34
|
+
|
|
35
|
+
### When not to use
|
|
36
|
+
|
|
37
|
+
Do not use it for features. `FeatureGrid01` is for that, with its icon tiles. A
|
|
38
|
+
note with an icon in front of it reads as a feature and is read as one, and a
|
|
39
|
+
section of twelve features is a page that argues rather than explains.
|
|
40
|
+
|
|
41
|
+
Do not use it where one of the points is much longer than the others. The grid is
|
|
42
|
+
scanned by row, and one long body makes its own row the only one read.
|
|
43
|
+
|
|
44
|
+
### Best practices
|
|
45
|
+
|
|
46
|
+
- Keep a body to three lines at the widest viewport. Past that the detail belongs
|
|
47
|
+
in the section's `description`, where it applies to the set.
|
|
48
|
+
- Keep every title to one line. The grid is scanned down its left edge, and a
|
|
49
|
+
title that wraps costs every other row its alignment.
|
|
50
|
+
- Four notes is the comfortable case. Six is the limit at the largest viewport.
|
|
51
|
+
- Use `caption` for the sentence that qualifies the set. It is the honest place
|
|
52
|
+
for "and here is what it does not do".
|
|
53
|
+
|
|
54
|
+
### Content guidelines
|
|
55
|
+
|
|
56
|
+
- Write a title as a short noun phrase, not a sentence.
|
|
57
|
+
- Write a body as one or two sentences that stand alone. A reader may read one row
|
|
58
|
+
and stop.
|
|
59
|
+
- Do not start every title with the same word. Six titles that all begin "One" are
|
|
60
|
+
a list of the same claim.
|
|
61
|
+
|
|
62
|
+
**Three points, each a title and a sentence, on a hairline and no tile.**
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { NoteGrid01 } from '@nanisoft/prism-ui/blocks/note-grid-01'
|
|
66
|
+
|
|
67
|
+
/** Three points, each a title and a sentence, on a hairline and no tile. */
|
|
68
|
+
export default function NoteGrid01Demo() {
|
|
69
|
+
return (
|
|
70
|
+
<NoteGrid01
|
|
71
|
+
headingLevel="h3"
|
|
72
|
+
eyebrow="Preview"
|
|
73
|
+
title="What the feed guarantees"
|
|
74
|
+
description="Three properties, and the test that holds each one."
|
|
75
|
+
notes={[
|
|
76
|
+
{ title: 'One canonical timestamp', body: 'Every row carries the same clock, set once at capture.' },
|
|
77
|
+
{ title: 'One symbol form', body: 'The same instrument is spelled the same way in every table.' },
|
|
78
|
+
{ title: 'A pinned column list', body: 'Held by a test rather than by a convention nobody reads.' },
|
|
79
|
+
]}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Props
|
|
86
|
+
|
|
87
|
+
**`eyebrow`** `string` · optional · default: — — Optional label above the section title. See the No-Default-Eyebrow Rule.
|
|
88
|
+
**`title`** `string` · optional · default: — — The section title. Omit it for a grid composed under its own heading.
|
|
89
|
+
**`description`** `string` · optional · default: — — One or two sentences under the title.
|
|
90
|
+
**`notes`** `readonly NoteGrid01Note[]` · required · default: — — The notes, in the order a reader should meet them. Order is the caller's because it is a claim about which point matters first.
|
|
91
|
+
**`caption`** `string` · optional · default: — — The line under the grid, for the sentence that qualifies it: what the points do not cover, or where to read more.
|
|
92
|
+
**`headingLevel`** `HeadingLevel` · optional · default: — — Heading level for the section title. See `HeadingLevel`.
|
|
93
|
+
**`body`** `string` · required · default: — — One or two sentences about the point.
|
|
94
|
+
**`children`** `[title ? (_jsx(SectionHeading, { as: headingLevel, align: "left", eyebrow: eyebrow, title: title, description: description, className: "mb-12" })) : null, _jsx("dl", { "data-slot": "note-grid", className: "grid gap-8 sm:grid-cols-2 lg:grid-cols-3", children: notes.map((note) => (_jsxs("div", { "data-slot": "note-grid-note", className: "border-border flex flex-col gap-2 border-t pt-4", children: [_jsx("dt", { className: "text-sm font-semibold", children: note.title }), _jsx("dd", { className: "text-muted-foreground text-pretty text-sm", children: note.body })] }, note.title))) }), caption ? _jsx("p", { className: "text-muted-foreground mt-6 text-pretty text-sm", children: caption }) : null]` · required · default: —
|
|
95
|
+
**`as`** `headingLevel, align: "left", eyebrow: eyebrow, title: title, description: description, className: "mb-12"` · required · default: —
|
|
96
|
+
**`className`** `"text-sm font-semibold", children: note.title` · required · default: —
|
|
97
|
+
|
|
98
|
+
## Composition
|
|
99
|
+
|
|
100
|
+
**`exports`** `NoteGrid01` — the public runtime names this Block promises
|
|
101
|
+
**`source`** `packages/ui/src/blocks/note-grid-01/index.tsx` — the file this Block is defined in
|
|
102
|
+
**`dependencies`** `Section` — the public Prism exports this item composes
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# PageHeader01
|
|
2
|
+
|
|
3
|
+
A page title band with a breadcrumb trail, a supporting line and a row of actions.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { PageHeader01 } from '@nanisoft/prism-ui/blocks/page-header-01'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
PageHeader01 is the title band at the top of an application screen: a
|
|
12
|
+
breadcrumb trail, a row of actions, the page title and one supporting line,
|
|
13
|
+
closed by a hairline rule.
|
|
14
|
+
|
|
15
|
+
The block composes these components:
|
|
16
|
+
|
|
17
|
+
| Part | Component | Role |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| Trail | Breadcrumb | the ancestor path, ending on the current page |
|
|
20
|
+
| Actions | Button | one primary action and supporting actions |
|
|
21
|
+
| Title | Typography | the page heading and its supporting line |
|
|
22
|
+
| Rule | Separator | closes the band before the working content |
|
|
23
|
+
|
|
24
|
+
Every step and action is a prop. The trail renders native anchors, so the
|
|
25
|
+
consumer owns the destination; a router link or a stateful control goes through
|
|
26
|
+
`actionsSlot` instead.
|
|
27
|
+
|
|
28
|
+
## Guidelines
|
|
29
|
+
|
|
30
|
+
### When to use
|
|
31
|
+
|
|
32
|
+
Use PageHeader01 at the top of a page whose content sits under the app shell. It
|
|
33
|
+
works when the page has one name, one short description and a small set of
|
|
34
|
+
actions that belong to the page rather than to a single row.
|
|
35
|
+
|
|
36
|
+
### When not to use
|
|
37
|
+
|
|
38
|
+
Do not use it as a section heading inside a page. It carries the page title and
|
|
39
|
+
a rule that closes a band, so using it mid-page splits one screen into two.
|
|
40
|
+
|
|
41
|
+
Do not use it in a marketing page. A hero introduces a product; a page header
|
|
42
|
+
orients a returning user, and the two carry different weight.
|
|
43
|
+
|
|
44
|
+
### Best practices
|
|
45
|
+
|
|
46
|
+
- Set `headingLevel="h1"` on a real page. The default `h2` suits a header
|
|
47
|
+
composed under a heading the document already owns.
|
|
48
|
+
- Keep the trail to the ancestors plus the current page. Repeating the title as
|
|
49
|
+
the last step reads as noise.
|
|
50
|
+
- Pass one primary action and at most two supporting ones, and put a link or a
|
|
51
|
+
menu in `actionsSlot` when it needs its own router or state.
|
|
52
|
+
|
|
53
|
+
### Content guidelines
|
|
54
|
+
|
|
55
|
+
- A breadcrumb label is the destination's display name: "Projects", "Settings".
|
|
56
|
+
- The title names the screen, not the action: "Overview", not "View overview".
|
|
57
|
+
|
|
58
|
+
**A page header with a breadcrumb trail and two actions.**
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { PageHeader01 } from '@nanisoft/prism-ui/blocks/page-header-01'
|
|
62
|
+
|
|
63
|
+
/** A page header with a breadcrumb trail and two actions. */
|
|
64
|
+
export default function PageHeader01Demo() {
|
|
65
|
+
return (
|
|
66
|
+
<PageHeader01
|
|
67
|
+
headingLevel="h3"
|
|
68
|
+
breadcrumbs={[
|
|
69
|
+
{ label: 'Workspaces', href: '#workspaces' },
|
|
70
|
+
{ label: 'Northwind', href: '#northwind' },
|
|
71
|
+
{ label: 'Overview' },
|
|
72
|
+
]}
|
|
73
|
+
title="Overview"
|
|
74
|
+
description="Deployments, usage and the people on this workspace."
|
|
75
|
+
actions={[
|
|
76
|
+
{ label: 'Share' },
|
|
77
|
+
{ label: 'New deployment', variant: 'outline' },
|
|
78
|
+
]}
|
|
79
|
+
/>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Props
|
|
85
|
+
|
|
86
|
+
**`breadcrumbs`** `PageHeaderCrumb[]` · optional · default: — — The trail above the title. The final item always renders as the current page, whether or not it carries an `href`.
|
|
87
|
+
**`title`** `ReactNode` · required · default: — — The page title.
|
|
88
|
+
**`description`** `ReactNode` · optional · default: — — One supporting line under the title.
|
|
89
|
+
**`actions`** `PageHeaderAction[]` · optional · default: — — Declarative actions rendered as Prism Buttons. Use `actionsSlot` for a control that needs its own behaviour, such as a router link or a menu.
|
|
90
|
+
**`actionsSlot`** `ReactNode` · optional · default: — — A slot for consumer-provided controls on the action row.
|
|
91
|
+
**`headingLevel`** `HeadingElement` · optional · default: — — The heading element for the title. Defaults to `h2` because a block is composed; a page whose own document outline this header opens passes `h1`. See `HeadingElement`.
|
|
92
|
+
|
|
93
|
+
## Composition
|
|
94
|
+
|
|
95
|
+
**`exports`** `PageHeader01` — the public runtime names this Block promises
|
|
96
|
+
**`source`** `packages/ui/src/blocks/page-header-01/index.tsx` — the file this Block is defined in
|
|
97
|
+
**`dependencies`** `Breadcrumb, Button, Separator` — the public Prism exports this item composes
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Pricing01
|
|
2
|
+
|
|
3
|
+
A plan comparison with one highlighted tier.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Pricing01 } from '@nanisoft/prism-ui/blocks/pricing-01'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Pricing01 is a plan comparison: up to three plans side by side, one of which may
|
|
12
|
+
be featured with a primary border, a filled action and a badge. Each plan
|
|
13
|
+
carries a name, a price, an optional period, an optional body, a feature list
|
|
14
|
+
and an action label.
|
|
15
|
+
|
|
16
|
+
Every string is a prop, including the prices and the call to action. The block
|
|
17
|
+
previously hardcoded a price set and shipped a heading above a title that
|
|
18
|
+
already said the same thing.
|
|
19
|
+
|
|
20
|
+
## Guidelines
|
|
21
|
+
|
|
22
|
+
### When to use
|
|
23
|
+
|
|
24
|
+
Use Pricing01 when a reader compares a small, fixed number of plans on the same
|
|
25
|
+
features. It lays the plans out for comparison and lifts the recommended one.
|
|
26
|
+
|
|
27
|
+
### When not to use
|
|
28
|
+
|
|
29
|
+
Do not use it for a usage-based price or a quote. A table of fixed prices cannot
|
|
30
|
+
represent a metered plan honestly.
|
|
31
|
+
|
|
32
|
+
Do not feature more than one plan. Two highlighted plans read as no
|
|
33
|
+
recommendation at all.
|
|
34
|
+
|
|
35
|
+
Do not use the block on a dense application screen. It is a marketing
|
|
36
|
+
composition with a lot of vertical space.
|
|
37
|
+
|
|
38
|
+
### Best practices
|
|
39
|
+
|
|
40
|
+
- Put the recommended plan in the middle when there are three, so the eye lands
|
|
41
|
+
on it after the first.
|
|
42
|
+
- Keep the feature lists the same length across plans. Uneven lists make the
|
|
43
|
+
shorter plan look thinner than it is.
|
|
44
|
+
- State the period on every price, or on none. A period on one plan and not
|
|
45
|
+
another invites a wrong total.
|
|
46
|
+
- Pass a badge on the featured plan, or none at all. The block ships no badge
|
|
47
|
+
word: a plan that is featured and unnamed is the honest state, and a block
|
|
48
|
+
that hardcoded "Popular" would make that claim for every consumer.
|
|
49
|
+
|
|
50
|
+
### Content guidelines
|
|
51
|
+
|
|
52
|
+
- A plan name is one word where possible and takes sentence case.
|
|
53
|
+
- Write a feature as an outcome, not a limit: "Unlimited projects" reads better
|
|
54
|
+
than "Projects: unlimited".
|
|
55
|
+
- A call to action is verb-first and sentence case: "Choose Team", "Contact
|
|
56
|
+
sales".
|
|
57
|
+
|
|
58
|
+
**The plan comparison, with the middle plan featured.**
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
import { Pricing01 } from '@nanisoft/prism-ui/blocks/pricing-01'
|
|
62
|
+
|
|
63
|
+
/** The plan comparison, with the middle plan featured. */
|
|
64
|
+
export default function Pricing01Demo() {
|
|
65
|
+
return (
|
|
66
|
+
<Pricing01
|
|
67
|
+
headingLevel="h3"
|
|
68
|
+
title="Section heading"
|
|
69
|
+
plans={[
|
|
70
|
+
{ name: 'First plan', price: '$0', period: ' / month', body: 'One line on who it is for.', features: ['First included line', 'Second included line', 'Third included line'], cta: 'Choose' },
|
|
71
|
+
{ name: 'Second plan', price: '$24', period: ' / month', body: 'One line on who it is for.', features: ['Everything in the first plan', 'One extra line', 'Another extra line'], cta: 'Choose', featured: true, badge: 'Most chosen' },
|
|
72
|
+
{ name: 'Third plan', price: '$68', period: ' / month', body: 'One line on who it is for.', features: ['Everything in the second plan', 'One extra line', 'Another extra line'], cta: 'Choose' },
|
|
73
|
+
]}
|
|
74
|
+
/>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Props
|
|
80
|
+
|
|
81
|
+
**`eyebrow`** `string` · optional · default: —
|
|
82
|
+
**`title`** `string` · optional · default: —
|
|
83
|
+
**`description`** `string` · optional · default: —
|
|
84
|
+
**`plans`** `Plan[]` · required · default: —
|
|
85
|
+
**`headingLevel`** `HeadingLevel` · optional · default: — — Heading level for the section title. See `HeadingLevel`.
|
|
86
|
+
|
|
87
|
+
## Composition
|
|
88
|
+
|
|
89
|
+
**`exports`** `Pricing01` — the public runtime names this Block promises
|
|
90
|
+
**`source`** `packages/ui/src/blocks/pricing-01/index.tsx` — the file this Block is defined in
|
|
91
|
+
**`dependencies`** `Badge, Button, Card, Section` — the public Prism exports this item composes
|