@krizaka/ui 3.74.0 → 3.76.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 (286) hide show
  1. package/README.md +2 -6
  2. package/dist/blocks.css +2 -0
  3. package/dist/{chunk-GSQRSWOE.js → chunk-CEW3LQOZ.js} +520 -429
  4. package/dist/chunk-CEW3LQOZ.js.map +1 -0
  5. package/dist/{chunk-E4FMPPDL.js → chunk-WC3SO4CE.js} +2 -2
  6. package/dist/{chunk-KF7UB3LM.js → chunk-YQWYGQTV.js} +11 -9
  7. package/dist/{chunk-KF7UB3LM.js.map → chunk-YQWYGQTV.js.map} +1 -1
  8. package/dist/{chunk-M3GEYLMR.js → chunk-ZPOVOEO3.js} +1 -2
  9. package/dist/data-table.d.ts +1 -1
  10. package/dist/data-table.js +3 -3
  11. package/dist/filter-bar.d.ts +12 -4
  12. package/dist/filter-bar.js +1 -1
  13. package/dist/gallery-page.js +3 -3
  14. package/dist/genui.js +101 -35
  15. package/dist/genui.js.map +1 -1
  16. package/dist/language-switch.d.ts +9 -9
  17. package/dist/{lightbox-D5NAHFEA.js → lightbox-Q45BZ3HW.js} +3 -3
  18. package/dist/match-dialog.js +2 -2
  19. package/dist/motion.css +1 -25
  20. package/dist/native/list.js +1 -1
  21. package/dist/native/list.js.map +1 -1
  22. package/dist/native.d.ts +2 -54
  23. package/dist/native.js +464 -560
  24. package/dist/native.js.map +1 -1
  25. package/dist/nav-bar.js +1 -1
  26. package/dist/nav-bar.js.map +1 -1
  27. package/dist/product-page.js +3 -3
  28. package/dist/shop-gallery.js +1 -1
  29. package/dist/tag-selector.js +16 -10
  30. package/dist/tag-selector.js.map +1 -1
  31. package/dist/theme.d.ts +3 -1
  32. package/dist/theme.js +2 -1
  33. package/dist/theme.js.map +1 -1
  34. package/dist/vertical-video.js +1 -1
  35. package/dist/waveform.js.map +1 -1
  36. package/package.json +8 -84
  37. package/registry/account-menu.json +1 -1
  38. package/registry/account-settings.json +1 -1
  39. package/registry/achievement.json +1 -1
  40. package/registry/action-bar.json +1 -1
  41. package/registry/activity-feed.json +1 -1
  42. package/registry/agenda.json +1 -1
  43. package/registry/alert.json +1 -1
  44. package/registry/analysis-report.json +1 -1
  45. package/registry/anatomy-plate.json +1 -1
  46. package/registry/app-frame.json +2 -2
  47. package/registry/app-header.json +1 -1
  48. package/registry/app-shell.json +1 -1
  49. package/registry/argument-card.json +1 -1
  50. package/registry/auth-layout.json +1 -1
  51. package/registry/avatar.json +1 -1
  52. package/registry/badge.json +1 -1
  53. package/registry/bird-plate.json +1 -1
  54. package/registry/button.json +1 -1
  55. package/registry/captcha.json +1 -1
  56. package/registry/card-grid.json +1 -1
  57. package/registry/card.json +1 -1
  58. package/registry/catalogue-page.json +1 -1
  59. package/registry/changelog-page.json +1 -1
  60. package/registry/chapter.json +1 -1
  61. package/registry/chat.json +3 -3
  62. package/registry/checkbox.json +1 -1
  63. package/registry/chip-link.json +1 -1
  64. package/registry/chip-row.json +1 -1
  65. package/registry/chip.json +1 -1
  66. package/registry/choice-grid.json +1 -1
  67. package/registry/code-block.json +1 -1
  68. package/registry/collection-switcher.json +1 -1
  69. package/registry/combobox.json +1 -1
  70. package/registry/command.json +1 -1
  71. package/registry/comparison-table.json +1 -1
  72. package/registry/component-page.json +1 -1
  73. package/registry/confirm-button.json +1 -1
  74. package/registry/contact-page.json +1 -1
  75. package/registry/continue-prompt.json +1 -1
  76. package/registry/copy-button.json +1 -1
  77. package/registry/countdown.json +1 -1
  78. package/registry/cover-hero.json +1 -1
  79. package/registry/cta-panel.json +1 -1
  80. package/registry/dashboard-layout.json +1 -1
  81. package/registry/data-table.json +20 -20
  82. package/registry/date-picker.json +1 -1
  83. package/registry/decision-list.json +1 -1
  84. package/registry/description-list.json +1 -1
  85. package/registry/desktop-window.json +1 -1
  86. package/registry/detail-layout.json +1 -1
  87. package/registry/dialog.json +1 -1
  88. package/registry/docs-article-page.json +1 -1
  89. package/registry/docs-hub-page.json +1 -1
  90. package/registry/docs-layout.json +1 -1
  91. package/registry/docs-nav.json +1 -1
  92. package/registry/document-viewer.json +1 -1
  93. package/registry/doodle.json +1 -1
  94. package/registry/drop-overlay.json +1 -1
  95. package/registry/dropdown-menu.json +1 -1
  96. package/registry/elephant.json +1 -1
  97. package/registry/embed-facade.json +1 -1
  98. package/registry/empty-state.json +1 -1
  99. package/registry/engine-flow.json +1 -1
  100. package/registry/entity-header.json +1 -1
  101. package/registry/environment-notice.json +1 -1
  102. package/registry/error-page.json +1 -1
  103. package/registry/field.json +1 -1
  104. package/registry/file-upload.json +1 -1
  105. package/registry/filter-bar.json +2 -2
  106. package/registry/flock.json +1 -1
  107. package/registry/footnote.json +1 -1
  108. package/registry/force-update-screen.json +1 -1
  109. package/registry/form.json +1 -1
  110. package/registry/gallery-page.json +1 -1
  111. package/registry/genui.json +1 -1
  112. package/registry/glossary-term.json +1 -1
  113. package/registry/glossary.json +1 -1
  114. package/registry/glow-card.json +1 -1
  115. package/registry/goal-gauge.json +1 -1
  116. package/registry/grade-stamp.json +1 -1
  117. package/registry/image-cropper.json +1 -1
  118. package/registry/index.json +10 -185
  119. package/registry/kanban.json +1 -1
  120. package/registry/kbd.json +1 -1
  121. package/registry/kind-config-editor.json +1 -1
  122. package/registry/kpi-explained.json +1 -1
  123. package/registry/landing-page.json +1 -1
  124. package/registry/landscape.json +1 -1
  125. package/registry/language-switch.json +1 -1
  126. package/registry/legal-page.json +1 -1
  127. package/registry/link-card.json +1 -1
  128. package/registry/list.json +1 -1
  129. package/registry/loader.json +1 -1
  130. package/registry/longform-page.json +1 -1
  131. package/registry/maintenance-screen.json +1 -1
  132. package/registry/map.json +2 -2
  133. package/registry/margin-layout.json +1 -1
  134. package/registry/markdown.json +1 -1
  135. package/registry/marketing-layout.json +1 -1
  136. package/registry/mascot-quote.json +1 -1
  137. package/registry/mascot-state.json +1 -1
  138. package/registry/mascots.json +1 -1
  139. package/registry/match-dialog.json +1 -1
  140. package/registry/media-capture.json +1 -1
  141. package/registry/media-gallery.json +3 -14
  142. package/registry/meter.json +1 -1
  143. package/registry/money-input.json +1 -1
  144. package/registry/nav-bar.json +3 -3
  145. package/registry/next-actions.json +1 -1
  146. package/registry/notification-preferences.json +1 -1
  147. package/registry/number-ticker.json +1 -1
  148. package/registry/opening-hours.json +1 -1
  149. package/registry/page-header.json +1 -1
  150. package/registry/page-hero.json +1 -1
  151. package/registry/page-index.json +1 -1
  152. package/registry/page.json +1 -1
  153. package/registry/pagination.json +1 -1
  154. package/registry/pointer-light.json +1 -1
  155. package/registry/popover.json +1 -1
  156. package/registry/price-catalogue-editor.json +1 -1
  157. package/registry/pricing-page.json +1 -1
  158. package/registry/product-page.json +2 -6
  159. package/registry/profile-card.json +1 -1
  160. package/registry/progress.json +1 -1
  161. package/registry/promise-card.json +1 -1
  162. package/registry/promo-code-field.json +1 -1
  163. package/registry/proposal.json +1 -1
  164. package/registry/qr-code.json +1 -1
  165. package/registry/quota-meter.json +1 -1
  166. package/registry/radio-group.json +1 -1
  167. package/registry/rail-nav.json +2 -2
  168. package/registry/recipes.json +1 -1
  169. package/registry/retro-tv.json +2 -3
  170. package/registry/reviews.json +1 -1
  171. package/registry/router.json +1 -1
  172. package/registry/schema-form.json +1 -1
  173. package/registry/scroll-stage.json +1 -1
  174. package/registry/search-field.json +1 -1
  175. package/registry/section-backdrop.json +1 -1
  176. package/registry/separator.json +1 -1
  177. package/registry/service-card.json +1 -1
  178. package/registry/settings-layout.json +1 -1
  179. package/registry/shop-composer.json +1 -1
  180. package/registry/shop-gallery.json +3 -8
  181. package/registry/shop.json +2 -2
  182. package/registry/showcase.json +2 -7
  183. package/registry/signature.json +1 -1
  184. package/registry/site-cahier.json +1 -1
  185. package/registry/site-footer.json +2 -2
  186. package/registry/sites.json +1 -1
  187. package/registry/skeleton.json +1 -1
  188. package/registry/skip-link.json +1 -1
  189. package/registry/slider.json +1 -1
  190. package/registry/slot-picker.json +1 -1
  191. package/registry/slot.json +1 -1
  192. package/registry/specimen-tag.json +1 -1
  193. package/registry/speed-lines.json +1 -1
  194. package/registry/spinner.json +1 -1
  195. package/registry/split-view.json +1 -1
  196. package/registry/stage-banner.json +1 -1
  197. package/registry/stat.json +1 -1
  198. package/registry/status-chip.json +1 -1
  199. package/registry/status-page.json +1 -1
  200. package/registry/step-progress.json +1 -1
  201. package/registry/step-showcase.json +1 -1
  202. package/registry/stepper.json +1 -1
  203. package/registry/sticky-action.json +1 -1
  204. package/registry/stuck.json +1 -1
  205. package/registry/swipe-deck.json +3 -4
  206. package/registry/switch.json +1 -1
  207. package/registry/tabs.json +1 -1
  208. package/registry/tag-input.json +1 -1
  209. package/registry/tag-selector.json +2 -2
  210. package/registry/taped-photo.json +1 -1
  211. package/registry/terminal-replay.json +1 -1
  212. package/registry/text-style.json +1 -1
  213. package/registry/theme.json +4 -4
  214. package/registry/toast.json +1 -1
  215. package/registry/toc.json +1 -1
  216. package/registry/tooltip.json +1 -1
  217. package/registry/tree-view.json +1 -1
  218. package/registry/update-prompt.json +1 -1
  219. package/registry/upload-queue.json +1 -1
  220. package/registry/usage.json +1 -1
  221. package/registry/verified-badge.json +1 -1
  222. package/registry/versus-card.json +1 -1
  223. package/registry/vertical-video.json +2 -6
  224. package/registry/video-player.json +2 -7
  225. package/registry/video-trimmer.json +3 -4
  226. package/registry/virtual.json +1 -1
  227. package/registry/wall.json +3 -9
  228. package/registry/waveform.json +4 -9
  229. package/dist/audio-player.d.ts +0 -115
  230. package/dist/audio-player.js +0 -211
  231. package/dist/audio-player.js.map +0 -1
  232. package/dist/chunk-GSQRSWOE.js.map +0 -1
  233. package/dist/chunk-YKOLME7R.js +0 -126
  234. package/dist/chunk-YKOLME7R.js.map +0 -1
  235. package/dist/how-it-works-page.d.ts +0 -49
  236. package/dist/how-it-works-page.js +0 -28
  237. package/dist/how-it-works-page.js.map +0 -1
  238. package/dist/marquee.d.ts +0 -34
  239. package/dist/marquee.js +0 -52
  240. package/dist/marquee.js.map +0 -1
  241. package/dist/media-grid.d.ts +0 -246
  242. package/dist/media-grid.js +0 -468
  243. package/dist/media-grid.js.map +0 -1
  244. package/dist/photo-grid.d.ts +0 -123
  245. package/dist/photo-grid.js +0 -94
  246. package/dist/photo-grid.js.map +0 -1
  247. package/registry/audio-player.json +0 -300
  248. package/registry/examples/audio-player/podcast.d.ts +0 -4
  249. package/registry/examples/audio-player/podcast.js +0 -22
  250. package/registry/examples/audio-player/podcast.tsx +0 -19
  251. package/registry/examples/audio-player/voice-note.d.ts +0 -4
  252. package/registry/examples/audio-player/voice-note.js +0 -12
  253. package/registry/examples/audio-player/voice-note.tsx +0 -12
  254. package/registry/examples/how-it-works-page/orazaka.d.ts +0 -4
  255. package/registry/examples/how-it-works-page/orazaka.js +0 -30
  256. package/registry/examples/how-it-works-page/orazaka.tsx +0 -26
  257. package/registry/examples/marquee/cards.d.ts +0 -4
  258. package/registry/examples/marquee/cards.js +0 -23
  259. package/registry/examples/marquee/cards.tsx +0 -21
  260. package/registry/examples/marquee/logos.d.ts +0 -4
  261. package/registry/examples/marquee/logos.js +0 -12
  262. package/registry/examples/marquee/logos.tsx +0 -17
  263. package/registry/examples/media-grid/feed.d.ts +0 -4
  264. package/registry/examples/media-grid/feed.js +0 -31
  265. package/registry/examples/media-grid/feed.tsx +0 -30
  266. package/registry/examples/media-grid/loading.d.ts +0 -4
  267. package/registry/examples/media-grid/loading.js +0 -28
  268. package/registry/examples/media-grid/loading.tsx +0 -25
  269. package/registry/examples/media-grid/uniform.d.ts +0 -4
  270. package/registry/examples/media-grid/uniform.js +0 -29
  271. package/registry/examples/media-grid/uniform.tsx +0 -26
  272. package/registry/examples/photo-grid/native/profile-photos.d.ts +0 -4
  273. package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
  274. package/registry/examples/photo-grid/native/profile-photos.js +0 -27
  275. package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
  276. package/registry/examples/photo-grid/native/profile-photos.tsx +0 -24
  277. package/registry/examples/photo-grid/profile-photos.d.ts +0 -4
  278. package/registry/examples/photo-grid/profile-photos.js +0 -28
  279. package/registry/examples/photo-grid/profile-photos.tsx +0 -25
  280. package/registry/how-it-works-page.json +0 -258
  281. package/registry/marquee.json +0 -241
  282. package/registry/media-grid.json +0 -1034
  283. package/registry/photo-grid.json +0 -316
  284. /package/dist/{chunk-E4FMPPDL.js.map → chunk-WC3SO4CE.js.map} +0 -0
  285. /package/dist/{chunk-M3GEYLMR.js.map → chunk-ZPOVOEO3.js.map} +0 -0
  286. /package/dist/{lightbox-D5NAHFEA.js.map → lightbox-Q45BZ3HW.js.map} +0 -0
@@ -16,8 +16,7 @@
16
16
  },
17
17
  "native": {
18
18
  "state": "n/a",
19
- "reason": "An ornamental storefront surface belongs to web pages; native content should stay in a scrolling gallery.",
20
- "use": "media-grid"
19
+ "reason": "An ornamental storefront surface belongs to web pages; native content should stay in a scrolling gallery."
21
20
  },
22
21
  "desktop": {
23
22
  "state": "yes"
@@ -27,10 +26,6 @@
27
26
  "A shop or community page whose owner's photos, words and identity should feel personally pinned up."
28
27
  ],
29
28
  "whenNotToUse": [
30
- {
31
- "when": "A searchable or large image collection.",
32
- "use": "photo-grid"
33
- },
34
29
  {
35
30
  "when": "Rows of data to compare or sort.",
36
31
  "use": "data-table"
@@ -71,7 +66,6 @@
71
66
  "taped-photo",
72
67
  "cover-hero",
73
68
  "media-gallery",
74
- "photo-grid",
75
69
  "profile-card"
76
70
  ],
77
71
  "web": {
@@ -378,7 +372,7 @@
378
372
  "files": [
379
373
  {
380
374
  "path": "meta.ts",
381
- "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the twelve domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
375
+ "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 | \"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 | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\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 | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the twelve domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
382
376
  },
383
377
  {
384
378
  "path": "wall/attachment.tsx",
@@ -390,7 +384,7 @@
390
384
  },
391
385
  {
392
386
  "path": "wall/meta.ts",
393
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Wall\",\n summary: \"A read-only wall of photos, short notes and the owner's sign: Montréal brick, Moroccan eight-point zellige, Grenoble ridgelines or warm plaster, over a real keyboard-reachable list.\",\n status: \"beta\",\n category: \"blocks\",\n domain: \"page-blocks\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"An ornamental storefront surface belongs to web pages; native content should stay in a scrolling gallery.\", use: \"media-grid\" }, desktop: \"web\" },\n whenToUse: [\"A shop or community page whose owner's photos, words and identity should feel personally pinned up.\"],\n whenNotToUse: [\n { when: \"A searchable or large image collection.\", use: \"photo-grid\" },\n { when: \"Rows of data to compare or sort.\", use: \"data-table\" },\n ],\n bestPractices: [\n \"Import @krizaka/ui/blocks.css once. All four components are exported from @krizaka/ui/wall.\",\n \"Each example includes its own words, so copied snippets are self-contained. Choose the host locale and pass its words as data; the French composition demonstrates the same surface unchanged.\",\n \"Wall draws at most `max` items (12 by default, the first in z order) in a fixed 16:9 box on a desktop; show the rest behind a « see the whole wall » of your own. Pass `height` only for a fixed pixel height. On a phone it stacks them in z order, straight.\",\n \"`ShopSign` renders its text children as the heading (`as=\\\"h1\\\"` by default): the page's one h1 is the sign. On a Wall a sign is a paragraph unless you pass `as`. `variant=\\\"none\\\"` is the name alone on paper; the neon flickers once, the first time it is seen, and never loops.\",\n \"`PinnedNote`: `hold` (tape or pin, through Stuck), `ink` (blue, margin, hue) and `lines` (a fixed box of N lines, default 4, read in full by assistive technology); `attachment` still works as an alias of `hold`.\",\n \"`PinnedNote` also takes `paper` (plain, or a post-it: butter, rose, mint, sky), an `action` slot (a link kept inside the note, keyboard reachable) and a `limit` of code points (default 140) for a message that is read whole.\",\n \"Provide stable ids, explicit x/y percentages, rotation in degrees and z for every item. Positions are clamped to 0–100; z sorts the real list stably, including keyboard and phone order.\",\n \"Use kind polaroid with img, kind note with text, or kind sign with logo. Items carry the same props as their standalone component; no editor or random placement is added.\",\n \"Use height and itemWidth for layout, not style: style is intentionally omitted from the public props so percentage placement and the mobile stack cannot be overwritten accidentally.\",\n \"Keep the wall sparse and tilts small. On screens narrower than 48rem it grows into an untilted single column in z order, without overlap.\",\n \"The img ReactNode accepts next/image, including fill: the square photo frame is positioned. Supply an informative alt, or an empty alt for decoration.\",\n \"Captions and signatures use the existing --kz-font-cahier handwriting role (Krizaka Cahier from @krizaka/fonts); load the font in the host.\",\n \"PinnedNote caps text at 140 Unicode code points. Keep the full message elsewhere when more detail matters.\",\n \"Set attachment and attachmentRotation for tape or a pin, rotation for the object; neon's animated=false and Polaroid's develop=false opt out of motion.\",\n \"Wall textures adapt to dark, light and brand themes. Polaroid composes TapedPhoto: its --kz-print paper stays pale in both themes, with --kz-print-ink captions and --kz-tape strips instead of a second print material.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Tab / Shift+Tab\", action: \"Visit each object in ascending z order, preserving input order for ties.\" }],\n notes: [\n \"Wall is a real ul with an explicit list role, preserving Safari semantics despite list-style:none, and focusable li objects; give it an aria-label describing the collection. Textures, tape, pins and screws are hidden from assistive technology.\",\n \"Every word and all photo/logo alternatives come from the host. Standalone objects keep their natural figure/article/div semantics; Wall supplies their focus target.\",\n \"Polaroid only develops after its first observed intersection. With reduced motion, without an observer, or before hydration the photo remains sharp; preference changes stop motion immediately.\",\n \"Neon only flickers softly once, never flashes or loops. All effects stop under prefers-reduced-motion; reading and focus order never depend on visual positions.\",\n ],\n },\n related: [\"taped-photo\", \"cover-hero\", \"media-gallery\", \"photo-grid\", \"profile-card\"],\n web: {\n imports: [\"Wall\", \"Polaroid\", \"PinnedNote\", \"ShopSign\"],\n examples: [\n { name: \"composition\", title: \"The owner's wall\", description: \"A photograph, a signed word and an enamel sign, positioned from deterministic data.\" },\n { name: \"composition-fr\", title: \"The owner's wall in French\", description: \"The same deterministic layout reads its French words and alternatives from the example's local catalogue.\" },\n { name: \"brick\", title: \"Montréal brick\", description: \"Staggered masonry and mortar on a warm token-based surface.\" },\n { name: \"zellige\", title: \"Moroccan zellige\", description: \"A repeating deterministic eight-point SVG star, without an image download.\" },\n { name: \"ridge\", title: \"Grenoble ridges\", description: \"Three layered mountain silhouettes behind the owner's words.\" },\n { name: \"plaster\", title: \"Warm plaster\", description: \"A quiet lightly textured wall when the content should speak first.\" },\n { name: \"polaroid\", title: \"Polaroids\", description: \"A photo slot, handwritten caption, deterministic tilt, and tape or pin.\" },\n { name: \"pinned-note\", title: \"Pinned notes\", description: \"Short signed words on cut-corner paper, held by a pin or tape.\" },\n { name: \"shop-sign\", title: \"Shop signs\", description: \"The owner's mark as enamel with screws, soft neon, or weathered painted lettering.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
387
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Wall\",\n summary: \"A read-only wall of photos, short notes and the owner's sign: Montréal brick, Moroccan eight-point zellige, Grenoble ridgelines or warm plaster, over a real keyboard-reachable list.\",\n status: \"beta\",\n category: \"blocks\",\n domain: \"page-blocks\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"An ornamental storefront surface belongs to web pages; native content should stay in a scrolling gallery.\" }, desktop: \"web\" },\n whenToUse: [\"A shop or community page whose owner's photos, words and identity should feel personally pinned up.\"],\n whenNotToUse: [\n { when: \"Rows of data to compare or sort.\", use: \"data-table\" },\n ],\n bestPractices: [\n \"Import @krizaka/ui/blocks.css once. All four components are exported from @krizaka/ui/wall.\",\n \"Each example includes its own words, so copied snippets are self-contained. Choose the host locale and pass its words as data; the French composition demonstrates the same surface unchanged.\",\n \"Wall draws at most `max` items (12 by default, the first in z order) in a fixed 16:9 box on a desktop; show the rest behind a « see the whole wall » of your own. Pass `height` only for a fixed pixel height. On a phone it stacks them in z order, straight.\",\n \"`ShopSign` renders its text children as the heading (`as=\\\"h1\\\"` by default): the page's one h1 is the sign. On a Wall a sign is a paragraph unless you pass `as`. `variant=\\\"none\\\"` is the name alone on paper; the neon flickers once, the first time it is seen, and never loops.\",\n \"`PinnedNote`: `hold` (tape or pin, through Stuck), `ink` (blue, margin, hue) and `lines` (a fixed box of N lines, default 4, read in full by assistive technology); `attachment` still works as an alias of `hold`.\",\n \"`PinnedNote` also takes `paper` (plain, or a post-it: butter, rose, mint, sky), an `action` slot (a link kept inside the note, keyboard reachable) and a `limit` of code points (default 140) for a message that is read whole.\",\n \"Provide stable ids, explicit x/y percentages, rotation in degrees and z for every item. Positions are clamped to 0–100; z sorts the real list stably, including keyboard and phone order.\",\n \"Use kind polaroid with img, kind note with text, or kind sign with logo. Items carry the same props as their standalone component; no editor or random placement is added.\",\n \"Use height and itemWidth for layout, not style: style is intentionally omitted from the public props so percentage placement and the mobile stack cannot be overwritten accidentally.\",\n \"Keep the wall sparse and tilts small. On screens narrower than 48rem it grows into an untilted single column in z order, without overlap.\",\n \"The img ReactNode accepts next/image, including fill: the square photo frame is positioned. Supply an informative alt, or an empty alt for decoration.\",\n \"Captions and signatures use the existing --kz-font-cahier handwriting role (Krizaka Cahier from @krizaka/fonts); load the font in the host.\",\n \"PinnedNote caps text at 140 Unicode code points. Keep the full message elsewhere when more detail matters.\",\n \"Set attachment and attachmentRotation for tape or a pin, rotation for the object; neon's animated=false and Polaroid's develop=false opt out of motion.\",\n \"Wall textures adapt to dark, light and brand themes. Polaroid composes TapedPhoto: its --kz-print paper stays pale in both themes, with --kz-print-ink captions and --kz-tape strips instead of a second print material.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Tab / Shift+Tab\", action: \"Visit each object in ascending z order, preserving input order for ties.\" }],\n notes: [\n \"Wall is a real ul with an explicit list role, preserving Safari semantics despite list-style:none, and focusable li objects; give it an aria-label describing the collection. Textures, tape, pins and screws are hidden from assistive technology.\",\n \"Every word and all photo/logo alternatives come from the host. Standalone objects keep their natural figure/article/div semantics; Wall supplies their focus target.\",\n \"Polaroid only develops after its first observed intersection. With reduced motion, without an observer, or before hydration the photo remains sharp; preference changes stop motion immediately.\",\n \"Neon only flickers softly once, never flashes or loops. All effects stop under prefers-reduced-motion; reading and focus order never depend on visual positions.\",\n ],\n },\n related: [\"taped-photo\", \"cover-hero\", \"media-gallery\", \"profile-card\"],\n web: {\n imports: [\"Wall\", \"Polaroid\", \"PinnedNote\", \"ShopSign\"],\n examples: [\n { name: \"composition\", title: \"The owner's wall\", description: \"A photograph, a signed word and an enamel sign, positioned from deterministic data.\" },\n { name: \"composition-fr\", title: \"The owner's wall in French\", description: \"The same deterministic layout reads its French words and alternatives from the example's local catalogue.\" },\n { name: \"brick\", title: \"Montréal brick\", description: \"Staggered masonry and mortar on a warm token-based surface.\" },\n { name: \"zellige\", title: \"Moroccan zellige\", description: \"A repeating deterministic eight-point SVG star, without an image download.\" },\n { name: \"ridge\", title: \"Grenoble ridges\", description: \"Three layered mountain silhouettes behind the owner's words.\" },\n { name: \"plaster\", title: \"Warm plaster\", description: \"A quiet lightly textured wall when the content should speak first.\" },\n { name: \"polaroid\", title: \"Polaroids\", description: \"A photo slot, handwritten caption, deterministic tilt, and tape or pin.\" },\n { name: \"pinned-note\", title: \"Pinned notes\", description: \"Short signed words on cut-corner paper, held by a pin or tape.\" },\n { name: \"shop-sign\", title: \"Shop signs\", description: \"The owner's mark as enamel with screws, soft neon, or weathered painted lettering.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
394
388
  },
395
389
  {
396
390
  "path": "wall/pinned-note.tsx",
@@ -26,10 +26,6 @@
26
26
  "Beside a sound's title when the shape is the identity (a voice note, a podcast episode) and nothing is seekable."
27
27
  ],
28
28
  "whenNotToUse": [
29
- {
30
- "when": "For a sound a person plays, seeks or speeds up.",
31
- "use": "audio-player"
32
- },
33
29
  {
34
30
  "when": "For a figure on its own, with its trend.",
35
31
  "use": "stat"
@@ -49,7 +45,6 @@
49
45
  ]
50
46
  },
51
47
  "related": [
52
- "audio-player",
53
48
  "progress",
54
49
  "meter"
55
50
  ],
@@ -212,11 +207,11 @@
212
207
  },
213
208
  {
214
209
  "path": "meta.ts",
215
- "content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which ui.krizaka.com (apps/site) renders as\n// ui.krizaka.com/components/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"notification-preferences\"\n | \"quota-meter\"\n | \"environment-notice\"\n | \"embed-facade\"\n | \"reviews\"\n | \"margin-layout\"\n | \"analysis-report\"\n | \"status-chip\"\n | \"kind-config-editor\"\n | \"agenda\"\n | \"account-settings\"\n | \"drop-overlay\"\n | \"upload-queue\"\n | \"achievement\"\n | \"anatomy-plate\"\n | \"bird-plate\"\n | \"taped-photo\"\n | \"stuck\"\n | \"doodle\"\n | \"signature\"\n | \"grade-stamp\"\n | \"versus-card\"\n | \"speed-lines\"\n | \"site-cahier\"\n | \"text-style\"\n | \"flock\"\n | \"elephant\"\n | \"footnote\"\n | \"page-index\"\n | \"chapter\"\n | \"specimen-tag\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-frame\"\n | \"desktop-window\"\n | \"form-flow\"\n | \"grid\"\n | \"list-detail\"\n | \"state-screen\"\n | \"app-header\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"captcha\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"chip-row\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"copy-button\"\n | \"money-input\"\n | \"price-catalogue-editor\"\n | \"promo-code-field\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cover-hero\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"docs-nav\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"engine-flow\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glossary\"\n | \"glossary-term\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"language-switch\"\n | \"media-gallery\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"opening-hours\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the twelve domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
210
+ "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 | \"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 | \"image-cropper\"\n | \"image-viewer\"\n | \"kanban\"\n | \"kbd\"\n | \"kpi-explained\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"waveform\"\n | \"proposal\"\n | \"qr-code\"\n | \"entity-header\"\n | \"collection-switcher\"\n | \"marketing-layout\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\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 | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"retro-tv\"\n | \"shop-gallery\"\n | \"radio-group\"\n | \"router\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"service-card\"\n | \"shop\"\n | \"shop-composer\"\n | \"schema-form\"\n | \"settings-layout\"\n | \"account-menu\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot-picker\"\n | \"slot\"\n | \"spinner\"\n | \"sticky-action\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"usage\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\"\n | \"wall\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `experimental`: created for a filed need (ADR-008 §4), it may change or go in any minor until its first consumer imports it; `adoption`\n * names that consumer's issue. `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"experimental\" | \"stable\" | \"beta\" | \"deprecated\";\n\n/**\n * What a component is for (ADR-008 §3): the twelve domains the documentation, the size budgets and the guards are\n * organised by. The domain is metadata: the entries stay flat (`@krizaka/ui/<name>`). `cahier` is the sites' register\n * (ADR-004): a product never imports it.\n */\nexport type Domain =\n | \"foundations\"\n | \"forms\"\n | \"data-display\"\n | \"navigation-shell\"\n | \"feedback\"\n | \"maps\"\n | \"media\"\n | \"commerce\"\n | \"identity\"\n | \"conversation\"\n | \"page-blocks\"\n | \"cahier\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n /** The React Native entry alone is deprecated while the web one stays (ADR-006 §7); a deprecated component says it once, above. */\n readonly deprecated?: Deprecation;\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** What it is for: one of the twelve domains (ADR-008 §3). */\n readonly domain: Domain;\n /** The `<repo>#<n>` issue of its first consumer: required for, and only for, an `experimental` component. */\n readonly adoption?: string;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
216
211
  },
217
212
  {
218
213
  "path": "waveform/bars.ts",
219
- "content": "// The bars of a waveform, shared by AudioPlayer (the seekable one) and Waveform (the decorative one). Pure: no React.\n\n/** Resamples peaks to `count` bars (the maximum of each slice), normalised to the loudest. No peaks: a flat line at 15 %. */\nexport function resamplePeaks(peaks: readonly number[], count: number): number[] {\n if (peaks.length === 0) return Array.from({ length: count }, () => 0.15);\n const out = Array.from({ length: count }, (_, i) => {\n const from = Math.floor((i / count) * peaks.length);\n const to = Math.max(from + 1, Math.floor(((i + 1) / count) * peaks.length));\n return Math.max(...peaks.slice(from, to).map(Math.abs));\n });\n const loudest = Math.max(...out, 0.0001);\n return out.map((v) => Math.max(0.08, v / loudest));\n}\n"
214
+ "content": "// The bars of a waveform, used by Waveform (the decorative one). Pure: no React.\n\n/** Resamples peaks to `count` bars (the maximum of each slice), normalised to the loudest. No peaks: a flat line at 15 %. */\nexport function resamplePeaks(peaks: readonly number[], count: number): number[] {\n if (peaks.length === 0) return Array.from({ length: count }, () => 0.15);\n const out = Array.from({ length: count }, (_, i) => {\n const from = Math.floor((i / count) * peaks.length);\n const to = Math.max(from + 1, Math.floor(((i + 1) / count) * peaks.length));\n return Math.max(...peaks.slice(from, to).map(Math.abs));\n });\n const loudest = Math.max(...out, 0.0001);\n return out.map((v) => Math.max(0.08, v / loudest));\n}\n"
220
215
  },
221
216
  {
222
217
  "path": "waveform/index.ts",
@@ -224,11 +219,11 @@
224
219
  },
225
220
  {
226
221
  "path": "waveform/meta.ts",
227
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Waveform\",\n summary:\n \"The bars of a sound, drawn on their own: decorative by default, in the brand's accent or a quiet tone, breathing gently while it plays and still under reduced motion.\",\n status: \"beta\",\n category: \"data-display\",\n domain: \"media\",\n platforms: \"both\",\n parity: { desktop: \"web\" },\n whenToUse: [\n \"On a card or a banner, to show that a product speaks: a voice, a sound, a call.\",\n \"Beside a sound's title when the shape is the identity (a voice note, a podcast episode) and nothing is seekable.\",\n ],\n whenNotToUse: [\n { when: \"For a sound a person plays, seeks or speeds up.\", use: \"audio-player\" },\n { when: \"For a figure on its own, with its trend.\", use: \"stat\" },\n ],\n bestPractices: [\n \"Leave it decorative (no `label`) when the text beside it already says what it is; give it a `label` only when the shape carries information.\",\n \"Pass the peaks of the real sound when you have them; without peaks it is a flat line, which reads as a quiet placeholder.\",\n \"Move it only while the sound plays (`playing`): a still waveform is the calm default.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"Decorative by default: `aria-hidden`, so a screen reader skips it. With a `label` it is an image named by that label.\",\n \"The motion is a gentle breathing of the bars, declared only under `prefers-reduced-motion: no-preference`; it pauses when the waveform leaves the screen.\",\n \"Colour comes from the tokens (the accent or the neutral border), never a fixed value: it reads in dark and light.\",\n ],\n },\n related: [\"audio-player\", \"progress\", \"meter\"],\n web: {\n imports: [\"Waveform\"],\n examples: [\n { name: \"card\", title: \"On a card\", description: \"A voice's waveform beside its name, moving while the sound plays.\" },\n { name: \"sizes\", title: \"Sizes and tones\", description: \"Small, medium and large, in the accent and in a neutral tone.\" },\n ],\n },\n native: {\n imports: [\"Waveform\"],\n differences: [\n \"Same API. The bars breathe on the native driver; under reduced motion or while the app is in the background they stay still.\",\n \"No intersection observer on the phone: a waveform scrolled out of view keeps moving until its screen unmounts it.\",\n ],\n examples: [{ name: \"card\", title: \"On a card\", description: \"A voice's waveform beside its name, moving while the sound plays.\" }],\n },\n} satisfies ComponentMeta;\n"
222
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Waveform\",\n summary:\n \"The bars of a sound, drawn on their own: decorative by default, in the brand's accent or a quiet tone, breathing gently while it plays and still under reduced motion.\",\n status: \"beta\",\n category: \"data-display\",\n domain: \"media\",\n platforms: \"both\",\n parity: { desktop: \"web\" },\n whenToUse: [\n \"On a card or a banner, to show that a product speaks: a voice, a sound, a call.\",\n \"Beside a sound's title when the shape is the identity (a voice note, a podcast episode) and nothing is seekable.\",\n ],\n whenNotToUse: [\n { when: \"For a figure on its own, with its trend.\", use: \"stat\" },\n ],\n bestPractices: [\n \"Leave it decorative (no `label`) when the text beside it already says what it is; give it a `label` only when the shape carries information.\",\n \"Pass the peaks of the real sound when you have them; without peaks it is a flat line, which reads as a quiet placeholder.\",\n \"Move it only while the sound plays (`playing`): a still waveform is the calm default.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"Decorative by default: `aria-hidden`, so a screen reader skips it. With a `label` it is an image named by that label.\",\n \"The motion is a gentle breathing of the bars, declared only under `prefers-reduced-motion: no-preference`; it pauses when the waveform leaves the screen.\",\n \"Colour comes from the tokens (the accent or the neutral border), never a fixed value: it reads in dark and light.\",\n ],\n },\n related: [\"progress\", \"meter\"],\n web: {\n imports: [\"Waveform\"],\n examples: [\n { name: \"card\", title: \"On a card\", description: \"A voice's waveform beside its name, moving while the sound plays.\" },\n { name: \"sizes\", title: \"Sizes and tones\", description: \"Small, medium and large, in the accent and in a neutral tone.\" },\n ],\n },\n native: {\n imports: [\"Waveform\"],\n differences: [\n \"Same API. The bars breathe on the native driver; under reduced motion or while the app is in the background they stay still.\",\n \"No intersection observer on the phone: a waveform scrolled out of view keeps moving until its screen unmounts it.\",\n ],\n examples: [{ name: \"card\", title: \"On a card\", description: \"A voice's waveform beside its name, moving while the sound plays.\" }],\n },\n} satisfies ComponentMeta;\n"
228
223
  },
229
224
  {
230
225
  "path": "waveform/waveform.tsx",
231
- "content": "// Client (the idle motion and the pause off screen). The bars of an AudioPlayer, drawn on their own: a decorative\n// waveform for a card, a banner or a sound's identity. Hidden from assistive technology unless it has a `label`.\n// Its motion runs only while `playing`, never under prefers-reduced-motion, and pauses when it leaves the screen.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { useInView } from \"../media\";\nimport { resamplePeaks } from \"./bars\";\n\nexport const waveform = tv({\n slots: {\n root: \"flex w-full items-center justify-center gap-[2px]\",\n bar: \"min-w-[2px] flex-1 rounded-full\",\n },\n variants: {\n size: {\n sm: { root: \"h-6\" },\n md: { root: \"h-10\" },\n lg: { root: \"h-16\" },\n },\n tone: {\n accent: { bar: \"bg-accent\" },\n neutral: { bar: \"bg-border-strong\" },\n },\n },\n defaultVariants: { size: \"md\", tone: \"accent\" },\n});\n\n// The idle motion: each bar breathes between 45 % and its height, staggered by its index. It is declared under a\n// no-preference query only, so a reduced-motion reader gets the still bars; `data-paused` holds it off screen.\nconst MOTION =\n \"@keyframes kz-wave{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}\" +\n \"@media (prefers-reduced-motion: no-preference){.kz-wave[data-playing] [data-bar]{animation:kz-wave 1.6s ease-in-out infinite;animation-delay:var(--kz-wave-delay,0s)}}\" +\n \".kz-wave[data-paused] [data-bar]{animation-play-state:paused}\";\n\nexport type WaveformProps = {\n /** The peaks, between 0 and 1, as many as you like (resampled to `bars`). Without them: a flat line. */\n peaks?: readonly number[];\n /** How many bars. Default 32. */\n bars?: number;\n /** sm · md (default) · lg: the height of the drawing. */\n size?: \"sm\" | \"md\" | \"lg\";\n /** accent (default, the brand's colour) · neutral (a quiet line beside text). */\n tone?: \"accent\" | \"neutral\";\n /** Moves gently while `true` (a sound playing); still otherwise. */\n playing?: boolean;\n /** When given, it is an image named by this (“Voice note, 0:42”); otherwise decorative and hidden from assistive technology. */\n label?: string;\n /** Classes merged last. */\n className?: string;\n};\n\n/** A decorative waveform: the bars of a sound, in the accent or a neutral tone, breathing gently while it plays. */\nexport function Waveform({ peaks, bars = 32, size, tone, playing = false, label, className }: WaveformProps) {\n const s = waveform({ size, tone });\n const root = React.useRef<HTMLDivElement>(null);\n const [visible, setVisible] = React.useState(true);\n useInView(root, setVisible, playing);\n const shape = React.useMemo(() => resamplePeaks(peaks ?? [], bars), [peaks, bars]);\n const labelled = label !== undefined;\n\n return (\n <>\n <style>{MOTION}</style>\n <div\n ref={root}\n className={s.root({ className: [\"kz-wave\", className].filter(Boolean).join(\" \") })}\n data-playing={playing || undefined}\n data-paused={playing && !visible ? \"\" : undefined}\n role={labelled ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={labelled ? undefined : true}\n >\n {shape.map((peak, i) => (\n <span\n key={i}\n data-bar\n aria-hidden\n className={s.bar()}\n style={{ height: `${Math.round(peak * 100)}%`, \"--kz-wave-delay\": `${-((i * 7) % 11) * 0.14}s` } as React.CSSProperties}\n />\n ))}\n </div>\n </>\n );\n}\n"
226
+ "content": "// Client (the idle motion and the pause off screen). The bars of a waveform, drawn on their own: a decorative\n// waveform for a card, a banner or a sound's identity. Hidden from assistive technology unless it has a `label`.\n// Its motion runs only while `playing`, never under prefers-reduced-motion, and pauses when it leaves the screen.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { useInView } from \"../media\";\nimport { resamplePeaks } from \"./bars\";\n\nexport const waveform = tv({\n slots: {\n root: \"flex w-full items-center justify-center gap-[2px]\",\n bar: \"min-w-[2px] flex-1 rounded-full\",\n },\n variants: {\n size: {\n sm: { root: \"h-6\" },\n md: { root: \"h-10\" },\n lg: { root: \"h-16\" },\n },\n tone: {\n accent: { bar: \"bg-accent\" },\n neutral: { bar: \"bg-border-strong\" },\n },\n },\n defaultVariants: { size: \"md\", tone: \"accent\" },\n});\n\n// The idle motion: each bar breathes between 45 % and its height, staggered by its index. It is declared under a\n// no-preference query only, so a reduced-motion reader gets the still bars; `data-paused` holds it off screen.\nconst MOTION =\n \"@keyframes kz-wave{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}\" +\n \"@media (prefers-reduced-motion: no-preference){.kz-wave[data-playing] [data-bar]{animation:kz-wave 1.6s ease-in-out infinite;animation-delay:var(--kz-wave-delay,0s)}}\" +\n \".kz-wave[data-paused] [data-bar]{animation-play-state:paused}\";\n\nexport type WaveformProps = {\n /** The peaks, between 0 and 1, as many as you like (resampled to `bars`). Without them: a flat line. */\n peaks?: readonly number[];\n /** How many bars. Default 32. */\n bars?: number;\n /** sm · md (default) · lg: the height of the drawing. */\n size?: \"sm\" | \"md\" | \"lg\";\n /** accent (default, the brand's colour) · neutral (a quiet line beside text). */\n tone?: \"accent\" | \"neutral\";\n /** Moves gently while `true` (a sound playing); still otherwise. */\n playing?: boolean;\n /** When given, it is an image named by this (“Voice note, 0:42”); otherwise decorative and hidden from assistive technology. */\n label?: string;\n /** Classes merged last. */\n className?: string;\n};\n\n/** A decorative waveform: the bars of a sound, in the accent or a neutral tone, breathing gently while it plays. */\nexport function Waveform({ peaks, bars = 32, size, tone, playing = false, label, className }: WaveformProps) {\n const s = waveform({ size, tone });\n const root = React.useRef<HTMLDivElement>(null);\n const [visible, setVisible] = React.useState(true);\n useInView(root, setVisible, playing);\n const shape = React.useMemo(() => resamplePeaks(peaks ?? [], bars), [peaks, bars]);\n const labelled = label !== undefined;\n\n return (\n <>\n <style>{MOTION}</style>\n <div\n ref={root}\n className={s.root({ className: [\"kz-wave\", className].filter(Boolean).join(\" \") })}\n data-playing={playing || undefined}\n data-paused={playing && !visible ? \"\" : undefined}\n role={labelled ? \"img\" : undefined}\n aria-label={label}\n aria-hidden={labelled ? undefined : true}\n >\n {shape.map((peak, i) => (\n <span\n key={i}\n data-bar\n aria-hidden\n className={s.bar()}\n style={{ height: `${Math.round(peak * 100)}%`, \"--kz-wave-delay\": `${-((i * 7) % 11) * 0.14}s` } as React.CSSProperties}\n />\n ))}\n </div>\n </>\n );\n}\n"
232
227
  }
233
228
  ],
234
229
  "dependencies": [
@@ -1,115 +0,0 @@
1
- import * as tailwind_variants from 'tailwind-variants';
2
- import * as React from 'react';
3
-
4
- /** Resamples peaks to `count` bars (the maximum of each slice), normalised to the loudest. No peaks: a flat line at 15 %. */
5
- declare function resamplePeaks(peaks: readonly number[], count: number): number[];
6
-
7
- declare const audioPlayer: tailwind_variants.TVReturnType<{
8
- [key: string]: {
9
- [key: string]: tailwind_variants.ClassValue | {
10
- root?: tailwind_variants.ClassValue;
11
- body?: tailwind_variants.ClassValue;
12
- title?: tailwind_variants.ClassValue;
13
- bar?: tailwind_variants.ClassValue;
14
- meta?: tailwind_variants.ClassValue;
15
- play?: tailwind_variants.ClassValue;
16
- wave?: tailwind_variants.ClassValue;
17
- speed?: tailwind_variants.ClassValue;
18
- };
19
- };
20
- } | {
21
- [x: string]: {
22
- [x: string]: tailwind_variants.ClassValue | {
23
- root?: tailwind_variants.ClassValue;
24
- body?: tailwind_variants.ClassValue;
25
- title?: tailwind_variants.ClassValue;
26
- bar?: tailwind_variants.ClassValue;
27
- meta?: tailwind_variants.ClassValue;
28
- play?: tailwind_variants.ClassValue;
29
- wave?: tailwind_variants.ClassValue;
30
- speed?: tailwind_variants.ClassValue;
31
- };
32
- };
33
- } | {}, {
34
- root: string;
35
- play: string;
36
- body: string;
37
- title: string;
38
- wave: string;
39
- bar: string;
40
- meta: string;
41
- speed: string;
42
- }, undefined, {
43
- [key: string]: {
44
- [key: string]: tailwind_variants.ClassValue | {
45
- root?: tailwind_variants.ClassValue;
46
- body?: tailwind_variants.ClassValue;
47
- title?: tailwind_variants.ClassValue;
48
- bar?: tailwind_variants.ClassValue;
49
- meta?: tailwind_variants.ClassValue;
50
- play?: tailwind_variants.ClassValue;
51
- wave?: tailwind_variants.ClassValue;
52
- speed?: tailwind_variants.ClassValue;
53
- };
54
- };
55
- } | {}, {
56
- root: string;
57
- play: string;
58
- body: string;
59
- title: string;
60
- wave: string;
61
- bar: string;
62
- meta: string;
63
- speed: string;
64
- }, tailwind_variants.TVReturnTypeLike<unknown, {
65
- root: string;
66
- play: string;
67
- body: string;
68
- title: string;
69
- wave: string;
70
- bar: string;
71
- meta: string;
72
- speed: string;
73
- }>>;
74
- type AudioPlayerLabels = {
75
- play: string;
76
- pause: string;
77
- /** The waveform slider ("Seek"). */
78
- seek: string;
79
- /** The speed button: `(rate) => "Speed " + rate + "×"`. */
80
- speed: (rate: number) => string;
81
- /** The slider's value: `(time, duration) => "0:42 of 3:10"`. */
82
- time: (time: string, duration: string) => string;
83
- };
84
- declare const audioPlayerLabels: AudioPlayerLabels;
85
- type AudioPlayerProps = {
86
- /** The address of the sound. */
87
- src: string;
88
- /** What it is ("Voice note — Eric, 0:42"): shown, and the accessible name of the player. */
89
- title: string;
90
- /** The peaks, between 0 and 1, as many as you like (they are resampled to `bars`). */
91
- peaks?: readonly number[];
92
- /** Without `peaks`: fetches the file and computes them with Web Audio at the first play (same-origin or CORS). */
93
- computePeaks?: boolean;
94
- /** How many bars. Default 48. */
95
- bars?: number;
96
- /** The speeds of the speed button. Default `[1, 1.5, 2]`; `[]` hides it. */
97
- playbackRates?: readonly number[];
98
- /** Pauses when it leaves the screen. Default `true`. */
99
- pauseWhenHidden?: boolean;
100
- /** The length, in seconds, before the metadata is loaded (from the server). */
101
- duration?: number;
102
- /** Called when playback starts, pauses, ends. */
103
- onPlayingChange?: (playing: boolean) => void;
104
- /** The words, passed translated; English by default. */
105
- labels?: Partial<AudioPlayerLabels>;
106
- /** Classes merged on the root. */
107
- className?: string;
108
- };
109
- /** The peaks of a sound file, computed with Web Audio (`count` of them). */
110
- declare function computeAudioPeaks(src: string, count?: number, signal?: AbortSignal): Promise<number[]>;
111
- /** A sound with a seekable waveform: play / pause, time, speed — a voice note, a podcast clip, a track. */
112
- declare function AudioPlayer({ src, title, peaks: given, computePeaks, bars, playbackRates, pauseWhenHidden, duration: knownDuration, onPlayingChange, labels: words, className, }: AudioPlayerProps): React.JSX.Element;
113
-
114
- export { AudioPlayer, audioPlayer, audioPlayerLabels, computeAudioPeaks, resamplePeaks };
115
- export type { AudioPlayerLabels, AudioPlayerProps };