@krizaka/ui 3.22.0 → 3.24.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 (453) hide show
  1. package/README.md +6 -1
  2. package/dist/achievement.js +1 -1
  3. package/dist/action-bar.js +4 -4
  4. package/dist/app-header.d.ts +79 -0
  5. package/dist/app-header.js +32 -0
  6. package/dist/app-header.js.map +1 -0
  7. package/dist/app-shell.d.ts +20 -2
  8. package/dist/app-shell.js +34 -19
  9. package/dist/app-shell.js.map +1 -1
  10. package/dist/argument-card.d.ts +4 -1
  11. package/dist/argument-card.js +10 -7
  12. package/dist/argument-card.js.map +1 -1
  13. package/dist/audio-player.d.ts +3 -2
  14. package/dist/audio-player.js +14 -10
  15. package/dist/audio-player.js.map +1 -1
  16. package/dist/blocks.css +28 -0
  17. package/dist/button.js +2 -1
  18. package/dist/captcha.d.ts +81 -0
  19. package/dist/captcha.js +162 -0
  20. package/dist/captcha.js.map +1 -0
  21. package/dist/card-grid.d.ts +10 -1
  22. package/dist/card-grid.js +3 -2
  23. package/dist/card-grid.js.map +1 -1
  24. package/dist/card.js +3 -3
  25. package/dist/changelog-page.d.ts +57 -3
  26. package/dist/changelog-page.js +117 -1
  27. package/dist/changelog-page.js.map +1 -1
  28. package/dist/choice-grid.js +1 -1
  29. package/dist/{chunk-YCIBJ6OQ.js → chunk-4DH2HW3D.js} +3 -1
  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-R6NK6ZNY.js → chunk-F7FVPPBB.js} +4 -4
  40. package/dist/{chunk-2L67YTNV.js → chunk-FTX66XZY.js} +2 -2
  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-AQSZJJAJ.js → chunk-MQPC3P4T.js} +2 -2
  48. package/dist/{chunk-2FRWNSRO.js → chunk-NSLXEDIS.js} +3 -2
  49. package/dist/chunk-NSLXEDIS.js.map +1 -0
  50. package/dist/{chunk-4LOMIQVX.js → chunk-W675RFOA.js} +3 -2
  51. package/dist/chunk-W675RFOA.js.map +1 -0
  52. package/dist/{chunk-G3ETON2A.js → chunk-WU4VLSEA.js} +3 -2
  53. package/dist/chunk-WU4VLSEA.js.map +1 -0
  54. package/dist/{chunk-IZ7MV6HM.js → chunk-XVFQZ3ZG.js} +3 -2
  55. package/dist/chunk-XVFQZ3ZG.js.map +1 -0
  56. package/dist/cn.js +1 -1
  57. package/dist/code-block.js +2 -2
  58. package/dist/code-block.js.map +1 -1
  59. package/dist/command.js +3 -3
  60. package/dist/comparison-table.js +1 -1
  61. package/dist/confirm-button.js +2 -2
  62. package/dist/continue-prompt.js +3 -3
  63. package/dist/continue-prompt.js.map +1 -1
  64. package/dist/cta-panel.js +1 -1
  65. package/dist/data-table.js +4 -4
  66. package/dist/date-picker.js +2 -2
  67. package/dist/decision-list.js +1 -1
  68. package/dist/dialog.js +3 -2
  69. package/dist/dialog.js.map +1 -1
  70. package/dist/docs-nav.d.ts +36 -0
  71. package/dist/docs-nav.js +44 -0
  72. package/dist/docs-nav.js.map +1 -0
  73. package/dist/dropdown-menu.js +1 -1
  74. package/dist/error-page.js +1 -1
  75. package/dist/field.js +1 -1
  76. package/dist/filter-bar.js +2 -2
  77. package/dist/force-update-screen.js +2 -1
  78. package/dist/force-update-screen.js.map +1 -1
  79. package/dist/gallery-page.js +1 -1
  80. package/dist/genui.d.ts +3 -1
  81. package/dist/genui.js +33 -6
  82. package/dist/genui.js.map +1 -1
  83. package/dist/glow-card.js +1 -1
  84. package/dist/goal-gauge.js +1 -1
  85. package/dist/how-it-works-page.js +1 -1
  86. package/dist/image-cropper.js +3 -3
  87. package/dist/index.d.ts +15 -1
  88. package/dist/index.js +65 -5
  89. package/dist/index.js.map +1 -1
  90. package/dist/landscape.js +1 -1
  91. package/dist/link-card.d.ts +9 -2
  92. package/dist/link-card.js +5 -44
  93. package/dist/link-card.js.map +1 -1
  94. package/dist/longform-page.js +1 -1
  95. package/dist/maintenance-screen.js +2 -1
  96. package/dist/maintenance-screen.js.map +1 -1
  97. package/dist/map.js +3 -3
  98. package/dist/map.js.map +1 -1
  99. package/dist/markdown.js +2 -1
  100. package/dist/markdown.js.map +1 -1
  101. package/dist/marquee.js +1 -1
  102. package/dist/mascot-quote.js +1 -1
  103. package/dist/match-dialog.js +2 -1
  104. package/dist/match-dialog.js.map +1 -1
  105. package/dist/media-grid.d.ts +26 -4
  106. package/dist/media-grid.js +144 -77
  107. package/dist/media-grid.js.map +1 -1
  108. package/dist/native/map.js +3 -3
  109. package/dist/native/map.js.map +1 -1
  110. package/dist/native.d.ts +18 -1
  111. package/dist/native.js +105 -24
  112. package/dist/native.js.map +1 -1
  113. package/dist/nav-bar.js +3 -3
  114. package/dist/page-hero.js +6 -6
  115. package/dist/page.js +2 -2
  116. package/dist/popover.js +1 -1
  117. package/dist/pricing-page.js +1 -1
  118. package/dist/product-page.js +1 -1
  119. package/dist/profile-card.js +1 -1
  120. package/dist/promise-card.js +1 -1
  121. package/dist/radio-group.js +2 -2
  122. package/dist/rail-nav.d.ts +149 -0
  123. package/dist/rail-nav.js +177 -0
  124. package/dist/rail-nav.js.map +1 -0
  125. package/dist/scroll-stage.js +1 -1
  126. package/dist/settings-layout.d.ts +75 -62
  127. package/dist/settings-layout.js +39 -6
  128. package/dist/settings-layout.js.map +1 -1
  129. package/dist/showcase.js +1 -1
  130. package/dist/site-footer.d.ts +48 -67
  131. package/dist/site-footer.js +36 -12
  132. package/dist/site-footer.js.map +1 -1
  133. package/dist/slider.js +2 -2
  134. package/dist/stage-banner.js +1 -1
  135. package/dist/step-showcase.js +1 -1
  136. package/dist/tabs.js +1 -1
  137. package/dist/tabs.js.map +1 -1
  138. package/dist/terminal-replay.js +1 -1
  139. package/dist/theme.js +2 -1
  140. package/dist/theme.js.map +1 -1
  141. package/dist/toast.js +1 -1
  142. package/dist/toc.js +1 -1
  143. package/dist/tooltip.js +1 -1
  144. package/dist/update-prompt.js +2 -1
  145. package/dist/update-prompt.js.map +1 -1
  146. package/dist/vertical-video.js +2 -2
  147. package/dist/video-player.js +3 -3
  148. package/dist/waveform.d.ts +93 -0
  149. package/dist/waveform.js +95 -0
  150. package/dist/waveform.js.map +1 -0
  151. package/package.json +81 -10
  152. package/registry/achievement.json +1 -1
  153. package/registry/action-bar.json +1 -1
  154. package/registry/activity-feed.json +1 -1
  155. package/registry/alert.json +1 -1
  156. package/registry/app-header.json +202 -0
  157. package/registry/app-shell.json +33 -9
  158. package/registry/argument-card.json +37 -5
  159. package/registry/audio-player.json +5 -3
  160. package/registry/auth-layout.json +1 -1
  161. package/registry/avatar.json +1 -1
  162. package/registry/badge.json +1 -1
  163. package/registry/button.json +3 -2
  164. package/registry/captcha.json +300 -0
  165. package/registry/card-grid.json +27 -3
  166. package/registry/card.json +1 -1
  167. package/registry/catalogue-page.json +1 -1
  168. package/registry/changelog-page.json +11 -7
  169. package/registry/chat.json +1 -1
  170. package/registry/checkbox.json +1 -1
  171. package/registry/chip-link.json +1 -1
  172. package/registry/chip.json +1 -1
  173. package/registry/choice-grid.json +1 -1
  174. package/registry/cn.json +1 -1
  175. package/registry/code-block.json +1 -1
  176. package/registry/combobox.json +1 -1
  177. package/registry/command.json +1 -1
  178. package/registry/comparison-table.json +1 -1
  179. package/registry/component-page.json +1 -1
  180. package/registry/confirm-button.json +1 -1
  181. package/registry/contact-page.json +1 -1
  182. package/registry/continue-prompt.json +1 -1
  183. package/registry/countdown.json +1 -1
  184. package/registry/cta-panel.json +1 -1
  185. package/registry/dashboard-layout.json +1 -1
  186. package/registry/data-table.json +1 -1
  187. package/registry/date-picker.json +1 -1
  188. package/registry/decision-list.json +1 -1
  189. package/registry/description-list.json +1 -1
  190. package/registry/detail-layout.json +1 -1
  191. package/registry/dialog.json +1 -1
  192. package/registry/docs-article-page.json +1 -1
  193. package/registry/docs-hub-page.json +1 -1
  194. package/registry/docs-layout.json +1 -1
  195. package/registry/docs-nav.json +177 -0
  196. package/registry/document-viewer.json +1 -1
  197. package/registry/dropdown-menu.json +1 -1
  198. package/registry/empty-state.json +1 -1
  199. package/registry/error-page.json +1 -1
  200. package/registry/examples/activity-feed/native/notifications.light.png +0 -0
  201. package/registry/examples/app-header/basic.d.ts +4 -0
  202. package/registry/examples/app-header/basic.js +23 -0
  203. package/registry/examples/app-header/basic.tsx +17 -0
  204. package/registry/examples/app-shell/desktop.d.ts +4 -0
  205. package/registry/examples/app-shell/desktop.js +41 -0
  206. package/registry/examples/app-shell/desktop.tsx +37 -0
  207. package/registry/examples/argument-card/hover-light.d.ts +4 -0
  208. package/registry/examples/argument-card/hover-light.js +17 -0
  209. package/registry/examples/argument-card/hover-light.tsx +19 -0
  210. package/registry/examples/argument-card/hover-quiet.d.ts +4 -0
  211. package/registry/examples/argument-card/hover-quiet.js +17 -0
  212. package/registry/examples/argument-card/hover-quiet.tsx +19 -0
  213. package/registry/examples/avatar/native/group.light.png +0 -0
  214. package/registry/examples/avatar/native/presence.light.png +0 -0
  215. package/registry/examples/avatar/native/sizes.light.png +0 -0
  216. package/registry/examples/badge/native/tones.light.png +0 -0
  217. package/registry/examples/button/native/ghost.light.png +0 -0
  218. package/registry/examples/captcha/disclosure.d.ts +4 -0
  219. package/registry/examples/captcha/disclosure.js +14 -0
  220. package/registry/examples/captcha/disclosure.tsx +11 -0
  221. package/registry/examples/captcha/form.d.ts +4 -0
  222. package/registry/examples/captcha/form.js +18 -0
  223. package/registry/examples/captcha/form.tsx +17 -0
  224. package/registry/examples/card/native/body.light.png +0 -0
  225. package/registry/examples/card/native/default.light.png +0 -0
  226. package/registry/examples/card/native/elevated.light.png +0 -0
  227. package/registry/examples/card/native/pressable.light.png +0 -0
  228. package/registry/examples/card-grid/hover-quiet.d.ts +4 -0
  229. package/registry/examples/card-grid/hover-quiet.js +18 -0
  230. package/registry/examples/card-grid/hover-quiet.tsx +20 -0
  231. package/registry/examples/changelog-page/releases.js +1 -1
  232. package/registry/examples/changelog-page/releases.tsx +1 -1
  233. package/registry/examples/chat/native/conversation.light.png +0 -0
  234. package/registry/examples/chat/native/inbox.light.png +0 -0
  235. package/registry/examples/chip/native/multiple.light.png +0 -0
  236. package/registry/examples/chip/native/removable.light.png +0 -0
  237. package/registry/examples/chip/native/single.light.png +0 -0
  238. package/registry/examples/chip/native/toggle.light.png +0 -0
  239. package/registry/examples/combobox/native/multiple.light.png +0 -0
  240. package/registry/examples/combobox/native/search.light.png +0 -0
  241. package/registry/examples/countdown/native/days.light.png +0 -0
  242. package/registry/examples/countdown/native/hours.light.png +0 -0
  243. package/registry/examples/countdown/native/sizes.light.png +0 -0
  244. package/registry/examples/countdown/native/urgent.light.png +0 -0
  245. package/registry/examples/countdown/native/with-label.light.png +0 -0
  246. package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
  247. package/registry/examples/date-picker/native/birth-date.light.png +0 -0
  248. package/registry/examples/date-picker/native/calendar.dark.png +0 -0
  249. package/registry/examples/date-picker/native/calendar.light.png +0 -0
  250. package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
  251. package/registry/examples/date-picker/native/day-strip.light.png +0 -0
  252. package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
  253. package/registry/examples/date-picker/native/time-slots.light.png +0 -0
  254. package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
  255. package/registry/examples/description-list/native/job-details.light.png +0 -0
  256. package/registry/examples/docs-nav/groups.d.ts +4 -0
  257. package/registry/examples/docs-nav/groups.js +21 -0
  258. package/registry/examples/docs-nav/groups.tsx +15 -0
  259. package/registry/examples/empty-state/native/default.light.png +0 -0
  260. package/registry/examples/field/native/default.light.png +0 -0
  261. package/registry/examples/field/native/select.light.png +0 -0
  262. package/registry/examples/force-update-screen/native/default.light.png +0 -0
  263. package/registry/examples/form/native/amount.light.png +0 -0
  264. package/registry/examples/form/native/audience.light.png +0 -0
  265. package/registry/examples/form/native/profile.light.png +0 -0
  266. package/registry/examples/form/native/settings.light.png +0 -0
  267. package/registry/examples/form/native/sign-up.light.png +0 -0
  268. package/registry/examples/form/native/upload.dark.png +0 -0
  269. package/registry/examples/form/native/upload.light.png +0 -0
  270. package/registry/examples/goal-gauge/native/default.light.png +0 -0
  271. package/registry/examples/header/native/large-title.light.png +0 -0
  272. package/registry/examples/link-card/hover-light.d.ts +4 -0
  273. package/registry/examples/link-card/hover-light.js +18 -0
  274. package/registry/examples/link-card/hover-light.tsx +20 -0
  275. package/registry/examples/link-card/hover-quiet.d.ts +4 -0
  276. package/registry/examples/link-card/hover-quiet.js +18 -0
  277. package/registry/examples/link-card/hover-quiet.tsx +20 -0
  278. package/registry/examples/loader/native/job-wait.light.png +0 -0
  279. package/registry/examples/maintenance-screen/native/default.light.png +0 -0
  280. package/registry/examples/map/native/places.light.png +0 -0
  281. package/registry/examples/markdown/native/basic.light.png +0 -0
  282. package/registry/examples/mascot-state/native/default.light.png +0 -0
  283. package/registry/examples/media-picker/native/story.light.png +0 -0
  284. package/registry/examples/meta-row/native/video.light.png +0 -0
  285. package/registry/examples/meter/native/credits.light.png +0 -0
  286. package/registry/examples/meter/native/split-ring.light.png +0 -0
  287. package/registry/examples/number-ticker/native/balance.light.png +0 -0
  288. package/registry/examples/onboarding/native/first-launch.light.png +0 -0
  289. package/registry/examples/otp-input/native/verify.light.png +0 -0
  290. package/registry/examples/pagination/native/cursor.light.png +0 -0
  291. package/registry/examples/pagination/native/pages.light.png +0 -0
  292. package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
  293. package/registry/examples/permission-prompt/native/camera.light.png +0 -0
  294. package/registry/examples/profile-card/native/default.light.png +0 -0
  295. package/registry/examples/radio-group/native/buttons.light.png +0 -0
  296. package/registry/examples/radio-group/native/cards.light.png +0 -0
  297. package/registry/examples/radio-group/native/list.light.png +0 -0
  298. package/registry/examples/radio-group/native/segmented.light.png +0 -0
  299. package/registry/examples/rail-nav/expandable.d.ts +4 -0
  300. package/registry/examples/rail-nav/expandable.js +34 -0
  301. package/registry/examples/rail-nav/expandable.tsx +28 -0
  302. package/registry/examples/rail-nav/studio.d.ts +4 -0
  303. package/registry/examples/rail-nav/studio.js +43 -0
  304. package/registry/examples/rail-nav/studio.tsx +38 -0
  305. package/registry/examples/screen/native/app-shell.light.png +0 -0
  306. package/registry/examples/screen/native/auth.light.png +0 -0
  307. package/registry/examples/screen/native/map.light.png +0 -0
  308. package/registry/examples/screen/native/notifications.light.png +0 -0
  309. package/registry/examples/screen/native/profile.light.png +0 -0
  310. package/registry/examples/segmented/native/default.light.png +0 -0
  311. package/registry/examples/segmented/native/small.light.png +0 -0
  312. package/registry/examples/settings-layout/flat.d.ts +4 -0
  313. package/registry/examples/settings-layout/flat.js +26 -0
  314. package/registry/examples/settings-layout/flat.tsx +30 -0
  315. package/registry/examples/showcase/native/slides.light.png +0 -0
  316. package/registry/examples/site-footer/app.d.ts +4 -0
  317. package/registry/examples/site-footer/app.js +25 -0
  318. package/registry/examples/site-footer/app.tsx +22 -0
  319. package/registry/examples/site-footer/docs.d.ts +4 -0
  320. package/registry/examples/site-footer/docs.js +31 -0
  321. package/registry/examples/site-footer/docs.tsx +24 -0
  322. package/registry/examples/slider/native/default.light.png +0 -0
  323. package/registry/examples/slider/native/stepped.light.png +0 -0
  324. package/registry/examples/step-progress/native/sign-up.light.png +0 -0
  325. package/registry/examples/stepper/native/run.light.png +0 -0
  326. package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
  327. package/registry/examples/switch/native/settings.light.png +0 -0
  328. package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
  329. package/registry/examples/tabs/native/sections.light.png +0 -0
  330. package/registry/examples/tabs/native/segmented.light.png +0 -0
  331. package/registry/examples/tag-selector/native/interests.light.png +0 -0
  332. package/registry/examples/toast/native/tones.light.png +0 -0
  333. package/registry/examples/txt/native/tones.dark.png +0 -0
  334. package/registry/examples/txt/native/tones.light.png +0 -0
  335. package/registry/examples/update-prompt/native/default.light.png +0 -0
  336. package/registry/examples/waveform/card.d.ts +4 -0
  337. package/registry/examples/waveform/card.js +18 -0
  338. package/registry/examples/waveform/card.tsx +16 -0
  339. package/registry/examples/waveform/native/card.d.ts +4 -0
  340. package/registry/examples/waveform/native/card.dark.png +0 -0
  341. package/registry/examples/waveform/native/card.js +19 -0
  342. package/registry/examples/waveform/native/card.light.png +0 -0
  343. package/registry/examples/waveform/native/card.tsx +19 -0
  344. package/registry/examples/waveform/sizes.d.ts +4 -0
  345. package/registry/examples/waveform/sizes.js +16 -0
  346. package/registry/examples/waveform/sizes.tsx +14 -0
  347. package/registry/field.json +1 -1
  348. package/registry/file-upload.json +1 -1
  349. package/registry/filter-bar.json +1 -1
  350. package/registry/force-update-screen.json +1 -1
  351. package/registry/form.json +1 -1
  352. package/registry/gallery-page.json +1 -1
  353. package/registry/genui.json +3 -3
  354. package/registry/glow-card.json +1 -1
  355. package/registry/goal-gauge.json +1 -1
  356. package/registry/how-it-works-page.json +1 -1
  357. package/registry/image-cropper.json +1 -1
  358. package/registry/index.json +197 -14
  359. package/registry/iso.json +1 -1
  360. package/registry/kanban.json +1 -1
  361. package/registry/kbd.json +1 -1
  362. package/registry/landing-page.json +1 -1
  363. package/registry/landscape.json +1 -1
  364. package/registry/legal-page.json +1 -1
  365. package/registry/link-card.json +38 -6
  366. package/registry/list.json +1 -1
  367. package/registry/loader.json +1 -1
  368. package/registry/longform-page.json +1 -1
  369. package/registry/maintenance-screen.json +1 -1
  370. package/registry/map.json +2 -2
  371. package/registry/markdown.json +1 -1
  372. package/registry/marketing-layout.json +1 -1
  373. package/registry/marquee.json +1 -1
  374. package/registry/mascot-quote.json +1 -1
  375. package/registry/mascot-state.json +1 -1
  376. package/registry/mascots.json +1 -1
  377. package/registry/match-dialog.json +1 -1
  378. package/registry/media-capture.json +1 -1
  379. package/registry/media-grid.json +92 -6
  380. package/registry/meta-row.json +1 -1
  381. package/registry/meter.json +1 -1
  382. package/registry/nav-bar.json +2 -2
  383. package/registry/number-ticker.json +1 -1
  384. package/registry/page-header.json +1 -1
  385. package/registry/page-hero.json +1 -1
  386. package/registry/page.json +1 -1
  387. package/registry/pagination.json +1 -1
  388. package/registry/photo-grid.json +1 -1
  389. package/registry/pointer-light.json +1 -1
  390. package/registry/popover.json +1 -1
  391. package/registry/pricing-page.json +1 -1
  392. package/registry/product-page.json +1 -1
  393. package/registry/profile-card.json +1 -1
  394. package/registry/progress.json +1 -1
  395. package/registry/promise-card.json +1 -1
  396. package/registry/radio-group.json +1 -1
  397. package/registry/rail-nav.json +493 -0
  398. package/registry/recipes.json +1 -1
  399. package/registry/scroll-stage.json +1 -1
  400. package/registry/search-field.json +1 -1
  401. package/registry/section-backdrop.json +1 -1
  402. package/registry/separator.json +1 -1
  403. package/registry/settings-layout.json +104 -9
  404. package/registry/showcase.json +1 -1
  405. package/registry/site-footer.json +38 -6
  406. package/registry/sites.json +1 -1
  407. package/registry/skeleton.json +1 -1
  408. package/registry/skip-link.json +1 -1
  409. package/registry/slider.json +1 -1
  410. package/registry/slot.json +1 -1
  411. package/registry/spinner.json +1 -1
  412. package/registry/split-view.json +1 -1
  413. package/registry/stage-banner.json +1 -1
  414. package/registry/stat.json +1 -1
  415. package/registry/status-page.json +1 -1
  416. package/registry/step-progress.json +1 -1
  417. package/registry/step-showcase.json +1 -1
  418. package/registry/stepper.json +1 -1
  419. package/registry/swipe-deck.json +1 -1
  420. package/registry/switch.json +1 -1
  421. package/registry/tabs.json +2 -2
  422. package/registry/tag-input.json +1 -1
  423. package/registry/tag-selector.json +1 -1
  424. package/registry/terminal-replay.json +1 -1
  425. package/registry/theme.json +1 -1
  426. package/registry/toast.json +1 -1
  427. package/registry/toc.json +1 -1
  428. package/registry/tooltip.json +1 -1
  429. package/registry/tree-view.json +1 -1
  430. package/registry/update-prompt.json +1 -1
  431. package/registry/verified-badge.json +1 -1
  432. package/registry/vertical-video.json +1 -1
  433. package/registry/video-player.json +1 -1
  434. package/registry/video-trimmer.json +1 -1
  435. package/registry/virtual.json +1 -1
  436. package/registry/waveform.json +296 -0
  437. package/dist/chunk-2FRWNSRO.js.map +0 -1
  438. package/dist/chunk-3BC4XQ6C.js.map +0 -1
  439. package/dist/chunk-3IN6TOPM.js.map +0 -1
  440. package/dist/chunk-4LOMIQVX.js.map +0 -1
  441. package/dist/chunk-G3ETON2A.js.map +0 -1
  442. package/dist/chunk-IZ7MV6HM.js.map +0 -1
  443. package/dist/chunk-OWC2LZD2.js.map +0 -1
  444. package/dist/chunk-ZNMFG62E.js.map +0 -1
  445. /package/dist/{chunk-YCIBJ6OQ.js.map → chunk-4DH2HW3D.js.map} +0 -0
  446. /package/dist/{chunk-FKBHWS4N.js.map → chunk-CEJDH6SA.js.map} +0 -0
  447. /package/dist/{chunk-R6NK6ZNY.js.map → chunk-F7FVPPBB.js.map} +0 -0
  448. /package/dist/{chunk-2L67YTNV.js.map → chunk-FTX66XZY.js.map} +0 -0
  449. /package/dist/{chunk-5Z7FWCV2.js.map → chunk-HBZPJ3EP.js.map} +0 -0
  450. /package/dist/{chunk-C2BRIFJG.js.map → chunk-HJFRHYCI.js.map} +0 -0
  451. /package/dist/{chunk-BTMFZ66D.js.map → chunk-KM6VAKIE.js.map} +0 -0
  452. /package/dist/{chunk-DGQMDJXK.js.map → chunk-LZNZLCOE.js.map} +0 -0
  453. /package/dist/{chunk-AQSZJJAJ.js.map → chunk-MQPC3P4T.js.map} +0 -0
@@ -0,0 +1,202 @@
1
+ {
2
+ "name": "app-header",
3
+ "type": "primitive",
4
+ "title": "App header",
5
+ "summary": "The top bar that sits next to a `RailNav`: the product's name as text, optional status chips, and the actions. The mark is the rail's; on a phone, where the rail is a bottom tab bar, the header shows it too, so one mark is visible at every width.",
6
+ "description": "The top bar that sits next to a `RailNav`: the product's name as text, optional status chips, and the actions. The mark is the rail's; on a phone, where the rail is a bottom tab bar, the header shows it too, so one mark is visible at every width.",
7
+ "status": "beta",
8
+ "deprecated": null,
9
+ "category": "navigation",
10
+ "platforms": "web",
11
+ "parity": {
12
+ "web": {
13
+ "state": "yes"
14
+ },
15
+ "native": {
16
+ "state": "n/a",
17
+ "reason": "A native screen has its own header.",
18
+ "use": "header"
19
+ },
20
+ "desktop": {
21
+ "state": "yes"
22
+ }
23
+ },
24
+ "whenToUse": [
25
+ "Beside a `RailNav`, as the bar of every signed-in screen: name, status, theme, notifications, account."
26
+ ],
27
+ "whenNotToUse": [
28
+ {
29
+ "when": "The bar of a site, with its menus and its call to action.",
30
+ "use": "nav-bar"
31
+ },
32
+ {
33
+ "when": "A screen's title and its actions inside an AppShell.",
34
+ "use": "app-shell"
35
+ },
36
+ {
37
+ "when": "A page's title block.",
38
+ "use": "page-header"
39
+ }
40
+ ],
41
+ "bestPractices": [
42
+ "Pass the name as text and the mark as `mark`: never put a mark in the header that the rail already carries on a desktop (`mark` is hidden from `md` up for that reason).",
43
+ "Chips say a state, not a place: « Local · Sovereign », « Dev », a version.",
44
+ "Keep the actions to what changes the session (theme, notifications, account menu): the sections are in the rail.",
45
+ "Make the name a link home with `homeLink` (your router's link) or `href`."
46
+ ],
47
+ "accessibility": {
48
+ "keyboard": [],
49
+ "notes": [
50
+ "A `header` landmark; the name is plain text (the page's `h1` is the screen's, below).",
51
+ "The mark is decorative beside the name: give the home link its name through the visible text."
52
+ ]
53
+ },
54
+ "related": [
55
+ "rail-nav",
56
+ "app-shell",
57
+ "nav-bar",
58
+ "badge",
59
+ "page-header"
60
+ ],
61
+ "web": {
62
+ "entry": "@krizaka/ui/app-header",
63
+ "import": "import { AppHeader } from \"@krizaka/ui/app-header\";",
64
+ "props": [
65
+ {
66
+ "component": "AppHeader",
67
+ "description": "The app's top bar: the name next to the rail, the mark on a phone, chips, actions.",
68
+ "props": [
69
+ {
70
+ "name": "name",
71
+ "type": "string",
72
+ "default": null,
73
+ "description": "The product's name, as text (`Orazaka`): the only brand element on a desktop.",
74
+ "required": true
75
+ },
76
+ {
77
+ "name": "actions",
78
+ "type": "ReactNode",
79
+ "default": null,
80
+ "description": "On the right: theme, notifications, the account menu.",
81
+ "required": false
82
+ },
83
+ {
84
+ "name": "chips",
85
+ "type": "ReactNode",
86
+ "default": null,
87
+ "description": "Status chips beside the name (`Badge`): « Local · Sovereign », « Dev », a version.",
88
+ "required": false
89
+ },
90
+ {
91
+ "name": "homeLink",
92
+ "type": "ReactElement<{ className?: string; children?: ReactNode; }, string | JSXElementConstructor<any>>",
93
+ "default": null,
94
+ "description": "Your router's link element for the home link; it receives the name and the mark as children.",
95
+ "required": false
96
+ },
97
+ {
98
+ "name": "href",
99
+ "type": "string",
100
+ "default": null,
101
+ "description": "Makes the name (and the mark) a link home: pass your router's link as `homeLink` or give a `href`.",
102
+ "required": false
103
+ },
104
+ {
105
+ "name": "mark",
106
+ "type": "ReactNode",
107
+ "default": null,
108
+ "description": "The product's mark (`<ProductLogo id=\"orazaka\" size={22} />`): shown below `md` only, where the rail (which carries it) is a bottom bar.",
109
+ "required": false
110
+ }
111
+ ]
112
+ }
113
+ ],
114
+ "examples": [
115
+ {
116
+ "name": "basic",
117
+ "title": "Name, chip and actions",
118
+ "description": "Orazaka's bar: the name, a « Local · Sovereign » chip, and the theme and account on the right; the mark joins the name below `md`.",
119
+ "path": "examples/app-header/basic.tsx",
120
+ "module": "@krizaka/ui/registry/examples/app-header/basic",
121
+ "code": "import { ProductLogo } from \"@krizaka/ui\";\nimport { AppHeader } from \"@krizaka/ui/app-header\";\nimport { Badge } from \"@krizaka/ui/badge\";\nimport { Button } from \"@krizaka/ui/button\";\n\n// The name is text; the mark shows below `md` only (a desktop's rail carries it). Chips say a state.\nexport default function AppHeaderBasic() {\n return (\n <AppHeader\n name=\"Orazaka\"\n mark={<ProductLogo id=\"orazaka\" size={22} animated={false} />}\n href=\"#home\"\n chips={<Badge tone=\"success\" dot>Local · Sovereign</Badge>}\n actions={<Button size=\"sm\" variant=\"secondary\">Account</Button>}\n />\n );\n}\n"
122
+ }
123
+ ]
124
+ },
125
+ "native": null,
126
+ "files": [
127
+ {
128
+ "path": "app-header/app-header.tsx",
129
+ "content": "// Server-safe: no hook, no context. The top bar that sits next to a `RailNav`: the product's NAME as text (the mark is the\n// rail's), then optional chips, then the actions. Where the rail is a bottom tab bar (a phone) it has no room for the mark,\n// so the header shows it there and only there: exactly one brand mark is visible at every width.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const appHeader = tv({\n slots: {\n root: \"sticky top-0 z-30 flex h-14 w-full shrink-0 items-center gap-3 border-b border-border-subtle bg-surface-1/90 px-4 backdrop-blur-xl md:bg-surface-1 md:pl-3 md:pr-5 md:backdrop-blur-none\",\n // The rail's mark is 56 px tall and so is this bar: the word shares the mark's line, right after the rail.\n brand: \"flex min-w-0 items-center gap-2 font-display text-sm font-bold tracking-tight text-fg no-underline\",\n mark: \"inline-flex shrink-0 md:hidden\",\n name: \"truncate\",\n chips: \"flex shrink-0 items-center gap-2\",\n actions: \"ml-auto flex shrink-0 items-center gap-2\",\n },\n});\nconst s = appHeader();\n\nexport type AppHeaderProps = Omit<React.ComponentProps<\"header\">, \"children\"> & {\n /** The product's name, as text (`Orazaka`): the only brand element on a desktop. */\n name: string;\n /** The product's mark (`<ProductLogo id=\"orazaka\" size={22} />`): shown below `md` only, where the rail (which carries it) is a bottom bar. */\n mark?: React.ReactNode;\n /** Makes the name (and the mark) a link home: pass your router's link as `homeLink` or give a `href`. */\n href?: string;\n /** Your router's link element for the home link; it receives the name and the mark as children. */\n homeLink?: React.ReactElement<{ className?: string; children?: React.ReactNode }>;\n /** Status chips beside the name (`Badge`): « Local · Sovereign », « Dev », a version. */\n chips?: React.ReactNode;\n /** On the right: theme, notifications, the account menu. */\n actions?: React.ReactNode;\n};\n\n/** The app's top bar: the name next to the rail, the mark on a phone, chips, actions. */\nexport function AppHeader({ name, mark, href, homeLink, chips, actions, className, ...props }: AppHeaderProps) {\n const brand = (\n <>\n {mark && <span data-brand-mark className={s.mark()}>{mark}</span>}\n <span className={s.name()}>{name}</span>\n </>\n );\n return (\n <header className={s.root({ className })} {...props}>\n {homeLink ? (\n React.cloneElement(homeLink, { className: s.brand() }, brand)\n ) : href ? (\n <a href={href} className={s.brand()}>{brand}</a>\n ) : (\n <div className={s.brand()}>{brand}</div>\n )}\n {chips && <div className={s.chips()}>{chips}</div>}\n {actions && <div className={s.actions()}>{actions}</div>}\n </header>\n );\n}\n"
130
+ },
131
+ {
132
+ "path": "app-header/index.ts",
133
+ "content": "/** @krizaka/ui/app-header — `AppHeader` (`name`, `mark`, `chips`, `actions`), `appHeader`: the top bar beside a `RailNav`. Server-safe. */\nexport { AppHeader, appHeader, type AppHeaderProps } from \"./app-header\";\n"
134
+ },
135
+ {
136
+ "path": "app-header/meta.ts",
137
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"App header\",\n summary: \"The top bar that sits next to a `RailNav`: the product's name as text, optional status chips, and the actions. The mark is the rail's; on a phone, where the rail is a bottom tab bar, the header shows it too, so one mark is visible at every width.\",\n status: \"beta\",\n category: \"navigation\",\n platforms: \"web\",\n parity: { native: { status: \"n/a\", reason: \"A native screen has its own header.\", use: \"header\" }, desktop: \"web\" },\n whenToUse: [\n \"Beside a `RailNav`, as the bar of every signed-in screen: name, status, theme, notifications, account.\",\n ],\n whenNotToUse: [\n { when: \"The bar of a site, with its menus and its call to action.\", use: \"nav-bar\" },\n { when: \"A screen's title and its actions inside an AppShell.\", use: \"app-shell\" },\n { when: \"A page's title block.\", use: \"page-header\" },\n ],\n bestPractices: [\n \"Pass the name as text and the mark as `mark`: never put a mark in the header that the rail already carries on a desktop (`mark` is hidden from `md` up for that reason).\",\n \"Chips say a state, not a place: « Local · Sovereign », « Dev », a version.\",\n \"Keep the actions to what changes the session (theme, notifications, account menu): the sections are in the rail.\",\n \"Make the name a link home with `homeLink` (your router's link) or `href`.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"A `header` landmark; the name is plain text (the page's `h1` is the screen's, below).\",\n \"The mark is decorative beside the name: give the home link its name through the visible text.\",\n ],\n },\n related: [\"rail-nav\", \"app-shell\", \"nav-bar\", \"badge\", \"page-header\"],\n web: {\n imports: [\"AppHeader\"],\n examples: [\n { name: \"basic\", title: \"Name, chip and actions\", description: \"Orazaka's bar: the name, a « Local · Sovereign » chip, and the theme and account on the right; the mark joins the name below `md`.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
138
+ },
139
+ {
140
+ "path": "meta.ts",
141
+ "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"
142
+ }
143
+ ],
144
+ "dependencies": [
145
+ "tailwind-variants@^3.3.1"
146
+ ],
147
+ "registryDependencies": [],
148
+ "demo": {
149
+ "path": "examples/app-header/basic.tsx",
150
+ "content": "import { ProductLogo } from \"@krizaka/ui\";\nimport { AppHeader } from \"@krizaka/ui/app-header\";\nimport { Badge } from \"@krizaka/ui/badge\";\nimport { Button } from \"@krizaka/ui/button\";\n\n// The name is text; the mark shows below `md` only (a desktop's rail carries it). Chips say a state.\nexport default function AppHeaderBasic() {\n return (\n <AppHeader\n name=\"Orazaka\"\n mark={<ProductLogo id=\"orazaka\" size={22} animated={false} />}\n href=\"#home\"\n chips={<Badge tone=\"success\" dot>Local · Sovereign</Badge>}\n actions={<Button size=\"sm\" variant=\"secondary\">Account</Button>}\n />\n );\n}\n"
151
+ },
152
+ "props": [
153
+ {
154
+ "component": "AppHeader",
155
+ "description": "The app's top bar: the name next to the rail, the mark on a phone, chips, actions.",
156
+ "props": [
157
+ {
158
+ "name": "name",
159
+ "type": "string",
160
+ "default": null,
161
+ "description": "The product's name, as text (`Orazaka`): the only brand element on a desktop.",
162
+ "required": true
163
+ },
164
+ {
165
+ "name": "actions",
166
+ "type": "ReactNode",
167
+ "default": null,
168
+ "description": "On the right: theme, notifications, the account menu.",
169
+ "required": false
170
+ },
171
+ {
172
+ "name": "chips",
173
+ "type": "ReactNode",
174
+ "default": null,
175
+ "description": "Status chips beside the name (`Badge`): « Local · Sovereign », « Dev », a version.",
176
+ "required": false
177
+ },
178
+ {
179
+ "name": "homeLink",
180
+ "type": "ReactElement<{ className?: string; children?: ReactNode; }, string | JSXElementConstructor<any>>",
181
+ "default": null,
182
+ "description": "Your router's link element for the home link; it receives the name and the mark as children.",
183
+ "required": false
184
+ },
185
+ {
186
+ "name": "href",
187
+ "type": "string",
188
+ "default": null,
189
+ "description": "Makes the name (and the mark) a link home: pass your router's link as `homeLink` or give a `href`.",
190
+ "required": false
191
+ },
192
+ {
193
+ "name": "mark",
194
+ "type": "ReactNode",
195
+ "default": null,
196
+ "description": "The product's mark (`<ProductLogo id=\"orazaka\" size={22} />`): shown below `md` only, where the rail (which carries it) is a bottom bar.",
197
+ "required": false
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ }
@@ -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 | \"comparison-table\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"document-viewer\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"force-update-screen\"\n | \"form\"\n | \"gallery-page\"\n | \"genui\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"maintenance-screen\"\n | \"map\"\n | \"markdown\"\n | \"meta-row\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"match-dialog\"\n | \"media-capture\"\n | \"media-grid\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"photo-grid\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"recipes\"\n | \"screen\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"showcase\"\n | \"step-showcase\"\n | \"site-footer\"\n | \"sites\"\n | \"skeleton\"\n | \"skip-link\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"splash-handoff\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"step-progress\"\n | \"stepper\"\n | \"swipe-deck\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"tag-selector\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"update-prompt\"\n | \"verified-badge\"\n | \"vertical-video\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/**\n * Why a component is not on a platform — a decision, never a silence (the parity matrix of ui.krizaka.com/platforms):\n * - `gap` (✗): it belongs there and is not built yet; `issue` is the issue that tracks it (`krizaka/krizaka-ui#275`);\n * - `n/a`: it is not meant for that platform (a site's page block on a phone, a swipe on a desktop); `use` names the\n * component that answers there, when one does.\n */\nexport type Absence =\n | { readonly status: \"gap\"; readonly issue: string; readonly reason: string; readonly use?: undefined }\n | { readonly status: \"n/a\"; readonly reason: string; readonly use?: ComponentName; readonly issue?: undefined };\n\n/**\n * Desktop is the Orazaka Mac app (Tauri 2: the system WebView renders the web components — ADR-002). `web`: the web\n * component runs there as it is; `desktop`: it also has a desktop form (a window's title bar, a denser layout…), said in\n * its documentation; otherwise the absence and why.\n */\nexport type DesktopSupport = \"web\" | \"desktop\" | Absence;\n\n/**\n * The three platforms of Krizaka UI — web · native (React Native, Expo) · desktop — for one component. The side a\n * component has is `platforms`; the side it lacks says why here: `native` is required for (and only for) a web-only\n * component, `web` for a native-only one; `desktop` always. `scripts/registry.test.mjs` fails on a missing decision.\n */\nexport interface Parity {\n readonly web?: Absence;\n readonly native?: Absence;\n readonly desktop: DesktopSupport;\n}\n\n/**\n * `stable`: its API only changes in a major. `beta`: it may still change in a minor. `deprecated`: no product uses it and\n * no work plans to — it still works, says what replaces it, and goes in the major named by `deprecated.removedIn`.\n */\nexport type Status = \"stable\" | \"beta\" | \"deprecated\";\n\n/** What a deprecated component says (required when `status` is `deprecated`, absent otherwise). */\nexport interface Deprecation {\n /** The version that deprecated it (`3.6.0`). */\n readonly since: string;\n /** The major that removes it (`4.0.0`). */\n readonly removedIn: string;\n /** What replaces it, when a component does. */\n readonly use?: ComponentName;\n /** Why it goes: no product uses it, no planned work needs it. */\n readonly reason: string;\n}\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/** Why a reader needs a template: the seven intents the templates are grouped by (sidebar sub-headings, catalogue filter). */\nexport type TemplatePurpose = \"convince\" | \"explain\" | \"show\" | \"act\" | \"operate\" | \"converse\" | \"recover\";\n\n/** The groups of templates, in reading order: the title, and the one line that says when to come to that group. */\nexport const templatePurposes = {\n convince: { title: \"Convince\", useWhen: \"You come here when a visitor must decide: a landing, a product, a price, a comparison, a proof.\" },\n explain: { title: \"Explain\", useWhen: \"You come here when a reader must understand: how it works, a documentation hub or article, a changelog, a FAQ, a policy.\" },\n show: { title: \"Show\", useWhen: \"You come here when the work itself is the argument: a gallery, a story, a case study, an object and its details.\" },\n act: { title: \"Act\", useWhen: \"You come here when a person must do something once: reach the team, sign in or up, set up, pay.\" },\n operate: { title: \"Operate\", useWhen: \"You come here when a person works every day: a dashboard, a console with a table, settings, an app shell.\" },\n converse: { title: \"Converse\", useWhen: \"You come here when people talk: an inbox, a chat, comments, a notifications centre.\" },\n recover: { title: \"Recover\", useWhen: \"You come here when the way is blocked: an empty list, an error, a missing page, maintenance, a product still being built.\" },\n} as const satisfies Record<TemplatePurpose, { readonly title: string; readonly useWhen: string }>;\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\ninterface ExampleBase {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n}\n\n/** A plain example, or a template: a whole screen with its intent (`purpose`) and the user goal its layout serves (`why`). */\nexport type Example =\n | (ExampleBase & { readonly template?: false; readonly purpose?: undefined; readonly why?: undefined })\n | (ExampleBase & {\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its\n * phone version thought out), copied as a starting point — at most 160 lines, listed on ui.krizaka.com/templates.\n */\n readonly template: true;\n /** The intent that groups it: why you need this block. */\n readonly purpose: TemplatePurpose;\n /** Why this layout: the user goal it serves, in one sentence. */\n readonly why: string;\n });\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n /** Required for, and only for, a `deprecated` component. */\n readonly deprecated?: Deprecation;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** The platforms it is not on, and why; and its desktop form (see `Parity`). */\n readonly parity: Parity;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
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)",