@krizaka/ui 3.69.0 → 3.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/dist/account-menu.d.ts +1 -1
  2. package/dist/account-menu.js +1 -1
  3. package/dist/account-settings.d.ts +1 -1
  4. package/dist/account-settings.js +1 -1
  5. package/dist/avatar/defaults.d.ts +22 -2
  6. package/dist/avatar/defaults.js +20 -7
  7. package/dist/avatar/defaults.js.map +1 -1
  8. package/dist/{avatar-BdZcfkWR.d.ts → avatar-B_na7r1U.d.ts} +16 -0
  9. package/dist/avatar.d.ts +22 -2
  10. package/dist/avatar.js +20 -7
  11. package/dist/avatar.js.map +1 -1
  12. package/dist/blocks.css +11 -0
  13. package/dist/chat.js +1 -1
  14. package/dist/chunk-2FCQCWIK.js +86 -0
  15. package/dist/chunk-2FCQCWIK.js.map +1 -0
  16. package/dist/chunk-3PRYL2LS.js +2 -0
  17. package/dist/chunk-3PRYL2LS.js.map +1 -0
  18. package/dist/{chunk-HK525THY.js → chunk-5MPPIGCB.js} +18 -7
  19. package/dist/chunk-5MPPIGCB.js.map +1 -0
  20. package/dist/{chunk-CSRKYZ53.js → chunk-CZHPWLNW.js} +1 -1
  21. package/dist/{chunk-PZ4FJOD5.js → chunk-HLEBSAGC.js} +5 -1
  22. package/dist/{chunk-PZ4FJOD5.js.map → chunk-HLEBSAGC.js.map} +1 -1
  23. package/dist/chunk-S4TLZRGZ.js +42 -0
  24. package/dist/chunk-S4TLZRGZ.js.map +1 -0
  25. package/dist/{chunk-EUJ7337V.js → chunk-TISDOZH3.js} +18 -7
  26. package/dist/chunk-TISDOZH3.js.map +1 -0
  27. package/dist/chunk-W64RAX4N.js +79 -0
  28. package/dist/chunk-W64RAX4N.js.map +1 -0
  29. package/dist/collection-switcher.d.ts +1 -1
  30. package/dist/confirm-button.js +5 -78
  31. package/dist/confirm-button.js.map +1 -1
  32. package/dist/{default-avatar-D9kiSFNB.d.ts → default-avatar-BL0nJFti.d.ts} +16 -0
  33. package/dist/entity-header.d.ts +1 -1
  34. package/dist/index.js +7 -7
  35. package/dist/kind-config-editor.js +3 -2
  36. package/dist/kind-config-editor.js.map +1 -1
  37. package/dist/match-dialog.js +1 -1
  38. package/dist/media-grid.d.ts +16 -0
  39. package/dist/media-grid.js +1 -1
  40. package/dist/money-input.js +6 -70
  41. package/dist/money-input.js.map +1 -1
  42. package/dist/native.d.ts +16 -0
  43. package/dist/native.js +17 -6
  44. package/dist/native.js.map +1 -1
  45. package/dist/nav-bar.d.ts +13 -2
  46. package/dist/nav-bar.js +74 -57
  47. package/dist/nav-bar.js.map +1 -1
  48. package/dist/notification-preferences.js +2 -1
  49. package/dist/notification-preferences.js.map +1 -1
  50. package/dist/price-catalogue-editor.d.ts +117 -0
  51. package/dist/price-catalogue-editor.js +194 -0
  52. package/dist/price-catalogue-editor.js.map +1 -0
  53. package/dist/promo-code-field.js +1 -1
  54. package/dist/proposal.d.ts +81 -0
  55. package/dist/proposal.js +71 -0
  56. package/dist/proposal.js.map +1 -0
  57. package/dist/schema-form.d.ts +106 -0
  58. package/dist/schema-form.js +268 -0
  59. package/dist/schema-form.js.map +1 -0
  60. package/dist/shop/map-gate.d.ts +1 -1
  61. package/dist/shop/map-gate.js +1 -1
  62. package/dist/shop/map-gate.js.map +1 -1
  63. package/dist/status-chip.js +16 -43
  64. package/dist/status-chip.js.map +1 -1
  65. package/dist/switch.js +2 -1
  66. package/dist/vertical-video.js +1 -1
  67. package/dist/wall.d.ts +7 -1
  68. package/dist/wall.js +5 -4
  69. package/dist/wall.js.map +1 -1
  70. package/package.json +51 -6
  71. package/registry/account-menu.json +1 -1
  72. package/registry/account-settings.json +1 -1
  73. package/registry/achievement.json +1 -1
  74. package/registry/action-bar.json +1 -1
  75. package/registry/activity-feed.json +1 -1
  76. package/registry/agenda.json +1 -1
  77. package/registry/alert.json +1 -1
  78. package/registry/analysis-report.json +1 -1
  79. package/registry/anatomy-plate.json +1 -1
  80. package/registry/app-frame.json +2 -2
  81. package/registry/app-header.json +1 -1
  82. package/registry/app-shell.json +1 -1
  83. package/registry/argument-card.json +1 -1
  84. package/registry/audio-player.json +1 -1
  85. package/registry/auth-layout.json +1 -1
  86. package/registry/avatar.json +4 -4
  87. package/registry/badge.json +1 -1
  88. package/registry/bird-plate.json +1 -1
  89. package/registry/button.json +1 -1
  90. package/registry/captcha.json +1 -1
  91. package/registry/card-grid.json +1 -1
  92. package/registry/card.json +1 -1
  93. package/registry/catalogue-page.json +1 -1
  94. package/registry/changelog-page.json +1 -1
  95. package/registry/chapter.json +1 -1
  96. package/registry/chat.json +1 -1
  97. package/registry/checkbox.json +1 -1
  98. package/registry/chip-link.json +1 -1
  99. package/registry/chip-row.json +1 -1
  100. package/registry/chip.json +1 -1
  101. package/registry/choice-grid.json +1 -1
  102. package/registry/code-block.json +1 -1
  103. package/registry/collection-switcher.json +1 -1
  104. package/registry/combobox.json +1 -1
  105. package/registry/command.json +1 -1
  106. package/registry/comparison-table.json +1 -1
  107. package/registry/component-page.json +1 -1
  108. package/registry/confirm-button.json +1 -1
  109. package/registry/contact-page.json +1 -1
  110. package/registry/continue-prompt.json +1 -1
  111. package/registry/copy-button.json +1 -1
  112. package/registry/countdown.json +1 -1
  113. package/registry/cover-hero.json +1 -1
  114. package/registry/cta-panel.json +1 -1
  115. package/registry/dashboard-layout.json +1 -1
  116. package/registry/data-table.json +1 -1
  117. package/registry/date-picker.json +1 -1
  118. package/registry/decision-list.json +1 -1
  119. package/registry/description-list.json +1 -1
  120. package/registry/desktop-window.json +1 -1
  121. package/registry/detail-layout.json +1 -1
  122. package/registry/dialog.json +1 -1
  123. package/registry/docs-article-page.json +1 -1
  124. package/registry/docs-hub-page.json +1 -1
  125. package/registry/docs-layout.json +1 -1
  126. package/registry/docs-nav.json +1 -1
  127. package/registry/document-viewer.json +1 -1
  128. package/registry/doodle.json +1 -1
  129. package/registry/drop-overlay.json +1 -1
  130. package/registry/dropdown-menu.json +1 -1
  131. package/registry/elephant.json +2 -2
  132. package/registry/embed-facade.json +1 -1
  133. package/registry/empty-state.json +1 -1
  134. package/registry/engine-flow.json +1 -1
  135. package/registry/entity-header.json +1 -1
  136. package/registry/environment-notice.json +1 -1
  137. package/registry/error-page.json +1 -1
  138. package/registry/examples/price-catalogue-editor/default.d.ts +4 -0
  139. package/registry/examples/price-catalogue-editor/default.js +47 -0
  140. package/registry/examples/price-catalogue-editor/default.tsx +25 -0
  141. package/registry/examples/proposal/default.d.ts +4 -0
  142. package/registry/examples/proposal/default.js +30 -0
  143. package/registry/examples/proposal/default.tsx +24 -0
  144. package/registry/examples/schema-form/default.d.ts +4 -0
  145. package/registry/examples/schema-form/default.js +29 -0
  146. package/registry/examples/schema-form/default.tsx +27 -0
  147. package/registry/examples/wall/pinned-note.js +2 -1
  148. package/registry/examples/wall/pinned-note.tsx +2 -1
  149. package/registry/field.json +1 -1
  150. package/registry/file-upload.json +1 -1
  151. package/registry/filter-bar.json +1 -1
  152. package/registry/flock.json +1 -1
  153. package/registry/footnote.json +1 -1
  154. package/registry/force-update-screen.json +1 -1
  155. package/registry/form.json +1 -1
  156. package/registry/gallery-page.json +1 -1
  157. package/registry/genui.json +1 -1
  158. package/registry/glossary-term.json +1 -1
  159. package/registry/glossary.json +1 -1
  160. package/registry/glow-card.json +1 -1
  161. package/registry/goal-gauge.json +1 -1
  162. package/registry/grade-stamp.json +1 -1
  163. package/registry/how-it-works-page.json +1 -1
  164. package/registry/image-cropper.json +1 -1
  165. package/registry/index.json +114 -8
  166. package/registry/iso.json +1 -1
  167. package/registry/kanban.json +1 -1
  168. package/registry/kbd.json +1 -1
  169. package/registry/kind-config-editor.json +1 -1
  170. package/registry/kpi-explained.json +1 -1
  171. package/registry/landing-page.json +1 -1
  172. package/registry/landscape.json +1 -1
  173. package/registry/language-switch.json +1 -1
  174. package/registry/legal-page.json +1 -1
  175. package/registry/link-card.json +1 -1
  176. package/registry/list.json +1 -1
  177. package/registry/loader.json +1 -1
  178. package/registry/longform-page.json +1 -1
  179. package/registry/maintenance-screen.json +1 -1
  180. package/registry/map.json +2 -2
  181. package/registry/margin-layout.json +1 -1
  182. package/registry/markdown.json +1 -1
  183. package/registry/marketing-layout.json +1 -1
  184. package/registry/marquee.json +1 -1
  185. package/registry/mascot-quote.json +1 -1
  186. package/registry/mascot-state.json +1 -1
  187. package/registry/mascots.json +1 -1
  188. package/registry/match-dialog.json +1 -1
  189. package/registry/media-capture.json +1 -1
  190. package/registry/media-gallery.json +1 -1
  191. package/registry/media-grid.json +1 -1
  192. package/registry/meta-row.json +1 -1
  193. package/registry/meter.json +1 -1
  194. package/registry/money-input.json +1 -1
  195. package/registry/nav-bar.json +30 -6
  196. package/registry/next-actions.json +1 -1
  197. package/registry/notification-preferences.json +1 -1
  198. package/registry/number-ticker.json +1 -1
  199. package/registry/opening-hours.json +1 -1
  200. package/registry/page-header.json +1 -1
  201. package/registry/page-hero.json +1 -1
  202. package/registry/page-index.json +1 -1
  203. package/registry/page.json +1 -1
  204. package/registry/pagination.json +1 -1
  205. package/registry/photo-grid.json +1 -1
  206. package/registry/pointer-light.json +1 -1
  207. package/registry/popover.json +1 -1
  208. package/registry/price-catalogue-editor.json +228 -0
  209. package/registry/pricing-page.json +1 -1
  210. package/registry/product-page.json +1 -1
  211. package/registry/profile-card.json +1 -1
  212. package/registry/progress.json +1 -1
  213. package/registry/promise-card.json +1 -1
  214. package/registry/promo-code-field.json +1 -1
  215. package/registry/proposal.json +353 -0
  216. package/registry/qr-code.json +1 -1
  217. package/registry/quota-meter.json +1 -1
  218. package/registry/radio-group.json +1 -1
  219. package/registry/rail-nav.json +2 -2
  220. package/registry/recipes.json +1 -1
  221. package/registry/retro-tv.json +1 -1
  222. package/registry/reviews.json +1 -1
  223. package/registry/router.json +1 -1
  224. package/registry/schema-form.json +253 -0
  225. package/registry/scroll-stage.json +1 -1
  226. package/registry/search-field.json +1 -1
  227. package/registry/section-backdrop.json +1 -1
  228. package/registry/separator.json +1 -1
  229. package/registry/service-card.json +1 -1
  230. package/registry/settings-layout.json +1 -1
  231. package/registry/shop-composer.json +1 -1
  232. package/registry/shop-gallery.json +1 -1
  233. package/registry/shop.json +3 -3
  234. package/registry/showcase.json +1 -1
  235. package/registry/signature.json +1 -1
  236. package/registry/site-cahier.json +1 -1
  237. package/registry/site-footer.json +2 -2
  238. package/registry/sites.json +1 -1
  239. package/registry/skeleton.json +1 -1
  240. package/registry/skip-link.json +1 -1
  241. package/registry/slider.json +1 -1
  242. package/registry/slot-picker.json +1 -1
  243. package/registry/slot.json +1 -1
  244. package/registry/specimen-tag.json +1 -1
  245. package/registry/speed-lines.json +1 -1
  246. package/registry/spinner.json +1 -1
  247. package/registry/split-view.json +1 -1
  248. package/registry/stage-banner.json +1 -1
  249. package/registry/stat.json +1 -1
  250. package/registry/status-chip.json +1 -1
  251. package/registry/status-page.json +1 -1
  252. package/registry/step-progress.json +1 -1
  253. package/registry/step-showcase.json +1 -1
  254. package/registry/stepper.json +1 -1
  255. package/registry/sticky-action.json +1 -1
  256. package/registry/stuck.json +1 -1
  257. package/registry/swipe-deck.json +1 -1
  258. package/registry/switch.json +1 -1
  259. package/registry/tabs.json +1 -1
  260. package/registry/tag-input.json +1 -1
  261. package/registry/tag-selector.json +1 -1
  262. package/registry/taped-photo.json +1 -1
  263. package/registry/terminal-replay.json +1 -1
  264. package/registry/text-style.json +1 -1
  265. package/registry/theme.json +1 -1
  266. package/registry/toast.json +1 -1
  267. package/registry/toc.json +1 -1
  268. package/registry/tooltip.json +1 -1
  269. package/registry/tree-view.json +1 -1
  270. package/registry/update-prompt.json +1 -1
  271. package/registry/upload-queue.json +1 -1
  272. package/registry/usage.json +1 -1
  273. package/registry/verified-badge.json +1 -1
  274. package/registry/versus-card.json +1 -1
  275. package/registry/vertical-video.json +1 -1
  276. package/registry/video-player.json +1 -1
  277. package/registry/video-trimmer.json +1 -1
  278. package/registry/virtual.json +1 -1
  279. package/registry/wall.json +47 -4
  280. package/registry/waveform.json +1 -1
  281. package/dist/chunk-EUJ7337V.js.map +0 -1
  282. package/dist/chunk-HK525THY.js.map +0 -1
  283. /package/dist/{chunk-CSRKYZ53.js.map → chunk-CZHPWLNW.js.map} +0 -0
@@ -0,0 +1,353 @@
1
+ {
2
+ "name": "proposal",
3
+ "type": "primitive",
4
+ "title": "Proposal review",
5
+ "summary": "An agent proposes, a person approves, rejects or edits: who proposes, what, how sure it is (in words and figures), the evidence as a signed diff, and the decision announced.",
6
+ "description": "An agent proposes, a person approves, rejects or edits: who proposes, what, how sure it is (in words and figures), the evidence as a signed diff, and the decision announced.",
7
+ "status": "beta",
8
+ "deprecated": null,
9
+ "category": "blocks",
10
+ "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "gap",
17
+ "reason": "The Orazaka Mac app renders the web block (orazaka#109); a phone twin follows with the first phone approval screen.",
18
+ "issue": "krizaka/krizaka-ui#673"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
24
+ "whenToUse": [
25
+ "A run needs a human to approve what an agent proposes (a timeline step, a review queue, a diff with approval).",
26
+ "Any proposal whose approval must be explicit, keyboard-reachable and announced."
27
+ ],
28
+ "whenNotToUse": [
29
+ {
30
+ "when": "For a plain yes/no question.",
31
+ "use": "confirm-button"
32
+ },
33
+ {
34
+ "when": "For a destructive action you chose yourself.",
35
+ "use": "confirm-button"
36
+ }
37
+ ],
38
+ "bestPractices": [
39
+ "The host owns the state: pass `waiting` until the decision is saved, then `approved`, `rejected` or `expired`; the new state is announced.",
40
+ "Set `irreversible` when approving cannot be undone: the primary button takes two presses.",
41
+ "Say the confidence in words (`label`) and add the figure (`percent`); the chip's tone only reinforces.",
42
+ "Examples use a fictitious run with round demo amounts, never a ledger line."
43
+ ],
44
+ "accessibility": {
45
+ "keyboard": [
46
+ {
47
+ "keys": "Tab",
48
+ "action": "Approve, Reject, then Edit, in that order."
49
+ },
50
+ {
51
+ "keys": "Enter / Space",
52
+ "action": "Presses the focused button; an irreversible approval needs a second press."
53
+ }
54
+ ],
55
+ "notes": [
56
+ "There is no slide-to-approve: a drag has no keyboard or screen-reader path (ADR-006).",
57
+ "`DiffView` prefixes every line with a sign and a hidden word (Added, Removed, Unchanged); the colour is never the only signal.",
58
+ "The state is an `output` region: it is read when it changes.",
59
+ "At 360 px the buttons wrap and the diff lines wrap; nothing scrolls sideways."
60
+ ]
61
+ },
62
+ "related": [
63
+ "confirm-button",
64
+ "decision-list",
65
+ "button"
66
+ ],
67
+ "web": {
68
+ "entry": "@krizaka/ui/proposal",
69
+ "import": "import { ProposalReview, DiffView } from \"@krizaka/ui/proposal\";",
70
+ "props": [
71
+ {
72
+ "component": "DiffView",
73
+ "description": "The lines of a change, signed and labelled; colour only reinforces.",
74
+ "props": [
75
+ {
76
+ "name": "lines",
77
+ "type": "readonly DiffLine[]",
78
+ "default": null,
79
+ "description": "The lines of the change, in order.",
80
+ "required": true
81
+ },
82
+ {
83
+ "name": "words",
84
+ "type": "DiffViewWords",
85
+ "default": null,
86
+ "description": "The words, passed translated.",
87
+ "required": true
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "component": "ProposalReview",
93
+ "description": "One proposal of an agent, its evidence, and the person's decision.",
94
+ "props": [
95
+ {
96
+ "name": "agent",
97
+ "type": "string",
98
+ "default": null,
99
+ "description": "The agent that proposes: its name, with its bird or mark in `mark`.",
100
+ "required": true
101
+ },
102
+ {
103
+ "name": "confidence",
104
+ "type": "ProposalConfidence",
105
+ "default": null,
106
+ "description": "How sure the agent is: in words, with the figure when known.",
107
+ "required": true
108
+ },
109
+ {
110
+ "name": "onApprove",
111
+ "type": "() => void",
112
+ "default": null,
113
+ "description": "The person approves.",
114
+ "required": true
115
+ },
116
+ {
117
+ "name": "onReject",
118
+ "type": "() => void",
119
+ "default": null,
120
+ "description": "The person rejects.",
121
+ "required": true
122
+ },
123
+ {
124
+ "name": "state",
125
+ "type": "ProposalState",
126
+ "default": null,
127
+ "description": "Where the decision stands; the host owns it.",
128
+ "required": true
129
+ },
130
+ {
131
+ "name": "summary",
132
+ "type": "string",
133
+ "default": null,
134
+ "description": "What it proposes, in one sentence.",
135
+ "required": true
136
+ },
137
+ {
138
+ "name": "words",
139
+ "type": "ProposalWords",
140
+ "default": null,
141
+ "description": "The words, passed translated.",
142
+ "required": true
143
+ },
144
+ {
145
+ "name": "busy",
146
+ "type": "boolean",
147
+ "default": "false",
148
+ "description": "Blocks the actions while the host saves the decision.",
149
+ "required": false
150
+ },
151
+ {
152
+ "name": "children",
153
+ "type": "ReactNode",
154
+ "default": null,
155
+ "description": "The evidence: a `DiffView`, a list, a quote.",
156
+ "required": false
157
+ },
158
+ {
159
+ "name": "irreversible",
160
+ "type": "boolean",
161
+ "default": "false",
162
+ "description": "The approval cannot be undone: it takes two presses.",
163
+ "required": false
164
+ },
165
+ {
166
+ "name": "locale",
167
+ "type": "string",
168
+ "default": null,
169
+ "description": "BCP 47 language for the percentage.",
170
+ "required": false
171
+ },
172
+ {
173
+ "name": "mark",
174
+ "type": "ReactNode",
175
+ "default": null,
176
+ "description": "The agent's bird or mark, drawn small beside its name.",
177
+ "required": false
178
+ },
179
+ {
180
+ "name": "onEdit",
181
+ "type": "(() => void)",
182
+ "default": null,
183
+ "description": "The person edits the proposal first; the button shows only when given.",
184
+ "required": false
185
+ }
186
+ ]
187
+ }
188
+ ],
189
+ "examples": [
190
+ {
191
+ "name": "default",
192
+ "title": "Approve a change",
193
+ "description": "A planner agent proposes a reminder change; the diff shows the lines; Approve, Reject and Edit.",
194
+ "path": "examples/proposal/default.tsx",
195
+ "module": "@krizaka/ui/registry/examples/proposal/default",
196
+ "code": "\"use client\";\n\nimport { DiffView, ProposalReview, type ProposalWords } from \"@krizaka/ui/proposal\";\nimport { useState } from \"react\";\n\nexport const words: ProposalWords = {\n approve: \"Approve\", reject: \"Reject\", edit: \"Edit\", confirmApprove: \"Approve for good?\",\n states: { waiting: \"Waiting for your decision\", approved: \"Approved\", rejected: \"Rejected\", expired: \"Expired\" },\n};\nexport const diffWords = { label: \"Proposed changes\", added: \"Added\", removed: \"Removed\", unchanged: \"Unchanged\" };\nexport const lines = [\n { kind: \"context\", text: \"Delivery: weekly\" },\n { kind: \"removed\", text: \"Reminder: 3 days before\" },\n { kind: \"added\", text: \"Reminder: 1 day before, by e-mail\" },\n] as const;\n\nexport default function ProposalDefault() {\n const [state, setState] = useState<\"waiting\" | \"approved\" | \"rejected\">(\"waiting\");\n return (\n <ProposalReview agent=\"Planner agent\" summary=\"Move the reminder to the day before, by e-mail.\" confidence={{ level: \"high\", label: \"High confidence\", percent: 92 }} state={state} locale=\"en-CA\" words={words} onApprove={() => setState(\"approved\")} onReject={() => setState(\"rejected\")} onEdit={() => {}}>\n <DiffView lines={lines} words={diffWords} />\n </ProposalReview>\n );\n}\n"
197
+ }
198
+ ]
199
+ },
200
+ "native": null,
201
+ "files": [
202
+ {
203
+ "path": "meta.ts",
204
+ "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 | \"iso\"\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 | \"meta-row\"\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 * `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 = \"stable\" | \"beta\" | \"deprecated\";\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 /** 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"
205
+ },
206
+ {
207
+ "path": "proposal/diff-view.tsx",
208
+ "content": "// Server-safe: no hook. Removed and added lines of a proposal: each line carries a sign (− or +) AND a text label for\n// screen readers, so the colour is never the only signal. Long lines wrap (a phone has no horizontal scroll).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type DiffLine = {\n /** `removed` (−), `added` (+) or `context` (unchanged). */\n kind: \"added\" | \"removed\" | \"context\";\n /** The line's text, without its sign. */\n text: string;\n};\n\nexport type DiffViewWords = {\n /** The group's accessible name: « Proposed changes ». */\n label: string;\n /** Read before an added line: « Added ». */\n added: string;\n /** Read before a removed line: « Removed ». */\n removed: string;\n /** Read before an unchanged line: « Unchanged ». */\n unchanged: string;\n};\n\nexport type DiffViewProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The lines of the change, in order. */\n lines: readonly DiffLine[];\n /** The words, passed translated. */\n words: DiffViewWords;\n};\n\nconst SIGN = { added: \"+\", removed: \"−\", context: \" \" } as const;\nconst TONE = {\n added: \"bg-success/10 text-fg\",\n removed: \"bg-danger/10 text-fg\",\n context: \"text-fg-secondary\",\n} as const;\n\n/** The lines of a change, signed and labelled; colour only reinforces. */\nexport function DiffView({ lines, words, className, ...props }: Readonly<DiffViewProps>) {\n const spoken = { added: words.added, removed: words.removed, context: words.unchanged } as const;\n return (\n <div role=\"group\" aria-label={words.label} data-diff=\"\" className={cn(\"overflow-hidden rounded-lg border border-border bg-surface-1 font-mono text-xs\", className)} {...props}>\n {lines.map((line, index) => (\n <div key={`${index}-${line.kind}`} data-kind={line.kind} className={cn(\"flex gap-2 px-3 py-1\", TONE[line.kind])}>\n <span aria-hidden className=\"w-3 shrink-0 select-none text-center font-semibold\">\n {SIGN[line.kind]}\n </span>\n <span className=\"sr-only\">{spoken[line.kind]}: </span>\n <span className=\"min-w-0 whitespace-pre-wrap break-words\">{line.text}</span>\n </div>\n ))}\n </div>\n );\n}\n"
209
+ },
210
+ {
211
+ "path": "proposal/index.ts",
212
+ "content": "/** @krizaka/ui/proposal — `ProposalReview` (an agent proposes, a person approves, rejects or edits) and `DiffView` (signed, labelled lines). Client (\"use client\"). */\nexport { type DiffLine, DiffView, type DiffViewProps, type DiffViewWords } from \"./diff-view\";\nexport { type ProposalConfidence, ProposalReview, type ProposalReviewProps, type ProposalState, type ProposalWords } from \"./proposal-review\";\n"
213
+ },
214
+ {
215
+ "path": "proposal/meta.ts",
216
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Proposal review\",\n summary: \"An agent proposes, a person approves, rejects or edits: who proposes, what, how sure it is (in words and figures), the evidence as a signed diff, and the decision announced.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n parity: { native: { status: \"gap\", issue: \"krizaka/krizaka-ui#673\", reason: \"The Orazaka Mac app renders the web block (orazaka#109); a phone twin follows with the first phone approval screen.\" }, desktop: \"web\" },\n whenToUse: [\"A run needs a human to approve what an agent proposes (a timeline step, a review queue, a diff with approval).\", \"Any proposal whose approval must be explicit, keyboard-reachable and announced.\"],\n whenNotToUse: [\n { when: \"For a plain yes/no question.\", use: \"confirm-button\" },\n { when: \"For a destructive action you chose yourself.\", use: \"confirm-button\" },\n ],\n bestPractices: [\n \"The host owns the state: pass `waiting` until the decision is saved, then `approved`, `rejected` or `expired`; the new state is announced.\",\n \"Set `irreversible` when approving cannot be undone: the primary button takes two presses.\",\n \"Say the confidence in words (`label`) and add the figure (`percent`); the chip's tone only reinforces.\",\n \"Examples use a fictitious run with round demo amounts, never a ledger line.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Approve, Reject, then Edit, in that order.\" },\n { keys: \"Enter / Space\", action: \"Presses the focused button; an irreversible approval needs a second press.\" },\n ],\n notes: [\n \"There is no slide-to-approve: a drag has no keyboard or screen-reader path (ADR-006).\",\n \"`DiffView` prefixes every line with a sign and a hidden word (Added, Removed, Unchanged); the colour is never the only signal.\",\n \"The state is an `output` region: it is read when it changes.\",\n \"At 360 px the buttons wrap and the diff lines wrap; nothing scrolls sideways.\",\n ],\n },\n related: [\"confirm-button\", \"decision-list\", \"button\"],\n web: {\n imports: [\"ProposalReview\", \"DiffView\"],\n examples: [{ name: \"default\", title: \"Approve a change\", description: \"A planner agent proposes a reminder change; the diff shows the lines; Approve, Reject and Edit.\" }],\n },\n} satisfies ComponentMeta;\n"
217
+ },
218
+ {
219
+ "path": "proposal/proposal-review.tsx",
220
+ "content": "\"use client\";\n// Client (the two-step confirmation lives in ConfirmButton). An agent proposes, a person approves, rejects or edits. The\n// host owns the state (`waiting` · `approved` · `rejected` · `expired`) and announces it here; the block never decides\n// for the person. No slide-to-approve (ADR-006): a button, reachable by keyboard and read by a screen reader.\nimport * as React from \"react\";\n\nimport { Badge } from \"../badge/badge\";\nimport { Button } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { ConfirmButton } from \"../confirm-button/confirm-button\";\n\nexport type ProposalState = \"waiting\" | \"approved\" | \"rejected\" | \"expired\";\n\nexport type ProposalConfidence = {\n /** In words: « High confidence », never colour alone. */\n label: string;\n /** 0 to 100, shown beside the words when given. */\n percent?: number;\n /** `high` · `medium` · `low`: the tone of the chip. */\n level: \"high\" | \"medium\" | \"low\";\n};\n\nexport type ProposalWords = {\n /** « Approve » */\n approve: string;\n /** « Reject » */\n reject: string;\n /** Shown only when `onEdit` is given. */\n edit?: string;\n /** What the second press of an irreversible approval does: « Approve for good? ». */\n confirmApprove: string;\n /** The states in words, announced when they change. */\n states: Record<ProposalState, string>;\n};\n\nexport type ProposalReviewProps = Omit<React.ComponentProps<\"section\">, \"title\" | \"children\"> & {\n /** The agent that proposes: its name, with its bird or mark in `mark`. */\n agent: string;\n /** The agent's bird or mark, drawn small beside its name. */\n mark?: React.ReactNode;\n /** What it proposes, in one sentence. */\n summary: string;\n /** How sure the agent is: in words, with the figure when known. */\n confidence: ProposalConfidence;\n /** The evidence: a `DiffView`, a list, a quote. */\n children?: React.ReactNode;\n /** Where the decision stands; the host owns it. */\n state: ProposalState;\n /** BCP 47 language for the percentage. */\n locale?: string;\n /** The words, passed translated. */\n words: ProposalWords;\n /** The person approves. */\n onApprove: () => void;\n /** The person rejects. */\n onReject: () => void;\n /** The person edits the proposal first; the button shows only when given. */\n onEdit?: () => void;\n /** The approval cannot be undone: it takes two presses. */\n irreversible?: boolean;\n /** Blocks the actions while the host saves the decision. */\n busy?: boolean;\n};\n\nconst TONES = { high: \"success\", medium: \"accent\", low: \"warning\" } as const;\n\n/** One proposal of an agent, its evidence, and the person's decision. */\nexport function ProposalReview({ agent, mark, summary, confidence, children, state, locale, words, onApprove, onReject, onEdit, irreversible = false, busy = false, className, ...props }: Readonly<ProposalReviewProps>) {\n const headingId = React.useId();\n const percent = confidence.percent === undefined ? null : new Intl.NumberFormat(locale, { style: \"percent\", maximumFractionDigits: 0 }).format(confidence.percent / 100);\n return (\n <section aria-labelledby={headingId} data-state={state} className={cn(\"flex flex-col gap-3 rounded-xl border border-border bg-surface-1 p-4\", className)} {...props}>\n <header className=\"flex flex-wrap items-center justify-between gap-x-3 gap-y-2\">\n <div className=\"flex min-w-0 items-center gap-2\">\n {mark && <span className=\"h-8 w-8 shrink-0 [&>*]:h-full [&>*]:w-full\">{mark}</span>}\n <p id={headingId} className=\"min-w-0 text-sm font-semibold break-words text-fg\">\n {agent}\n </p>\n </div>\n <Badge tone={TONES[confidence.level]} dot>\n {confidence.label}\n {percent && ` · ${percent}`}\n </Badge>\n </header>\n <p className=\"text-base text-fg\">{summary}</p>\n {children}\n <div className=\"flex flex-wrap items-center gap-2\">\n {state === \"waiting\" ? (\n <>\n {irreversible ? (\n <ConfirmButton variant=\"primary\" size=\"md\" disabled={busy} confirmLabel={words.confirmApprove} onConfirm={onApprove}>\n {words.approve}\n </ConfirmButton>\n ) : (\n <Button variant=\"primary\" size=\"md\" disabled={busy} onClick={onApprove}>\n {words.approve}\n </Button>\n )}\n <Button variant=\"secondary\" size=\"md\" disabled={busy} onClick={onReject}>\n {words.reject}\n </Button>\n {onEdit && words.edit && (\n <Button variant=\"ghost\" size=\"md\" disabled={busy} onClick={onEdit}>\n {words.edit}\n </Button>\n )}\n </>\n ) : null}\n <output data-proposal-state={state} className={cn(\"text-sm font-medium\", state === \"waiting\" ? \"sr-only\" : \"text-fg-secondary\")}>\n {words.states[state]}\n </output>\n </div>\n </section>\n );\n}\n"
221
+ }
222
+ ],
223
+ "dependencies": [],
224
+ "registryDependencies": [
225
+ "badge",
226
+ "button",
227
+ "cn",
228
+ "confirm-button"
229
+ ],
230
+ "demo": {
231
+ "path": "examples/proposal/default.tsx",
232
+ "content": "\"use client\";\n\nimport { DiffView, ProposalReview, type ProposalWords } from \"@krizaka/ui/proposal\";\nimport { useState } from \"react\";\n\nexport const words: ProposalWords = {\n approve: \"Approve\", reject: \"Reject\", edit: \"Edit\", confirmApprove: \"Approve for good?\",\n states: { waiting: \"Waiting for your decision\", approved: \"Approved\", rejected: \"Rejected\", expired: \"Expired\" },\n};\nexport const diffWords = { label: \"Proposed changes\", added: \"Added\", removed: \"Removed\", unchanged: \"Unchanged\" };\nexport const lines = [\n { kind: \"context\", text: \"Delivery: weekly\" },\n { kind: \"removed\", text: \"Reminder: 3 days before\" },\n { kind: \"added\", text: \"Reminder: 1 day before, by e-mail\" },\n] as const;\n\nexport default function ProposalDefault() {\n const [state, setState] = useState<\"waiting\" | \"approved\" | \"rejected\">(\"waiting\");\n return (\n <ProposalReview agent=\"Planner agent\" summary=\"Move the reminder to the day before, by e-mail.\" confidence={{ level: \"high\", label: \"High confidence\", percent: 92 }} state={state} locale=\"en-CA\" words={words} onApprove={() => setState(\"approved\")} onReject={() => setState(\"rejected\")} onEdit={() => {}}>\n <DiffView lines={lines} words={diffWords} />\n </ProposalReview>\n );\n}\n"
233
+ },
234
+ "props": [
235
+ {
236
+ "component": "DiffView",
237
+ "description": "The lines of a change, signed and labelled; colour only reinforces.",
238
+ "props": [
239
+ {
240
+ "name": "lines",
241
+ "type": "readonly DiffLine[]",
242
+ "default": null,
243
+ "description": "The lines of the change, in order.",
244
+ "required": true
245
+ },
246
+ {
247
+ "name": "words",
248
+ "type": "DiffViewWords",
249
+ "default": null,
250
+ "description": "The words, passed translated.",
251
+ "required": true
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "component": "ProposalReview",
257
+ "description": "One proposal of an agent, its evidence, and the person's decision.",
258
+ "props": [
259
+ {
260
+ "name": "agent",
261
+ "type": "string",
262
+ "default": null,
263
+ "description": "The agent that proposes: its name, with its bird or mark in `mark`.",
264
+ "required": true
265
+ },
266
+ {
267
+ "name": "confidence",
268
+ "type": "ProposalConfidence",
269
+ "default": null,
270
+ "description": "How sure the agent is: in words, with the figure when known.",
271
+ "required": true
272
+ },
273
+ {
274
+ "name": "onApprove",
275
+ "type": "() => void",
276
+ "default": null,
277
+ "description": "The person approves.",
278
+ "required": true
279
+ },
280
+ {
281
+ "name": "onReject",
282
+ "type": "() => void",
283
+ "default": null,
284
+ "description": "The person rejects.",
285
+ "required": true
286
+ },
287
+ {
288
+ "name": "state",
289
+ "type": "ProposalState",
290
+ "default": null,
291
+ "description": "Where the decision stands; the host owns it.",
292
+ "required": true
293
+ },
294
+ {
295
+ "name": "summary",
296
+ "type": "string",
297
+ "default": null,
298
+ "description": "What it proposes, in one sentence.",
299
+ "required": true
300
+ },
301
+ {
302
+ "name": "words",
303
+ "type": "ProposalWords",
304
+ "default": null,
305
+ "description": "The words, passed translated.",
306
+ "required": true
307
+ },
308
+ {
309
+ "name": "busy",
310
+ "type": "boolean",
311
+ "default": "false",
312
+ "description": "Blocks the actions while the host saves the decision.",
313
+ "required": false
314
+ },
315
+ {
316
+ "name": "children",
317
+ "type": "ReactNode",
318
+ "default": null,
319
+ "description": "The evidence: a `DiffView`, a list, a quote.",
320
+ "required": false
321
+ },
322
+ {
323
+ "name": "irreversible",
324
+ "type": "boolean",
325
+ "default": "false",
326
+ "description": "The approval cannot be undone: it takes two presses.",
327
+ "required": false
328
+ },
329
+ {
330
+ "name": "locale",
331
+ "type": "string",
332
+ "default": null,
333
+ "description": "BCP 47 language for the percentage.",
334
+ "required": false
335
+ },
336
+ {
337
+ "name": "mark",
338
+ "type": "ReactNode",
339
+ "default": null,
340
+ "description": "The agent's bird or mark, drawn small beside its name.",
341
+ "required": false
342
+ },
343
+ {
344
+ "name": "onEdit",
345
+ "type": "(() => void)",
346
+ "default": null,
347
+ "description": "The person edits the proposal first; the button shows only when given.",
348
+ "required": false
349
+ }
350
+ ]
351
+ }
352
+ ]
353
+ }
@@ -236,7 +236,7 @@
236
236
  },
237
237
  {
238
238
  "path": "meta.ts",
239
- "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 | \"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 | \"iso\"\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 | \"meta-row\"\n | \"waveform\"\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 | \"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 * `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 = \"stable\" | \"beta\" | \"deprecated\";\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 /** 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"
239
+ "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 | \"iso\"\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 | \"meta-row\"\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 * `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 = \"stable\" | \"beta\" | \"deprecated\";\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 /** 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"
240
240
  },
241
241
  {
242
242
  "path": "qr-code/encode.ts",
@@ -181,7 +181,7 @@
181
181
  "files": [
182
182
  {
183
183
  "path": "meta.ts",
184
- "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 | \"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 | \"iso\"\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 | \"meta-row\"\n | \"waveform\"\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 | \"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 * `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 = \"stable\" | \"beta\" | \"deprecated\";\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 /** 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"
184
+ "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 | \"iso\"\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 | \"meta-row\"\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 * `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 = \"stable\" | \"beta\" | \"deprecated\";\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 /** 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"
185
185
  },
186
186
  {
187
187
  "path": "quota-meter/index.ts",