@krizaka/ui 3.22.0 → 3.23.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 (447) hide show
  1. package/README.md +4 -0
  2. package/dist/achievement.js +1 -1
  3. package/dist/action-bar.js +4 -4
  4. package/dist/app-header.d.ts +79 -0
  5. package/dist/app-header.js +32 -0
  6. package/dist/app-header.js.map +1 -0
  7. package/dist/app-shell.d.ts +20 -2
  8. package/dist/app-shell.js +34 -19
  9. package/dist/app-shell.js.map +1 -1
  10. package/dist/argument-card.d.ts +4 -1
  11. package/dist/argument-card.js +10 -7
  12. package/dist/argument-card.js.map +1 -1
  13. package/dist/audio-player.d.ts +3 -2
  14. package/dist/audio-player.js +14 -10
  15. package/dist/audio-player.js.map +1 -1
  16. package/dist/blocks.css +28 -0
  17. package/dist/button.js +2 -1
  18. package/dist/captcha.d.ts +81 -0
  19. package/dist/captcha.js +162 -0
  20. package/dist/captcha.js.map +1 -0
  21. package/dist/card-grid.d.ts +10 -1
  22. package/dist/card-grid.js +3 -2
  23. package/dist/card-grid.js.map +1 -1
  24. package/dist/card.js +3 -3
  25. package/dist/changelog-page.d.ts +57 -3
  26. package/dist/changelog-page.js +117 -1
  27. package/dist/changelog-page.js.map +1 -1
  28. package/dist/choice-grid.js +1 -1
  29. package/dist/{chunk-3IN6TOPM.js → chunk-6ZYRUOTA.js} +6 -3
  30. package/dist/chunk-6ZYRUOTA.js.map +1 -0
  31. package/dist/chunk-APNIVNIX.js +54 -0
  32. package/dist/chunk-APNIVNIX.js.map +1 -0
  33. package/dist/{chunk-FKBHWS4N.js → chunk-CEJDH6SA.js} +2 -2
  34. package/dist/{chunk-OWC2LZD2.js → chunk-CHOJUCVE.js} +6 -3
  35. package/dist/chunk-CHOJUCVE.js.map +1 -0
  36. package/dist/{chunk-3BC4XQ6C.js → chunk-DZU6RMYD.js} +6 -3
  37. package/dist/chunk-DZU6RMYD.js.map +1 -0
  38. package/dist/{chunk-R6NK6ZNY.js → chunk-F7FVPPBB.js} +4 -4
  39. package/dist/{chunk-5Z7FWCV2.js → chunk-HBZPJ3EP.js} +2 -2
  40. package/dist/{chunk-C2BRIFJG.js → chunk-HJFRHYCI.js} +2 -2
  41. package/dist/{chunk-ZNMFG62E.js → chunk-KH3JOEPY.js} +3 -2
  42. package/dist/chunk-KH3JOEPY.js.map +1 -0
  43. package/dist/{chunk-BTMFZ66D.js → chunk-KM6VAKIE.js} +2 -2
  44. package/dist/{chunk-DGQMDJXK.js → chunk-LZNZLCOE.js} +2 -2
  45. package/dist/{chunk-AQSZJJAJ.js → chunk-MQPC3P4T.js} +2 -2
  46. package/dist/{chunk-2FRWNSRO.js → chunk-NSLXEDIS.js} +3 -2
  47. package/dist/chunk-NSLXEDIS.js.map +1 -0
  48. package/dist/{chunk-4LOMIQVX.js → chunk-W675RFOA.js} +3 -2
  49. package/dist/chunk-W675RFOA.js.map +1 -0
  50. package/dist/{chunk-G3ETON2A.js → chunk-WU4VLSEA.js} +3 -2
  51. package/dist/chunk-WU4VLSEA.js.map +1 -0
  52. package/dist/{chunk-IZ7MV6HM.js → chunk-XVFQZ3ZG.js} +3 -2
  53. package/dist/chunk-XVFQZ3ZG.js.map +1 -0
  54. package/dist/cn.js +1 -1
  55. package/dist/code-block.js +2 -2
  56. package/dist/code-block.js.map +1 -1
  57. package/dist/command.js +3 -3
  58. package/dist/comparison-table.js +1 -1
  59. package/dist/confirm-button.js +2 -2
  60. package/dist/continue-prompt.js +3 -3
  61. package/dist/continue-prompt.js.map +1 -1
  62. package/dist/cta-panel.js +1 -1
  63. package/dist/data-table.js +4 -4
  64. package/dist/date-picker.js +2 -2
  65. package/dist/decision-list.js +1 -1
  66. package/dist/dialog.js +3 -2
  67. package/dist/dialog.js.map +1 -1
  68. package/dist/docs-nav.d.ts +36 -0
  69. package/dist/docs-nav.js +44 -0
  70. package/dist/docs-nav.js.map +1 -0
  71. package/dist/dropdown-menu.js +1 -1
  72. package/dist/error-page.js +1 -1
  73. package/dist/field.js +1 -1
  74. package/dist/filter-bar.js +2 -2
  75. package/dist/force-update-screen.js +2 -1
  76. package/dist/force-update-screen.js.map +1 -1
  77. package/dist/gallery-page.js +1 -1
  78. package/dist/genui.d.ts +3 -1
  79. package/dist/genui.js +33 -6
  80. package/dist/genui.js.map +1 -1
  81. package/dist/glow-card.js +1 -1
  82. package/dist/goal-gauge.js +1 -1
  83. package/dist/how-it-works-page.js +1 -1
  84. package/dist/image-cropper.js +3 -3
  85. package/dist/index.js +3 -3
  86. package/dist/landscape.js +1 -1
  87. package/dist/link-card.d.ts +9 -2
  88. package/dist/link-card.js +5 -44
  89. package/dist/link-card.js.map +1 -1
  90. package/dist/longform-page.js +1 -1
  91. package/dist/maintenance-screen.js +2 -1
  92. package/dist/maintenance-screen.js.map +1 -1
  93. package/dist/map.js +3 -3
  94. package/dist/map.js.map +1 -1
  95. package/dist/markdown.js +2 -1
  96. package/dist/markdown.js.map +1 -1
  97. package/dist/marquee.js +1 -1
  98. package/dist/mascot-quote.js +1 -1
  99. package/dist/match-dialog.js +2 -1
  100. package/dist/match-dialog.js.map +1 -1
  101. package/dist/media-grid.d.ts +26 -4
  102. package/dist/media-grid.js +144 -77
  103. package/dist/media-grid.js.map +1 -1
  104. package/dist/native/map.js +3 -3
  105. package/dist/native/map.js.map +1 -1
  106. package/dist/native.d.ts +18 -1
  107. package/dist/native.js +105 -24
  108. package/dist/native.js.map +1 -1
  109. package/dist/nav-bar.js +1 -1
  110. package/dist/page-hero.js +6 -6
  111. package/dist/page.js +2 -2
  112. package/dist/popover.js +1 -1
  113. package/dist/pricing-page.js +1 -1
  114. package/dist/product-page.js +1 -1
  115. package/dist/profile-card.js +1 -1
  116. package/dist/promise-card.js +1 -1
  117. package/dist/radio-group.js +2 -2
  118. package/dist/rail-nav.d.ts +149 -0
  119. package/dist/rail-nav.js +177 -0
  120. package/dist/rail-nav.js.map +1 -0
  121. package/dist/scroll-stage.js +1 -1
  122. package/dist/settings-layout.d.ts +75 -62
  123. package/dist/settings-layout.js +39 -6
  124. package/dist/settings-layout.js.map +1 -1
  125. package/dist/showcase.js +1 -1
  126. package/dist/site-footer.d.ts +48 -67
  127. package/dist/site-footer.js +34 -10
  128. package/dist/site-footer.js.map +1 -1
  129. package/dist/slider.js +2 -2
  130. package/dist/stage-banner.js +1 -1
  131. package/dist/step-showcase.js +1 -1
  132. package/dist/tabs.js +1 -1
  133. package/dist/tabs.js.map +1 -1
  134. package/dist/terminal-replay.js +1 -1
  135. package/dist/theme.js +2 -1
  136. package/dist/theme.js.map +1 -1
  137. package/dist/toast.js +1 -1
  138. package/dist/toc.js +1 -1
  139. package/dist/tooltip.js +1 -1
  140. package/dist/update-prompt.js +2 -1
  141. package/dist/update-prompt.js.map +1 -1
  142. package/dist/vertical-video.js +2 -2
  143. package/dist/video-player.js +3 -3
  144. package/dist/waveform.d.ts +93 -0
  145. package/dist/waveform.js +95 -0
  146. package/dist/waveform.js.map +1 -0
  147. package/package.json +81 -10
  148. package/registry/achievement.json +1 -1
  149. package/registry/action-bar.json +1 -1
  150. package/registry/activity-feed.json +1 -1
  151. package/registry/alert.json +1 -1
  152. package/registry/app-header.json +202 -0
  153. package/registry/app-shell.json +33 -9
  154. package/registry/argument-card.json +37 -5
  155. package/registry/audio-player.json +5 -3
  156. package/registry/auth-layout.json +1 -1
  157. package/registry/avatar.json +1 -1
  158. package/registry/badge.json +1 -1
  159. package/registry/button.json +3 -2
  160. package/registry/captcha.json +300 -0
  161. package/registry/card-grid.json +27 -3
  162. package/registry/card.json +1 -1
  163. package/registry/catalogue-page.json +1 -1
  164. package/registry/changelog-page.json +11 -7
  165. package/registry/chat.json +1 -1
  166. package/registry/checkbox.json +1 -1
  167. package/registry/chip-link.json +1 -1
  168. package/registry/chip.json +1 -1
  169. package/registry/choice-grid.json +1 -1
  170. package/registry/cn.json +1 -1
  171. package/registry/code-block.json +1 -1
  172. package/registry/combobox.json +1 -1
  173. package/registry/command.json +1 -1
  174. package/registry/comparison-table.json +1 -1
  175. package/registry/component-page.json +1 -1
  176. package/registry/confirm-button.json +1 -1
  177. package/registry/contact-page.json +1 -1
  178. package/registry/continue-prompt.json +1 -1
  179. package/registry/countdown.json +1 -1
  180. package/registry/cta-panel.json +1 -1
  181. package/registry/dashboard-layout.json +1 -1
  182. package/registry/data-table.json +1 -1
  183. package/registry/date-picker.json +1 -1
  184. package/registry/decision-list.json +1 -1
  185. package/registry/description-list.json +1 -1
  186. package/registry/detail-layout.json +1 -1
  187. package/registry/dialog.json +1 -1
  188. package/registry/docs-article-page.json +1 -1
  189. package/registry/docs-hub-page.json +1 -1
  190. package/registry/docs-layout.json +1 -1
  191. package/registry/docs-nav.json +177 -0
  192. package/registry/document-viewer.json +1 -1
  193. package/registry/dropdown-menu.json +1 -1
  194. package/registry/empty-state.json +1 -1
  195. package/registry/error-page.json +1 -1
  196. package/registry/examples/activity-feed/native/notifications.light.png +0 -0
  197. package/registry/examples/app-header/basic.d.ts +4 -0
  198. package/registry/examples/app-header/basic.js +23 -0
  199. package/registry/examples/app-header/basic.tsx +17 -0
  200. package/registry/examples/app-shell/desktop.d.ts +4 -0
  201. package/registry/examples/app-shell/desktop.js +41 -0
  202. package/registry/examples/app-shell/desktop.tsx +37 -0
  203. package/registry/examples/argument-card/hover-light.d.ts +4 -0
  204. package/registry/examples/argument-card/hover-light.js +17 -0
  205. package/registry/examples/argument-card/hover-light.tsx +19 -0
  206. package/registry/examples/argument-card/hover-quiet.d.ts +4 -0
  207. package/registry/examples/argument-card/hover-quiet.js +17 -0
  208. package/registry/examples/argument-card/hover-quiet.tsx +19 -0
  209. package/registry/examples/avatar/native/group.light.png +0 -0
  210. package/registry/examples/avatar/native/presence.light.png +0 -0
  211. package/registry/examples/avatar/native/sizes.light.png +0 -0
  212. package/registry/examples/badge/native/tones.light.png +0 -0
  213. package/registry/examples/button/native/ghost.light.png +0 -0
  214. package/registry/examples/captcha/disclosure.d.ts +4 -0
  215. package/registry/examples/captcha/disclosure.js +14 -0
  216. package/registry/examples/captcha/disclosure.tsx +11 -0
  217. package/registry/examples/captcha/form.d.ts +4 -0
  218. package/registry/examples/captcha/form.js +18 -0
  219. package/registry/examples/captcha/form.tsx +17 -0
  220. package/registry/examples/card/native/body.light.png +0 -0
  221. package/registry/examples/card/native/default.light.png +0 -0
  222. package/registry/examples/card/native/elevated.light.png +0 -0
  223. package/registry/examples/card/native/pressable.light.png +0 -0
  224. package/registry/examples/card-grid/hover-quiet.d.ts +4 -0
  225. package/registry/examples/card-grid/hover-quiet.js +18 -0
  226. package/registry/examples/card-grid/hover-quiet.tsx +20 -0
  227. package/registry/examples/changelog-page/releases.js +1 -1
  228. package/registry/examples/changelog-page/releases.tsx +1 -1
  229. package/registry/examples/chat/native/conversation.light.png +0 -0
  230. package/registry/examples/chat/native/inbox.light.png +0 -0
  231. package/registry/examples/chip/native/multiple.light.png +0 -0
  232. package/registry/examples/chip/native/removable.light.png +0 -0
  233. package/registry/examples/chip/native/single.light.png +0 -0
  234. package/registry/examples/chip/native/toggle.light.png +0 -0
  235. package/registry/examples/combobox/native/multiple.light.png +0 -0
  236. package/registry/examples/combobox/native/search.light.png +0 -0
  237. package/registry/examples/countdown/native/days.light.png +0 -0
  238. package/registry/examples/countdown/native/hours.light.png +0 -0
  239. package/registry/examples/countdown/native/sizes.light.png +0 -0
  240. package/registry/examples/countdown/native/urgent.light.png +0 -0
  241. package/registry/examples/countdown/native/with-label.light.png +0 -0
  242. package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
  243. package/registry/examples/date-picker/native/birth-date.light.png +0 -0
  244. package/registry/examples/date-picker/native/calendar.dark.png +0 -0
  245. package/registry/examples/date-picker/native/calendar.light.png +0 -0
  246. package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
  247. package/registry/examples/date-picker/native/day-strip.light.png +0 -0
  248. package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
  249. package/registry/examples/date-picker/native/time-slots.light.png +0 -0
  250. package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
  251. package/registry/examples/description-list/native/job-details.light.png +0 -0
  252. package/registry/examples/docs-nav/groups.d.ts +4 -0
  253. package/registry/examples/docs-nav/groups.js +21 -0
  254. package/registry/examples/docs-nav/groups.tsx +15 -0
  255. package/registry/examples/empty-state/native/default.light.png +0 -0
  256. package/registry/examples/field/native/default.light.png +0 -0
  257. package/registry/examples/field/native/select.light.png +0 -0
  258. package/registry/examples/force-update-screen/native/default.light.png +0 -0
  259. package/registry/examples/form/native/amount.light.png +0 -0
  260. package/registry/examples/form/native/audience.light.png +0 -0
  261. package/registry/examples/form/native/profile.light.png +0 -0
  262. package/registry/examples/form/native/settings.light.png +0 -0
  263. package/registry/examples/form/native/sign-up.light.png +0 -0
  264. package/registry/examples/form/native/upload.dark.png +0 -0
  265. package/registry/examples/form/native/upload.light.png +0 -0
  266. package/registry/examples/goal-gauge/native/default.light.png +0 -0
  267. package/registry/examples/header/native/large-title.light.png +0 -0
  268. package/registry/examples/link-card/hover-light.d.ts +4 -0
  269. package/registry/examples/link-card/hover-light.js +18 -0
  270. package/registry/examples/link-card/hover-light.tsx +20 -0
  271. package/registry/examples/link-card/hover-quiet.d.ts +4 -0
  272. package/registry/examples/link-card/hover-quiet.js +18 -0
  273. package/registry/examples/link-card/hover-quiet.tsx +20 -0
  274. package/registry/examples/loader/native/job-wait.light.png +0 -0
  275. package/registry/examples/maintenance-screen/native/default.light.png +0 -0
  276. package/registry/examples/map/native/places.light.png +0 -0
  277. package/registry/examples/markdown/native/basic.light.png +0 -0
  278. package/registry/examples/mascot-state/native/default.light.png +0 -0
  279. package/registry/examples/media-picker/native/story.light.png +0 -0
  280. package/registry/examples/meta-row/native/video.light.png +0 -0
  281. package/registry/examples/meter/native/credits.light.png +0 -0
  282. package/registry/examples/meter/native/split-ring.light.png +0 -0
  283. package/registry/examples/number-ticker/native/balance.light.png +0 -0
  284. package/registry/examples/onboarding/native/first-launch.light.png +0 -0
  285. package/registry/examples/otp-input/native/verify.light.png +0 -0
  286. package/registry/examples/pagination/native/cursor.light.png +0 -0
  287. package/registry/examples/pagination/native/pages.light.png +0 -0
  288. package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
  289. package/registry/examples/permission-prompt/native/camera.light.png +0 -0
  290. package/registry/examples/profile-card/native/default.light.png +0 -0
  291. package/registry/examples/radio-group/native/buttons.light.png +0 -0
  292. package/registry/examples/radio-group/native/cards.light.png +0 -0
  293. package/registry/examples/radio-group/native/list.light.png +0 -0
  294. package/registry/examples/radio-group/native/segmented.light.png +0 -0
  295. package/registry/examples/rail-nav/expandable.d.ts +4 -0
  296. package/registry/examples/rail-nav/expandable.js +34 -0
  297. package/registry/examples/rail-nav/expandable.tsx +28 -0
  298. package/registry/examples/rail-nav/studio.d.ts +4 -0
  299. package/registry/examples/rail-nav/studio.js +43 -0
  300. package/registry/examples/rail-nav/studio.tsx +38 -0
  301. package/registry/examples/screen/native/app-shell.light.png +0 -0
  302. package/registry/examples/screen/native/auth.light.png +0 -0
  303. package/registry/examples/screen/native/map.light.png +0 -0
  304. package/registry/examples/screen/native/notifications.light.png +0 -0
  305. package/registry/examples/screen/native/profile.light.png +0 -0
  306. package/registry/examples/segmented/native/default.light.png +0 -0
  307. package/registry/examples/segmented/native/small.light.png +0 -0
  308. package/registry/examples/settings-layout/flat.d.ts +4 -0
  309. package/registry/examples/settings-layout/flat.js +26 -0
  310. package/registry/examples/settings-layout/flat.tsx +30 -0
  311. package/registry/examples/showcase/native/slides.light.png +0 -0
  312. package/registry/examples/site-footer/app.d.ts +4 -0
  313. package/registry/examples/site-footer/app.js +25 -0
  314. package/registry/examples/site-footer/app.tsx +22 -0
  315. package/registry/examples/site-footer/docs.d.ts +4 -0
  316. package/registry/examples/site-footer/docs.js +31 -0
  317. package/registry/examples/site-footer/docs.tsx +24 -0
  318. package/registry/examples/slider/native/default.light.png +0 -0
  319. package/registry/examples/slider/native/stepped.light.png +0 -0
  320. package/registry/examples/step-progress/native/sign-up.light.png +0 -0
  321. package/registry/examples/stepper/native/run.light.png +0 -0
  322. package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
  323. package/registry/examples/switch/native/settings.light.png +0 -0
  324. package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
  325. package/registry/examples/tabs/native/sections.light.png +0 -0
  326. package/registry/examples/tabs/native/segmented.light.png +0 -0
  327. package/registry/examples/tag-selector/native/interests.light.png +0 -0
  328. package/registry/examples/toast/native/tones.light.png +0 -0
  329. package/registry/examples/txt/native/tones.dark.png +0 -0
  330. package/registry/examples/txt/native/tones.light.png +0 -0
  331. package/registry/examples/update-prompt/native/default.light.png +0 -0
  332. package/registry/examples/waveform/card.d.ts +4 -0
  333. package/registry/examples/waveform/card.js +18 -0
  334. package/registry/examples/waveform/card.tsx +16 -0
  335. package/registry/examples/waveform/native/card.d.ts +4 -0
  336. package/registry/examples/waveform/native/card.dark.png +0 -0
  337. package/registry/examples/waveform/native/card.js +19 -0
  338. package/registry/examples/waveform/native/card.light.png +0 -0
  339. package/registry/examples/waveform/native/card.tsx +19 -0
  340. package/registry/examples/waveform/sizes.d.ts +4 -0
  341. package/registry/examples/waveform/sizes.js +16 -0
  342. package/registry/examples/waveform/sizes.tsx +14 -0
  343. package/registry/field.json +1 -1
  344. package/registry/file-upload.json +1 -1
  345. package/registry/filter-bar.json +1 -1
  346. package/registry/force-update-screen.json +1 -1
  347. package/registry/form.json +1 -1
  348. package/registry/gallery-page.json +1 -1
  349. package/registry/genui.json +3 -3
  350. package/registry/glow-card.json +1 -1
  351. package/registry/goal-gauge.json +1 -1
  352. package/registry/how-it-works-page.json +1 -1
  353. package/registry/image-cropper.json +1 -1
  354. package/registry/index.json +197 -14
  355. package/registry/iso.json +1 -1
  356. package/registry/kanban.json +1 -1
  357. package/registry/kbd.json +1 -1
  358. package/registry/landing-page.json +1 -1
  359. package/registry/landscape.json +1 -1
  360. package/registry/legal-page.json +1 -1
  361. package/registry/link-card.json +38 -6
  362. package/registry/list.json +1 -1
  363. package/registry/loader.json +1 -1
  364. package/registry/longform-page.json +1 -1
  365. package/registry/maintenance-screen.json +1 -1
  366. package/registry/map.json +2 -2
  367. package/registry/markdown.json +1 -1
  368. package/registry/marketing-layout.json +1 -1
  369. package/registry/marquee.json +1 -1
  370. package/registry/mascot-quote.json +1 -1
  371. package/registry/mascot-state.json +1 -1
  372. package/registry/mascots.json +1 -1
  373. package/registry/match-dialog.json +1 -1
  374. package/registry/media-capture.json +1 -1
  375. package/registry/media-grid.json +92 -6
  376. package/registry/meta-row.json +1 -1
  377. package/registry/meter.json +1 -1
  378. package/registry/nav-bar.json +2 -2
  379. package/registry/number-ticker.json +1 -1
  380. package/registry/page-header.json +1 -1
  381. package/registry/page-hero.json +1 -1
  382. package/registry/page.json +1 -1
  383. package/registry/pagination.json +1 -1
  384. package/registry/photo-grid.json +1 -1
  385. package/registry/pointer-light.json +1 -1
  386. package/registry/popover.json +1 -1
  387. package/registry/pricing-page.json +1 -1
  388. package/registry/product-page.json +1 -1
  389. package/registry/profile-card.json +1 -1
  390. package/registry/progress.json +1 -1
  391. package/registry/promise-card.json +1 -1
  392. package/registry/radio-group.json +1 -1
  393. package/registry/rail-nav.json +493 -0
  394. package/registry/recipes.json +1 -1
  395. package/registry/scroll-stage.json +1 -1
  396. package/registry/search-field.json +1 -1
  397. package/registry/section-backdrop.json +1 -1
  398. package/registry/separator.json +1 -1
  399. package/registry/settings-layout.json +104 -9
  400. package/registry/showcase.json +1 -1
  401. package/registry/site-footer.json +38 -6
  402. package/registry/sites.json +1 -1
  403. package/registry/skeleton.json +1 -1
  404. package/registry/skip-link.json +1 -1
  405. package/registry/slider.json +1 -1
  406. package/registry/slot.json +1 -1
  407. package/registry/spinner.json +1 -1
  408. package/registry/split-view.json +1 -1
  409. package/registry/stage-banner.json +1 -1
  410. package/registry/stat.json +1 -1
  411. package/registry/status-page.json +1 -1
  412. package/registry/step-progress.json +1 -1
  413. package/registry/step-showcase.json +1 -1
  414. package/registry/stepper.json +1 -1
  415. package/registry/swipe-deck.json +1 -1
  416. package/registry/switch.json +1 -1
  417. package/registry/tabs.json +2 -2
  418. package/registry/tag-input.json +1 -1
  419. package/registry/tag-selector.json +1 -1
  420. package/registry/terminal-replay.json +1 -1
  421. package/registry/theme.json +1 -1
  422. package/registry/toast.json +1 -1
  423. package/registry/toc.json +1 -1
  424. package/registry/tooltip.json +1 -1
  425. package/registry/tree-view.json +1 -1
  426. package/registry/update-prompt.json +1 -1
  427. package/registry/verified-badge.json +1 -1
  428. package/registry/vertical-video.json +1 -1
  429. package/registry/video-player.json +1 -1
  430. package/registry/video-trimmer.json +1 -1
  431. package/registry/virtual.json +1 -1
  432. package/registry/waveform.json +296 -0
  433. package/dist/chunk-2FRWNSRO.js.map +0 -1
  434. package/dist/chunk-3BC4XQ6C.js.map +0 -1
  435. package/dist/chunk-3IN6TOPM.js.map +0 -1
  436. package/dist/chunk-4LOMIQVX.js.map +0 -1
  437. package/dist/chunk-G3ETON2A.js.map +0 -1
  438. package/dist/chunk-IZ7MV6HM.js.map +0 -1
  439. package/dist/chunk-OWC2LZD2.js.map +0 -1
  440. package/dist/chunk-ZNMFG62E.js.map +0 -1
  441. /package/dist/{chunk-FKBHWS4N.js.map → chunk-CEJDH6SA.js.map} +0 -0
  442. /package/dist/{chunk-R6NK6ZNY.js.map → chunk-F7FVPPBB.js.map} +0 -0
  443. /package/dist/{chunk-5Z7FWCV2.js.map → chunk-HBZPJ3EP.js.map} +0 -0
  444. /package/dist/{chunk-C2BRIFJG.js.map → chunk-HJFRHYCI.js.map} +0 -0
  445. /package/dist/{chunk-BTMFZ66D.js.map → chunk-KM6VAKIE.js.map} +0 -0
  446. /package/dist/{chunk-DGQMDJXK.js.map → chunk-LZNZLCOE.js.map} +0 -0
  447. /package/dist/{chunk-AQSZJJAJ.js.map → chunk-MQPC3P4T.js.map} +0 -0
@@ -2,8 +2,8 @@
2
2
  "name": "settings-layout",
3
3
  "type": "primitive",
4
4
  "title": "Settings layout",
5
- "summary": "Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.",
6
- "description": "Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.",
5
+ "summary": "Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, as titled cards with their own save or, flat, as hairline-divided rows (`SettingsRow`).",
6
+ "description": "Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, as titled cards with their own save or, flat, as hairline-divided rows (`SettingsRow`).",
7
7
  "status": "beta",
8
8
  "deprecated": null,
9
9
  "category": "layouts",
@@ -36,6 +36,8 @@
36
36
  }
37
37
  ],
38
38
  "bestPractices": [
39
+ "Prefer `variant=\"flat\"` and `SettingsRow` for a product's settings: a label and its help on the left, the control on the right, no card.",
40
+ "Keep support-only facts (an account id) in a last `Advanced` section, small and mono, never in the first screen.",
39
41
  "One save per section, at its foot: a change never waits for another.",
40
42
  "Sections as pages (`/settings/billing`) or as anchors of one long page (`#billing`).",
41
43
  "Say in the description what the section changes for the user."
@@ -54,7 +56,7 @@
54
56
  ],
55
57
  "web": {
56
58
  "entry": "@krizaka/ui/settings-layout",
57
- "import": "import { SettingsLayout, SettingsSection } from \"@krizaka/ui/settings-layout\";",
59
+ "import": "import { SettingsLayout, SettingsSection, SettingsRow } from \"@krizaka/ui/settings-layout\";",
58
60
  "props": [
59
61
  {
60
62
  "component": "SettingsLayout",
@@ -94,12 +96,46 @@
94
96
  "default": null,
95
97
  "description": "The screen's title (`Settings`).",
96
98
  "required": false
99
+ },
100
+ {
101
+ "name": "variant",
102
+ "type": "\"flat\" | \"card\"",
103
+ "default": "card",
104
+ "description": "`card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).",
105
+ "required": false
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "component": "SettingsRow",
111
+ "description": "One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`.",
112
+ "props": [
113
+ {
114
+ "name": "label",
115
+ "type": "ReactNode",
116
+ "default": null,
117
+ "description": "What the setting is (`Username`).",
118
+ "required": true
119
+ },
120
+ {
121
+ "name": "description",
122
+ "type": "ReactNode",
123
+ "default": null,
124
+ "description": "The help text under it, one sentence.",
125
+ "required": false
126
+ },
127
+ {
128
+ "name": "htmlFor",
129
+ "type": "string",
130
+ "default": null,
131
+ "description": "The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value.",
132
+ "required": false
97
133
  }
98
134
  ]
99
135
  },
100
136
  {
101
137
  "component": "SettingsSection",
102
- "description": "A group of settings: a titled card with its fields and its own save.",
138
+ "description": "A group of settings: a titled card with its fields and its own save, or flat rows under a title.",
103
139
  "props": [
104
140
  {
105
141
  "name": "title",
@@ -121,6 +157,13 @@
121
157
  "default": null,
122
158
  "description": "At the foot: the section's own save (a Button), a note.",
123
159
  "required": false
160
+ },
161
+ {
162
+ "name": "variant",
163
+ "type": "\"flat\" | \"card\"",
164
+ "default": "card",
165
+ "description": "`card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).",
166
+ "required": false
124
167
  }
125
168
  ]
126
169
  }
@@ -137,6 +180,17 @@
137
180
  "module": "@krizaka/ui/registry/examples/settings-layout/account",
138
181
  "code": "import { Button } from \"@krizaka/ui/button\";\nimport { Field, Input, Select } from \"@krizaka/ui/field\";\nimport { SettingsLayout, SettingsSection } from \"@krizaka/ui/settings-layout\";\nimport { Switch } from \"@krizaka/ui/switch\";\n\nconst NAV = [\n { id: \"profile\", label: \"Profile\", href: \"#profile\", current: true },\n { id: \"notifications\", label: \"Notifications\", href: \"#notifications\" },\n { id: \"payouts\", label: \"Payouts\", href: \"#payouts\" },\n { id: \"security\", label: \"Security\", href: \"#security\" },\n];\n\n// TEMPLATE — account settings: the sections on the left (a row of chips that scrolls on a phone), each form a titled\n// card with its own save, so a change in one never waits for another.\nexport default function SettingsLayoutAccount() {\n return (\n <SettingsLayout className=\"w-full\" title=\"Settings\" description=\"Your profile, what we tell you and how you are paid.\" nav={NAV} navLabel=\"Settings sections\">\n <SettingsSection\n id=\"profile\"\n title=\"Profile\"\n description=\"What your fans see.\"\n footer={<Button size=\"sm\" variant=\"primary\" shape=\"cut\">Save the profile</Button>}\n >\n <Field.Root>\n <Field.Label htmlFor=\"settings-name\">Display name</Field.Label>\n <Input id=\"settings-name\" defaultValue=\"Elena Varga\" />\n </Field.Root>\n <Field.Root>\n <Field.Label htmlFor=\"settings-language\">Language</Field.Label>\n <Select id=\"settings-language\" defaultValue=\"fr\">\n <option value=\"en\">English</option>\n <option value=\"fr\">Français</option>\n </Select>\n </Field.Root>\n </SettingsSection>\n <SettingsSection id=\"notifications\" title=\"Notifications\" description=\"Only what you ask for.\">\n {[\n { id: \"unlock\", label: \"A fan unlocks a video\", on: true },\n { id: \"auction\", label: \"An auction ends\", on: true },\n { id: \"weekly\", label: \"Weekly summary by email\", on: false },\n ].map((n) => (\n <div key={n.id} className=\"flex items-center justify-between gap-4 text-sm text-fg\">\n <span id={`notify-${n.id}`}>{n.label}</span>\n <Switch aria-labelledby={`notify-${n.id}`} defaultChecked={n.on} />\n </div>\n ))}\n </SettingsSection>\n </SettingsLayout>\n );\n}\n"
139
182
  },
183
+ {
184
+ "name": "flat",
185
+ "title": "Calm settings",
186
+ "description": "The flat variant: one column of at most 45rem, each setting a row (label and help left, control right) divided by hairlines.",
187
+ "template": true,
188
+ "purpose": "operate",
189
+ "why": "A person scans the settings, finds the one to change and changes it in place, without cards competing for attention.",
190
+ "path": "examples/settings-layout/flat.tsx",
191
+ "module": "@krizaka/ui/registry/examples/settings-layout/flat",
192
+ "code": "import { Badge } from \"@krizaka/ui/badge\";\nimport { Button } from \"@krizaka/ui/button\";\nimport { Input } from \"@krizaka/ui/field\";\nimport { SettingsLayout, SettingsRow, SettingsSection } from \"@krizaka/ui/settings-layout\";\n\nconst NAV = [\n { id: \"account\", label: \"Account\", href: \"/settings/account\", current: true },\n { id: \"appearance\", label: \"Appearance\", href: \"/settings/appearance\" },\n { id: \"integrations\", label: \"Integrations\", href: \"/settings/integrations\" },\n];\n\n// TEMPLATE — calm settings: sections on the left, one column of rows (label and help left, control right) divided by hairlines.\nexport default function SettingsLayoutFlat() {\n return (\n <SettingsLayout className=\"w-full\" variant=\"flat\" title=\"Settings\" nav={NAV} navLabel=\"Settings sections\">\n <SettingsSection variant=\"flat\" id=\"account\" title=\"Account\" description=\"Who you are in this workspace.\">\n <SettingsRow label=\"Username\" description=\"Shown to your team.\" htmlFor=\"flat-username\">\n <Input id=\"flat-username\" defaultValue=\"oussama\" className=\"w-56\" />\n </SettingsRow>\n <SettingsRow label=\"Email\">oussama@krizaka.com</SettingsRow>\n <SettingsRow label=\"Role\"><Badge>Admin</Badge></SettingsRow>\n </SettingsSection>\n <SettingsSection variant=\"flat\" title=\"Danger zone\">\n <SettingsRow label=\"Sign out everywhere\" description=\"Ends every session on every device.\">\n <Button size=\"sm\" variant=\"secondary\">Sign out</Button>\n </SettingsRow>\n </SettingsSection>\n </SettingsLayout>\n );\n}\n"
193
+ },
140
194
  {
141
195
  "name": "sections",
142
196
  "title": "One section per page",
@@ -151,19 +205,19 @@
151
205
  "files": [
152
206
  {
153
207
  "path": "meta.ts",
154
- "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\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 | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\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\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
208
+ "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\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 | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\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\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
155
209
  },
156
210
  {
157
211
  "path": "settings-layout/index.ts",
158
- "content": "/** @krizaka/ui/settings-layout — `SettingsLayout` and `SettingsSection`: sections on the side, forms as titled cards. Server-safe. */\nexport { SettingsLayout, settingsLayout, type SettingsLayoutProps, type SettingsNavItem, SettingsSection, type SettingsSectionProps } from \"./settings-layout\";\n"
212
+ "content": "/** @krizaka/ui/settings-layout — `SettingsLayout`, `SettingsSection` and `SettingsRow`: sections on the side, forms as titled cards or flat rows. Server-safe. */\nexport { SettingsLayout, settingsLayout, type SettingsLayoutProps, type SettingsNavItem, SettingsRow, type SettingsRowProps, SettingsSection, type SettingsSectionProps } from \"./settings-layout\";\n"
159
213
  },
160
214
  {
161
215
  "path": "settings-layout/meta.ts",
162
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Settings layout\",\n summary: \"Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, each a titled card with its own save.\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n parity: { native: { status: \"gap\", issue: \"krizaka/krizaka-ui#246\", reason: \"orazaka-mobile-client hand-rolls its settings rows and groups (src/ui/SettingsRow.tsx).\" }, desktop: \"web\" },\n whenToUse: [\"Account, workspace and administration settings.\", \"Any long form that splits into independent groups.\"],\n whenNotToUse: [\n { when: \"For a step-by-step setup the user follows once.\", use: \"stepper\" },\n { when: \"For one small form.\", use: \"field\" },\n ],\n bestPractices: [\"One save per section, at its foot: a change never waits for another.\", \"Sections as pages (`/settings/billing`) or as anchors of one long page (`#billing`).\", \"Say in the description what the section changes for the user.\"],\n accessibility: {\n keyboard: [],\n notes: [\"The sections are a `nav` named by `navLabel`; the current one has `aria-current` (page or location).\", \"Each section is a `section` named by its `h2`.\"],\n },\n related: [\"field\", \"switch\", \"app-shell\"],\n web: {\n imports: [\"SettingsLayout\", \"SettingsSection\"],\n examples: [\n { name: \"account\", title: \"Account settings\", description: \"Profile and notifications, each with its own save; the sections as chips on a phone.\", template: true, purpose: \"operate\", why: \"A person changes one setting at a time, saves it at once and knows where each lives.\" },\n { name: \"sections\", title: \"One section per page\", description: \"A workspace's settings, the current section marked.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
216
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Settings layout\",\n summary: \"Settings: the sections on the side (a row of chips that scrolls on a phone) and the current section's forms, as titled cards with their own save or, flat, as hairline-divided rows (`SettingsRow`).\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n parity: { native: { status: \"gap\", issue: \"krizaka/krizaka-ui#246\", reason: \"orazaka-mobile-client hand-rolls its settings rows and groups (src/ui/SettingsRow.tsx).\" }, desktop: \"web\" },\n whenToUse: [\"Account, workspace and administration settings.\", \"Any long form that splits into independent groups.\"],\n whenNotToUse: [\n { when: \"For a step-by-step setup the user follows once.\", use: \"stepper\" },\n { when: \"For one small form.\", use: \"field\" },\n ],\n bestPractices: [\"Prefer `variant=\\\"flat\\\"` and `SettingsRow` for a product's settings: a label and its help on the left, the control on the right, no card.\", \"Keep support-only facts (an account id) in a last `Advanced` section, small and mono, never in the first screen.\", \"One save per section, at its foot: a change never waits for another.\", \"Sections as pages (`/settings/billing`) or as anchors of one long page (`#billing`).\", \"Say in the description what the section changes for the user.\"],\n accessibility: {\n keyboard: [],\n notes: [\"The sections are a `nav` named by `navLabel`; the current one has `aria-current` (page or location).\", \"Each section is a `section` named by its `h2`.\"],\n },\n related: [\"field\", \"switch\", \"app-shell\"],\n web: {\n imports: [\"SettingsLayout\", \"SettingsSection\", \"SettingsRow\"],\n examples: [\n { name: \"account\", title: \"Account settings\", description: \"Profile and notifications, each with its own save; the sections as chips on a phone.\", template: true, purpose: \"operate\", why: \"A person changes one setting at a time, saves it at once and knows where each lives.\" },\n { name: \"flat\", title: \"Calm settings\", description: \"The flat variant: one column of at most 45rem, each setting a row (label and help left, control right) divided by hairlines.\", template: true, purpose: \"operate\", why: \"A person scans the settings, finds the one to change and changes it in place, without cards competing for attention.\" },\n { name: \"sections\", title: \"One section per page\", description: \"A workspace's settings, the current section marked.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
163
217
  },
164
218
  {
165
219
  "path": "settings-layout/settings-layout.tsx",
166
- "content": "// Server-safe. Settings, read from the products' account and administration screens: a list of sections on the left\n// (a row of chips that scrolls on a phone), the current section's forms on the right, each form a titled card with its\n// own save at the foot. The sections are links (one page each) or anchors (one long page).\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const settingsLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-1\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-10\",\n nav: \"-mx-4 overflow-x-auto overflow-y-hidden px-4 py-1 -my-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:mx-0 lg:overflow-visible lg:px-0 lg:py-0 lg:my-0\",\n navList: \"flex w-max gap-2 lg:sticky lg:top-20 lg:w-auto lg:flex-col lg:gap-0.5\",\n navLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-full border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg-secondary no-underline \" +\n \"hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:border-accent aria-[current]:text-fg \" +\n \"lg:rounded-lg lg:border-transparent lg:bg-transparent lg:px-3 lg:hover:bg-surface-2 lg:aria-[current]:bg-accent-soft [&>svg]:h-4 [&>svg]:w-4\",\n content: \"flex min-w-0 flex-col gap-6\",\n section: \"rounded-xl border border-border-default bg-surface-1\",\n sectionHead: \"flex flex-col gap-1 px-5 pt-5\",\n sectionTitle: \"text-base font-bold text-fg\",\n sectionDescription: \"text-sm text-fg-secondary\",\n sectionBody: \"flex flex-col gap-4 px-5 py-5\",\n sectionFooter: \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl\",\n },\n});\nconst s = settingsLayout();\n\nexport interface SettingsNavItem {\n /** Its id (the anchor of a section on one long page). */\n id: string;\n /** Its words. */\n label: string;\n /** Where it leads: a page (`/settings/billing`) or an anchor (`#billing`). */\n href: string;\n /** Its icon (a signature icon). */\n icon?: React.ReactNode;\n /** The section shown now: `aria-current`. */\n current?: boolean;\n}\n\nexport type SettingsLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title (`Settings`). */\n title?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The sections. */\n nav: readonly SettingsNavItem[];\n /** The navigation's accessible name (`Settings sections`). */\n navLabel: string;\n /** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The current section's forms (`SettingsSection`). */\n children: React.ReactNode;\n};\n\n/** A settings screen: sections on the left (chips on a phone), forms on the right. */\nexport function SettingsLayout({ title, description, nav, navLabel, linkAs: Link = \"a\", className, children, ...props }: SettingsLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n {(title || description) && (\n <div className={s.head()}>\n {title && <h1 className={s.title()}>{title}</h1>}\n {description && <p className={s.description()}>{description}</p>}\n </div>\n )}\n <div className={s.columns()}>\n <nav aria-label={navLabel} className={s.nav()}>\n <ul className={s.navList()}>\n {nav.map((item) => (\n <li key={item.id}>\n <Link href={item.href} className={s.navLink()} aria-current={item.current ? (item.href.startsWith(\"#\") ? \"location\" : \"page\") : undefined}>\n {item.icon}\n {item.label}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n <div className={s.content()}>{children}</div>\n </div>\n </div>\n );\n}\n\nexport type SettingsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The section's title: it names the region (and is its anchor's target when `id` is set). */\n title: React.ReactNode;\n /** What these settings change, in one sentence. */\n description?: React.ReactNode;\n /** At the foot: the section's own save (a Button), a note. */\n footer?: React.ReactNode;\n /** The fields. */\n children: React.ReactNode;\n};\n\n/** A group of settings: a titled card with its fields and its own save. */\nexport function SettingsSection({ title, description, footer, id, className, children, ...props }: SettingsSectionProps) {\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <h2 id={titleId} className={s.sectionTitle()}>\n {title}\n </h2>\n {description && <p className={s.sectionDescription()}>{description}</p>}\n </div>\n <div className={s.sectionBody()}>{children}</div>\n {footer && <div className={s.sectionFooter()}>{footer}</div>}\n </section>\n );\n}\n"
220
+ "content": "// Server-safe. Settings, read from the products' account and administration screens: a list of sections on the left\n// (a row of chips that scrolls on a phone), the current section's forms on the right, each form a titled card with its\n// own save at the foot. The sections are links (one page each) or anchors (one long page).\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const settingsLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-1\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-10\",\n nav: \"-mx-4 overflow-x-auto overflow-y-hidden px-4 py-1 -my-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:mx-0 lg:overflow-visible lg:px-0 lg:py-0 lg:my-0\",\n navList: \"flex w-max gap-2 lg:sticky lg:top-20 lg:w-auto lg:flex-col lg:gap-0.5\",\n navLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-full border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg-secondary no-underline \" +\n \"hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:border-accent aria-[current]:text-fg \" +\n \"lg:rounded-lg lg:border-transparent lg:bg-transparent lg:px-3 lg:hover:bg-surface-2 lg:aria-[current]:bg-accent-soft [&>svg]:h-4 [&>svg]:w-4\",\n content: \"flex min-w-0 flex-col gap-6\",\n section: \"rounded-xl border border-border-default bg-surface-1\",\n sectionHead: \"flex flex-col gap-1 px-5 pt-5\",\n sectionTitle: \"text-base font-bold text-fg\",\n sectionDescription: \"text-sm text-fg-secondary\",\n sectionBody: \"flex flex-col gap-4 px-5 py-5\",\n sectionFooter: \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl\",\n // The flat look: no card, hairline-divided rows (Linear / Vercel / GitHub settings).\n rows: \"flex flex-col divide-y divide-border-subtle border-y border-border-subtle\",\n row: \"flex flex-col gap-2 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6\",\n rowText: \"flex min-w-0 flex-col gap-0.5\",\n rowLabel: \"text-sm font-medium text-fg\",\n rowDescription: \"text-sm text-fg-secondary\",\n rowControl: \"flex min-w-0 shrink-0 items-center gap-2 text-sm text-fg sm:max-w-[60%] sm:justify-end\",\n },\n variants: {\n variant: {\n card: {},\n flat: {\n content: \"max-w-[45rem] gap-10\",\n section: \"rounded-none border-0 bg-transparent\",\n sectionHead: \"gap-0.5 px-0 pb-3 pt-0\",\n sectionBody: \"gap-0 px-0 py-0\",\n sectionFooter: \"justify-start border-t-0 bg-transparent px-0 pb-0 pt-4\",\n },\n },\n },\n defaultVariants: { variant: \"card\" },\n});\n\nexport interface SettingsNavItem {\n /** Its id (the anchor of a section on one long page). */\n id: string;\n /** Its words. */\n label: string;\n /** Where it leads: a page (`/settings/billing`) or an anchor (`#billing`). */\n href: string;\n /** Its icon (a signature icon). */\n icon?: React.ReactNode;\n /** The section shown now: `aria-current`. */\n current?: boolean;\n}\n\nexport type SettingsLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title (`Settings`). */\n title?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The sections. */\n nav: readonly SettingsNavItem[];\n /** The navigation's accessible name (`Settings sections`). */\n navLabel: string;\n /** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /**\n * `card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The current section's forms (`SettingsSection`). */\n children: React.ReactNode;\n};\n\n/** A settings screen: sections on the left (chips on a phone), forms on the right. */\nexport function SettingsLayout({ title, description, nav, navLabel, linkAs: Link = \"a\", variant = \"card\", className, children, ...props }: SettingsLayoutProps) {\n const s = settingsLayout({ variant });\n return (\n <div className={s.root({ className })} {...props}>\n {(title || description) && (\n <div className={s.head()}>\n {title && <h1 className={s.title()}>{title}</h1>}\n {description && <p className={s.description()}>{description}</p>}\n </div>\n )}\n <div className={s.columns()}>\n <nav aria-label={navLabel} className={s.nav()}>\n <ul className={s.navList()}>\n {nav.map((item) => (\n <li key={item.id}>\n <Link href={item.href} className={s.navLink()} aria-current={item.current ? (item.href.startsWith(\"#\") ? \"location\" : \"page\") : undefined}>\n {item.icon}\n {item.label}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n <div className={s.content()}>{children}</div>\n </div>\n </div>\n );\n}\n\nexport type SettingsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The section's title: it names the region (and is its anchor's target when `id` is set). */\n title: React.ReactNode;\n /** What these settings change, in one sentence. */\n description?: React.ReactNode;\n /** At the foot: the section's own save (a Button), a note. */\n footer?: React.ReactNode;\n /**\n * `card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The fields (or, flat, the `SettingsRow`s). */\n children: React.ReactNode;\n};\n\n/** A group of settings: a titled card with its fields and its own save, or flat rows under a title. */\nexport function SettingsSection({ title, description, footer, variant = \"card\", id, className, children, ...props }: SettingsSectionProps) {\n const s = settingsLayout({ variant });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <h2 id={titleId} className={s.sectionTitle()}>\n {title}\n </h2>\n {description && <p className={s.sectionDescription()}>{description}</p>}\n </div>\n <div className={variant === \"flat\" ? s.rows() : s.sectionBody()} data-settings-rows={variant === \"flat\" ? \"\" : undefined}>\n {children}\n </div>\n {footer && <div className={s.sectionFooter()}>{footer}</div>}\n </section>\n );\n}\n\nexport type SettingsRowProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** What the setting is (`Username`). */\n label: React.ReactNode;\n /** The help text under it, one sentence. */\n description?: React.ReactNode;\n /** The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value. */\n htmlFor?: string;\n /** The control or the value, on the right (stacked under the label on a phone). */\n children?: React.ReactNode;\n};\n\n/** One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`. */\nexport function SettingsRow({ label, description, htmlFor, className, children, ...props }: SettingsRowProps) {\n const s = settingsLayout();\n const Label = htmlFor ? \"label\" : \"span\";\n return (\n <div className={s.row({ className })} {...props}>\n <div className={s.rowText()}>\n <Label className={s.rowLabel()} {...(htmlFor ? { htmlFor } : {})}>\n {label}\n </Label>\n {description && <span className={s.rowDescription()}>{description}</span>}\n </div>\n {children !== undefined && <div className={s.rowControl()}>{children}</div>}\n </div>\n );\n}\n"
167
221
  }
168
222
  ],
169
223
  "dependencies": [
@@ -213,12 +267,46 @@
213
267
  "default": null,
214
268
  "description": "The screen's title (`Settings`).",
215
269
  "required": false
270
+ },
271
+ {
272
+ "name": "variant",
273
+ "type": "\"flat\" | \"card\"",
274
+ "default": "card",
275
+ "description": "`card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).",
276
+ "required": false
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "component": "SettingsRow",
282
+ "description": "One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`.",
283
+ "props": [
284
+ {
285
+ "name": "label",
286
+ "type": "ReactNode",
287
+ "default": null,
288
+ "description": "What the setting is (`Username`).",
289
+ "required": true
290
+ },
291
+ {
292
+ "name": "description",
293
+ "type": "ReactNode",
294
+ "default": null,
295
+ "description": "The help text under it, one sentence.",
296
+ "required": false
297
+ },
298
+ {
299
+ "name": "htmlFor",
300
+ "type": "string",
301
+ "default": null,
302
+ "description": "The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value.",
303
+ "required": false
216
304
  }
217
305
  ]
218
306
  },
219
307
  {
220
308
  "component": "SettingsSection",
221
- "description": "A group of settings: a titled card with its fields and its own save.",
309
+ "description": "A group of settings: a titled card with its fields and its own save, or flat rows under a title.",
222
310
  "props": [
223
311
  {
224
312
  "name": "title",
@@ -240,6 +328,13 @@
240
328
  "default": null,
241
329
  "description": "At the foot: the section's own save (a Button), a note.",
242
330
  "required": false
331
+ },
332
+ {
333
+ "name": "variant",
334
+ "type": "\"flat\" | \"card\"",
335
+ "default": "card",
336
+ "description": "`card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).",
337
+ "required": false
243
338
  }
244
339
  ]
245
340
  }
@@ -307,7 +307,7 @@
307
307
  "files": [
308
308
  {
309
309
  "path": "meta.ts",
310
- "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"chat\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\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 | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\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\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
310
+ "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 | \"achievement\"\n | \"action-bar\"\n | \"action-sheet\"\n | \"activity-feed\"\n | \"alert\"\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 | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\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 | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"waveform\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\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 | \"radio-group\"\n | \"rail-nav\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\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\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
311
311
  },
312
312
  {
313
313
  "path": "showcase/index.ts",