@krizaka/ui 3.74.0 → 3.75.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 +2 -6
- package/dist/{chunk-GSQRSWOE.js → chunk-RI3AA2E3.js} +3 -3
- package/dist/{chunk-E4FMPPDL.js → chunk-WC3SO4CE.js} +2 -2
- package/dist/{chunk-KF7UB3LM.js → chunk-YQWYGQTV.js} +11 -9
- package/dist/{chunk-KF7UB3LM.js.map → chunk-YQWYGQTV.js.map} +1 -1
- package/dist/{chunk-M3GEYLMR.js → chunk-ZPOVOEO3.js} +1 -2
- package/dist/data-table.js +3 -3
- package/dist/filter-bar.d.ts +12 -4
- package/dist/filter-bar.js +1 -1
- package/dist/gallery-page.js +3 -3
- package/dist/genui.js +101 -35
- package/dist/genui.js.map +1 -1
- package/dist/language-switch.d.ts +9 -9
- package/dist/{lightbox-D5NAHFEA.js → lightbox-Q45BZ3HW.js} +3 -3
- package/dist/match-dialog.js +2 -2
- package/dist/motion.css +1 -25
- package/dist/native/list.js +1 -1
- package/dist/native/list.js.map +1 -1
- package/dist/native.d.ts +2 -54
- package/dist/native.js +464 -560
- package/dist/native.js.map +1 -1
- package/dist/product-page.js +3 -3
- package/dist/shop-gallery.js +1 -1
- package/dist/tag-selector.js +16 -10
- package/dist/tag-selector.js.map +1 -1
- package/dist/vertical-video.js +1 -1
- package/dist/waveform.js.map +1 -1
- package/package.json +5 -81
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/analysis-report.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-frame.json +2 -2
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chapter.json +1 -1
- package/registry/chat.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/collection-switcher.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/copy-button.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/desktop-window.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/doodle.json +1 -1
- package/registry/drop-overlay.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +1 -1
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/entity-header.json +1 -1
- package/registry/environment-notice.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +2 -2
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/grade-stamp.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +10 -185
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +1 -1
- package/registry/kpi-explained.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/margin-layout.json +1 -1
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +3 -14
- package/registry/meter.json +1 -1
- package/registry/money-input.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/price-catalogue-editor.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +2 -6
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/promo-code-field.json +1 -1
- package/registry/proposal.json +1 -1
- package/registry/qr-code.json +1 -1
- package/registry/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +2 -3
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/schema-form.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/shop-composer.json +1 -1
- package/registry/shop-gallery.json +3 -8
- package/registry/shop.json +2 -2
- package/registry/showcase.json +2 -7
- package/registry/signature.json +1 -1
- package/registry/site-cahier.json +1 -1
- package/registry/site-footer.json +2 -2
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-chip.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +1 -1
- package/registry/swipe-deck.json +3 -4
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +2 -2
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/text-style.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +1 -1
- package/registry/usage.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/versus-card.json +1 -1
- package/registry/vertical-video.json +2 -6
- package/registry/video-player.json +2 -7
- package/registry/video-trimmer.json +3 -4
- package/registry/virtual.json +1 -1
- package/registry/wall.json +3 -9
- package/registry/waveform.json +4 -9
- package/dist/audio-player.d.ts +0 -115
- package/dist/audio-player.js +0 -211
- package/dist/audio-player.js.map +0 -1
- package/dist/chunk-YKOLME7R.js +0 -126
- package/dist/chunk-YKOLME7R.js.map +0 -1
- package/dist/how-it-works-page.d.ts +0 -49
- package/dist/how-it-works-page.js +0 -28
- package/dist/how-it-works-page.js.map +0 -1
- package/dist/marquee.d.ts +0 -34
- package/dist/marquee.js +0 -52
- package/dist/marquee.js.map +0 -1
- package/dist/media-grid.d.ts +0 -246
- package/dist/media-grid.js +0 -468
- package/dist/media-grid.js.map +0 -1
- package/dist/photo-grid.d.ts +0 -123
- package/dist/photo-grid.js +0 -94
- package/dist/photo-grid.js.map +0 -1
- package/registry/audio-player.json +0 -300
- package/registry/examples/audio-player/podcast.d.ts +0 -4
- package/registry/examples/audio-player/podcast.js +0 -22
- package/registry/examples/audio-player/podcast.tsx +0 -19
- package/registry/examples/audio-player/voice-note.d.ts +0 -4
- package/registry/examples/audio-player/voice-note.js +0 -12
- package/registry/examples/audio-player/voice-note.tsx +0 -12
- package/registry/examples/how-it-works-page/orazaka.d.ts +0 -4
- package/registry/examples/how-it-works-page/orazaka.js +0 -30
- package/registry/examples/how-it-works-page/orazaka.tsx +0 -26
- package/registry/examples/marquee/cards.d.ts +0 -4
- package/registry/examples/marquee/cards.js +0 -23
- package/registry/examples/marquee/cards.tsx +0 -21
- package/registry/examples/marquee/logos.d.ts +0 -4
- package/registry/examples/marquee/logos.js +0 -12
- package/registry/examples/marquee/logos.tsx +0 -17
- package/registry/examples/media-grid/feed.d.ts +0 -4
- package/registry/examples/media-grid/feed.js +0 -31
- package/registry/examples/media-grid/feed.tsx +0 -30
- package/registry/examples/media-grid/loading.d.ts +0 -4
- package/registry/examples/media-grid/loading.js +0 -28
- package/registry/examples/media-grid/loading.tsx +0 -25
- package/registry/examples/media-grid/uniform.d.ts +0 -4
- package/registry/examples/media-grid/uniform.js +0 -29
- package/registry/examples/media-grid/uniform.tsx +0 -26
- package/registry/examples/photo-grid/native/profile-photos.d.ts +0 -4
- package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.js +0 -27
- package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.tsx +0 -24
- package/registry/examples/photo-grid/profile-photos.d.ts +0 -4
- package/registry/examples/photo-grid/profile-photos.js +0 -28
- package/registry/examples/photo-grid/profile-photos.tsx +0 -25
- package/registry/how-it-works-page.json +0 -258
- package/registry/marquee.json +0 -241
- package/registry/media-grid.json +0 -1034
- package/registry/photo-grid.json +0 -316
- /package/dist/{chunk-GSQRSWOE.js.map → chunk-RI3AA2E3.js.map} +0 -0
- /package/dist/{chunk-E4FMPPDL.js.map → chunk-WC3SO4CE.js.map} +0 -0
- /package/dist/{chunk-M3GEYLMR.js.map → chunk-ZPOVOEO3.js.map} +0 -0
- /package/dist/{lightbox-D5NAHFEA.js.map → lightbox-Q45BZ3HW.js.map} +0 -0
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "how-it-works-page",
|
|
3
|
-
"type": "primitive",
|
|
4
|
-
"title": "How-it-works page",
|
|
5
|
-
"summary": "How a product works, told in steps along a numbered line — each step its words beside its visual, the sides alternating on a wide screen.",
|
|
6
|
-
"description": "How a product works, told in steps along a numbered line — each step its words beside its visual, the sides alternating on a wide screen.",
|
|
7
|
-
"status": "beta",
|
|
8
|
-
"deprecated": null,
|
|
9
|
-
"category": "templates",
|
|
10
|
-
"domain": "page-blocks",
|
|
11
|
-
"adoption": null,
|
|
12
|
-
"platforms": "web",
|
|
13
|
-
"parity": {
|
|
14
|
-
"web": {
|
|
15
|
-
"state": "yes"
|
|
16
|
-
},
|
|
17
|
-
"native": {
|
|
18
|
-
"state": "n/a",
|
|
19
|
-
"reason": "A whole page of a public site; a phone app's screens are built from Screen, Header and the native primitives."
|
|
20
|
-
},
|
|
21
|
-
"desktop": {
|
|
22
|
-
"state": "n/a",
|
|
23
|
-
"reason": "A public site's page, not a window of the Mac app."
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"whenToUse": [
|
|
27
|
-
"The journey of a request, an onboarding, an installation.",
|
|
28
|
-
"Any process told in three to seven steps."
|
|
29
|
-
],
|
|
30
|
-
"whenNotToUse": [
|
|
31
|
-
{
|
|
32
|
-
"when": "For a product's overview."
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"when": "For a step the user is on right now.",
|
|
36
|
-
"use": "stepper"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"bestPractices": [
|
|
40
|
-
"Three to seven steps; a step's title says what happens, in a few words.",
|
|
41
|
-
"Each visual shows the step for real: a command, a schema, a screen.",
|
|
42
|
-
"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion)."
|
|
43
|
-
],
|
|
44
|
-
"accessibility": {
|
|
45
|
-
"keyboard": [],
|
|
46
|
-
"notes": [
|
|
47
|
-
"The steps are an ordered list; each title an `h2`.",
|
|
48
|
-
"The line and the numbers are decorative: the list says the order."
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"related": [
|
|
52
|
-
"stepper",
|
|
53
|
-
"code-block"
|
|
54
|
-
],
|
|
55
|
-
"web": {
|
|
56
|
-
"entry": "@krizaka/ui/how-it-works-page",
|
|
57
|
-
"import": "import { HowItWorksPage } from \"@krizaka/ui/how-it-works-page\";",
|
|
58
|
-
"props": [
|
|
59
|
-
{
|
|
60
|
-
"component": "HowItWorksPage",
|
|
61
|
-
"description": "How a product works: the hero, a numbered timeline of steps with their visuals, then the details.",
|
|
62
|
-
"props": [
|
|
63
|
-
{
|
|
64
|
-
"name": "steps",
|
|
65
|
-
"type": "readonly HowStep[]",
|
|
66
|
-
"default": null,
|
|
67
|
-
"description": "The steps, in order.",
|
|
68
|
-
"required": true
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "stepsLabel",
|
|
72
|
-
"type": "string",
|
|
73
|
-
"default": null,
|
|
74
|
-
"description": "The steps' accessible name (`The steps`).",
|
|
75
|
-
"required": true
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "title",
|
|
79
|
-
"type": "ReactNode",
|
|
80
|
-
"default": null,
|
|
81
|
-
"description": "The page's `h1`.",
|
|
82
|
-
"required": true
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "aside",
|
|
86
|
-
"type": "ReactNode",
|
|
87
|
-
"default": null,
|
|
88
|
-
"description": "Beside the hero: the page's bird or an illustration.",
|
|
89
|
-
"required": false
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "back",
|
|
93
|
-
"type": "{ href: string; label: string; }",
|
|
94
|
-
"default": null,
|
|
95
|
-
"description": "The way back to the product.",
|
|
96
|
-
"required": false
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"name": "brand",
|
|
100
|
-
"type": "string",
|
|
101
|
-
"default": null,
|
|
102
|
-
"description": "The brand the page wears (`.brand-<id>`).",
|
|
103
|
-
"required": false
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "closing",
|
|
107
|
-
"type": "{ title: ReactNode; body?: ReactNode; actions: ReactNode; }",
|
|
108
|
-
"default": null,
|
|
109
|
-
"description": "The closing call.",
|
|
110
|
-
"required": false
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "eyebrow",
|
|
114
|
-
"type": "ReactNode",
|
|
115
|
-
"default": null,
|
|
116
|
-
"description": "A mono line above the title.",
|
|
117
|
-
"required": false
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"name": "lead",
|
|
121
|
-
"type": "ReactNode",
|
|
122
|
-
"default": null,
|
|
123
|
-
"description": "One or two sentences under it.",
|
|
124
|
-
"required": false
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "linkAs",
|
|
128
|
-
"type": "LinkComponent",
|
|
129
|
-
"default": null,
|
|
130
|
-
"description": "The app's link component (Next's `Link`).",
|
|
131
|
-
"required": false
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
"examples": [
|
|
137
|
-
{
|
|
138
|
-
"name": "orazaka",
|
|
139
|
-
"title": "Orazaka's journey",
|
|
140
|
-
"description": "Install, guard, answer — each with its command.",
|
|
141
|
-
"template": true,
|
|
142
|
-
"purpose": "explain",
|
|
143
|
-
"why": "A reader grasps a process as a few steps, each with the command that does it.",
|
|
144
|
-
"path": "examples/how-it-works-page/orazaka.tsx",
|
|
145
|
-
"module": "@krizaka/ui/registry/examples/how-it-works-page/orazaka",
|
|
146
|
-
"code": "import { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { HowItWorksPage } from \"@krizaka/ui/how-it-works-page\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\n\nconst copy = { copyLabel: \"Copy\", copiedLabel: \"Copied\" };\n\n// TEMPLATE — how a product works, in steps along a line (Orazaka's journey of a request): each step its words beside\n// its visual, the sides alternating on a wide screen, one column on a phone.\nexport default function HowItWorksPageOrazaka() {\n return (\n <HowItWorksPage\n brand=\"orazaka\"\n back={{ href: \"#orazaka\", label: \"Orazaka\" }}\n eyebrow=\"How it works\"\n title=\"The journey of a request\"\n lead=\"Six stages, the same for every request — and none of them leaves your server.\"\n aside={<Mascot bird=\"duck\" mood=\"thinking\" size={112} />}\n stepsLabel=\"The steps\"\n steps={[\n { id: \"install\", title: \"Install\", text: \"One command pulls the engine, the models you choose and the console.\", visual: <CodeBlock code=\"npx orazaka install\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"guard\", title: \"Guard\", text: \"Every request crosses the same interceptors: identity, quotas, the rules of your workspace.\", visual: <CodeBlock code=\"orazaka rules add --deny pii-export\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"answer\", title: \"Answer\", text: \"The best local model answers; the answer is checked before it is shown.\", visual: <CodeBlock code=\"orazaka chat --model llama3.3\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n ]}\n />\n );\n}\n"
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
},
|
|
150
|
-
"native": null,
|
|
151
|
-
"files": [
|
|
152
|
-
{
|
|
153
|
-
"path": "how-it-works-page/how-it-works-page.tsx",
|
|
154
|
-
"content": "// Server-safe. How a product works, told in steps (blocks.css `.kz-tpl-timeline`): the hero, then a numbered line\n// down the page — each step its words beside its visual (a command, a schema, a screen), the sides alternating on a\n// wide screen, one column on a phone — then what is under the hood and the closing call.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface HowStep {\n /** A stable key (the step's anchor). */\n id: string;\n /** What happens, in a few words. */\n title: React.ReactNode;\n /** How, in two or three sentences. */\n text: React.ReactNode;\n /** Beside the words: a code block, a schema, a screen. */\n visual?: React.ReactNode;\n}\n\nexport type HowItWorksPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** The way back to the product. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Beside the hero: the page's bird or an illustration. */\n aside?: React.ReactNode;\n /** The steps' accessible name (`The steps`). */\n stepsLabel: string;\n /** The steps, in order. */\n steps: readonly HowStep[];\n /** After the steps: architecture, guarantees, a module map. */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** How a product works: the hero, a numbered timeline of steps with their visuals, then the details. */\nexport function HowItWorksPage({ brand, back, eyebrow, title, lead, aside, stepsLabel, steps, closing, linkAs, className, children, ...props }: HowItWorksPageProps) {\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} aside={aside} />\n <Section aria-label={stepsLabel}>\n <ol className=\"kz-tpl-timeline\">\n {steps.map((step, i) => (\n <li key={step.id} id={step.id} className=\"kz-tpl-step\" data-reveal=\"\">\n <span className=\"kz-tpl-step-n\" aria-hidden>\n {i + 1}\n </span>\n <div className=\"kz-tpl-step-text\">\n <h2>{step.title}</h2>\n <p>{step.text}</p>\n </div>\n {step.visual && <div className=\"kz-tpl-step-visual\">{step.visual}</div>}\n </li>\n ))}\n </ol>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"how-closing\">\n <CtaPanel id=\"how-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"path": "how-it-works-page/index.ts",
|
|
158
|
-
"content": "/** @krizaka/ui/how-it-works-page — `HowItWorksPage`: How a product works: a numbered timeline of steps, each with its visual. Server-safe; a page template. */\nexport { HowItWorksPage, type HowItWorksPageProps, type HowStep } from \"./how-it-works-page\";\n"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"path": "how-it-works-page/meta.ts",
|
|
162
|
-
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"How-it-works page\",\n summary: \"How a product works, told in steps along a numbered line — each step its words beside its visual, the sides alternating on a wide screen.\",\n status: \"beta\",\n category: \"templates\",\n domain: \"page-blocks\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"A whole page of a public site; a phone app's screens are built from Screen, Header and the native primitives.\" }, desktop: { status: \"n/a\", reason: \"A public site's page, not a window of the Mac app.\" } },\n whenToUse: [\"The journey of a request, an onboarding, an installation.\", \"Any process told in three to seven steps.\"],\n whenNotToUse: [\n { when: \"For a product's overview.\" },\n { when: \"For a step the user is on right now.\", use: \"stepper\" },\n ],\n bestPractices: [\"Three to seven steps; a step's title says what happens, in a few words.\", \"Each visual shows the step for real: a command, a schema, a screen.\", \"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion).\"],\n accessibility: {\n keyboard: [],\n notes: [\"The steps are an ordered list; each title an `h2`.\", \"The line and the numbers are decorative: the list says the order.\"],\n },\n related: [\"stepper\", \"code-block\"],\n web: {\n imports: [\"HowItWorksPage\"],\n examples: [\n { name: \"orazaka\", title: \"Orazaka's journey\", description: \"Install, guard, answer — each with its command.\", template: true, purpose: \"explain\", why: \"A reader grasps a process as a few steps, each with the command that does it.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"path": "meta.ts",
|
|
166
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the twelve domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"dependencies": [],
|
|
170
|
-
"registryDependencies": [
|
|
171
|
-
"cn",
|
|
172
|
-
"cta-panel",
|
|
173
|
-
"page",
|
|
174
|
-
"page-hero"
|
|
175
|
-
],
|
|
176
|
-
"demo": {
|
|
177
|
-
"path": "examples/how-it-works-page/orazaka.tsx",
|
|
178
|
-
"content": "import { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { HowItWorksPage } from \"@krizaka/ui/how-it-works-page\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\n\nconst copy = { copyLabel: \"Copy\", copiedLabel: \"Copied\" };\n\n// TEMPLATE — how a product works, in steps along a line (Orazaka's journey of a request): each step its words beside\n// its visual, the sides alternating on a wide screen, one column on a phone.\nexport default function HowItWorksPageOrazaka() {\n return (\n <HowItWorksPage\n brand=\"orazaka\"\n back={{ href: \"#orazaka\", label: \"Orazaka\" }}\n eyebrow=\"How it works\"\n title=\"The journey of a request\"\n lead=\"Six stages, the same for every request — and none of them leaves your server.\"\n aside={<Mascot bird=\"duck\" mood=\"thinking\" size={112} />}\n stepsLabel=\"The steps\"\n steps={[\n { id: \"install\", title: \"Install\", text: \"One command pulls the engine, the models you choose and the console.\", visual: <CodeBlock code=\"npx orazaka install\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"guard\", title: \"Guard\", text: \"Every request crosses the same interceptors: identity, quotas, the rules of your workspace.\", visual: <CodeBlock code=\"orazaka rules add --deny pii-export\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"answer\", title: \"Answer\", text: \"The best local model answers; the answer is checked before it is shown.\", visual: <CodeBlock code=\"orazaka chat --model llama3.3\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n ]}\n />\n );\n}\n"
|
|
179
|
-
},
|
|
180
|
-
"props": [
|
|
181
|
-
{
|
|
182
|
-
"component": "HowItWorksPage",
|
|
183
|
-
"description": "How a product works: the hero, a numbered timeline of steps with their visuals, then the details.",
|
|
184
|
-
"props": [
|
|
185
|
-
{
|
|
186
|
-
"name": "steps",
|
|
187
|
-
"type": "readonly HowStep[]",
|
|
188
|
-
"default": null,
|
|
189
|
-
"description": "The steps, in order.",
|
|
190
|
-
"required": true
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"name": "stepsLabel",
|
|
194
|
-
"type": "string",
|
|
195
|
-
"default": null,
|
|
196
|
-
"description": "The steps' accessible name (`The steps`).",
|
|
197
|
-
"required": true
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"name": "title",
|
|
201
|
-
"type": "ReactNode",
|
|
202
|
-
"default": null,
|
|
203
|
-
"description": "The page's `h1`.",
|
|
204
|
-
"required": true
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"name": "aside",
|
|
208
|
-
"type": "ReactNode",
|
|
209
|
-
"default": null,
|
|
210
|
-
"description": "Beside the hero: the page's bird or an illustration.",
|
|
211
|
-
"required": false
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"name": "back",
|
|
215
|
-
"type": "{ href: string; label: string; }",
|
|
216
|
-
"default": null,
|
|
217
|
-
"description": "The way back to the product.",
|
|
218
|
-
"required": false
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "brand",
|
|
222
|
-
"type": "string",
|
|
223
|
-
"default": null,
|
|
224
|
-
"description": "The brand the page wears (`.brand-<id>`).",
|
|
225
|
-
"required": false
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"name": "closing",
|
|
229
|
-
"type": "{ title: ReactNode; body?: ReactNode; actions: ReactNode; }",
|
|
230
|
-
"default": null,
|
|
231
|
-
"description": "The closing call.",
|
|
232
|
-
"required": false
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"name": "eyebrow",
|
|
236
|
-
"type": "ReactNode",
|
|
237
|
-
"default": null,
|
|
238
|
-
"description": "A mono line above the title.",
|
|
239
|
-
"required": false
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"name": "lead",
|
|
243
|
-
"type": "ReactNode",
|
|
244
|
-
"default": null,
|
|
245
|
-
"description": "One or two sentences under it.",
|
|
246
|
-
"required": false
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
"name": "linkAs",
|
|
250
|
-
"type": "LinkComponent",
|
|
251
|
-
"default": null,
|
|
252
|
-
"description": "The app's link component (Next's `Link`).",
|
|
253
|
-
"required": false
|
|
254
|
-
}
|
|
255
|
-
]
|
|
256
|
-
}
|
|
257
|
-
]
|
|
258
|
-
}
|
package/registry/marquee.json
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "marquee",
|
|
3
|
-
"type": "primitive",
|
|
4
|
-
"title": "Marquee",
|
|
5
|
-
"summary": "A band of items that slides forever — at a speed in pixels per second, paused by the pointer, the focus or its own pause button, read once by assistive technology, and a still row you scroll under reduced motion.",
|
|
6
|
-
"description": "A band of items that slides forever — at a speed in pixels per second, paused by the pointer, the focus or its own pause button, read once by assistive technology, and a still row you scroll under reduced motion.",
|
|
7
|
-
"status": "beta",
|
|
8
|
-
"deprecated": null,
|
|
9
|
-
"category": "data-display",
|
|
10
|
-
"domain": "page-blocks",
|
|
11
|
-
"adoption": null,
|
|
12
|
-
"platforms": "web",
|
|
13
|
-
"parity": {
|
|
14
|
-
"web": {
|
|
15
|
-
"state": "yes"
|
|
16
|
-
},
|
|
17
|
-
"native": {
|
|
18
|
-
"state": "n/a",
|
|
19
|
-
"reason": "Decorative scrolling logos of a site's page."
|
|
20
|
-
},
|
|
21
|
-
"desktop": {
|
|
22
|
-
"state": "n/a",
|
|
23
|
-
"reason": "A public site's page, not a window of the Mac app."
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"whenToUse": [
|
|
27
|
-
"A band of logos, names or short quotes on a landing page: proof at a glance.",
|
|
28
|
-
"Short cards that need no comparison (testimonials, recent payouts) — one band per page."
|
|
29
|
-
],
|
|
30
|
-
"whenNotToUse": [
|
|
31
|
-
{
|
|
32
|
-
"when": "For content the reader must read in order or act on: a list stays still."
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"when": "For a few items that fit on one line: show them, still."
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"bestPractices": [
|
|
39
|
-
"Keep it slow (24–40 px/s) and short; one band per page.",
|
|
40
|
-
"Items that make sense alone: the reader catches them in any order.",
|
|
41
|
-
"Pass `label`, `pauseLabel` and `playLabel` translated: the band is a named region with a real pause button."
|
|
42
|
-
],
|
|
43
|
-
"accessibility": {
|
|
44
|
-
"keyboard": [
|
|
45
|
-
{
|
|
46
|
-
"keys": "Tab",
|
|
47
|
-
"action": "Focuses the band (it pauses; under reduced motion the arrows scroll it), the links inside, then the pause button."
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"keys": "Enter / Space",
|
|
51
|
-
"action": "On the pause button: stops or restarts the band."
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"notes": [
|
|
55
|
-
"A `section` named by `label`; the items are a list, and the second copy (for the loop) is hidden from assistive technology.",
|
|
56
|
-
"The pause button (`aria-pressed`) meets WCAG 2.2.2: motion that lasts can be stopped.",
|
|
57
|
-
"Under `prefers-reduced-motion` the band is still, its copy removed, and it scrolls by hand; off screen it pauses (MotionObserver)."
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
"related": [
|
|
61
|
-
"glow-card",
|
|
62
|
-
"number-ticker"
|
|
63
|
-
],
|
|
64
|
-
"web": {
|
|
65
|
-
"entry": "@krizaka/ui/marquee",
|
|
66
|
-
"import": "import { Marquee } from \"@krizaka/ui/marquee\";",
|
|
67
|
-
"props": [
|
|
68
|
-
{
|
|
69
|
-
"component": "Marquee",
|
|
70
|
-
"description": "A band of items sliding forever — pausable, accessible, still under reduced motion.",
|
|
71
|
-
"props": [
|
|
72
|
-
{
|
|
73
|
-
"name": "children",
|
|
74
|
-
"type": "ReactNode",
|
|
75
|
-
"default": null,
|
|
76
|
-
"description": "The items: logos, words, cards.",
|
|
77
|
-
"required": true
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"name": "label",
|
|
81
|
-
"type": "string",
|
|
82
|
-
"default": null,
|
|
83
|
-
"description": "The accessible name of the band (“Our partners”) — passed translated.",
|
|
84
|
-
"required": true
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "pauseLabel",
|
|
88
|
-
"type": "string",
|
|
89
|
-
"default": null,
|
|
90
|
-
"description": "The pause button's name (“Pause the band”) — passed translated.",
|
|
91
|
-
"required": true
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"name": "playLabel",
|
|
95
|
-
"type": "string",
|
|
96
|
-
"default": null,
|
|
97
|
-
"description": "The same button's name once paused (“Play the band”) — passed translated.",
|
|
98
|
-
"required": true
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"name": "defaultPaused",
|
|
102
|
-
"type": "boolean",
|
|
103
|
-
"default": "false",
|
|
104
|
-
"description": "Starts paused.",
|
|
105
|
-
"required": false
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"name": "direction",
|
|
109
|
-
"type": "\"right\" | \"left\"",
|
|
110
|
-
"default": "left",
|
|
111
|
-
"description": "Which way it slides.",
|
|
112
|
-
"required": false
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "fade",
|
|
116
|
-
"type": "boolean",
|
|
117
|
-
"default": "true",
|
|
118
|
-
"description": "The edges fade into the page.",
|
|
119
|
-
"required": false
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"name": "speed",
|
|
123
|
-
"type": "number",
|
|
124
|
-
"default": "40",
|
|
125
|
-
"description": "Pixels per second.",
|
|
126
|
-
"required": false
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"examples": [
|
|
132
|
-
{
|
|
133
|
-
"name": "logos",
|
|
134
|
-
"title": "A band of names",
|
|
135
|
-
"description": "Paused by the pointer, the focus or its button; a still row under reduced motion.",
|
|
136
|
-
"path": "examples/marquee/logos.tsx",
|
|
137
|
-
"module": "@krizaka/ui/registry/examples/marquee/logos",
|
|
138
|
-
"code": "import { Marquee } from \"@krizaka/ui/marquee\";\n\nconst names = [\"Postgres\", \"Ollama\", \"Spring\", \"Kafka\", \"Keycloak\", \"Qdrant\", \"MinIO\", \"Grafana\"];\n\n// A band of names at 40 px/s: it pauses under the pointer or the focus, and its pause button (top right, on hover or\n// focus) stops it for good. Under reduced motion it is a still row you scroll.\nexport default function MarqueeLogos() {\n return (\n <Marquee label=\"Built on open source\" pauseLabel=\"Pause the band\" playLabel=\"Play the band\" className=\"w-full max-w-2xl\">\n {names.map((name) => (\n <span key={name} className=\"font-display text-lg font-semibold text-fg-secondary\">\n {name}\n </span>\n ))}\n </Marquee>\n );\n}\n"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"name": "cards",
|
|
142
|
-
"title": "Testimonials",
|
|
143
|
-
"description": "Cards sliding the other way, slower; each one read once.",
|
|
144
|
-
"path": "examples/marquee/cards.tsx",
|
|
145
|
-
"module": "@krizaka/ui/registry/examples/marquee/cards",
|
|
146
|
-
"code": "import { Marquee } from \"@krizaka/ui/marquee\";\n\nconst quotes = [\n { who: \"Maya, illustrator\", text: \"My supporters see exactly where their tip goes.\" },\n { who: \"Eric, filmmaker\", text: \"I sold a cut to the highest bidder, live.\" },\n { who: \"Sam, musician\", text: \"90 % to me — and it shows on every payout.\" },\n];\n\n// Cards sliding the other way, slower; each card's text is read once (the copy is hidden from assistive technology).\nexport default function MarqueeCards() {\n return (\n <Marquee label=\"What creators say\" pauseLabel=\"Pause\" playLabel=\"Play\" direction=\"right\" speed={24} className=\"w-full max-w-2xl\">\n {quotes.map((q) => (\n <figure key={q.who} className=\"w-72 rounded-xl border border-border-default bg-surface-1 p-4\">\n <blockquote className=\"text-sm text-fg\">“{q.text}”</blockquote>\n <figcaption className=\"mt-2 text-xs text-fg-secondary\">{q.who}</figcaption>\n </figure>\n ))}\n </Marquee>\n );\n}\n"
|
|
147
|
-
}
|
|
148
|
-
]
|
|
149
|
-
},
|
|
150
|
-
"native": null,
|
|
151
|
-
"files": [
|
|
152
|
-
{
|
|
153
|
-
"path": "marquee/index.ts",
|
|
154
|
-
"content": "/** @krizaka/ui/marquee — `Marquee`: a band that slides, pausable (pointer, focus, a button), still under reduced motion. Client. */\nexport { Marquee, type MarqueeProps } from \"./marquee\";\n"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
"path": "marquee/marquee.tsx",
|
|
158
|
-
"content": "// Client (a pause button, a measure). A band that slides — and that anyone can stop: it pauses under the pointer and\n// while something inside has the focus, it carries a visible pause button (WCAG 2.2.2: motion longer than 5 s can be\n// paused), its speed is in pixels per second whatever its width (a long band does not race), its copy is hidden from\n// assistive technology (each item is read once), and under reduced motion it is a still row you scroll by hand.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type MarqueeProps = Omit<React.ComponentProps<\"section\">, \"children\"> & {\n /** The accessible name of the band (“Our partners”) — passed translated. */\n label: string;\n /** The pause button's name (“Pause the band”) — passed translated. */\n pauseLabel: string;\n /** The same button's name once paused (“Play the band”) — passed translated. */\n playLabel: string;\n /** The items: logos, words, cards. */\n children: React.ReactNode;\n /**\n * Pixels per second.\n * @default 40\n */\n speed?: number;\n /**\n * Which way it slides.\n * @default \"left\"\n */\n direction?: \"left\" | \"right\";\n /**\n * The edges fade into the page.\n * @default true\n */\n fade?: boolean;\n /** Starts paused. */\n defaultPaused?: boolean;\n};\n\n/** A band of items sliding forever — pausable, accessible, still under reduced motion. */\nexport function Marquee({ label, pauseLabel, playLabel, children, speed = 40, direction = \"left\", fade = true, defaultPaused = false, className, ...props }: MarqueeProps) {\n const [paused, setPaused] = React.useState(defaultPaused);\n const track = React.useRef<HTMLDivElement>(null);\n React.useEffect(() => {\n const el = track.current;\n if (!el) return;\n const measure = () => el.style.setProperty(\"--kz-marquee-duration\", `${Math.max(4, el.scrollWidth / 2 / Math.max(1, speed))}s`);\n measure();\n const ro = new ResizeObserver(measure);\n ro.observe(el);\n return () => ro.disconnect();\n }, [speed]);\n return (\n <section aria-label={label} data-paused={paused ? \"\" : undefined} data-direction={direction} data-fade={fade ? \"\" : undefined} className={cn(\"kz-band group/marquee relative\", className)} {...props}>\n {/* Focusable: the keyboard stops the band (focus-within) and, still under reduced motion, scrolls the row. */}\n <div\n tabIndex={0}\n className=\"kz-band-viewport overflow-hidden rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n {/* Each copy ends with the gap: two copies are exactly twice one, so the loop never jumps. */}\n <div ref={track} className=\"kz-marquee kz-loop\">\n <ul className=\"flex shrink-0 items-center gap-(--kz-band-gap) pr-(--kz-band-gap)\">{wrap(children)}</ul>\n <ul aria-hidden className=\"kz-band-copy flex shrink-0 items-center gap-(--kz-band-gap) pr-(--kz-band-gap)\">\n {wrap(children)}\n </ul>\n </div>\n </div>\n <button\n type=\"button\"\n aria-pressed={paused}\n aria-label={paused ? playLabel : pauseLabel}\n onClick={() => setPaused(!paused)}\n className=\"absolute right-1 top-1/2 inline-flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full border border-border-default bg-surface-1/90 text-fg-secondary opacity-0 shadow-sm transition-opacity hover:text-fg focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring group-hover/marquee:opacity-100 aria-pressed:opacity-100 motion-reduce:hidden\"\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-3.5 w-3.5\" fill=\"currentColor\" aria-hidden>\n {paused ? <path d=\"M8 5.5v13l10-6.5Z\" /> : <path d=\"M7 5h3.5v14H7zM13.5 5H17v14h-3.5z\" />}\n </svg>\n </button>\n </section>\n );\n}\n\nfunction wrap(children: React.ReactNode) {\n return React.Children.map(children, (child) => <li className=\"shrink-0\">{child}</li>);\n}\n"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"path": "marquee/meta.ts",
|
|
162
|
-
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Marquee\",\n summary:\n \"A band of items that slides forever — at a speed in pixels per second, paused by the pointer, the focus or its own pause button, read once by assistive technology, and a still row you scroll under reduced motion.\",\n status: \"beta\",\n category: \"data-display\",\n domain: \"page-blocks\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"Decorative scrolling logos of a site's page.\" }, desktop: { status: \"n/a\", reason: \"A public site's page, not a window of the Mac app.\" } },\n whenToUse: [\n \"A band of logos, names or short quotes on a landing page: proof at a glance.\",\n \"Short cards that need no comparison (testimonials, recent payouts) — one band per page.\",\n ],\n whenNotToUse: [\n { when: \"For content the reader must read in order or act on: a list stays still.\" },\n { when: \"For a few items that fit on one line: show them, still.\" },\n ],\n bestPractices: [\n \"Keep it slow (24–40 px/s) and short; one band per page.\",\n \"Items that make sense alone: the reader catches them in any order.\",\n \"Pass `label`, `pauseLabel` and `playLabel` translated: the band is a named region with a real pause button.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Focuses the band (it pauses; under reduced motion the arrows scroll it), the links inside, then the pause button.\" },\n { keys: \"Enter / Space\", action: \"On the pause button: stops or restarts the band.\" },\n ],\n notes: [\n \"A `section` named by `label`; the items are a list, and the second copy (for the loop) is hidden from assistive technology.\",\n \"The pause button (`aria-pressed`) meets WCAG 2.2.2: motion that lasts can be stopped.\",\n \"Under `prefers-reduced-motion` the band is still, its copy removed, and it scrolls by hand; off screen it pauses (MotionObserver).\",\n ],\n },\n related: [\"glow-card\", \"number-ticker\"],\n web: {\n imports: [\"Marquee\"],\n examples: [\n { name: \"logos\", title: \"A band of names\", description: \"Paused by the pointer, the focus or its button; a still row under reduced motion.\" },\n { name: \"cards\", title: \"Testimonials\", description: \"Cards sliding the other way, slower; each one read once.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"path": "meta.ts",
|
|
166
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the twelve domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"dependencies": [],
|
|
170
|
-
"registryDependencies": [
|
|
171
|
-
"cn"
|
|
172
|
-
],
|
|
173
|
-
"demo": {
|
|
174
|
-
"path": "examples/marquee/logos.tsx",
|
|
175
|
-
"content": "import { Marquee } from \"@krizaka/ui/marquee\";\n\nconst names = [\"Postgres\", \"Ollama\", \"Spring\", \"Kafka\", \"Keycloak\", \"Qdrant\", \"MinIO\", \"Grafana\"];\n\n// A band of names at 40 px/s: it pauses under the pointer or the focus, and its pause button (top right, on hover or\n// focus) stops it for good. Under reduced motion it is a still row you scroll.\nexport default function MarqueeLogos() {\n return (\n <Marquee label=\"Built on open source\" pauseLabel=\"Pause the band\" playLabel=\"Play the band\" className=\"w-full max-w-2xl\">\n {names.map((name) => (\n <span key={name} className=\"font-display text-lg font-semibold text-fg-secondary\">\n {name}\n </span>\n ))}\n </Marquee>\n );\n}\n"
|
|
176
|
-
},
|
|
177
|
-
"props": [
|
|
178
|
-
{
|
|
179
|
-
"component": "Marquee",
|
|
180
|
-
"description": "A band of items sliding forever — pausable, accessible, still under reduced motion.",
|
|
181
|
-
"props": [
|
|
182
|
-
{
|
|
183
|
-
"name": "children",
|
|
184
|
-
"type": "ReactNode",
|
|
185
|
-
"default": null,
|
|
186
|
-
"description": "The items: logos, words, cards.",
|
|
187
|
-
"required": true
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "label",
|
|
191
|
-
"type": "string",
|
|
192
|
-
"default": null,
|
|
193
|
-
"description": "The accessible name of the band (“Our partners”) — passed translated.",
|
|
194
|
-
"required": true
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"name": "pauseLabel",
|
|
198
|
-
"type": "string",
|
|
199
|
-
"default": null,
|
|
200
|
-
"description": "The pause button's name (“Pause the band”) — passed translated.",
|
|
201
|
-
"required": true
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "playLabel",
|
|
205
|
-
"type": "string",
|
|
206
|
-
"default": null,
|
|
207
|
-
"description": "The same button's name once paused (“Play the band”) — passed translated.",
|
|
208
|
-
"required": true
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"name": "defaultPaused",
|
|
212
|
-
"type": "boolean",
|
|
213
|
-
"default": "false",
|
|
214
|
-
"description": "Starts paused.",
|
|
215
|
-
"required": false
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"name": "direction",
|
|
219
|
-
"type": "\"right\" | \"left\"",
|
|
220
|
-
"default": "left",
|
|
221
|
-
"description": "Which way it slides.",
|
|
222
|
-
"required": false
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "fade",
|
|
226
|
-
"type": "boolean",
|
|
227
|
-
"default": "true",
|
|
228
|
-
"description": "The edges fade into the page.",
|
|
229
|
-
"required": false
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"name": "speed",
|
|
233
|
-
"type": "number",
|
|
234
|
-
"default": "40",
|
|
235
|
-
"description": "Pixels per second.",
|
|
236
|
-
"required": false
|
|
237
|
-
}
|
|
238
|
-
]
|
|
239
|
-
}
|
|
240
|
-
]
|
|
241
|
-
}
|