@krizaka/ui 3.21.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 (494) hide show
  1. package/README.md +5 -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 +35 -20
  9. package/dist/app-shell.js.map +1 -1
  10. package/dist/argument-card.d.ts +4 -1
  11. package/dist/argument-card.js +8 -5
  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-5MH64NIL.js → chunk-2L67YTNV.js} +2 -2
  30. package/dist/{chunk-3IN6TOPM.js → chunk-6ZYRUOTA.js} +6 -3
  31. package/dist/chunk-6ZYRUOTA.js.map +1 -0
  32. package/dist/chunk-APNIVNIX.js +54 -0
  33. package/dist/chunk-APNIVNIX.js.map +1 -0
  34. package/dist/{chunk-FKBHWS4N.js → chunk-CEJDH6SA.js} +2 -2
  35. package/dist/{chunk-OWC2LZD2.js → chunk-CHOJUCVE.js} +6 -3
  36. package/dist/chunk-CHOJUCVE.js.map +1 -0
  37. package/dist/{chunk-3BC4XQ6C.js → chunk-DZU6RMYD.js} +6 -3
  38. package/dist/chunk-DZU6RMYD.js.map +1 -0
  39. package/dist/chunk-F7FVPPBB.js +1080 -0
  40. package/dist/chunk-F7FVPPBB.js.map +1 -0
  41. package/dist/{chunk-5Z7FWCV2.js → chunk-HBZPJ3EP.js} +2 -2
  42. package/dist/{chunk-C2BRIFJG.js → chunk-HJFRHYCI.js} +2 -2
  43. package/dist/{chunk-ZNMFG62E.js → chunk-KH3JOEPY.js} +3 -2
  44. package/dist/chunk-KH3JOEPY.js.map +1 -0
  45. package/dist/{chunk-BTMFZ66D.js → chunk-KM6VAKIE.js} +2 -2
  46. package/dist/{chunk-DGQMDJXK.js → chunk-LZNZLCOE.js} +2 -2
  47. package/dist/chunk-MQPC3P4T.js +126 -0
  48. package/dist/chunk-MQPC3P4T.js.map +1 -0
  49. package/dist/{chunk-2FRWNSRO.js → chunk-NSLXEDIS.js} +3 -2
  50. package/dist/chunk-NSLXEDIS.js.map +1 -0
  51. package/dist/{chunk-3GODX3D6.js → chunk-QDXV544C.js} +2 -2
  52. package/dist/chunk-QDXV544C.js.map +1 -0
  53. package/dist/{chunk-4LOMIQVX.js → chunk-W675RFOA.js} +3 -2
  54. package/dist/chunk-W675RFOA.js.map +1 -0
  55. package/dist/{chunk-G3ETON2A.js → chunk-WU4VLSEA.js} +3 -2
  56. package/dist/chunk-WU4VLSEA.js.map +1 -0
  57. package/dist/{chunk-IZ7MV6HM.js → chunk-XVFQZ3ZG.js} +3 -2
  58. package/dist/chunk-XVFQZ3ZG.js.map +1 -0
  59. package/dist/{chunk-LIPK4UCS.js → chunk-YCIBJ6OQ.js} +140 -209
  60. package/dist/chunk-YCIBJ6OQ.js.map +1 -0
  61. package/dist/cn.js +1 -1
  62. package/dist/code-block.js +2 -2
  63. package/dist/code-block.js.map +1 -1
  64. package/dist/command.js +3 -3
  65. package/dist/comparison-table.d.ts +44 -0
  66. package/dist/comparison-table.js +84 -0
  67. package/dist/comparison-table.js.map +1 -0
  68. package/dist/confirm-button.js +2 -2
  69. package/dist/continue-prompt.js +3 -3
  70. package/dist/continue-prompt.js.map +1 -1
  71. package/dist/cta-panel.js +1 -1
  72. package/dist/data-table.js +19 -1066
  73. package/dist/data-table.js.map +1 -1
  74. package/dist/date-picker.js +4 -4
  75. package/dist/decision-list.js +1 -1
  76. package/dist/dialog.js +3 -2
  77. package/dist/dialog.js.map +1 -1
  78. package/dist/docs-nav.d.ts +36 -0
  79. package/dist/docs-nav.js +44 -0
  80. package/dist/docs-nav.js.map +1 -0
  81. package/dist/dropdown-menu.js +1 -1
  82. package/dist/error-page.js +1 -1
  83. package/dist/field.js +1 -1
  84. package/dist/filter-bar.js +2 -2
  85. package/dist/force-update-screen.js +2 -1
  86. package/dist/force-update-screen.js.map +1 -1
  87. package/dist/gallery-page.js +1 -1
  88. package/dist/genui.d.ts +221 -0
  89. package/dist/genui.js +533 -0
  90. package/dist/genui.js.map +1 -0
  91. package/dist/glow-card.js +1 -1
  92. package/dist/goal-gauge.js +1 -1
  93. package/dist/how-it-works-page.js +1 -1
  94. package/dist/image-cropper.js +3 -3
  95. package/dist/index.d.ts +17 -24
  96. package/dist/index.js +4 -4
  97. package/dist/landscape.js +1 -1
  98. package/dist/link-card.d.ts +9 -2
  99. package/dist/link-card.js +5 -44
  100. package/dist/link-card.js.map +1 -1
  101. package/dist/longform-page.js +1 -1
  102. package/dist/maintenance-screen.js +2 -1
  103. package/dist/maintenance-screen.js.map +1 -1
  104. package/dist/map.js +3 -3
  105. package/dist/map.js.map +1 -1
  106. package/dist/markdown.js +2 -1
  107. package/dist/markdown.js.map +1 -1
  108. package/dist/marketing-layout.js +1 -1
  109. package/dist/marketing-layout.js.map +1 -1
  110. package/dist/marquee.js +1 -1
  111. package/dist/mascot-quote.js +1 -1
  112. package/dist/match-dialog.js +2 -1
  113. package/dist/match-dialog.js.map +1 -1
  114. package/dist/media-grid.d.ts +26 -4
  115. package/dist/media-grid.js +122 -163
  116. package/dist/media-grid.js.map +1 -1
  117. package/dist/meta-row.d.ts +54 -0
  118. package/dist/meta-row.js +35 -0
  119. package/dist/meta-row.js.map +1 -0
  120. package/dist/native/map.js +3 -3
  121. package/dist/native/map.js.map +1 -1
  122. package/dist/native.d.ts +42 -16
  123. package/dist/native.js +591 -537
  124. package/dist/native.js.map +1 -1
  125. package/dist/nav-bar.js +3 -3
  126. package/dist/page-hero.js +5 -5
  127. package/dist/page.js +2 -2
  128. package/dist/popover.js +1 -1
  129. package/dist/pricing-page.js +1 -1
  130. package/dist/product-page.js +1 -1
  131. package/dist/profile-card.js +1 -1
  132. package/dist/promise-card.js +1 -1
  133. package/dist/radio-group.js +2 -2
  134. package/dist/rail-nav.d.ts +149 -0
  135. package/dist/rail-nav.js +177 -0
  136. package/dist/rail-nav.js.map +1 -0
  137. package/dist/scroll-stage.js +1 -1
  138. package/dist/settings-layout.d.ts +75 -62
  139. package/dist/settings-layout.js +39 -6
  140. package/dist/settings-layout.js.map +1 -1
  141. package/dist/showcase.js +1 -1
  142. package/dist/site-footer.d.ts +48 -67
  143. package/dist/site-footer.js +36 -12
  144. package/dist/site-footer.js.map +1 -1
  145. package/dist/skip-link.js +1 -1
  146. package/dist/slider.js +2 -2
  147. package/dist/stage-banner.js +1 -1
  148. package/dist/step-showcase.d.ts +62 -0
  149. package/dist/step-showcase.js +227 -0
  150. package/dist/step-showcase.js.map +1 -0
  151. package/dist/tabs.js +1 -1
  152. package/dist/tabs.js.map +1 -1
  153. package/dist/terminal-replay.js +1 -1
  154. package/dist/theme.js +2 -1
  155. package/dist/theme.js.map +1 -1
  156. package/dist/toast.js +1 -1
  157. package/dist/toc.js +1 -1
  158. package/dist/tooltip.js +1 -1
  159. package/dist/update-prompt.js +2 -1
  160. package/dist/update-prompt.js.map +1 -1
  161. package/dist/vertical-video.js +2 -2
  162. package/dist/video-player.js +3 -3
  163. package/dist/waveform.d.ts +93 -0
  164. package/dist/waveform.js +95 -0
  165. package/dist/waveform.js.map +1 -0
  166. package/package.json +138 -10
  167. package/registry/achievement.json +1 -1
  168. package/registry/action-bar.json +1 -1
  169. package/registry/activity-feed.json +1 -1
  170. package/registry/alert.json +1 -1
  171. package/registry/app-header.json +202 -0
  172. package/registry/app-shell.json +33 -9
  173. package/registry/argument-card.json +37 -5
  174. package/registry/audio-player.json +5 -3
  175. package/registry/auth-layout.json +1 -1
  176. package/registry/avatar.json +1 -1
  177. package/registry/badge.json +1 -1
  178. package/registry/button.json +3 -2
  179. package/registry/captcha.json +300 -0
  180. package/registry/card-grid.json +27 -3
  181. package/registry/card.json +1 -1
  182. package/registry/catalogue-page.json +1 -1
  183. package/registry/changelog-page.json +11 -7
  184. package/registry/chat.json +1 -1
  185. package/registry/checkbox.json +1 -1
  186. package/registry/chip-link.json +1 -1
  187. package/registry/chip.json +1 -1
  188. package/registry/choice-grid.json +1 -1
  189. package/registry/cn.json +1 -1
  190. package/registry/code-block.json +1 -1
  191. package/registry/combobox.json +1 -1
  192. package/registry/command.json +1 -1
  193. package/registry/comparison-table.json +207 -0
  194. package/registry/component-page.json +1 -1
  195. package/registry/confirm-button.json +1 -1
  196. package/registry/contact-page.json +1 -1
  197. package/registry/continue-prompt.json +1 -1
  198. package/registry/countdown.json +1 -1
  199. package/registry/cta-panel.json +1 -1
  200. package/registry/dashboard-layout.json +1 -1
  201. package/registry/data-table.json +1 -1
  202. package/registry/date-picker.json +1 -1
  203. package/registry/decision-list.json +1 -1
  204. package/registry/description-list.json +1 -1
  205. package/registry/detail-layout.json +1 -1
  206. package/registry/dialog.json +1 -1
  207. package/registry/docs-article-page.json +1 -1
  208. package/registry/docs-hub-page.json +1 -1
  209. package/registry/docs-layout.json +1 -1
  210. package/registry/docs-nav.json +177 -0
  211. package/registry/document-viewer.json +1 -1
  212. package/registry/dropdown-menu.json +1 -1
  213. package/registry/empty-state.json +1 -1
  214. package/registry/error-page.json +1 -1
  215. package/registry/examples/activity-feed/native/notifications.light.png +0 -0
  216. package/registry/examples/app-header/basic.d.ts +4 -0
  217. package/registry/examples/app-header/basic.js +23 -0
  218. package/registry/examples/app-header/basic.tsx +17 -0
  219. package/registry/examples/app-shell/desktop.d.ts +4 -0
  220. package/registry/examples/app-shell/desktop.js +41 -0
  221. package/registry/examples/app-shell/desktop.tsx +37 -0
  222. package/registry/examples/argument-card/hover-light.d.ts +4 -0
  223. package/registry/examples/argument-card/hover-light.js +17 -0
  224. package/registry/examples/argument-card/hover-light.tsx +19 -0
  225. package/registry/examples/argument-card/hover-quiet.d.ts +4 -0
  226. package/registry/examples/argument-card/hover-quiet.js +17 -0
  227. package/registry/examples/argument-card/hover-quiet.tsx +19 -0
  228. package/registry/examples/avatar/native/group.light.png +0 -0
  229. package/registry/examples/avatar/native/presence.light.png +0 -0
  230. package/registry/examples/avatar/native/sizes.light.png +0 -0
  231. package/registry/examples/badge/native/tones.light.png +0 -0
  232. package/registry/examples/button/native/ghost.light.png +0 -0
  233. package/registry/examples/captcha/disclosure.d.ts +4 -0
  234. package/registry/examples/captcha/disclosure.js +14 -0
  235. package/registry/examples/captcha/disclosure.tsx +11 -0
  236. package/registry/examples/captcha/form.d.ts +4 -0
  237. package/registry/examples/captcha/form.js +18 -0
  238. package/registry/examples/captcha/form.tsx +17 -0
  239. package/registry/examples/card/native/body.light.png +0 -0
  240. package/registry/examples/card/native/default.light.png +0 -0
  241. package/registry/examples/card/native/elevated.light.png +0 -0
  242. package/registry/examples/card/native/pressable.light.png +0 -0
  243. package/registry/examples/card-grid/hover-quiet.d.ts +4 -0
  244. package/registry/examples/card-grid/hover-quiet.js +18 -0
  245. package/registry/examples/card-grid/hover-quiet.tsx +20 -0
  246. package/registry/examples/changelog-page/releases.js +1 -1
  247. package/registry/examples/changelog-page/releases.tsx +1 -1
  248. package/registry/examples/chat/native/conversation.light.png +0 -0
  249. package/registry/examples/chat/native/inbox.light.png +0 -0
  250. package/registry/examples/chip/native/multiple.light.png +0 -0
  251. package/registry/examples/chip/native/removable.light.png +0 -0
  252. package/registry/examples/chip/native/single.light.png +0 -0
  253. package/registry/examples/chip/native/toggle.light.png +0 -0
  254. package/registry/examples/combobox/native/multiple.light.png +0 -0
  255. package/registry/examples/combobox/native/search.light.png +0 -0
  256. package/registry/examples/comparison-table/versus.d.ts +4 -0
  257. package/registry/examples/comparison-table/versus.js +28 -0
  258. package/registry/examples/comparison-table/versus.tsx +20 -0
  259. package/registry/examples/countdown/native/days.light.png +0 -0
  260. package/registry/examples/countdown/native/hours.light.png +0 -0
  261. package/registry/examples/countdown/native/sizes.light.png +0 -0
  262. package/registry/examples/countdown/native/urgent.light.png +0 -0
  263. package/registry/examples/countdown/native/with-label.light.png +0 -0
  264. package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
  265. package/registry/examples/date-picker/native/birth-date.light.png +0 -0
  266. package/registry/examples/date-picker/native/calendar.dark.png +0 -0
  267. package/registry/examples/date-picker/native/calendar.light.png +0 -0
  268. package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
  269. package/registry/examples/date-picker/native/day-strip.light.png +0 -0
  270. package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
  271. package/registry/examples/date-picker/native/time-slots.light.png +0 -0
  272. package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
  273. package/registry/examples/description-list/native/job-details.light.png +0 -0
  274. package/registry/examples/dialog/native/sheet.dark.png +0 -0
  275. package/registry/examples/dialog/native/sheet.light.png +0 -0
  276. package/registry/examples/docs-nav/groups.d.ts +4 -0
  277. package/registry/examples/docs-nav/groups.js +21 -0
  278. package/registry/examples/docs-nav/groups.tsx +15 -0
  279. package/registry/examples/empty-state/native/default.light.png +0 -0
  280. package/registry/examples/field/native/default.light.png +0 -0
  281. package/registry/examples/field/native/select.light.png +0 -0
  282. package/registry/examples/force-update-screen/native/default.light.png +0 -0
  283. package/registry/examples/form/native/amount.light.png +0 -0
  284. package/registry/examples/form/native/audience.light.png +0 -0
  285. package/registry/examples/form/native/profile.light.png +0 -0
  286. package/registry/examples/form/native/settings.light.png +0 -0
  287. package/registry/examples/form/native/sign-up.light.png +0 -0
  288. package/registry/examples/form/native/upload.dark.png +0 -0
  289. package/registry/examples/form/native/upload.light.png +0 -0
  290. package/registry/examples/genui/streaming.d.ts +4 -0
  291. package/registry/examples/genui/streaming.js +18 -0
  292. package/registry/examples/genui/streaming.tsx +14 -0
  293. package/registry/examples/genui/table.d.ts +4 -0
  294. package/registry/examples/genui/table.js +19 -0
  295. package/registry/examples/genui/table.tsx +14 -0
  296. package/registry/examples/goal-gauge/native/default.light.png +0 -0
  297. package/registry/examples/header/native/large-title.light.png +0 -0
  298. package/registry/examples/link-card/hover-light.d.ts +4 -0
  299. package/registry/examples/link-card/hover-light.js +18 -0
  300. package/registry/examples/link-card/hover-light.tsx +20 -0
  301. package/registry/examples/link-card/hover-quiet.d.ts +4 -0
  302. package/registry/examples/link-card/hover-quiet.js +18 -0
  303. package/registry/examples/link-card/hover-quiet.tsx +20 -0
  304. package/registry/examples/loader/native/job-wait.light.png +0 -0
  305. package/registry/examples/maintenance-screen/native/default.light.png +0 -0
  306. package/registry/examples/map/native/places.light.png +0 -0
  307. package/registry/examples/markdown/native/basic.light.png +0 -0
  308. package/registry/examples/mascot-state/native/default.light.png +0 -0
  309. package/registry/examples/media-picker/native/story.light.png +0 -0
  310. package/registry/examples/meta-row/native/video.d.ts +4 -0
  311. package/registry/examples/meta-row/native/video.dark.png +0 -0
  312. package/registry/examples/meta-row/native/video.js +11 -0
  313. package/registry/examples/meta-row/native/video.light.png +0 -0
  314. package/registry/examples/meta-row/native/video.tsx +5 -0
  315. package/registry/examples/meta-row/status.d.ts +4 -0
  316. package/registry/examples/meta-row/status.js +12 -0
  317. package/registry/examples/meta-row/status.tsx +7 -0
  318. package/registry/examples/meta-row/video.d.ts +4 -0
  319. package/registry/examples/meta-row/video.js +12 -0
  320. package/registry/examples/meta-row/video.tsx +7 -0
  321. package/registry/examples/meter/native/credits.light.png +0 -0
  322. package/registry/examples/meter/native/split-ring.light.png +0 -0
  323. package/registry/examples/number-ticker/native/balance.light.png +0 -0
  324. package/registry/examples/onboarding/native/first-launch.light.png +0 -0
  325. package/registry/examples/otp-input/native/verify.light.png +0 -0
  326. package/registry/examples/pagination/native/cursor.light.png +0 -0
  327. package/registry/examples/pagination/native/pages.light.png +0 -0
  328. package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
  329. package/registry/examples/permission-prompt/native/camera.light.png +0 -0
  330. package/registry/examples/profile-card/native/default.light.png +0 -0
  331. package/registry/examples/radio-group/native/buttons.light.png +0 -0
  332. package/registry/examples/radio-group/native/cards.light.png +0 -0
  333. package/registry/examples/radio-group/native/list.light.png +0 -0
  334. package/registry/examples/radio-group/native/segmented.light.png +0 -0
  335. package/registry/examples/rail-nav/expandable.d.ts +4 -0
  336. package/registry/examples/rail-nav/expandable.js +34 -0
  337. package/registry/examples/rail-nav/expandable.tsx +28 -0
  338. package/registry/examples/rail-nav/studio.d.ts +4 -0
  339. package/registry/examples/rail-nav/studio.js +43 -0
  340. package/registry/examples/rail-nav/studio.tsx +38 -0
  341. package/registry/examples/screen/native/app-shell.light.png +0 -0
  342. package/registry/examples/screen/native/auth.light.png +0 -0
  343. package/registry/examples/screen/native/map.light.png +0 -0
  344. package/registry/examples/screen/native/notifications.light.png +0 -0
  345. package/registry/examples/screen/native/profile.light.png +0 -0
  346. package/registry/examples/segmented/native/default.light.png +0 -0
  347. package/registry/examples/segmented/native/small.light.png +0 -0
  348. package/registry/examples/settings-layout/flat.d.ts +4 -0
  349. package/registry/examples/settings-layout/flat.js +26 -0
  350. package/registry/examples/settings-layout/flat.tsx +30 -0
  351. package/registry/examples/showcase/native/slides.light.png +0 -0
  352. package/registry/examples/site-footer/app.d.ts +4 -0
  353. package/registry/examples/site-footer/app.js +25 -0
  354. package/registry/examples/site-footer/app.tsx +22 -0
  355. package/registry/examples/site-footer/docs.d.ts +4 -0
  356. package/registry/examples/site-footer/docs.js +31 -0
  357. package/registry/examples/site-footer/docs.tsx +24 -0
  358. package/registry/examples/slider/native/default.light.png +0 -0
  359. package/registry/examples/slider/native/stepped.light.png +0 -0
  360. package/registry/examples/step-progress/native/sign-up.light.png +0 -0
  361. package/registry/examples/step-showcase/desktop.d.ts +4 -0
  362. package/registry/examples/step-showcase/desktop.js +24 -0
  363. package/registry/examples/step-showcase/desktop.tsx +19 -0
  364. package/registry/examples/step-showcase/phone.d.ts +4 -0
  365. package/registry/examples/step-showcase/phone.js +24 -0
  366. package/registry/examples/step-showcase/phone.tsx +19 -0
  367. package/registry/examples/stepper/native/run.light.png +0 -0
  368. package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
  369. package/registry/examples/switch/native/settings.light.png +0 -0
  370. package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
  371. package/registry/examples/tabs/native/sections.light.png +0 -0
  372. package/registry/examples/tabs/native/segmented.light.png +0 -0
  373. package/registry/examples/tag-selector/native/interests.light.png +0 -0
  374. package/registry/examples/toast/native/tones.light.png +0 -0
  375. package/registry/examples/txt/native/tones.dark.png +0 -0
  376. package/registry/examples/txt/native/tones.light.png +0 -0
  377. package/registry/examples/update-prompt/native/default.light.png +0 -0
  378. package/registry/examples/waveform/card.d.ts +4 -0
  379. package/registry/examples/waveform/card.js +18 -0
  380. package/registry/examples/waveform/card.tsx +16 -0
  381. package/registry/examples/waveform/native/card.d.ts +4 -0
  382. package/registry/examples/waveform/native/card.dark.png +0 -0
  383. package/registry/examples/waveform/native/card.js +19 -0
  384. package/registry/examples/waveform/native/card.light.png +0 -0
  385. package/registry/examples/waveform/native/card.tsx +19 -0
  386. package/registry/examples/waveform/sizes.d.ts +4 -0
  387. package/registry/examples/waveform/sizes.js +16 -0
  388. package/registry/examples/waveform/sizes.tsx +14 -0
  389. package/registry/field.json +1 -1
  390. package/registry/file-upload.json +1 -1
  391. package/registry/filter-bar.json +1 -1
  392. package/registry/force-update-screen.json +1 -1
  393. package/registry/form.json +1 -1
  394. package/registry/gallery-page.json +1 -1
  395. package/registry/genui.json +409 -0
  396. package/registry/glow-card.json +1 -1
  397. package/registry/goal-gauge.json +1 -1
  398. package/registry/how-it-works-page.json +1 -1
  399. package/registry/image-cropper.json +1 -1
  400. package/registry/index.json +323 -14
  401. package/registry/iso.json +1 -1
  402. package/registry/kanban.json +1 -1
  403. package/registry/kbd.json +1 -1
  404. package/registry/landing-page.json +1 -1
  405. package/registry/landscape.json +1 -1
  406. package/registry/legal-page.json +1 -1
  407. package/registry/link-card.json +38 -6
  408. package/registry/list.json +1 -1
  409. package/registry/loader.json +1 -1
  410. package/registry/longform-page.json +1 -1
  411. package/registry/maintenance-screen.json +1 -1
  412. package/registry/map.json +2 -2
  413. package/registry/markdown.json +1 -1
  414. package/registry/marketing-layout.json +1 -1
  415. package/registry/marquee.json +1 -1
  416. package/registry/mascot-quote.json +1 -1
  417. package/registry/mascot-state.json +1 -1
  418. package/registry/mascots.json +1 -1
  419. package/registry/match-dialog.json +1 -1
  420. package/registry/media-capture.json +1 -1
  421. package/registry/media-grid.json +92 -6
  422. package/registry/meta-row.json +215 -0
  423. package/registry/meter.json +1 -1
  424. package/registry/nav-bar.json +13 -13
  425. package/registry/number-ticker.json +1 -1
  426. package/registry/page-header.json +1 -1
  427. package/registry/page-hero.json +1 -1
  428. package/registry/page.json +1 -1
  429. package/registry/pagination.json +1 -1
  430. package/registry/photo-grid.json +1 -1
  431. package/registry/pointer-light.json +1 -1
  432. package/registry/popover.json +1 -1
  433. package/registry/pricing-page.json +1 -1
  434. package/registry/product-page.json +1 -1
  435. package/registry/profile-card.json +1 -1
  436. package/registry/progress.json +1 -1
  437. package/registry/promise-card.json +1 -1
  438. package/registry/radio-group.json +1 -1
  439. package/registry/rail-nav.json +493 -0
  440. package/registry/recipes.json +1 -1
  441. package/registry/scroll-stage.json +1 -1
  442. package/registry/search-field.json +1 -1
  443. package/registry/section-backdrop.json +1 -1
  444. package/registry/separator.json +1 -1
  445. package/registry/settings-layout.json +104 -9
  446. package/registry/showcase.json +1 -1
  447. package/registry/site-footer.json +49 -17
  448. package/registry/sites.json +1 -1
  449. package/registry/skeleton.json +1 -1
  450. package/registry/skip-link.json +2 -2
  451. package/registry/slider.json +1 -1
  452. package/registry/slot.json +1 -1
  453. package/registry/spinner.json +1 -1
  454. package/registry/split-view.json +1 -1
  455. package/registry/stage-banner.json +1 -1
  456. package/registry/stat.json +1 -1
  457. package/registry/status-page.json +1 -1
  458. package/registry/step-progress.json +1 -1
  459. package/registry/step-showcase.json +296 -0
  460. package/registry/stepper.json +1 -1
  461. package/registry/swipe-deck.json +1 -1
  462. package/registry/switch.json +1 -1
  463. package/registry/tabs.json +2 -2
  464. package/registry/tag-input.json +1 -1
  465. package/registry/tag-selector.json +1 -1
  466. package/registry/terminal-replay.json +1 -1
  467. package/registry/theme.json +1 -1
  468. package/registry/toast.json +1 -1
  469. package/registry/toc.json +1 -1
  470. package/registry/tooltip.json +1 -1
  471. package/registry/tree-view.json +1 -1
  472. package/registry/update-prompt.json +1 -1
  473. package/registry/verified-badge.json +1 -1
  474. package/registry/vertical-video.json +1 -1
  475. package/registry/video-player.json +1 -1
  476. package/registry/video-trimmer.json +1 -1
  477. package/registry/virtual.json +1 -1
  478. package/registry/waveform.json +296 -0
  479. package/dist/chunk-2FRWNSRO.js.map +0 -1
  480. package/dist/chunk-3BC4XQ6C.js.map +0 -1
  481. package/dist/chunk-3GODX3D6.js.map +0 -1
  482. package/dist/chunk-3IN6TOPM.js.map +0 -1
  483. package/dist/chunk-4LOMIQVX.js.map +0 -1
  484. package/dist/chunk-G3ETON2A.js.map +0 -1
  485. package/dist/chunk-IZ7MV6HM.js.map +0 -1
  486. package/dist/chunk-LIPK4UCS.js.map +0 -1
  487. package/dist/chunk-OWC2LZD2.js.map +0 -1
  488. package/dist/chunk-ZNMFG62E.js.map +0 -1
  489. /package/dist/{chunk-5MH64NIL.js.map → chunk-2L67YTNV.js.map} +0 -0
  490. /package/dist/{chunk-FKBHWS4N.js.map → chunk-CEJDH6SA.js.map} +0 -0
  491. /package/dist/{chunk-5Z7FWCV2.js.map → chunk-HBZPJ3EP.js.map} +0 -0
  492. /package/dist/{chunk-C2BRIFJG.js.map → chunk-HJFRHYCI.js.map} +0 -0
  493. /package/dist/{chunk-BTMFZ66D.js.map → chunk-KM6VAKIE.js.map} +0 -0
  494. /package/dist/{chunk-DGQMDJXK.js.map → chunk-LZNZLCOE.js.map} +0 -0
@@ -18,7 +18,7 @@
18
18
  "use": "tab-bar"
19
19
  },
20
20
  "desktop": {
21
- "state": "yes"
21
+ "state": "desktop"
22
22
  }
23
23
  },
24
24
  "whenToUse": [
@@ -40,7 +40,8 @@
40
40
  "Persist the collapse with `collapsed` + `onCollapsedChange`; put the account in the sidebar's `footer`.",
41
41
  "Render your router's links with `AppShell.Item asChild`.",
42
42
  "Give the sections a `shortcut` (`g p`: G then P): it clicks the item, so a router link navigates, and the keys show on hover and focus.",
43
- "Put `AppShell.Search` in the header and open your `CommandDialog` from its `onOpen`: ⌘K (Ctrl+K) opens it from anywhere."
43
+ "Put `AppShell.Search` in the header and open your `CommandDialog` from its `onOpen`: ⌘K (Ctrl+K) opens it from anywhere.",
44
+ "In a desktop app (the Orazaka Mac app, Tauri 2) pass `desktop`: the header and the sidebar's top become the title bar that moves the window, there is no drawer, the density is the desktop's; build the native menu bar from the same shortcuts with `acceleratorOf` (`mod+k` → `CmdOrCtrl+K`)."
44
45
  ],
45
46
  "accessibility": {
46
47
  "keyboard": [
@@ -71,7 +72,8 @@
71
72
  "On a phone the drawer is a modal dialog (Radix): focus trapped inside, Escape and the overlay close it, the focus returns to the button.",
72
73
  "The header's title is the screen's `h1`; nested layouts use `headingAs=\"h2\"`.",
73
74
  "A combination is announced with `aria-keyshortcuts` (`Control+K`, `Meta+K` on a Mac); a sequence is not a chord, so it is only shown on its keys, never named to assistive technology.",
74
- "The platform's keys are known after the first client render (⌘ on a Mac, Ctrl elsewhere): the server and the first render agree."
75
+ "The platform's keys are known after the first client render (⌘ on a Mac, Ctrl elsewhere): the server and the first render agree.",
76
+ "With `desktop`, the drag regions are the header, its title and the sidebar's top only — never a control — so every button, link and field keeps its focus and its click; the chrome is not selectable, the content is."
75
77
  ]
76
78
  },
77
79
  "related": [
@@ -87,7 +89,7 @@
87
89
  ],
88
90
  "web": {
89
91
  "entry": "@krizaka/ui/app-shell",
90
- "import": "import { AppShell, useShortcuts, formatShortcut } from \"@krizaka/ui/app-shell\";",
92
+ "import": "import { AppShell, useShortcuts, formatShortcut, acceleratorOf } from \"@krizaka/ui/app-shell\";",
91
93
  "props": [
92
94
  {
93
95
  "component": "AppShellRoot",
@@ -114,6 +116,13 @@
114
116
  "description": "The sidebar starts collapsed to its icons (desktop).",
115
117
  "required": false
116
118
  },
119
+ {
120
+ "name": "desktop",
121
+ "type": "boolean",
122
+ "default": "false",
123
+ "description": "The shell is a desktop app's window (the Orazaka Mac app, Tauri 2 — ADR-002): no drawer, the sidebar's top clears the\nwindow's traffic lights (`--kz-titlebar-inset`, 28 px; the window's height is `--kz-window-height`, the viewport by default), the header and that top move the window\n(`data-tauri-drag-region`), a denser layout, the chrome not selectable. In a browser it is a fixed-height shell.",
124
+ "required": false
125
+ },
117
126
  {
118
127
  "name": "onCollapsedChange",
119
128
  "type": "((collapsed: boolean) => void)",
@@ -344,6 +353,14 @@
344
353
  "path": "examples/app-shell/basic.tsx",
345
354
  "module": "@krizaka/ui/registry/examples/app-shell/basic",
346
355
  "code": "import { ProductLogo } from \"@krizaka/ui\";\nimport { AppShell } from \"@krizaka/ui/app-shell\";\nimport { Button } from \"@krizaka/ui/button\";\n\nconst dot = <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" aria-hidden><circle cx=\"12\" cy=\"12\" r=\"7\" /></svg>;\n\n// The shell alone: the sidebar (it collapses to its icons on a desktop, opens as a drawer on a phone), the header, the\n// content. Your router's links go in `AppShell.Item asChild`.\nexport default function AppShellBasic() {\n return (\n <AppShell.Root className=\"min-h-[32rem]\">\n <AppShell.Sidebar\n label=\"Studio\"\n brand={<><ProductLogo id=\"orochia\" size={24} animated={false} /> Studio</>}\n collapseLabels={[\"Collapse\", \"Expand\"]}\n closeLabel=\"Close the menu\"\n >\n <AppShell.Item href=\"#home\" icon={dot} label=\"Home\" current />\n <AppShell.Item href=\"#videos\" icon={dot} label=\"Videos\" badge={3} />\n <AppShell.Group>Money</AppShell.Group>\n <AppShell.Item href=\"#earnings\" icon={dot} label=\"Earnings\" />\n </AppShell.Sidebar>\n <AppShell.Body>\n <AppShell.Header title=\"Home\" menuLabel=\"Open the menu\" actions={<Button size=\"sm\" variant=\"primary\" shape=\"cut\">Upload</Button>} />\n <AppShell.Main>\n <p className=\"text-sm text-fg-secondary\">The screen's content.</p>\n </AppShell.Main>\n </AppShell.Body>\n </AppShell.Root>\n );\n}\n"
356
+ },
357
+ {
358
+ "name": "desktop",
359
+ "title": "Desktop window",
360
+ "description": "The Orazaka Mac app's window (`desktop`): the title bar moves the window and clears the traffic lights, no drawer, the desktop's density, ⌘1–⌘3 to the sections.",
361
+ "path": "examples/app-shell/desktop.tsx",
362
+ "module": "@krizaka/ui/registry/examples/app-shell/desktop",
363
+ "code": "import { ProductLogo } from \"@krizaka/ui\";\nimport { AppShell } from \"@krizaka/ui/app-shell\";\nimport { Badge } from \"@krizaka/ui/badge\";\nimport { Button } from \"@krizaka/ui/button\";\nimport { Progress } from \"@krizaka/ui/progress\";\n\nconst dot = <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" aria-hidden><circle cx=\"12\" cy=\"12\" r=\"7\" /></svg>;\n\n// The Mac app's window (Tauri 2, ADR-002): `desktop` — the title bar moves the window and clears the traffic lights, no\n// drawer, desktop density. The menu bar answers the same keys (`acceleratorOf(\"mod+1\")` → `CmdOrCtrl+1`).\nexport default function AppShellDesktop() {\n return (\n <AppShell.Root desktop style={{ [\"--kz-window-height\" as string]: \"34rem\" }}>\n <AppShell.Sidebar label=\"Orazaka\" brand={<><ProductLogo id=\"orazaka\" size={22} animated={false} /> Orazaka</>} collapseLabels={[\"Collapse\", \"Expand\"]} closeLabel=\"Close\">\n <AppShell.Item href=\"#workspace\" icon={dot} label=\"Workspace\" shortcut=\"mod+1\" />\n <AppShell.Item href=\"#models\" icon={dot} label=\"Models\" shortcut=\"mod+2\" current />\n <AppShell.Item href=\"#jobs\" icon={dot} label=\"Jobs\" shortcut=\"mod+3\" badge={2} />\n <AppShell.Group>Machine</AppShell.Group>\n <AppShell.Item href=\"#backups\" icon={dot} label=\"Backups\" />\n <AppShell.Item href=\"#logs\" icon={dot} label=\"Logs\" />\n </AppShell.Sidebar>\n <AppShell.Body>\n <AppShell.Header title=\"Models\" menuLabel=\"Open the menu\" actions={<Button size=\"sm\" variant=\"primary\" shape=\"cut\">Add a model</Button>} />\n <AppShell.Main className=\"space-y-4\">\n <div className=\"flex items-center justify-between gap-3 rounded-lg border border-border-subtle bg-surface-1 p-4\">\n <div className=\"min-w-0 flex-1 space-y-2\">\n <p className=\"text-sm font-semibold\">qwen2.5 7B · chat</p>\n <Progress value={64} label=\"Downloading qwen2.5 7B\" />\n </div>\n <Badge tone=\"accent\">3.1 of 4.8 GB</Badge>\n </div>\n <p className=\"text-[13px] text-fg-secondary\">Models run on this Mac (Metal). Nothing leaves your network.</p>\n </AppShell.Main>\n </AppShell.Body>\n </AppShell.Root>\n );\n}\n"
347
364
  }
348
365
  ]
349
366
  },
@@ -351,19 +368,19 @@
351
368
  "files": [
352
369
  {
353
370
  "path": "app-shell/app-shell.tsx",
354
- "content": "// Client (the collapse, the drawer, the shortcuts). The shell of an application screen, read from the products' consoles\n// (Orochia admin and studio, Orazaka web-admin and web-client): a sidebar of sections that collapses to its icons on a\n// desktop, a header with the screen's title, a search that opens the app's command palette and its actions, the content —\n// and below `md` the sidebar becomes a drawer opened from the header (Radix Dialog: focus trap, Escape, focus return).\n// Keyboard: ⌘/Ctrl+B folds the sidebar, ⌘/Ctrl+K opens the search, `g` then a letter goes to a section (`shortcut` of an\n// item). Words arrive as props; links through `asChild`.\nimport { SkipLink } from \"@krizaka/ui/skip-link\";\nimport { Dialog as DialogPrimitive, Slot } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { ChevronGlyph, CloseGlyph, SearchGlyph } from \"../glyphs\";\nimport { Kbd } from \"../kbd\";\nimport { ariaKeyShortcuts, formatShortcut, useApple, useShortcuts } from \"./shortcuts\";\n\nexport const appShell = tv({\n slots: {\n root: \"flex min-h-dvh w-full bg-surface-0 text-fg\",\n sidebar:\n \"sticky top-0 hidden h-dvh shrink-0 flex-col border-r border-border-subtle bg-surface-1 transition-[width] duration-300 motion-reduce:transition-none md:flex \" +\n \"w-64 data-collapsed:w-[4.25rem]\",\n drawer:\n \"kz-dialog fixed inset-y-0 left-0 z-50 flex w-[min(20rem,88vw)] flex-col border-r border-border-default bg-surface-1 pl-[env(safe-area-inset-left)] shadow-lg focus:outline-hidden\",\n overlay: \"kz-overlay fixed inset-0 z-50 bg-overlay backdrop-blur-xs\",\n brand: \"flex h-14 shrink-0 items-center gap-2.5 px-4 font-display text-[15px] font-bold tracking-tight [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0\",\n nav: \"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2\",\n group: \"mt-3 mb-1 px-3 font-mono text-[10.5px] font-semibold uppercase tracking-[0.14em] text-fg-secondary [[data-collapsed]_&]:sr-only\",\n item:\n \"group/item relative flex h-10 items-center gap-3 rounded-lg px-3 text-sm font-medium text-fg-secondary no-underline transition-colors \" +\n \"hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring \" +\n \"aria-[current=page]:bg-accent-soft aria-[current=page]:text-fg \" +\n \"aria-[current=page]:before:absolute aria-[current=page]:before:inset-y-2 aria-[current=page]:before:-left-2 aria-[current=page]:before:w-1 aria-[current=page]:before:rounded-full aria-[current=page]:before:bg-accent \" +\n \"[[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0 [&>svg]:h-[18px] [&>svg]:w-[18px] [&>svg]:shrink-0\",\n itemLabel: \"min-w-0 flex-1 truncate [[data-collapsed]_&]:sr-only\",\n itemHint: \"ml-auto hidden items-center gap-0.5 text-fg-secondary group-hover/item:flex group-focus-visible/item:flex [[data-collapsed]_&]:!hidden\",\n itemBadge:\n \"ml-auto inline-flex min-w-5 items-center justify-center rounded-full bg-accent px-1.5 text-[11px] font-bold text-on-accent \" +\n \"[[data-collapsed]_&]:absolute [[data-collapsed]_&]:right-1.5 [[data-collapsed]_&]:top-1 [[data-collapsed]_&]:min-w-4 [[data-collapsed]_&]:px-1 [[data-collapsed]_&]:text-[10px]\",\n footer: \"shrink-0 border-t border-border-subtle p-2\",\n collapse:\n \"hidden h-9 w-full items-center gap-2 rounded-lg px-3 text-xs font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg md:flex \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0\",\n body: \"flex min-w-0 flex-1 flex-col\",\n header:\n \"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border-subtle bg-surface-0/85 px-4 backdrop-blur-xl md:px-6\",\n menuButton:\n \"inline-flex h-9 w-9 items-center justify-center rounded-lg border border-border-subtle bg-surface-1 text-fg md:hidden \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n title: \"min-w-0 flex-1 truncate font-display text-base font-bold tracking-tight\",\n search:\n \"inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-lg border border-border-subtle bg-surface-1 px-2.5 text-sm text-fg-secondary transition-colors \" +\n \"hover:border-border-default hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring md:w-56 md:justify-start [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0\",\n searchLabel: \"sr-only md:not-sr-only md:flex-1 md:truncate md:text-left\",\n searchKeys: \"hidden items-center gap-0.5 md:flex\",\n actions: \"ml-auto flex shrink-0 items-center gap-2\",\n main: \"min-w-0 flex-1 px-4 py-6 md:px-6 md:py-8\",\n },\n});\nconst s = appShell();\n\ninterface ShellState {\n collapsed: boolean;\n setCollapsed: (value: boolean) => void;\n open: boolean;\n setOpen: (value: boolean) => void;\n inDrawer: boolean;\n}\nconst ShellContext = React.createContext<ShellState | null>(null);\nconst useShell = () => {\n const ctx = React.useContext(ShellContext);\n if (!ctx) throw new Error(\"AppShell parts must be inside <AppShell.Root>\");\n return ctx;\n};\n\nexport type AppShellRootProps = React.ComponentProps<\"div\"> & {\n /** The sidebar starts collapsed to its icons (desktop). */\n defaultCollapsed?: boolean;\n /** Controlled collapse (desktop): pair with `onCollapsedChange` to persist the choice. */\n collapsed?: boolean;\n /** Called when the sidebar collapses or expands. */\n onCollapsedChange?: (collapsed: boolean) => void;\n /** The words of the \"skip to content\" link (`Skip to content`), the first tab stop; it lands on `AppShell.Main`. Without it, no link. */\n skipLabel?: string;\n /**\n * The shortcut that folds and unfolds the sidebar (a combination: `mod+b` is ⌘B on a Mac, Ctrl+B elsewhere), or `false`\n * for none.\n * @default \"mod+b\"\n */\n collapseShortcut?: string | false;\n};\n\n/** The shell: holds the collapse (desktop) and the drawer (phone) state. Children: Sidebar, then Body. */\nexport function AppShellRoot({ defaultCollapsed = false, collapsed: controlled, onCollapsedChange, skipLabel, collapseShortcut = \"mod+b\", className, children, ...props }: AppShellRootProps) {\n const [own, setOwn] = React.useState(defaultCollapsed);\n const [open, setOpen] = React.useState(false);\n const collapsed = controlled ?? own;\n const setCollapsed = React.useCallback(\n (value: boolean) => {\n if (controlled === undefined) setOwn(value);\n onCollapsedChange?.(value);\n },\n [controlled, onCollapsedChange],\n );\n const value = React.useMemo(() => ({ collapsed, setCollapsed, open, setOpen, inDrawer: false }), [collapsed, setCollapsed, open]);\n useShortcuts(collapseShortcut ? { [collapseShortcut]: () => setCollapsed(!collapsed) } : {});\n return (\n <ShellContext.Provider value={value}>\n <div className={s.root({ className })} {...props}>\n {skipLabel && <SkipLink href=\"#content\">{skipLabel}</SkipLink>}\n {children}\n </div>\n </ShellContext.Provider>\n );\n}\n\nexport type AppShellSidebarProps = Omit<React.ComponentProps<\"nav\">, \"children\"> & {\n /** The navigation's accessible name (`Studio`, `Administration`). */\n label: string;\n /** The brand at the top: the product's mark and name (a link home through `asChild` of your router, or plain). */\n brand?: React.ReactNode;\n /** The sections: `AppShell.Group` and `AppShell.Item`. */\n children: React.ReactNode;\n /** At the bottom, above the collapse button: the account, a plan, the version. */\n footer?: React.ReactNode;\n /** The collapse button's words, `[collapse, expand]` (desktop only). Without it the sidebar cannot collapse. */\n collapseLabels?: readonly [string, string];\n /** The drawer's close button words (phone). */\n closeLabel: string;\n};\n\nfunction SidebarContent({ brand, children, footer, collapseLabels, closeLabel }: Pick<AppShellSidebarProps, \"brand\" | \"children\" | \"footer\" | \"collapseLabels\" | \"closeLabel\">) {\n const { collapsed, setCollapsed, inDrawer } = useShell();\n return (\n <>\n <div className={s.brand()}>\n {brand}\n {inDrawer && (\n <DialogPrimitive.Close className={cn(s.menuButton(), \"ml-auto flex\")} aria-label={closeLabel}>\n <CloseGlyph className=\"h-4 w-4\" />\n </DialogPrimitive.Close>\n )}\n </div>\n <div className={s.nav()}>{children}</div>\n {(footer || (collapseLabels && !inDrawer)) && (\n <div className={s.footer()}>\n {footer}\n {collapseLabels && !inDrawer && (\n <button type=\"button\" className={s.collapse()} aria-expanded={!collapsed} onClick={() => setCollapsed(!collapsed)}>\n <ChevronGlyph direction={collapsed ? \"right\" : \"left\"} className=\"h-4 w-4\" />\n <span className={collapsed ? \"sr-only\" : undefined}>{collapsed ? collapseLabels[1] : collapseLabels[0]}</span>\n </button>\n )}\n </div>\n )}\n </>\n );\n}\n\n/** The sidebar: on a desktop a column that collapses to its icons; on a phone the same content in a drawer. */\nexport function AppShellSidebar({ label, brand, children, footer, collapseLabels, closeLabel, className, ...props }: AppShellSidebarProps) {\n const shell = useShell();\n const content = { brand, children, footer, collapseLabels, closeLabel };\n return (\n <>\n <nav aria-label={label} data-collapsed={shell.collapsed ? \"\" : undefined} className={s.sidebar({ className })} {...props}>\n <SidebarContent {...content} />\n </nav>\n <DialogPrimitive.Root open={shell.open} onOpenChange={shell.setOpen}>\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={s.overlay()} />\n <DialogPrimitive.Content className={s.drawer()} aria-describedby={undefined}>\n <DialogPrimitive.Title className=\"sr-only\">{label}</DialogPrimitive.Title>\n <ShellContext.Provider value={{ ...shell, collapsed: false, inDrawer: true }}>\n <nav aria-label={label} className=\"flex min-h-0 flex-1 flex-col\" onClick={(e) => (e.target as Element).closest(\"a\") && shell.setOpen(false)}>\n <SidebarContent {...content} />\n </nav>\n </ShellContext.Provider>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n </>\n );\n}\n\nexport type AppShellGroupProps = React.ComponentProps<\"p\"> & {\n /** The group's name, above its items (hidden when the sidebar is collapsed). */\n children: React.ReactNode;\n};\n\n/** A heading between groups of items. */\nexport function AppShellGroup({ className, ...props }: AppShellGroupProps) {\n return <p className={s.group({ className })} {...props} />;\n}\n\nexport type AppShellItemProps = Omit<React.ComponentProps<\"a\">, \"children\"> & {\n /** The item's icon (a signature icon): it stays when the sidebar collapses. */\n icon?: React.ReactNode;\n /** Its words: the accessible name, hidden visually when collapsed (the icon carries a tooltip through `title`). */\n label: string;\n /** The screen it opens is the current one: `aria-current=\"page\"`. */\n current?: boolean;\n /** A count beside it (unread, pending): a number or a few characters. */\n badge?: React.ReactNode;\n /**\n * A keyboard shortcut that goes to it: a sequence (`g d`: G then D) or a combination (`mod+1`). It clicks the item, so a\n * router link navigates. The keys are shown on hover and focus when the sidebar is open.\n */\n shortcut?: string;\n /** Renders your link (Next's `Link`) with the item's look: pass it as the only child. */\n asChild?: boolean;\n /** Your link element when `asChild`. */\n children?: React.ReactElement;\n};\n\n/** A destination of the sidebar: icon, words, a count. */\nexport function AppShellItem({ icon, label, current, badge, shortcut, asChild, children, className, ...props }: AppShellItemProps) {\n const { collapsed, inDrawer } = useShell();\n const element = React.useRef<HTMLAnchorElement>(null);\n const apple = useApple();\n // Only the sidebar's own items listen: the drawer holds a copy of them, open or not.\n useShortcuts(shortcut && !inDrawer ? { [shortcut]: () => element.current?.click() } : {});\n const Comp = asChild ? Slot.Root : \"a\";\n const inner = (\n <>\n {icon}\n <span className={s.itemLabel()}>{label}</span>\n {badge != null && <span className={s.itemBadge()}>{badge}</span>}\n {shortcut && !inDrawer ? (\n <span className={s.itemHint()} aria-hidden>\n {formatShortcut(shortcut, apple).map((key) => (\n <Kbd key={key} size=\"sm\">\n {key}\n </Kbd>\n ))}\n </span>\n ) : null}\n </>\n );\n return (\n <Comp ref={element} aria-current={current ? \"page\" : undefined} aria-keyshortcuts={shortcut ? ariaKeyShortcuts(shortcut, apple) : undefined} title={collapsed ? label : undefined} className={s.item({ className })} {...props}>\n {asChild && children ? React.cloneElement(children, undefined, inner) : inner}\n </Comp>\n );\n}\n\n/** The column right of the sidebar: Header, then Main. */\nexport function AppShellBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.body({ className })} {...props} />;\n}\n\nexport type AppShellHeaderProps = Omit<React.ComponentProps<\"header\">, \"title\"> & {\n /** The screen's title (an `h1`). */\n title?: React.ReactNode;\n /** The button that opens the drawer on a phone: its words. */\n menuLabel: string;\n /** The screen's actions, on the right. */\n actions?: React.ReactNode;\n};\n\n/** The top of the screen: the drawer's button (phone), the title, the actions. Sticky. */\nexport function AppShellHeader({ title, menuLabel, actions, className, children, ...props }: AppShellHeaderProps) {\n const { open, setOpen } = useShell();\n return (\n <header className={s.header({ className })} {...props}>\n <button type=\"button\" className={s.menuButton()} aria-label={menuLabel} aria-expanded={open} aria-haspopup=\"dialog\" onClick={() => setOpen(true)}>\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M4 7h16M4 12h16M4 17h10\" />\n </svg>\n </button>\n {title && <h1 className={s.title()}>{title}</h1>}\n {children}\n {actions && <div className={s.actions()}>{actions}</div>}\n </header>\n );\n}\n\nexport type AppShellSearchProps = Omit<React.ComponentProps<\"button\">, \"children\" | \"onClick\"> & {\n /** The words (\"Search\", \"Search creators\"): the accessible name, shown beside the keys on a desktop. */\n label: string;\n /** Called when the button is pressed or the shortcut is typed: open your command palette (`CommandDialog`) here. */\n onOpen: () => void;\n /**\n * The shortcut that opens it (a combination); shown on its keys.\n * @default \"mod+k\"\n */\n shortcut?: string;\n};\n\n/** The header's search: a button that looks like a field (a magnifier, its words, ⌘K) and opens the app's command palette. */\nexport function AppShellSearch({ label, onOpen, shortcut = \"mod+k\", className, ...props }: AppShellSearchProps) {\n const apple = useApple();\n useShortcuts({ [shortcut]: () => onOpen() });\n return (\n <button type=\"button\" className={s.search({ className })} aria-keyshortcuts={ariaKeyShortcuts(shortcut, apple)} onClick={onOpen} {...props}>\n <SearchGlyph />\n <span className={s.searchLabel()}>{label}</span>\n <span className={s.searchKeys()} aria-hidden>\n {formatShortcut(shortcut, apple).map((key) => (\n <Kbd key={key} size=\"sm\">\n {key}\n </Kbd>\n ))}\n </span>\n </button>\n );\n}\n\n/** The screen's content. */\nexport function AppShellMain({ className, ...props }: React.ComponentProps<\"main\">) {\n return <main id=\"content\" tabIndex={-1} className={s.main({ className })} {...props} />;\n}\n\nexport const AppShell = {\n Root: AppShellRoot,\n Sidebar: AppShellSidebar,\n Group: AppShellGroup,\n Item: AppShellItem,\n Body: AppShellBody,\n Header: AppShellHeader,\n Search: AppShellSearch,\n Main: AppShellMain,\n};\n"
371
+ "content": "// Client (the collapse, the drawer, the shortcuts). The shell of an application screen, read from the products' consoles\n// (Orochia admin and studio, Orazaka web-admin and web-client): a sidebar of sections that collapses to its icons on a\n// desktop, a header with the screen's title, a search that opens the app's command palette and its actions, the content —\n// and below `md` the sidebar becomes a drawer opened from the header (Radix Dialog: focus trap, Escape, focus return).\n// Keyboard: ⌘/Ctrl+B folds the sidebar, ⌘/Ctrl+K opens the search, `g` then a letter goes to a section (`shortcut` of an\n// item). Words arrive as props; links through `asChild`.\n// `desktop` (ADR-002): the shell is the window of a desktop app (the Orazaka Mac app, Tauri 2): the sidebar is always\n// there (a window has a minimum width, no drawer), its top clears the traffic lights, the header and the sidebar's top are\n// the title bar (`data-tauri-drag-region`: dragging them moves the window), the density is the desktop's (32 px rows,\n// 13 px text, a 48 px header), the chrome is not selectable, and the content scrolls under a fixed header.\nimport { SkipLink } from \"@krizaka/ui/skip-link\";\nimport { Dialog as DialogPrimitive, Slot } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { ChevronGlyph, CloseGlyph, SearchGlyph } from \"../glyphs\";\nimport { Kbd } from \"../kbd\";\nimport { ariaKeyShortcuts, formatShortcut, useApple, useShortcuts } from \"./shortcuts\";\n\nexport const appShell = tv({\n slots: {\n root: \"flex min-h-dvh w-full bg-surface-0 text-fg data-desktop:h-[var(--kz-window-height,100dvh)] data-desktop:overflow-hidden\",\n sidebar:\n \"sticky top-0 hidden h-dvh shrink-0 flex-col border-r border-border-subtle bg-surface-1 transition-[width] duration-300 motion-reduce:transition-none md:flex \" +\n \"w-64 data-collapsed:w-[4.25rem] \" +\n \"[[data-desktop]_&]:static [[data-desktop]_&]:flex [[data-desktop]_&]:h-auto [[data-desktop]_&]:w-60 [[data-desktop]_&]:select-none [[data-desktop]_&]:data-collapsed:w-[4.75rem]\",\n titlebar: \"h-[var(--kz-titlebar-inset,1.75rem)] shrink-0\",\n drawer:\n \"kz-dialog fixed inset-y-0 left-0 z-50 flex w-[min(20rem,88vw)] flex-col border-r border-border-default bg-surface-1 pl-[env(safe-area-inset-left)] shadow-lg focus:outline-hidden\",\n overlay: \"kz-overlay fixed inset-0 z-50 bg-overlay backdrop-blur-xs\",\n brand: \"flex h-14 shrink-0 items-center gap-2.5 px-4 font-display text-[15px] font-bold tracking-tight [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0 [[data-desktop]_&]:h-11\",\n nav: \"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2\",\n group: \"mt-3 mb-1 px-3 font-mono text-[10.5px] font-semibold uppercase tracking-[0.14em] text-fg-secondary [[data-collapsed]_&]:sr-only\",\n item:\n \"group/item relative flex h-10 items-center gap-3 rounded-lg px-3 text-sm font-medium text-fg-secondary no-underline transition-colors \" +\n \"hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring \" +\n \"aria-[current=page]:bg-accent-soft aria-[current=page]:text-fg \" +\n \"aria-[current=page]:before:absolute aria-[current=page]:before:inset-y-2 aria-[current=page]:before:-left-2 aria-[current=page]:before:w-1 aria-[current=page]:before:rounded-full aria-[current=page]:before:bg-accent \" +\n \"[[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0 [&>svg]:h-[18px] [&>svg]:w-[18px] [&>svg]:shrink-0 \" +\n \"[[data-desktop]_&]:h-8 [[data-desktop]_&]:cursor-default [[data-desktop]_&]:rounded-md [[data-desktop]_&]:text-[13px] [[data-desktop]_&_svg]:h-4 [[data-desktop]_&_svg]:w-4\",\n itemLabel: \"min-w-0 flex-1 truncate [[data-collapsed]_&]:sr-only\",\n itemHint: \"ml-auto hidden items-center gap-0.5 text-fg-secondary group-hover/item:flex group-focus-visible/item:flex [[data-collapsed]_&]:!hidden\",\n itemBadge:\n \"ml-auto inline-flex min-w-5 items-center justify-center rounded-full bg-accent px-1.5 text-[11px] font-bold text-on-accent \" +\n \"[[data-collapsed]_&]:absolute [[data-collapsed]_&]:right-1.5 [[data-collapsed]_&]:top-1 [[data-collapsed]_&]:min-w-4 [[data-collapsed]_&]:px-1 [[data-collapsed]_&]:text-[10px]\",\n footer: \"shrink-0 border-t border-border-subtle p-2\",\n collapse:\n \"hidden h-9 w-full items-center gap-2 rounded-lg px-3 text-xs font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg md:flex \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0\",\n body: \"flex min-w-0 flex-1 flex-col [[data-desktop]_&]:min-h-0 [[data-desktop]_&]:overflow-y-auto\",\n header:\n \"sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border-subtle bg-surface-0/85 px-4 backdrop-blur-xl md:px-6 \" +\n \"[[data-desktop]_&]:h-12 [[data-desktop]_&]:select-none [[data-desktop]_&]:px-5\",\n menuButton:\n \"inline-flex h-9 w-9 items-center justify-center rounded-lg border border-border-subtle bg-surface-1 text-fg md:hidden [[data-desktop]_&]:hidden \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n title: \"min-w-0 flex-1 truncate font-display text-base font-bold tracking-tight [[data-desktop]_&]:text-[15px]\",\n search:\n \"inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-lg border border-border-subtle bg-surface-1 px-2.5 text-sm text-fg-secondary transition-colors \" +\n \"hover:border-border-default hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring md:w-56 md:justify-start [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0\",\n searchLabel: \"sr-only md:not-sr-only md:flex-1 md:truncate md:text-left\",\n searchKeys: \"hidden items-center gap-0.5 md:flex\",\n actions: \"ml-auto flex shrink-0 items-center gap-2\",\n main: \"min-w-0 flex-1 px-4 py-6 md:px-6 md:py-8 [[data-desktop]_&]:px-6 [[data-desktop]_&]:py-6\",\n },\n});\nconst s = appShell();\n\ninterface ShellState {\n collapsed: boolean;\n setCollapsed: (value: boolean) => void;\n open: boolean;\n setOpen: (value: boolean) => void;\n inDrawer: boolean;\n desktop: boolean;\n}\nconst ShellContext = React.createContext<ShellState | null>(null);\nconst useShell = () => {\n const ctx = React.useContext(ShellContext);\n if (!ctx) throw new Error(\"AppShell parts must be inside <AppShell.Root>\");\n return ctx;\n};\n\nexport type AppShellRootProps = React.ComponentProps<\"div\"> & {\n /** The sidebar starts collapsed to its icons (desktop). */\n defaultCollapsed?: boolean;\n /** Controlled collapse (desktop): pair with `onCollapsedChange` to persist the choice. */\n collapsed?: boolean;\n /** Called when the sidebar collapses or expands. */\n onCollapsedChange?: (collapsed: boolean) => void;\n /** The words of the \"skip to content\" link (`Skip to content`), the first tab stop; it lands on `AppShell.Main`. Without it, no link. */\n skipLabel?: string;\n /**\n * The shortcut that folds and unfolds the sidebar (a combination: `mod+b` is ⌘B on a Mac, Ctrl+B elsewhere), or `false`\n * for none.\n * @default \"mod+b\"\n */\n collapseShortcut?: string | false;\n /**\n * The shell is a desktop app's window (the Orazaka Mac app, Tauri 2 — ADR-002): no drawer, the sidebar's top clears the\n * window's traffic lights (`--kz-titlebar-inset`, 28 px; the window's height is `--kz-window-height`, the viewport by default), the header and that top move the window\n * (`data-tauri-drag-region`), a denser layout, the chrome not selectable. In a browser it is a fixed-height shell.\n */\n desktop?: boolean;\n};\n\n/** The shell: holds the collapse (desktop) and the drawer (phone) state. Children: Sidebar, then Body. */\nexport function AppShellRoot({ defaultCollapsed = false, collapsed: controlled, onCollapsedChange, skipLabel, collapseShortcut = \"mod+b\", desktop = false, className, children, ...props }: AppShellRootProps) {\n const [own, setOwn] = React.useState(defaultCollapsed);\n const [open, setOpen] = React.useState(false);\n const collapsed = controlled ?? own;\n const setCollapsed = React.useCallback(\n (value: boolean) => {\n if (controlled === undefined) setOwn(value);\n onCollapsedChange?.(value);\n },\n [controlled, onCollapsedChange],\n );\n const value = React.useMemo(() => ({ collapsed, setCollapsed, open, setOpen, inDrawer: false, desktop }), [collapsed, setCollapsed, open, desktop]);\n useShortcuts(collapseShortcut ? { [collapseShortcut]: () => setCollapsed(!collapsed) } : {});\n return (\n <ShellContext.Provider value={value}>\n <div data-desktop={desktop ? \"\" : undefined} className={s.root({ className })} {...props}>\n {skipLabel && <SkipLink href=\"#content\">{skipLabel}</SkipLink>}\n {children}\n </div>\n </ShellContext.Provider>\n );\n}\n\nexport type AppShellSidebarProps = Omit<React.ComponentProps<\"nav\">, \"children\"> & {\n /** The navigation's accessible name (`Studio`, `Administration`). */\n label: string;\n /** The brand at the top: the product's mark and name (a link home through `asChild` of your router, or plain). */\n brand?: React.ReactNode;\n /** The sections: `AppShell.Group` and `AppShell.Item`. */\n children: React.ReactNode;\n /** At the bottom, above the collapse button: the account, a plan, the version. */\n footer?: React.ReactNode;\n /** The collapse button's words, `[collapse, expand]` (desktop only). Without it the sidebar cannot collapse. */\n collapseLabels?: readonly [string, string];\n /** The drawer's close button words (phone). */\n closeLabel: string;\n};\n\nfunction SidebarContent({ brand, children, footer, collapseLabels, closeLabel }: Pick<AppShellSidebarProps, \"brand\" | \"children\" | \"footer\" | \"collapseLabels\" | \"closeLabel\">) {\n const { collapsed, setCollapsed, inDrawer, desktop } = useShell();\n const drag = desktop ? { \"data-tauri-drag-region\": \"\" } : {};\n return (\n <>\n {desktop && <div aria-hidden className={s.titlebar()} {...drag} />}\n <div className={s.brand()} {...drag}>\n {brand}\n {inDrawer && (\n <DialogPrimitive.Close className={cn(s.menuButton(), \"ml-auto flex\")} aria-label={closeLabel}>\n <CloseGlyph className=\"h-4 w-4\" />\n </DialogPrimitive.Close>\n )}\n </div>\n <div className={s.nav()}>{children}</div>\n {(footer || (collapseLabels && !inDrawer)) && (\n <div className={s.footer()}>\n {footer}\n {collapseLabels && !inDrawer && (\n <button type=\"button\" className={s.collapse()} aria-expanded={!collapsed} onClick={() => setCollapsed(!collapsed)}>\n <ChevronGlyph direction={collapsed ? \"right\" : \"left\"} className=\"h-4 w-4\" />\n <span className={collapsed ? \"sr-only\" : undefined}>{collapsed ? collapseLabels[1] : collapseLabels[0]}</span>\n </button>\n )}\n </div>\n )}\n </>\n );\n}\n\n/** The sidebar: on a desktop a column that collapses to its icons; on a phone the same content in a drawer. */\nexport function AppShellSidebar({ label, brand, children, footer, collapseLabels, closeLabel, className, ...props }: AppShellSidebarProps) {\n const shell = useShell();\n const content = { brand, children, footer, collapseLabels, closeLabel };\n return (\n <>\n <nav aria-label={label} data-collapsed={shell.collapsed ? \"\" : undefined} className={s.sidebar({ className })} {...props}>\n <SidebarContent {...content} />\n </nav>\n {!shell.desktop && (\n <DialogPrimitive.Root open={shell.open} onOpenChange={shell.setOpen}>\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={s.overlay()} />\n <DialogPrimitive.Content className={s.drawer()} aria-describedby={undefined}>\n <DialogPrimitive.Title className=\"sr-only\">{label}</DialogPrimitive.Title>\n <ShellContext.Provider value={{ ...shell, collapsed: false, inDrawer: true }}>\n <nav aria-label={label} className=\"flex min-h-0 flex-1 flex-col\" onClick={(e) => (e.target as Element).closest(\"a\") && shell.setOpen(false)}>\n <SidebarContent {...content} />\n </nav>\n </ShellContext.Provider>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n )}\n </>\n );\n}\n\nexport type AppShellGroupProps = React.ComponentProps<\"p\"> & {\n /** The group's name, above its items (hidden when the sidebar is collapsed). */\n children: React.ReactNode;\n};\n\n/** A heading between groups of items. */\nexport function AppShellGroup({ className, ...props }: AppShellGroupProps) {\n return <p className={s.group({ className })} {...props} />;\n}\n\nexport type AppShellItemProps = Omit<React.ComponentProps<\"a\">, \"children\"> & {\n /** The item's icon (a signature icon): it stays when the sidebar collapses. */\n icon?: React.ReactNode;\n /** Its words: the accessible name, hidden visually when collapsed (the icon carries a tooltip through `title`). */\n label: string;\n /** The screen it opens is the current one: `aria-current=\"page\"`. */\n current?: boolean;\n /** A count beside it (unread, pending): a number or a few characters. */\n badge?: React.ReactNode;\n /**\n * A keyboard shortcut that goes to it: a sequence (`g d`: G then D) or a combination (`mod+1`). It clicks the item, so a\n * router link navigates. The keys are shown on hover and focus when the sidebar is open.\n */\n shortcut?: string;\n /** Renders your link (Next's `Link`) with the item's look: pass it as the only child. */\n asChild?: boolean;\n /** Your link element when `asChild`. */\n children?: React.ReactElement;\n};\n\n/** A destination of the sidebar: icon, words, a count. */\nexport function AppShellItem({ icon, label, current, badge, shortcut, asChild, children, className, ...props }: AppShellItemProps) {\n const { collapsed, inDrawer } = useShell();\n const element = React.useRef<HTMLAnchorElement>(null);\n const apple = useApple();\n // Only the sidebar's own items listen: the drawer holds a copy of them, open or not.\n useShortcuts(shortcut && !inDrawer ? { [shortcut]: () => element.current?.click() } : {});\n const Comp = asChild ? Slot.Root : \"a\";\n const inner = (\n <>\n {icon}\n <span className={s.itemLabel()}>{label}</span>\n {badge != null && <span className={s.itemBadge()}>{badge}</span>}\n {shortcut && !inDrawer ? (\n <span className={s.itemHint()} aria-hidden>\n {formatShortcut(shortcut, apple).map((key) => (\n <Kbd key={key} size=\"sm\">\n {key}\n </Kbd>\n ))}\n </span>\n ) : null}\n </>\n );\n return (\n <Comp ref={element} aria-current={current ? \"page\" : undefined} aria-keyshortcuts={shortcut ? ariaKeyShortcuts(shortcut, apple) : undefined} title={collapsed ? label : undefined} className={s.item({ className })} {...props}>\n {asChild && children ? React.cloneElement(children, undefined, inner) : inner}\n </Comp>\n );\n}\n\n/** The column right of the sidebar: Header, then Main. */\nexport function AppShellBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.body({ className })} {...props} />;\n}\n\nexport type AppShellHeaderProps = Omit<React.ComponentProps<\"header\">, \"title\"> & {\n /** The screen's title (an `h1`). */\n title?: React.ReactNode;\n /** The button that opens the drawer on a phone: its words. */\n menuLabel: string;\n /** The screen's actions, on the right. */\n actions?: React.ReactNode;\n};\n\n/** The top of the screen: the drawer's button (phone), the title, the actions. Sticky. */\nexport function AppShellHeader({ title, menuLabel, actions, className, children, ...props }: AppShellHeaderProps) {\n const { open, setOpen, desktop } = useShell();\n const drag = desktop ? { \"data-tauri-drag-region\": \"\" } : {};\n return (\n <header className={s.header({ className })} {...drag} {...props}>\n <button type=\"button\" className={s.menuButton()} aria-label={menuLabel} aria-expanded={open} aria-haspopup=\"dialog\" onClick={() => setOpen(true)}>\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M4 7h16M4 12h16M4 17h10\" />\n </svg>\n </button>\n {title && (\n <h1 className={s.title()} {...drag}>\n {title}\n </h1>\n )}\n {children}\n {actions && <div className={s.actions()}>{actions}</div>}\n </header>\n );\n}\n\nexport type AppShellSearchProps = Omit<React.ComponentProps<\"button\">, \"children\" | \"onClick\"> & {\n /** The words (\"Search\", \"Search creators\"): the accessible name, shown beside the keys on a desktop. */\n label: string;\n /** Called when the button is pressed or the shortcut is typed: open your command palette (`CommandDialog`) here. */\n onOpen: () => void;\n /**\n * The shortcut that opens it (a combination); shown on its keys.\n * @default \"mod+k\"\n */\n shortcut?: string;\n};\n\n/** The header's search: a button that looks like a field (a magnifier, its words, ⌘K) and opens the app's command palette. */\nexport function AppShellSearch({ label, onOpen, shortcut = \"mod+k\", className, ...props }: AppShellSearchProps) {\n const apple = useApple();\n useShortcuts({ [shortcut]: () => onOpen() });\n return (\n <button type=\"button\" className={s.search({ className })} aria-keyshortcuts={ariaKeyShortcuts(shortcut, apple)} onClick={onOpen} {...props}>\n <SearchGlyph />\n <span className={s.searchLabel()}>{label}</span>\n <span className={s.searchKeys()} aria-hidden>\n {formatShortcut(shortcut, apple).map((key) => (\n <Kbd key={key} size=\"sm\">\n {key}\n </Kbd>\n ))}\n </span>\n </button>\n );\n}\n\n/** The screen's content. */\nexport function AppShellMain({ className, ...props }: React.ComponentProps<\"main\">) {\n return <main id=\"content\" tabIndex={-1} className={s.main({ className })} {...props} />;\n}\n\nexport const AppShell = {\n Root: AppShellRoot,\n Sidebar: AppShellSidebar,\n Group: AppShellGroup,\n Item: AppShellItem,\n Body: AppShellBody,\n Header: AppShellHeader,\n Search: AppShellSearch,\n Main: AppShellMain,\n};\n"
355
372
  },
356
373
  {
357
374
  "path": "app-shell/index.ts",
358
- "content": "/** @krizaka/ui/app-shell — `AppShell.Root/Sidebar/Group/Item/Body/Header/Search/Main`: an application screen (sidebar that collapses, header with a search for the command palette, drawer on a phone, keyboard shortcuts), and `useShortcuts`. Client. */\nexport {\n AppShell,\n appShell,\n AppShellBody,\n AppShellGroup,\n type AppShellGroupProps,\n AppShellHeader,\n type AppShellHeaderProps,\n AppShellItem,\n type AppShellItemProps,\n AppShellMain,\n AppShellRoot,\n type AppShellRootProps,\n AppShellSearch,\n type AppShellSearchProps,\n AppShellSidebar,\n type AppShellSidebarProps,\n} from \"./app-shell\";\nexport { ariaKeyShortcuts, formatShortcut, matchesCombo, parseCombo, type ShortcutMap, useApple, useShortcuts } from \"./shortcuts\";\n"
375
+ "content": "/** @krizaka/ui/app-shell — `AppShell.Root/Sidebar/Group/Item/Body/Header/Search/Main`: an application screen (sidebar that collapses, header with a search for the command palette, drawer on a phone, keyboard shortcuts), and `useShortcuts`. Client. */\nexport {\n AppShell,\n appShell,\n AppShellBody,\n AppShellGroup,\n type AppShellGroupProps,\n AppShellHeader,\n type AppShellHeaderProps,\n AppShellItem,\n type AppShellItemProps,\n AppShellMain,\n AppShellRoot,\n type AppShellRootProps,\n AppShellSearch,\n type AppShellSearchProps,\n AppShellSidebar,\n type AppShellSidebarProps,\n} from \"./app-shell\";\nexport { acceleratorOf, ariaKeyShortcuts, formatShortcut, matchesCombo, parseCombo, type ShortcutMap, useApple, useShortcuts } from \"./shortcuts\";\n"
359
376
  },
360
377
  {
361
378
  "path": "app-shell/meta.ts",
362
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"App shell\",\n summary: \"The shell of an application screen: a sidebar of sections that collapses to its icons on a desktop and opens as a drawer on a phone, a sticky header with the screen's title, a search that opens the command palette and its actions, the content — and the keyboard shortcuts a console lives by (⌘B, ⌘K, `g` then a letter).\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"On a phone the app shell is a tab bar, a header and a screen.\", use: \"tab-bar\" }, desktop: \"web\" },\n whenToUse: [\"Every signed-in screen of a product: a studio, a console, an administration.\", \"When the app has more than four destinations — fewer fit a NavBar.\"],\n whenNotToUse: [\n { when: \"For a public page of a site.\", use: \"marketing-layout\" },\n { when: \"For a mobile app's tabs: React Native has its own tab bar.\" },\n ],\n bestPractices: [\"Five to nine items, grouped by what the user does (`AppShell.Group`), the current one marked with `current`.\", \"Give every item an icon: it is all that remains when the sidebar collapses (its words become a tooltip).\", \"Persist the collapse with `collapsed` + `onCollapsedChange`; put the account in the sidebar's `footer`.\", \"Render your router's links with `AppShell.Item asChild`.\", \"Give the sections a `shortcut` (`g p`: G then P): it clicks the item, so a router link navigates, and the keys show on hover and focus.\", \"Put `AppShell.Search` in the header and open your `CommandDialog` from its `onOpen`: ⌘K (Ctrl+K) opens it from anywhere.\"],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Moves through the sidebar's items, the collapse button and the header's actions.\" },\n { keys: \"Esc\", action: \"Closes the drawer on a phone and returns the focus to the menu button.\" },\n { keys: \"⌘B / Ctrl+B\", action: \"Folds and unfolds the sidebar (`collapseShortcut`, off with `false`).\" },\n { keys: \"⌘K / Ctrl+K\", action: \"Opens the command palette from `AppShell.Search`, in a text field too.\" },\n { keys: \"G then a letter\", action: \"Goes to the section whose `shortcut` it is; plain keys never fire while typing in a field.\" },\n ],\n notes: [\"`skipLabel` on `AppShell.Root` adds the skip link (WCAG 2.4.1): the first tab stop, landing on `AppShell.Main`.\", \"The sidebar is a `nav` named by `label`; the current item carries `aria-current=\\\"page\\\"`.\", \"On a phone the drawer is a modal dialog (Radix): focus trapped inside, Escape and the overlay close it, the focus returns to the button.\", \"The header's title is the screen's `h1`; nested layouts use `headingAs=\\\"h2\\\"`.\", \"A combination is announced with `aria-keyshortcuts` (`Control+K`, `Meta+K` on a Mac); a sequence is not a chord, so it is only shown on its keys, never named to assistive technology.\", \"The platform's keys are known after the first client render (⌘ on a Mac, Ctrl elsewhere): the server and the first render agree.\"],\n },\n related: [\"dashboard-layout\", \"nav-bar\", \"dialog\", \"skip-link\", \"command\", \"page-header\", \"action-bar\", \"data-table\", \"form\"],\n web: {\n imports: [\"AppShell\", \"useShortcuts\", \"formatShortcut\"],\n examples: [\n { name: \"console\", title: \"Console\", description: \"A finance console: sections with `g` shortcuts, ⌘K that opens the palette, a server-side table that refreshes when a form creates a row.\", template: true, purpose: \"operate\", why: \"An operator works all day from the keyboard: jumps between sections, finds a row, creates one and sees the table update.\" },\n { name: \"orochia-studio\", title: \"Orochia studio\", description: \"Elena's home in the creator studio: the shell around this week's figures, the payout, the auction and the sales.\", template: true, purpose: \"operate\", why: \"A creator moves between the sections of an app and reads this week's figures at home.\" },\n { name: \"admin-console\", title: \"Administration console\", description: \"A review queue in a console: sections, counts and a sortable table with bulk actions (cards on a phone).\", template: true, purpose: \"operate\", why: \"An administrator works a queue: scans it, sorts it and acts on many rows at once.\" },\n { name: \"basic\", title: \"The shell alone\", description: \"Sidebar with a group and a count, header with an action, the content.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
379
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"App shell\",\n summary: \"The shell of an application screen: a sidebar of sections that collapses to its icons on a desktop and opens as a drawer on a phone, a sticky header with the screen's title, a search that opens the command palette and its actions, the content — and the keyboard shortcuts a console lives by (⌘B, ⌘K, `g` then a letter).\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"On a phone the app shell is a tab bar, a header and a screen.\", use: \"tab-bar\" }, desktop: \"desktop\" },\n whenToUse: [\"Every signed-in screen of a product: a studio, a console, an administration.\", \"When the app has more than four destinations — fewer fit a NavBar.\"],\n whenNotToUse: [\n { when: \"For a public page of a site.\", use: \"marketing-layout\" },\n { when: \"For a mobile app's tabs: React Native has its own tab bar.\" },\n ],\n bestPractices: [\"Five to nine items, grouped by what the user does (`AppShell.Group`), the current one marked with `current`.\", \"Give every item an icon: it is all that remains when the sidebar collapses (its words become a tooltip).\", \"Persist the collapse with `collapsed` + `onCollapsedChange`; put the account in the sidebar's `footer`.\", \"Render your router's links with `AppShell.Item asChild`.\", \"Give the sections a `shortcut` (`g p`: G then P): it clicks the item, so a router link navigates, and the keys show on hover and focus.\", \"Put `AppShell.Search` in the header and open your `CommandDialog` from its `onOpen`: ⌘K (Ctrl+K) opens it from anywhere.\", \"In a desktop app (the Orazaka Mac app, Tauri 2) pass `desktop`: the header and the sidebar's top become the title bar that moves the window, there is no drawer, the density is the desktop's; build the native menu bar from the same shortcuts with `acceleratorOf` (`mod+k` → `CmdOrCtrl+K`).\"],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Moves through the sidebar's items, the collapse button and the header's actions.\" },\n { keys: \"Esc\", action: \"Closes the drawer on a phone and returns the focus to the menu button.\" },\n { keys: \"⌘B / Ctrl+B\", action: \"Folds and unfolds the sidebar (`collapseShortcut`, off with `false`).\" },\n { keys: \"⌘K / Ctrl+K\", action: \"Opens the command palette from `AppShell.Search`, in a text field too.\" },\n { keys: \"G then a letter\", action: \"Goes to the section whose `shortcut` it is; plain keys never fire while typing in a field.\" },\n ],\n notes: [\"`skipLabel` on `AppShell.Root` adds the skip link (WCAG 2.4.1): the first tab stop, landing on `AppShell.Main`.\", \"The sidebar is a `nav` named by `label`; the current item carries `aria-current=\\\"page\\\"`.\", \"On a phone the drawer is a modal dialog (Radix): focus trapped inside, Escape and the overlay close it, the focus returns to the button.\", \"The header's title is the screen's `h1`; nested layouts use `headingAs=\\\"h2\\\"`.\", \"A combination is announced with `aria-keyshortcuts` (`Control+K`, `Meta+K` on a Mac); a sequence is not a chord, so it is only shown on its keys, never named to assistive technology.\", \"The platform's keys are known after the first client render (⌘ on a Mac, Ctrl elsewhere): the server and the first render agree.\", \"With `desktop`, the drag regions are the header, its title and the sidebar's top only — never a control — so every button, link and field keeps its focus and its click; the chrome is not selectable, the content is.\"],\n },\n related: [\"dashboard-layout\", \"nav-bar\", \"dialog\", \"skip-link\", \"command\", \"page-header\", \"action-bar\", \"data-table\", \"form\"],\n web: {\n imports: [\"AppShell\", \"useShortcuts\", \"formatShortcut\", \"acceleratorOf\"],\n examples: [\n { name: \"console\", title: \"Console\", description: \"A finance console: sections with `g` shortcuts, ⌘K that opens the palette, a server-side table that refreshes when a form creates a row.\", template: true, purpose: \"operate\", why: \"An operator works all day from the keyboard: jumps between sections, finds a row, creates one and sees the table update.\" },\n { name: \"orochia-studio\", title: \"Orochia studio\", description: \"Elena's home in the creator studio: the shell around this week's figures, the payout, the auction and the sales.\", template: true, purpose: \"operate\", why: \"A creator moves between the sections of an app and reads this week's figures at home.\" },\n { name: \"admin-console\", title: \"Administration console\", description: \"A review queue in a console: sections, counts and a sortable table with bulk actions (cards on a phone).\", template: true, purpose: \"operate\", why: \"An administrator works a queue: scans it, sorts it and acts on many rows at once.\" },\n { name: \"basic\", title: \"The shell alone\", description: \"Sidebar with a group and a count, header with an action, the content.\" },\n { name: \"desktop\", title: \"Desktop window\", description: \"The Orazaka Mac app's window (`desktop`): the title bar moves the window and clears the traffic lights, no drawer, the desktop's density, ⌘1–⌘3 to the sections.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
363
380
  },
364
381
  {
365
382
  "path": "app-shell/shortcuts.ts",
366
- "content": "// Keyboard shortcuts for an application: a combination (`mod+k`, `shift+/`, `alt+arrowup`) or a sequence (`g d`: press G,\n// then D). `mod` is ⌘ on Apple devices and Ctrl elsewhere. Plain keys and sequences stay out of text fields; a combination\n// with `mod` works in an input (not in a rich-text editor, where ⌘B is bold). Nothing is decided here about the words.\nimport * as React from \"react\";\n\nimport { useLatest } from \"../media\";\n\nexport type ShortcutMap = Readonly<Record<string, ((event: KeyboardEvent) => void) | undefined>>;\n\nconst isApple = () => typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);\n\nconst ALIASES: Record<string, string> = { esc: \"escape\", return: \"enter\", space: \" \", spacebar: \" \", up: \"arrowup\", down: \"arrowdown\", left: \"arrowleft\", right: \"arrowright\", del: \"delete\", plus: \"+\" };\ntype Modifier = \"mod\" | \"ctrl\" | \"alt\" | \"shift\" | \"meta\";\n\ntype Combo = { key: string; mod: boolean; ctrl: boolean; alt: boolean; shift: boolean; meta: boolean };\n\n/** `\"mod+shift+k\"` → its parts. A lone `+` key is written `plus`. */\nexport function parseCombo(combo: string): Combo {\n const parts = combo.toLowerCase().split(\"+\").filter(Boolean);\n const key = ALIASES[parts.at(-1) ?? \"\"] ?? parts.at(-1) ?? \"\";\n const has = (name: Modifier) => parts.slice(0, -1).includes(name);\n return { key, mod: has(\"mod\"), ctrl: has(\"ctrl\"), alt: has(\"alt\"), shift: has(\"shift\"), meta: has(\"meta\") };\n}\n\n/** Whether a key event is this combination: its modifiers exactly (`mod` is ⌘ or Ctrl by platform), then its key. */\nexport function matchesCombo(event: Pick<KeyboardEvent, \"key\" | \"metaKey\" | \"ctrlKey\" | \"altKey\" | \"shiftKey\">, combo: string, apple = isApple()): boolean {\n const want = parseCombo(combo);\n const meta = want.meta || (want.mod && apple);\n const ctrl = want.ctrl || (want.mod && !apple);\n if (event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== want.alt) return false;\n // Shift is only checked when the binding names it: `?` and `/` need it on most layouts.\n if (want.shift && !event.shiftKey) return false;\n return event.key.toLowerCase() === want.key;\n}\n\n/** The keys of a shortcut to show on a keycap: `[\"⌘\", \"K\"]` on a Mac, `[\"Ctrl\", \"K\"]` elsewhere; a sequence `g d` is `[\"G\", \"D\"]`. */\nexport function formatShortcut(shortcut: string, apple = isApple()): string[] {\n if (shortcut.includes(\" \")) return shortcut.split(/\\s+/).map((key) => key.toUpperCase());\n const parts = shortcut.split(\"+\").filter(Boolean);\n const key = parts.at(-1) ?? \"\";\n const names: Record<string, [string, string]> = { mod: [\"⌘\", \"Ctrl\"], meta: [\"⌘\", \"Win\"], ctrl: [\"⌃\", \"Ctrl\"], alt: [\"⌥\", \"Alt\"], shift: [\"⇧\", \"Shift\"] };\n const shown = parts.slice(0, -1).map((part) => names[part.toLowerCase()]?.[apple ? 0 : 1] ?? part);\n const glyph: Record<string, string> = { escape: \"Esc\", enter: \"↵\", arrowup: \"↑\", arrowdown: \"↓\", arrowleft: \"←\", arrowright: \"→\", \" \": \"Space\" };\n const last = glyph[ALIASES[key.toLowerCase()] ?? key.toLowerCase()] ?? key.toUpperCase();\n return [...shown, last];\n}\n\nconst noop = () => () => undefined;\n\n/** Whether the person is on an Apple device — `false` on the server and in the first client render (no mismatch), then right. */\nexport function useApple(): boolean {\n return React.useSyncExternalStore(noop, isApple, () => false);\n}\n\n/** The `aria-keyshortcuts` of a combination (`Control+K`, `Meta+K` on a Mac); a sequence has none (it is not a chord). */\nexport function ariaKeyShortcuts(shortcut: string, apple = isApple()): string | undefined {\n if (shortcut.includes(\" \")) return undefined;\n const parts = shortcut.split(\"+\").filter(Boolean);\n const names: Record<string, string> = { mod: apple ? \"Meta\" : \"Control\", meta: \"Meta\", ctrl: \"Control\", alt: \"Alt\", shift: \"Shift\" };\n const key = parts.at(-1) ?? \"\";\n return [...parts.slice(0, -1).map((part) => names[part.toLowerCase()] ?? part), key.length === 1 ? key.toUpperCase() : key.charAt(0).toUpperCase() + key.slice(1)].join(\"+\");\n}\n\n/** Whether a key press happens in something you type in. */\nfunction isEditable(target: EventTarget | null): { field: boolean; rich: boolean } {\n const element = target instanceof HTMLElement ? target : null;\n if (!element) return { field: false, rich: false };\n const rich = element.isContentEditable;\n return { field: rich || /^(input|textarea|select)$/i.test(element.tagName), rich };\n}\n\n/**\n * Binds shortcuts for as long as the component lives (`enabled` turns them off). Each key is a combination or a sequence,\n * each value runs when it is pressed; the handler may change on every render. A shortcut that fires is `preventDefault`ed.\n * A sequence waits `timeout` ms for its next key.\n */\nexport function useShortcuts(map: ShortcutMap, { enabled = true, timeout = 900 }: { enabled?: boolean; timeout?: number } = {}) {\n const latest = useLatest(map);\n const names = Object.keys(map).sort().join(\"\\n\");\n React.useEffect(() => {\n if (!enabled) return;\n const bindings = names.split(\"\\n\").filter(Boolean);\n let buffer: { key: string; at: number }[] = [];\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.defaultPrevented || event.isComposing || event.repeat || !event.key) return;\n const editing = isEditable(event.target);\n const chord = event.metaKey || event.ctrlKey || event.altKey;\n const now = Date.now();\n buffer = [...buffer.filter((entry) => now - entry.at <= timeout), { key: event.key.toLowerCase(), at: now }].slice(-4);\n for (const binding of bindings) {\n const handler = latest.current[binding];\n if (!handler) continue;\n const keys = binding.toLowerCase().split(/\\s+/).map((key) => ALIASES[key] ?? key);\n const fired =\n keys.length > 1\n ? !chord && !editing.field && buffer.length >= keys.length && keys.every((key, i) => buffer[buffer.length - keys.length + i]?.key === key)\n : matchesCombo(event, binding) && (chord ? !editing.rich : !editing.field);\n if (!fired) continue;\n event.preventDefault();\n buffer = [];\n handler(event);\n return;\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n return () => document.removeEventListener(\"keydown\", onKeyDown);\n }, [enabled, names, latest, timeout]);\n}\n"
383
+ "content": "// Keyboard shortcuts for an application: a combination (`mod+k`, `shift+/`, `alt+arrowup`) or a sequence (`g d`: press G,\n// then D). `mod` is ⌘ on Apple devices and Ctrl elsewhere. Plain keys and sequences stay out of text fields; a combination\n// with `mod` works in an input (not in a rich-text editor, where ⌘B is bold). Nothing is decided here about the words.\nimport * as React from \"react\";\n\nimport { useLatest } from \"../media\";\n\nexport type ShortcutMap = Readonly<Record<string, ((event: KeyboardEvent) => void) | undefined>>;\n\nconst isApple = () => typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);\n\nconst ALIASES: Record<string, string> = { esc: \"escape\", return: \"enter\", space: \" \", spacebar: \" \", up: \"arrowup\", down: \"arrowdown\", left: \"arrowleft\", right: \"arrowright\", del: \"delete\", plus: \"+\" };\ntype Modifier = \"mod\" | \"ctrl\" | \"alt\" | \"shift\" | \"meta\";\n\ntype Combo = { key: string; mod: boolean; ctrl: boolean; alt: boolean; shift: boolean; meta: boolean };\n\n/** `\"mod+shift+k\"` → its parts. A lone `+` key is written `plus`. */\nexport function parseCombo(combo: string): Combo {\n const parts = combo.toLowerCase().split(\"+\").filter(Boolean);\n const key = ALIASES[parts.at(-1) ?? \"\"] ?? parts.at(-1) ?? \"\";\n const has = (name: Modifier) => parts.slice(0, -1).includes(name);\n return { key, mod: has(\"mod\"), ctrl: has(\"ctrl\"), alt: has(\"alt\"), shift: has(\"shift\"), meta: has(\"meta\") };\n}\n\n/** Whether a key event is this combination: its modifiers exactly (`mod` is ⌘ or Ctrl by platform), then its key. */\nexport function matchesCombo(event: Pick<KeyboardEvent, \"key\" | \"metaKey\" | \"ctrlKey\" | \"altKey\" | \"shiftKey\">, combo: string, apple = isApple()): boolean {\n const want = parseCombo(combo);\n const meta = want.meta || (want.mod && apple);\n const ctrl = want.ctrl || (want.mod && !apple);\n if (event.metaKey !== meta || event.ctrlKey !== ctrl || event.altKey !== want.alt) return false;\n // Shift is only checked when the binding names it: `?` and `/` need it on most layouts.\n if (want.shift && !event.shiftKey) return false;\n return event.key.toLowerCase() === want.key;\n}\n\n/** The keys of a shortcut to show on a keycap: `[\"⌘\", \"K\"]` on a Mac, `[\"Ctrl\", \"K\"]` elsewhere; a sequence `g d` is `[\"G\", \"D\"]`. */\nexport function formatShortcut(shortcut: string, apple = isApple()): string[] {\n if (shortcut.includes(\" \")) return shortcut.split(/\\s+/).map((key) => key.toUpperCase());\n const parts = shortcut.split(\"+\").filter(Boolean);\n const key = parts.at(-1) ?? \"\";\n const names: Record<string, [string, string]> = { mod: [\"⌘\", \"Ctrl\"], meta: [\"⌘\", \"Win\"], ctrl: [\"⌃\", \"Ctrl\"], alt: [\"⌥\", \"Alt\"], shift: [\"⇧\", \"Shift\"] };\n const shown = parts.slice(0, -1).map((part) => names[part.toLowerCase()]?.[apple ? 0 : 1] ?? part);\n const glyph: Record<string, string> = { escape: \"Esc\", enter: \"↵\", arrowup: \"↑\", arrowdown: \"↓\", arrowleft: \"←\", arrowright: \"→\", \" \": \"Space\" };\n const last = glyph[ALIASES[key.toLowerCase()] ?? key.toLowerCase()] ?? key.toUpperCase();\n return [...shown, last];\n}\n\n/**\n * The accelerator of a combination for a desktop app's native menu bar (Tauri's `MenuItem`, Electron's — ADR-002):\n * `mod+k` → `CmdOrCtrl+K`, `shift+mod+/` → `Shift+CmdOrCtrl+/`. The menu and the shell then answer the same keys, and the\n * menu shows them. A sequence (`g d`) has none: a menu item takes one chord.\n */\nexport function acceleratorOf(shortcut: string): string | undefined {\n if (shortcut.trim().includes(\" \")) return undefined;\n const parts = shortcut.split(\"+\").filter(Boolean);\n const names: Record<string, string> = { mod: \"CmdOrCtrl\", meta: \"Super\", ctrl: \"Ctrl\", alt: \"Alt\", shift: \"Shift\" };\n const raw = (parts.at(-1) ?? \"\").toLowerCase();\n const key = ALIASES[raw] ?? raw;\n const keys: Record<string, string> = { escape: \"Escape\", enter: \"Enter\", \" \": \"Space\", arrowup: \"Up\", arrowdown: \"Down\", arrowleft: \"Left\", arrowright: \"Right\", delete: \"Delete\", backspace: \"Backspace\", tab: \"Tab\", \"+\": \"Plus\" };\n const last = keys[key] ?? (key.length === 1 ? key.toUpperCase() : key.charAt(0).toUpperCase() + key.slice(1));\n return [...parts.slice(0, -1).map((part) => names[part.toLowerCase()] ?? part), last].join(\"+\");\n}\n\nconst noop = () => () => undefined;\n\n/** Whether the person is on an Apple device — `false` on the server and in the first client render (no mismatch), then right. */\nexport function useApple(): boolean {\n return React.useSyncExternalStore(noop, isApple, () => false);\n}\n\n/** The `aria-keyshortcuts` of a combination (`Control+K`, `Meta+K` on a Mac); a sequence has none (it is not a chord). */\nexport function ariaKeyShortcuts(shortcut: string, apple = isApple()): string | undefined {\n if (shortcut.includes(\" \")) return undefined;\n const parts = shortcut.split(\"+\").filter(Boolean);\n const names: Record<string, string> = { mod: apple ? \"Meta\" : \"Control\", meta: \"Meta\", ctrl: \"Control\", alt: \"Alt\", shift: \"Shift\" };\n const key = parts.at(-1) ?? \"\";\n return [...parts.slice(0, -1).map((part) => names[part.toLowerCase()] ?? part), key.length === 1 ? key.toUpperCase() : key.charAt(0).toUpperCase() + key.slice(1)].join(\"+\");\n}\n\n/** Whether a key press happens in something you type in. */\nfunction isEditable(target: EventTarget | null): { field: boolean; rich: boolean } {\n const element = target instanceof HTMLElement ? target : null;\n if (!element) return { field: false, rich: false };\n const rich = element.isContentEditable;\n return { field: rich || /^(input|textarea|select)$/i.test(element.tagName), rich };\n}\n\n/**\n * Binds shortcuts for as long as the component lives (`enabled` turns them off). Each key is a combination or a sequence,\n * each value runs when it is pressed; the handler may change on every render. A shortcut that fires is `preventDefault`ed.\n * A sequence waits `timeout` ms for its next key.\n */\nexport function useShortcuts(map: ShortcutMap, { enabled = true, timeout = 900 }: { enabled?: boolean; timeout?: number } = {}) {\n const latest = useLatest(map);\n const names = Object.keys(map).sort().join(\"\\n\");\n React.useEffect(() => {\n if (!enabled) return;\n const bindings = names.split(\"\\n\").filter(Boolean);\n let buffer: { key: string; at: number }[] = [];\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.defaultPrevented || event.isComposing || event.repeat || !event.key) return;\n const editing = isEditable(event.target);\n const chord = event.metaKey || event.ctrlKey || event.altKey;\n const now = Date.now();\n buffer = [...buffer.filter((entry) => now - entry.at <= timeout), { key: event.key.toLowerCase(), at: now }].slice(-4);\n for (const binding of bindings) {\n const handler = latest.current[binding];\n if (!handler) continue;\n const keys = binding.toLowerCase().split(/\\s+/).map((key) => ALIASES[key] ?? key);\n const fired =\n keys.length > 1\n ? !chord && !editing.field && buffer.length >= keys.length && keys.every((key, i) => buffer[buffer.length - keys.length + i]?.key === key)\n : matchesCombo(event, binding) && (chord ? !editing.rich : !editing.field);\n if (!fired) continue;\n event.preventDefault();\n buffer = [];\n handler(event);\n return;\n }\n };\n document.addEventListener(\"keydown\", onKeyDown);\n return () => document.removeEventListener(\"keydown\", onKeyDown);\n }, [enabled, names, latest, timeout]);\n}\n"
367
384
  },
368
385
  {
369
386
  "path": "glyphs.tsx",
@@ -375,7 +392,7 @@
375
392
  },
376
393
  {
377
394
  "path": "meta.ts",
378
- "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 | \"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 | \"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 | \"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 | \"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"
395
+ "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"
379
396
  }
380
397
  ],
381
398
  "dependencies": [
@@ -417,6 +434,13 @@
417
434
  "description": "The sidebar starts collapsed to its icons (desktop).",
418
435
  "required": false
419
436
  },
437
+ {
438
+ "name": "desktop",
439
+ "type": "boolean",
440
+ "default": "false",
441
+ "description": "The shell is a desktop app's window (the Orazaka Mac app, Tauri 2 — ADR-002): no drawer, the sidebar's top clears the\nwindow's traffic lights (`--kz-titlebar-inset`, 28 px; the window's height is `--kz-window-height`, the viewport by default), the header and that top move the window\n(`data-tauri-drag-region`), a denser layout, the chrome not selectable. In a browser it is a fixed-height shell.",
442
+ "required": false
443
+ },
420
444
  {
421
445
  "name": "onCollapsedChange",
422
446
  "type": "((collapsed: boolean) => void)",
@@ -41,7 +41,8 @@
41
41
  "What it does, the bird's quote and the long version are never on the face: a detail page (`more`), or `panelLabel`.",
42
42
  "One idea per card; one bird per idea: small in the corner (`mark`), its quote (`rule`) where the card unfolds.",
43
43
  "Give each subject its hue with `--kz-hue` on the card (or a wrapper); the brand's accent otherwise.",
44
- "Secondary actions as an icon `ActionBar` in `actions`; the way in as `more`."
44
+ "Secondary actions as an icon `ActionBar` in `actions`; the way in as `more`.",
45
+ "`hover=\"quiet\"` for reasons read as prose (a product's argument, a policy): no glow, a lift and a ring on focus. The default `light` keeps the pointer's light."
45
46
  ],
46
47
  "accessibility": {
47
48
  "keyboard": [
@@ -53,7 +54,7 @@
53
54
  "notes": [
54
55
  "An `article` named by its title; the hook's label is read before the line (visually hidden); the fold is a native `details` element.",
55
56
  "The way in is described by the card's title (`aria-describedby`), so several `Read more` links stay distinct.",
56
- "The lift, the light and the panel's chevron stop under `prefers-reduced-motion`."
57
+ "The lift, the light and the panel's chevron stop under `prefers-reduced-motion`; the quiet hover keeps its surface and ring, and never lifts."
57
58
  ]
58
59
  },
59
60
  "related": [
@@ -104,6 +105,13 @@
104
105
  "description": "Compact facts under the line: registry and version, a status said honestly.",
105
106
  "required": false
106
107
  },
108
+ {
109
+ "name": "hover",
110
+ "type": "CardHover",
111
+ "default": null,
112
+ "description": "The hover of the card: `light` (the pointer's light, the default) or `quiet` (no glow, a lift, a ring on focus).",
113
+ "required": false
114
+ },
107
115
  {
108
116
  "name": "icon",
109
117
  "type": "ReactNode",
@@ -194,6 +202,22 @@
194
202
  "path": "examples/argument-card/grid.tsx",
195
203
  "module": "@krizaka/ui/registry/examples/argument-card/grid",
196
204
  "code": "import { ArgumentCard } from \"@krizaka/ui/argument-card\";\nimport { CardGrid } from \"@krizaka/ui/card-grid\";\n\nconst reasons = [\n { id: \"local\", title: \"Local inference\", hook: \"Elsewhere, every prompt crosses the ocean.\" },\n { id: \"pipeline\", title: \"One pipeline\", hook: \"Elsewhere, each feature guards itself — or forgets.\" },\n { id: \"telemetry\", title: \"Zero telemetry\", hook: \"Elsewhere, usage data is the price of the free tier.\" },\n];\n\n// A product page's reasons, side by side: each card the same height, the hook at the same place on every card.\nexport default function ArgumentCardGrid() {\n return (\n <CardGrid className=\"w-full max-w-5xl\" min={260} reveal={false}>\n {reasons.map((r) => (\n <ArgumentCard key={r.id} id={`why-${r.id}`} title={r.title} hook={{ label: \"The trap elsewhere\", text: r.hook }} more={{ href: `#${r.id}`, label: \"Details\" }} />\n ))}\n </CardGrid>\n );\n}\n"
205
+ },
206
+ {
207
+ "name": "hover-light",
208
+ "title": "The light hover",
209
+ "description": "`hover=\"light\"`, the default: the pointer's light and the coloured lift, said explicitly.",
210
+ "path": "examples/argument-card/hover-light.tsx",
211
+ "module": "@krizaka/ui/registry/examples/argument-card/hover-light",
212
+ "code": "import { ArgumentCard } from \"@krizaka/ui/argument-card\";\nimport { CardGrid } from \"@krizaka/ui/card-grid\";\n\nconst reasons = [\n { id: \"local\", title: \"Local inference\", hook: \"Elsewhere, every prompt crosses the ocean.\" },\n { id: \"pipeline\", title: \"One pipeline\", hook: \"Elsewhere, each feature guards itself — or forgets.\" },\n { id: \"telemetry\", title: \"Zero telemetry\", hook: \"Elsewhere, usage data is the price of the free tier.\" },\n];\n\n// The default hover, said explicitly: the pointer's light on the reasons.\nexport default function ArgumentCardHoverLight() {\n return (\n <CardGrid className=\"w-full max-w-5xl\" min={260} reveal={false}>\n {reasons.map((r) => (\n <ArgumentCard key={r.id} hover=\"light\" id={`light-${r.id}`} title={r.title} hook={{ label: \"The trap elsewhere\", text: r.hook }} more={{ href: `#${r.id}`, label: \"Details\" }} />\n ))}\n </CardGrid>\n );\n}\n"
213
+ },
214
+ {
215
+ "name": "hover-quiet",
216
+ "title": "The quiet hover",
217
+ "description": "`hover=\"quiet\"` on a grid of reasons: no glow, a lift, a ring on focus.",
218
+ "path": "examples/argument-card/hover-quiet.tsx",
219
+ "module": "@krizaka/ui/registry/examples/argument-card/hover-quiet",
220
+ "code": "import { ArgumentCard } from \"@krizaka/ui/argument-card\";\nimport { CardGrid } from \"@krizaka/ui/card-grid\";\n\nconst reasons = [\n { id: \"local\", title: \"Local inference\", hook: \"Elsewhere, every prompt crosses the ocean.\" },\n { id: \"pipeline\", title: \"One pipeline\", hook: \"Elsewhere, each feature guards itself — or forgets.\" },\n { id: \"telemetry\", title: \"Zero telemetry\", hook: \"Elsewhere, usage data is the price of the free tier.\" },\n];\n\n// The quiet hover on the reasons: no glow, a lift, a ring on focus. The grid is quiet, so every card is.\nexport default function ArgumentCardHoverQuiet() {\n return (\n <CardGrid className=\"w-full max-w-5xl\" min={260} reveal={false} hover=\"quiet\">\n {reasons.map((r) => (\n <ArgumentCard key={r.id} id={`quiet-${r.id}`} title={r.title} hook={{ label: \"The trap elsewhere\", text: r.hook }} more={{ href: `#${r.id}`, label: \"Details\" }} />\n ))}\n </CardGrid>\n );\n}\n"
197
221
  }
198
222
  ]
199
223
  },
@@ -201,7 +225,7 @@
201
225
  "files": [
202
226
  {
203
227
  "path": "argument-card/argument-card.tsx",
204
- "content": "// Server-safe. A card that argues (blocks.css), compact: who (icon, name, facts) → the trap in one line → the way in.\n// The long version — what it does, the rule a bird stands for, the reasons — waits in a panel the reader opens (a\n// native <details>: keyboard, screen readers, no script). Cards of a row share their height; the panel and the foot\n// sit at the bottom, at the same place on every card.\nimport type * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\nimport { ArrowGlyph, ChevronGlyph } from \"../glyphs\";\nimport { type Fact, Facts } from \"../page/page\";\n\nexport type ArgumentCardProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The id of the title: the card's accessible name. */\n id: string;\n /** The title: the subject (a building block, a feature, a plan). */\n title: React.ReactNode;\n /** The icon tile (a signature icon): decorative. */\n icon?: React.ReactNode;\n /** A mono line under the title (a repository, a package). */\n meta?: React.ReactNode;\n /** Small, in the top corner: the bird whose rule it is (a `Mascot` of 40 px, still). Decorative. */\n mark?: React.ReactNode;\n /** Compact facts under the line: registry and version, a status said honestly. */\n facts?: readonly Fact[];\n /**\n * The problem in ONE line (≤ 90 characters): what a reader keeps if they read nothing else. `label` (`The trap`) is\n * read by assistive technology before it, not shown.\n */\n hook: { label: React.ReactNode; text: React.ReactNode };\n /** Unfolded only: what it does, as a few short points, with their label (`What it does`). */\n points?: { label: React.ReactNode; items: readonly React.ReactNode[] };\n /** Unfolded only: the rule told by a bird (a `MascotQuote`, `variant=\"inline\"`). */\n rule?: React.ReactNode;\n /** Unfolded only: the long version, as labelled paragraphs. */\n details?: readonly { label: React.ReactNode; text: React.ReactNode }[];\n /**\n * Without a detail page: the words that unfold the card in place (`Details`) — a native `<details>` holding the\n * points, the rule and the long version. Ignored with `more`: the detail page holds them.\n */\n panelLabel?: React.ReactNode;\n /** The way in: a detail page — one short action at the foot (`Details`). With it, the card is only its face. */\n more?: { href: string; label: React.ReactNode };\n /** Discreet secondary actions at the foot, on the right (an `ActionBar` with `variant=\"icons\"`). */\n actions?: React.ReactNode;\n /**\n * The title's level.\n * @default 3\n */\n level?: 2 | 3 | 4;\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n};\n\n/**\n * A card that argues, compact (about a third of a full card): who (icon, name, meta; the bird small in the corner) →\n * the problem in one line → compact facts → one short action. What it does, the bird's rule and the long version are\n * never on the face: they live on the detail page (`more`) or in the card unfolded in place (`panelLabel`).\n */\nexport function ArgumentCard({ id, title, icon, meta, mark, facts, hook, points, rule, details, panelLabel, more, actions, level = 3, linkAs, className, ...props }: ArgumentCardProps) {\n const H = `h${level}` as \"h2\" | \"h3\" | \"h4\";\n const fold = !more && panelLabel && (points || rule || (details && details.length > 0));\n return (\n <article className={cn(\"kz-block-card kz-arg\", className)} data-kz-light=\"\" aria-labelledby={id} {...props}>\n <div className=\"kz-arg-head\">\n {icon && (\n <span className=\"kz-block-icon\" aria-hidden>\n {icon}\n </span>\n )}\n <div className=\"kz-arg-id\">\n <H id={id} className=\"kz-arg-title\">\n {title}\n </H>\n {meta && <p className=\"kz-arg-meta\">{meta}</p>}\n </div>\n {mark && (\n <span className=\"kz-arg-mark\" aria-hidden>\n {mark}\n </span>\n )}\n </div>\n <p className=\"kz-arg-line\">\n <span className=\"kz-sr-only\">{hook.label} — </span>\n {hook.text}\n </p>\n {facts && facts.length > 0 && <Facts items={facts} />}\n {fold && (\n <details className=\"kz-arg-panel\">\n <summary>\n {panelLabel} <ChevronGlyph className=\"h-3.5 w-3.5\" />\n </summary>\n <div className=\"kz-arg-panel-body\">\n {points && (\n <div>\n <p className=\"kz-label\">{points.label}</p>\n <ul className=\"kz-list\">\n {points.items.map((item, i) => (\n <li key={i}>{item}</li>\n ))}\n </ul>\n </div>\n )}\n {details && details.length > 0 && (\n <dl>\n {details.map((d, i) => (\n <div key={i}>\n <dt className=\"kz-label\">{d.label}</dt>\n <dd>{d.text}</dd>\n </div>\n ))}\n </dl>\n )}\n {rule}\n </div>\n </details>\n )}\n {(more || actions) && (\n <div className=\"kz-arg-foot\">\n {more ? (\n <BlockLink href={more.href} linkAs={linkAs} className=\"kz-arg-more\" aria-describedby={id}>\n {more.label} <ArrowGlyph className=\"h-3.5 w-3.5\" />\n </BlockLink>\n ) : (\n <span />\n )}\n {actions}\n </div>\n )}\n </article>\n );\n}\n"
228
+ "content": "// Server-safe. A card that argues (blocks.css), compact: who (icon, name, facts) → the trap in one line → the way in.\n// The long version — what it does, the rule a bird stands for, the reasons — waits in a panel the reader opens (a\n// native <details>: keyboard, screen readers, no script). Cards of a row share their height; the panel and the foot\n// sit at the bottom, at the same place on every card.\nimport type * as React from \"react\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\nimport { cn } from \"../cn\";\nimport { ArrowGlyph, ChevronGlyph } from \"../glyphs\";\nimport { type CardHover, cardHoverClass } from \"../link-card/link-card\";\nimport { type Fact, Facts } from \"../page/page\";\n\nexport type ArgumentCardProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The id of the title: the card's accessible name. */\n id: string;\n /** The title: the subject (a building block, a feature, a plan). */\n title: React.ReactNode;\n /** The icon tile (a signature icon): decorative. */\n icon?: React.ReactNode;\n /** A mono line under the title (a repository, a package). */\n meta?: React.ReactNode;\n /** Small, in the top corner: the bird whose rule it is (a `Mascot` of 40 px, still). Decorative. */\n mark?: React.ReactNode;\n /** Compact facts under the line: registry and version, a status said honestly. */\n facts?: readonly Fact[];\n /**\n * The problem in ONE line (≤ 90 characters): what a reader keeps if they read nothing else. `label` (`The trap`) is\n * read by assistive technology before it, not shown.\n */\n hook: { label: React.ReactNode; text: React.ReactNode };\n /** Unfolded only: what it does, as a few short points, with their label (`What it does`). */\n points?: { label: React.ReactNode; items: readonly React.ReactNode[] };\n /** Unfolded only: the rule told by a bird (a `MascotQuote`, `variant=\"inline\"`). */\n rule?: React.ReactNode;\n /** Unfolded only: the long version, as labelled paragraphs. */\n details?: readonly { label: React.ReactNode; text: React.ReactNode }[];\n /**\n * Without a detail page: the words that unfold the card in place (`Details`) — a native `<details>` holding the\n * points, the rule and the long version. Ignored with `more`: the detail page holds them.\n */\n panelLabel?: React.ReactNode;\n /** The way in: a detail page — one short action at the foot (`Details`). With it, the card is only its face. */\n more?: { href: string; label: React.ReactNode };\n /** Discreet secondary actions at the foot, on the right (an `ActionBar` with `variant=\"icons\"`). */\n actions?: React.ReactNode;\n /**\n * The title's level.\n * @default 3\n */\n level?: 2 | 3 | 4;\n /** The app's link component for internal addresses (Next's `Link`); an `<a>` otherwise. */\n linkAs?: LinkComponent;\n /** The hover of the card: `light` (the pointer's light, the default) or `quiet` (no glow, a lift, a ring on focus). */\n hover?: CardHover;\n};\n\n/**\n * A card that argues, compact (about a third of a full card): who (icon, name, meta; the bird small in the corner) →\n * the problem in one line → compact facts → one short action. What it does, the bird's rule and the long version are\n * never on the face: they live on the detail page (`more`) or in the card unfolded in place (`panelLabel`).\n */\nexport function ArgumentCard({ id, title, icon, meta, mark, facts, hook, points, rule, details, panelLabel, more, actions, level = 3, linkAs, hover, className, ...props }: ArgumentCardProps) {\n const H = `h${level}` as \"h2\" | \"h3\" | \"h4\";\n const fold = !more && panelLabel && (points || rule || (details && details.length > 0));\n return (\n <article className={cn(\"kz-block-card kz-arg\", cardHoverClass(hover), className)} data-kz-light=\"\" aria-labelledby={id} {...props}>\n <div className=\"kz-arg-head\">\n {icon && (\n <span className=\"kz-block-icon\" aria-hidden>\n {icon}\n </span>\n )}\n <div className=\"kz-arg-id\">\n <H id={id} className=\"kz-arg-title\">\n {title}\n </H>\n {meta && <p className=\"kz-arg-meta\">{meta}</p>}\n </div>\n {mark && (\n <span className=\"kz-arg-mark\" aria-hidden>\n {mark}\n </span>\n )}\n </div>\n <p className=\"kz-arg-line\">\n <span className=\"kz-sr-only\">{hook.label} — </span>\n {hook.text}\n </p>\n {facts && facts.length > 0 && <Facts items={facts} />}\n {fold && (\n <details className=\"kz-arg-panel\">\n <summary>\n {panelLabel} <ChevronGlyph className=\"h-3.5 w-3.5\" />\n </summary>\n <div className=\"kz-arg-panel-body\">\n {points && (\n <div>\n <p className=\"kz-label\">{points.label}</p>\n <ul className=\"kz-list\">\n {points.items.map((item, i) => (\n <li key={i}>{item}</li>\n ))}\n </ul>\n </div>\n )}\n {details && details.length > 0 && (\n <dl>\n {details.map((d, i) => (\n <div key={i}>\n <dt className=\"kz-label\">{d.label}</dt>\n <dd>{d.text}</dd>\n </div>\n ))}\n </dl>\n )}\n {rule}\n </div>\n </details>\n )}\n {(more || actions) && (\n <div className=\"kz-arg-foot\">\n {more ? (\n <BlockLink href={more.href} linkAs={linkAs} className=\"kz-arg-more\" aria-describedby={id}>\n {more.label} <ArrowGlyph className=\"h-3.5 w-3.5\" />\n </BlockLink>\n ) : (\n <span />\n )}\n {actions}\n </div>\n )}\n </article>\n );\n}\n"
205
229
  },
206
230
  {
207
231
  "path": "argument-card/index.ts",
@@ -209,7 +233,7 @@
209
233
  },
210
234
  {
211
235
  "path": "argument-card/meta.ts",
212
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Argument card\",\n summary:\n \"A compact card that argues — about a third of a full card: who (icon, name, the bird in the corner), the trap in one line, facts and one short action; the long version lives on a detail page or unfolds in place.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"A block of a public site's page; an app screen on a phone is built from Screen, Header and Card.\", use: \"card\" }, desktop: { status: \"n/a\", reason: \"A public site's page, not a window of the Mac app.\" } },\n whenToUse: [\n \"The reasons of a product page, the building blocks of an open-source page, the options of a decision.\",\n \"When each subject has a problem to state before its solution, and a reader who scans before reading.\",\n ],\n whenNotToUse: [\n { when: \"When the card only leads somewhere.\", use: \"link-card\" },\n { when: \"For the decisions behind a choice, compared side by side.\", use: \"decision-list\" },\n ],\n bestPractices: [\n \"The hook is ONE line (≤ 90 characters, regular weight) a reader keeps in five seconds — never three bold lines.\",\n \"What it does, the bird's quote and the long version are never on the face: a detail page (`more`), or `panelLabel`.\",\n \"One idea per card; one bird per idea: small in the corner (`mark`), its quote (`rule`) where the card unfolds.\",\n \"Give each subject its hue with `--kz-hue` on the card (or a wrapper); the brand's accent otherwise.\",\n \"Secondary actions as an icon `ActionBar` in `actions`; the way in as `more`.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Enter / Space\", action: \"On the panel's summary, opens or closes the long version.\" }],\n notes: [\n \"An `article` named by its title; the hook's label is read before the line (visually hidden); the fold is a native `details` element.\",\n \"The way in is described by the card's title (`aria-describedby`), so several `Read more` links stay distinct.\",\n \"The lift, the light and the panel's chevron stop under `prefers-reduced-motion`.\",\n ],\n },\n related: [\"card-grid\", \"mascot-quote\", \"action-bar\"],\n web: {\n imports: [\"ArgumentCard\"],\n examples: [\n { name: \"building-block\", title: \"A building block\", description: \"Compact: the duck in the corner, the trap in one line, facts, one short action and an icon action.\" },\n { name: \"unfold\", title: \"Unfolded in place\", description: \"No detail page: `panelLabel` unfolds what it does, the cost and the pigeon's rule.\" },\n { name: \"grid\", title: \"Three reasons\", description: \"A product's reasons side by side in a grid: the hook and the way in, no panel.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
236
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Argument card\",\n summary:\n \"A compact card that argues — about a third of a full card: who (icon, name, the bird in the corner), the trap in one line, facts and one short action; the long version lives on a detail page or unfolds in place.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"A block of a public site's page; an app screen on a phone is built from Screen, Header and Card.\", use: \"card\" }, desktop: { status: \"n/a\", reason: \"A public site's page, not a window of the Mac app.\" } },\n whenToUse: [\n \"The reasons of a product page, the building blocks of an open-source page, the options of a decision.\",\n \"When each subject has a problem to state before its solution, and a reader who scans before reading.\",\n ],\n whenNotToUse: [\n { when: \"When the card only leads somewhere.\", use: \"link-card\" },\n { when: \"For the decisions behind a choice, compared side by side.\", use: \"decision-list\" },\n ],\n bestPractices: [\n \"The hook is ONE line (≤ 90 characters, regular weight) a reader keeps in five seconds — never three bold lines.\",\n \"What it does, the bird's quote and the long version are never on the face: a detail page (`more`), or `panelLabel`.\",\n \"One idea per card; one bird per idea: small in the corner (`mark`), its quote (`rule`) where the card unfolds.\",\n \"Give each subject its hue with `--kz-hue` on the card (or a wrapper); the brand's accent otherwise.\",\n \"Secondary actions as an icon `ActionBar` in `actions`; the way in as `more`.\",\n \"`hover=\\\"quiet\\\"` for reasons read as prose (a product's argument, a policy): no glow, a lift and a ring on focus. The default `light` keeps the pointer's light.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Enter / Space\", action: \"On the panel's summary, opens or closes the long version.\" }],\n notes: [\n \"An `article` named by its title; the hook's label is read before the line (visually hidden); the fold is a native `details` element.\",\n \"The way in is described by the card's title (`aria-describedby`), so several `Read more` links stay distinct.\",\n \"The lift, the light and the panel's chevron stop under `prefers-reduced-motion`; the quiet hover keeps its surface and ring, and never lifts.\",\n ],\n },\n related: [\"card-grid\", \"mascot-quote\", \"action-bar\"],\n web: {\n imports: [\"ArgumentCard\"],\n examples: [\n { name: \"building-block\", title: \"A building block\", description: \"Compact: the duck in the corner, the trap in one line, facts, one short action and an icon action.\" },\n { name: \"unfold\", title: \"Unfolded in place\", description: \"No detail page: `panelLabel` unfolds what it does, the cost and the pigeon's rule.\" },\n { name: \"grid\", title: \"Three reasons\", description: \"A product's reasons side by side in a grid: the hook and the way in, no panel.\" },\n { name: \"hover-light\", title: \"The light hover\", description: \"`hover=\\\"light\\\"`, the default: the pointer's light and the coloured lift, said explicitly.\" },\n { name: \"hover-quiet\", title: \"The quiet hover\", description: \"`hover=\\\"quiet\\\"` on a grid of reasons: no glow, a lift, a ring on focus.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
213
237
  },
214
238
  {
215
239
  "path": "block-link.tsx",
@@ -221,12 +245,13 @@
221
245
  },
222
246
  {
223
247
  "path": "meta.ts",
224
- "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 | \"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 | \"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 | \"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 | \"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"
248
+ "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"
225
249
  }
226
250
  ],
227
251
  "dependencies": [],
228
252
  "registryDependencies": [
229
253
  "cn",
254
+ "link-card",
230
255
  "page"
231
256
  ],
232
257
  "demo": {
@@ -273,6 +298,13 @@
273
298
  "description": "Compact facts under the line: registry and version, a status said honestly.",
274
299
  "required": false
275
300
  },
301
+ {
302
+ "name": "hover",
303
+ "type": "CardHover",
304
+ "default": null,
305
+ "description": "The hover of the card: `light` (the pointer's light, the default) or `quiet` (no glow, a lift, a ring on focus).",
306
+ "required": false
307
+ },
276
308
  {
277
309
  "name": "icon",
278
310
  "type": "ReactNode",