@krizaka/ui 3.53.0 → 3.55.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 (504) hide show
  1. package/README.md +1 -0
  2. package/dist/account-menu.d.ts +6 -2
  3. package/dist/account-menu.js +8 -1
  4. package/dist/account-menu.js.map +1 -1
  5. package/dist/account-settings.js +28 -88
  6. package/dist/account-settings.js.map +1 -1
  7. package/dist/anatomy-plate.d.ts +4 -1
  8. package/dist/anatomy-plate.js +4 -0
  9. package/dist/anatomy-plate.js.map +1 -1
  10. package/dist/app-header/search.d.ts +63 -0
  11. package/dist/app-header/search.js +70 -0
  12. package/dist/app-header/search.js.map +1 -0
  13. package/dist/app-header.d.ts +88 -4
  14. package/dist/app-header.js +63 -5
  15. package/dist/app-header.js.map +1 -1
  16. package/dist/app-shell.js +31 -40
  17. package/dist/app-shell.js.map +1 -1
  18. package/dist/argument-card.js +3 -3
  19. package/dist/bird-plate.d.ts +3 -1
  20. package/dist/bird-plate.js +2 -2
  21. package/dist/bird-plate.js.map +1 -1
  22. package/dist/blocks.css +202 -27
  23. package/dist/chapter.d.ts +20 -3
  24. package/dist/chapter.js +82 -31
  25. package/dist/chapter.js.map +1 -1
  26. package/dist/chat.js +2 -2
  27. package/dist/chat.js.map +1 -1
  28. package/dist/checkbox.js +1 -1
  29. package/dist/checkbox.js.map +1 -1
  30. package/dist/chip.js +5 -98
  31. package/dist/chip.js.map +1 -1
  32. package/dist/choice-grid.js +28 -88
  33. package/dist/choice-grid.js.map +1 -1
  34. package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
  35. package/dist/chunk-3X3OF4TI.js.map +1 -0
  36. package/dist/chunk-5VEVYDVC.js +11 -0
  37. package/dist/chunk-5VEVYDVC.js.map +1 -0
  38. package/dist/chunk-7U5TXA5Q.js +105 -0
  39. package/dist/chunk-7U5TXA5Q.js.map +1 -0
  40. package/dist/{chunk-KBQD6HE3.js → chunk-AEP3K4YD.js} +3 -3
  41. package/dist/{chunk-KBQD6HE3.js.map → chunk-AEP3K4YD.js.map} +1 -1
  42. package/dist/chunk-BDIU5LZB.js +18 -0
  43. package/dist/chunk-BDIU5LZB.js.map +1 -0
  44. package/dist/chunk-CSRKYZ53.js +39 -0
  45. package/dist/chunk-CSRKYZ53.js.map +1 -0
  46. package/dist/chunk-HEKDKM5Y.js +128 -0
  47. package/dist/chunk-HEKDKM5Y.js.map +1 -0
  48. package/dist/chunk-KGLRZMCY.js +16 -0
  49. package/dist/chunk-KGLRZMCY.js.map +1 -0
  50. package/dist/chunk-KID32IRJ.js +18 -0
  51. package/dist/chunk-KID32IRJ.js.map +1 -0
  52. package/dist/{chunk-ZQW7LF4Y.js → chunk-OIMXKRXF.js} +2 -2
  53. package/dist/{chunk-YHKTYFOQ.js → chunk-QWKCNSPF.js} +271 -47
  54. package/dist/chunk-QWKCNSPF.js.map +1 -0
  55. package/dist/{chunk-4LYKBSOG.js → chunk-USPOIQV5.js} +2 -2
  56. package/dist/chunk-USPOIQV5.js.map +1 -0
  57. package/dist/{chunk-7NRSPHAF.js → chunk-VB7MWE2N.js} +2 -2
  58. package/dist/{chunk-7NRSPHAF.js.map → chunk-VB7MWE2N.js.map} +1 -1
  59. package/dist/chunk-VIPSZXO4.js +103 -0
  60. package/dist/chunk-VIPSZXO4.js.map +1 -0
  61. package/dist/chunk-YCZ7N6Q6.js +385 -0
  62. package/dist/chunk-YCZ7N6Q6.js.map +1 -0
  63. package/dist/code-block.js +81 -98
  64. package/dist/code-block.js.map +1 -1
  65. package/dist/combobox.js +2 -2
  66. package/dist/component-page.d.ts +4 -1
  67. package/dist/component-page.js +5 -0
  68. package/dist/component-page.js.map +1 -1
  69. package/dist/continue-prompt.d.ts +4 -1
  70. package/dist/continue-prompt.js +4 -0
  71. package/dist/continue-prompt.js.map +1 -1
  72. package/dist/data-table.d.ts +60 -4
  73. package/dist/data-table.js +19 -7
  74. package/dist/date-picker.js +2 -2
  75. package/dist/date-picker.js.map +1 -1
  76. package/dist/detail-layout.d.ts +28 -17
  77. package/dist/detail-layout.js +73 -16
  78. package/dist/detail-layout.js.map +1 -1
  79. package/dist/doodle.d.ts +21 -0
  80. package/dist/doodle.js +39 -0
  81. package/dist/doodle.js.map +1 -0
  82. package/dist/drop-overlay.d.ts +12 -4
  83. package/dist/drop-overlay.js +16 -6
  84. package/dist/drop-overlay.js.map +1 -1
  85. package/dist/elephant.d.ts +2 -0
  86. package/dist/elephant.js +4 -0
  87. package/dist/elephant.js.map +1 -1
  88. package/dist/field.js +1 -1
  89. package/dist/field.js.map +1 -1
  90. package/dist/filter-bar.js +2 -2
  91. package/dist/force-update-screen.d.ts +5 -1
  92. package/dist/force-update-screen.js +4 -0
  93. package/dist/force-update-screen.js.map +1 -1
  94. package/dist/gallery-page.d.ts +4 -1
  95. package/dist/gallery-page.js +4 -0
  96. package/dist/gallery-page.js.map +1 -1
  97. package/dist/genui.js +5 -5
  98. package/dist/image-cropper.d.ts +10 -2
  99. package/dist/image-cropper.js +4 -0
  100. package/dist/image-cropper.js.map +1 -1
  101. package/dist/kanban.d.ts +3 -0
  102. package/dist/kanban.js +4 -0
  103. package/dist/kanban.js.map +1 -1
  104. package/dist/landscape.d.ts +4 -1
  105. package/dist/landscape.js +4 -0
  106. package/dist/landscape.js.map +1 -1
  107. package/dist/list.js +1 -1
  108. package/dist/maintenance-screen.d.ts +5 -1
  109. package/dist/maintenance-screen.js +4 -0
  110. package/dist/maintenance-screen.js.map +1 -1
  111. package/dist/map.js +6 -0
  112. package/dist/map.js.map +1 -1
  113. package/dist/markdown.d.ts +5 -1
  114. package/dist/markdown.js +12 -5
  115. package/dist/markdown.js.map +1 -1
  116. package/dist/match-dialog.d.ts +4 -1
  117. package/dist/match-dialog.js +4 -0
  118. package/dist/match-dialog.js.map +1 -1
  119. package/dist/media-capture.d.ts +6 -1
  120. package/dist/media-capture.js +4 -0
  121. package/dist/media-capture.js.map +1 -1
  122. package/dist/meter.js +5 -121
  123. package/dist/meter.js.map +1 -1
  124. package/dist/native/map.js +6 -0
  125. package/dist/native/map.js.map +1 -1
  126. package/dist/native/markdown.d.ts +9 -2
  127. package/dist/native/markdown.js +46 -7
  128. package/dist/native/markdown.js.map +1 -1
  129. package/dist/native/media-capture.d.ts +1 -0
  130. package/dist/native/media-capture.js +5 -0
  131. package/dist/native/media-capture.js.map +1 -1
  132. package/dist/native/vertical-video.d.ts +8 -2
  133. package/dist/native/vertical-video.js +6 -0
  134. package/dist/native/vertical-video.js.map +1 -1
  135. package/dist/native.d.ts +94 -4
  136. package/dist/native.js +1236 -1110
  137. package/dist/native.js.map +1 -1
  138. package/dist/nav-bar/me.d.ts +32 -0
  139. package/dist/nav-bar/me.js +23 -0
  140. package/dist/nav-bar/me.js.map +1 -0
  141. package/dist/nav-bar.d.ts +60 -2
  142. package/dist/nav-bar.js +92 -48
  143. package/dist/nav-bar.js.map +1 -1
  144. package/dist/notification-preferences.d.ts +151 -0
  145. package/dist/notification-preferences.js +77 -0
  146. package/dist/notification-preferences.js.map +1 -0
  147. package/dist/page-header.js +1 -1
  148. package/dist/page-header.js.map +1 -1
  149. package/dist/pointer-light.js +5 -0
  150. package/dist/pointer-light.js.map +1 -1
  151. package/dist/product-page.d.ts +4 -1
  152. package/dist/product-page.js +4 -0
  153. package/dist/product-page.js.map +1 -1
  154. package/dist/profile-card.d.ts +119 -1
  155. package/dist/profile-card.js +68 -21
  156. package/dist/profile-card.js.map +1 -1
  157. package/dist/promise-card.d.ts +4 -1
  158. package/dist/promise-card.js +4 -0
  159. package/dist/promise-card.js.map +1 -1
  160. package/dist/quota-meter.d.ts +113 -0
  161. package/dist/quota-meter.js +58 -0
  162. package/dist/quota-meter.js.map +1 -0
  163. package/dist/radio-group.js +6 -8
  164. package/dist/radio-group.js.map +1 -1
  165. package/dist/rail-nav.d.ts +18 -2
  166. package/dist/rail-nav.js +25 -2
  167. package/dist/rail-nav.js.map +1 -1
  168. package/dist/retro-tv.d.ts +30 -0
  169. package/dist/retro-tv.js +124 -0
  170. package/dist/retro-tv.js.map +1 -0
  171. package/dist/router.d.ts +12 -1
  172. package/dist/router.js +85 -8
  173. package/dist/router.js.map +1 -1
  174. package/dist/scroll-stage.d.ts +5 -1
  175. package/dist/scroll-stage.js +5 -0
  176. package/dist/scroll-stage.js.map +1 -1
  177. package/dist/search-field.js +1 -1
  178. package/dist/showcase.d.ts +9 -2
  179. package/dist/showcase.js +5 -0
  180. package/dist/showcase.js.map +1 -1
  181. package/dist/signature.d.ts +19 -0
  182. package/dist/signature.js +39 -0
  183. package/dist/signature.js.map +1 -0
  184. package/dist/site-footer.js +1 -1
  185. package/dist/sites.js +1 -1
  186. package/dist/sites.js.map +1 -1
  187. package/dist/slot.d.ts +1 -1
  188. package/dist/stat.js +1 -1
  189. package/dist/stat.js.map +1 -1
  190. package/dist/status-page.d.ts +4 -1
  191. package/dist/status-page.js +5 -0
  192. package/dist/status-page.js.map +1 -1
  193. package/dist/stuck.d.ts +27 -0
  194. package/dist/stuck.js +26 -0
  195. package/dist/stuck.js.map +1 -0
  196. package/dist/swipe-deck.d.ts +9 -2
  197. package/dist/swipe-deck.js +5 -0
  198. package/dist/swipe-deck.js.map +1 -1
  199. package/dist/switch.js +4 -32
  200. package/dist/switch.js.map +1 -1
  201. package/dist/tabs.d.ts +47 -8
  202. package/dist/tabs.js +62 -12
  203. package/dist/tabs.js.map +1 -1
  204. package/dist/tag-input.js +2 -2
  205. package/dist/tag-selector.js +1 -1
  206. package/dist/terminal-replay.d.ts +4 -1
  207. package/dist/terminal-replay.js +4 -0
  208. package/dist/terminal-replay.js.map +1 -1
  209. package/dist/tree-view.js +4 -0
  210. package/dist/tree-view.js.map +1 -1
  211. package/dist/update-prompt.d.ts +5 -1
  212. package/dist/update-prompt.js +4 -0
  213. package/dist/update-prompt.js.map +1 -1
  214. package/dist/video-player.js +7 -376
  215. package/dist/video-player.js.map +1 -1
  216. package/dist/video-trimmer.d.ts +6 -1
  217. package/dist/video-trimmer.js +4 -0
  218. package/dist/video-trimmer.js.map +1 -1
  219. package/package.json +143 -31
  220. package/registry/account-menu.json +9 -8
  221. package/registry/account-settings.json +2 -2
  222. package/registry/achievement.json +3 -4
  223. package/registry/action-bar.json +3 -3
  224. package/registry/action-sheet.json +1 -0
  225. package/registry/activity-feed.json +2 -1
  226. package/registry/agenda.json +1 -1
  227. package/registry/alert.json +1 -1
  228. package/registry/anatomy-plate.json +13 -5
  229. package/registry/app-header.json +470 -23
  230. package/registry/app-shell.json +2 -2
  231. package/registry/argument-card.json +1 -1
  232. package/registry/audio-player.json +1 -1
  233. package/registry/auth-layout.json +1 -1
  234. package/registry/avatar.json +3 -2
  235. package/registry/badge.json +2 -1
  236. package/registry/bird-plate.json +16 -2
  237. package/registry/button.json +7 -6
  238. package/registry/captcha.json +1 -1
  239. package/registry/card-grid.json +1 -1
  240. package/registry/card.json +7 -6
  241. package/registry/catalogue-page.json +3 -4
  242. package/registry/changelog-page.json +3 -5
  243. package/registry/chapter.json +46 -10
  244. package/registry/chat.json +3 -2
  245. package/registry/checkbox.json +4 -3
  246. package/registry/chip-link.json +2 -2
  247. package/registry/chip-row.json +2 -2
  248. package/registry/chip.json +3 -2
  249. package/registry/choice-grid.json +3 -4
  250. package/registry/code-block.json +1 -1
  251. package/registry/combobox.json +3 -2
  252. package/registry/command.json +2 -2
  253. package/registry/comparison-table.json +1 -1
  254. package/registry/component-page.json +14 -5
  255. package/registry/confirm-button.json +4 -4
  256. package/registry/contact-page.json +1 -1
  257. package/registry/continue-prompt.json +13 -5
  258. package/registry/countdown.json +4 -3
  259. package/registry/cover-hero.json +3 -4
  260. package/registry/cta-panel.json +1 -1
  261. package/registry/dashboard-layout.json +1 -1
  262. package/registry/data-table.json +63 -7
  263. package/registry/date-picker.json +5 -4
  264. package/registry/decision-list.json +1 -1
  265. package/registry/description-list.json +2 -1
  266. package/registry/detail-layout.json +30 -6
  267. package/registry/dialog.json +7 -6
  268. package/registry/docs-article-page.json +3 -4
  269. package/registry/docs-hub-page.json +1 -1
  270. package/registry/docs-layout.json +1 -1
  271. package/registry/docs-nav.json +1 -1
  272. package/registry/document-viewer.json +3 -5
  273. package/registry/doodle.json +209 -0
  274. package/registry/drop-overlay.json +30 -16
  275. package/registry/dropdown-menu.json +2 -2
  276. package/registry/elephant.json +15 -7
  277. package/registry/empty-state.json +2 -1
  278. package/registry/engine-flow.json +1 -1
  279. package/registry/error-page.json +3 -5
  280. package/registry/examples/app-header/family.d.ts +4 -0
  281. package/registry/examples/app-header/family.js +41 -0
  282. package/registry/examples/app-header/family.tsx +37 -0
  283. package/registry/examples/app-header/native/family.d.ts +4 -0
  284. package/registry/examples/app-header/native/family.dark.png +0 -0
  285. package/registry/examples/app-header/native/family.js +25 -0
  286. package/registry/examples/app-header/native/family.light.png +0 -0
  287. package/registry/examples/app-header/native/family.tsx +33 -0
  288. package/registry/examples/chapter/album.d.ts +4 -0
  289. package/registry/examples/chapter/album.js +34 -0
  290. package/registry/examples/chapter/album.tsx +30 -0
  291. package/registry/examples/chapter/in-ruled-page.d.ts +4 -0
  292. package/registry/examples/chapter/in-ruled-page.js +23 -0
  293. package/registry/examples/chapter/in-ruled-page.tsx +19 -0
  294. package/registry/examples/data-table/applicant-files.d.ts +4 -0
  295. package/registry/examples/data-table/applicant-files.js +24 -0
  296. package/registry/examples/data-table/applicant-files.tsx +23 -0
  297. package/registry/examples/data-table/checks.d.ts +4 -0
  298. package/registry/examples/data-table/checks.js +25 -0
  299. package/registry/examples/data-table/checks.tsx +24 -0
  300. package/registry/examples/detail-layout/profile.d.ts +4 -0
  301. package/registry/examples/detail-layout/profile.js +26 -0
  302. package/registry/examples/detail-layout/profile.tsx +21 -0
  303. package/registry/examples/doodle/kinds.d.ts +4 -0
  304. package/registry/examples/doodle/kinds.js +17 -0
  305. package/registry/examples/doodle/kinds.tsx +14 -0
  306. package/registry/examples/doodle/margin.d.ts +4 -0
  307. package/registry/examples/doodle/margin.js +17 -0
  308. package/registry/examples/doodle/margin.tsx +17 -0
  309. package/registry/examples/markdown/native/basic.dark.png +0 -0
  310. package/registry/examples/markdown/native/basic.light.png +0 -0
  311. package/registry/examples/markdown/native/wide-table.d.ts +4 -0
  312. package/registry/examples/markdown/native/wide-table.dark.png +0 -0
  313. package/registry/examples/markdown/native/wide-table.js +23 -0
  314. package/registry/examples/markdown/native/wide-table.light.png +0 -0
  315. package/registry/examples/markdown/native/wide-table.tsx +22 -0
  316. package/registry/examples/markdown/wide-table.d.ts +4 -0
  317. package/registry/examples/markdown/wide-table.js +28 -0
  318. package/registry/examples/markdown/wide-table.tsx +23 -0
  319. package/registry/examples/nav-bar/family-product.js +2 -4
  320. package/registry/examples/nav-bar/family-product.tsx +3 -5
  321. package/registry/examples/notification-preferences/default.d.ts +4 -0
  322. package/registry/examples/notification-preferences/default.js +29 -0
  323. package/registry/examples/notification-preferences/default.tsx +28 -0
  324. package/registry/examples/profile-card/banner.d.ts +4 -0
  325. package/registry/examples/profile-card/banner.js +28 -0
  326. package/registry/examples/profile-card/banner.tsx +24 -0
  327. package/registry/examples/profile-card/native/banner.d.ts +4 -0
  328. package/registry/examples/profile-card/native/banner.dark.png +0 -0
  329. package/registry/examples/profile-card/native/banner.js +22 -0
  330. package/registry/examples/profile-card/native/banner.light.png +0 -0
  331. package/registry/examples/profile-card/native/banner.tsx +18 -0
  332. package/registry/examples/quota-meter/default.d.ts +4 -0
  333. package/registry/examples/quota-meter/default.js +26 -0
  334. package/registry/examples/quota-meter/default.tsx +20 -0
  335. package/registry/examples/quota-meter/full.d.ts +4 -0
  336. package/registry/examples/quota-meter/full.js +25 -0
  337. package/registry/examples/quota-meter/full.tsx +18 -0
  338. package/registry/examples/rail-nav/shortcuts.d.ts +4 -0
  339. package/registry/examples/rail-nav/shortcuts.js +49 -0
  340. package/registry/examples/rail-nav/shortcuts.tsx +40 -0
  341. package/registry/examples/retro-tv/cabinet.d.ts +4 -0
  342. package/registry/examples/retro-tv/cabinet.js +12 -0
  343. package/registry/examples/retro-tv/cabinet.tsx +7 -0
  344. package/registry/examples/retro-tv/portable.d.ts +4 -0
  345. package/registry/examples/retro-tv/portable.js +12 -0
  346. package/registry/examples/retro-tv/portable.tsx +7 -0
  347. package/registry/examples/signature/both.d.ts +4 -0
  348. package/registry/examples/signature/both.js +11 -0
  349. package/registry/examples/signature/both.tsx +6 -0
  350. package/registry/examples/signature/variants.d.ts +4 -0
  351. package/registry/examples/signature/variants.js +14 -0
  352. package/registry/examples/signature/variants.tsx +11 -0
  353. package/registry/examples/stuck/card.d.ts +4 -0
  354. package/registry/examples/stuck/card.js +13 -0
  355. package/registry/examples/stuck/card.tsx +14 -0
  356. package/registry/examples/stuck/holds.d.ts +4 -0
  357. package/registry/examples/stuck/holds.js +12 -0
  358. package/registry/examples/stuck/holds.tsx +16 -0
  359. package/registry/examples/stuck/tag.d.ts +4 -0
  360. package/registry/examples/stuck/tag.js +12 -0
  361. package/registry/examples/stuck/tag.tsx +13 -0
  362. package/registry/examples/tabs/binder.d.ts +4 -0
  363. package/registry/examples/tabs/binder.js +22 -0
  364. package/registry/examples/tabs/binder.tsx +20 -0
  365. package/registry/examples/tabs/native/binder.d.ts +4 -0
  366. package/registry/examples/tabs/native/binder.dark.png +0 -0
  367. package/registry/examples/tabs/native/binder.js +26 -0
  368. package/registry/examples/tabs/native/binder.light.png +0 -0
  369. package/registry/examples/tabs/native/binder.tsx +22 -0
  370. package/registry/fab.json +1 -0
  371. package/registry/field.json +3 -2
  372. package/registry/file-upload.json +6 -11
  373. package/registry/filter-bar.json +2 -2
  374. package/registry/flock.json +3 -4
  375. package/registry/footnote.json +2 -3
  376. package/registry/force-update-screen.json +14 -5
  377. package/registry/form.json +5 -4
  378. package/registry/gallery-page.json +14 -5
  379. package/registry/genui.json +2 -2
  380. package/registry/glossary-term.json +1 -1
  381. package/registry/glossary.json +1 -1
  382. package/registry/glow-card.json +2 -2
  383. package/registry/goal-gauge.json +2 -1
  384. package/registry/header.json +1 -0
  385. package/registry/how-it-works-page.json +3 -5
  386. package/registry/image-cropper.json +13 -5
  387. package/registry/image-viewer.json +3 -4
  388. package/registry/index.json +306 -91
  389. package/registry/iso.json +1 -1
  390. package/registry/kanban.json +13 -5
  391. package/registry/kbd.json +1 -1
  392. package/registry/kpi-explained.json +2 -2
  393. package/registry/landing-page.json +3 -5
  394. package/registry/landscape.json +13 -5
  395. package/registry/language-switch.json +1 -1
  396. package/registry/legal-page.json +1 -1
  397. package/registry/link-card.json +1 -1
  398. package/registry/list.json +2 -1
  399. package/registry/loader.json +2 -1
  400. package/registry/longform-page.json +1 -1
  401. package/registry/maintenance-screen.json +14 -5
  402. package/registry/map.json +3 -2
  403. package/registry/markdown.json +86 -9
  404. package/registry/marketing-layout.json +1 -1
  405. package/registry/marquee.json +1 -1
  406. package/registry/mascot-quote.json +1 -1
  407. package/registry/mascot-state.json +12 -11
  408. package/registry/mascots.json +2 -1
  409. package/registry/match-dialog.json +14 -5
  410. package/registry/media-capture.json +14 -5
  411. package/registry/media-gallery.json +3 -5
  412. package/registry/media-grid.json +1 -1
  413. package/registry/media-picker.json +2 -3
  414. package/registry/meta-row.json +2 -1
  415. package/registry/meter.json +4 -3
  416. package/registry/nav-bar.json +100 -9
  417. package/registry/next-actions.json +1 -1
  418. package/registry/notification-preferences.json +250 -0
  419. package/registry/number-ticker.json +2 -1
  420. package/registry/onboarding.json +1 -0
  421. package/registry/opening-hours.json +1 -1
  422. package/registry/otp-input.json +1 -0
  423. package/registry/page-header.json +2 -2
  424. package/registry/page-hero.json +1 -1
  425. package/registry/page-index.json +1 -1
  426. package/registry/page.json +3 -3
  427. package/registry/pagination.json +2 -1
  428. package/registry/permission-prompt.json +2 -2
  429. package/registry/photo-grid.json +4 -4
  430. package/registry/pointer-light.json +6 -2
  431. package/registry/popover.json +2 -2
  432. package/registry/pricing-page.json +4 -6
  433. package/registry/product-page.json +14 -5
  434. package/registry/profile-card.json +232 -8
  435. package/registry/progress.json +4 -3
  436. package/registry/promise-card.json +13 -5
  437. package/registry/pull-to-refresh.json +1 -0
  438. package/registry/quota-meter.json +308 -0
  439. package/registry/radio-group.json +4 -3
  440. package/registry/rail-nav.json +48 -10
  441. package/registry/recipes.json +1 -1
  442. package/registry/retro-tv.json +478 -0
  443. package/registry/router.json +3 -3
  444. package/registry/screen.json +1 -0
  445. package/registry/scroll-stage.json +14 -5
  446. package/registry/search-field.json +3 -2
  447. package/registry/section-backdrop.json +1 -1
  448. package/registry/segmented.json +1 -0
  449. package/registry/separator.json +2 -2
  450. package/registry/service-card.json +1 -1
  451. package/registry/settings-layout.json +2 -1
  452. package/registry/showcase.json +14 -5
  453. package/registry/signature.json +185 -0
  454. package/registry/site-footer.json +3 -3
  455. package/registry/sites.json +2 -2
  456. package/registry/skeleton.json +2 -1
  457. package/registry/skip-link.json +1 -1
  458. package/registry/slider.json +5 -4
  459. package/registry/slot-picker.json +1 -1
  460. package/registry/slot.json +2 -2
  461. package/registry/specimen-tag.json +1 -1
  462. package/registry/spinner.json +4 -3
  463. package/registry/splash-handoff.json +1 -0
  464. package/registry/split-view.json +1 -1
  465. package/registry/stage-banner.json +2 -3
  466. package/registry/stat.json +2 -2
  467. package/registry/status-page.json +13 -5
  468. package/registry/step-progress.json +2 -1
  469. package/registry/step-showcase.json +3 -5
  470. package/registry/stepper.json +2 -1
  471. package/registry/sticky-action.json +1 -1
  472. package/registry/stuck.json +219 -0
  473. package/registry/swipe-deck.json +14 -5
  474. package/registry/swipeable-row.json +1 -0
  475. package/registry/switch.json +3 -2
  476. package/registry/tab-bar.json +1 -0
  477. package/registry/tabs.json +154 -22
  478. package/registry/tag-input.json +1 -1
  479. package/registry/tag-selector.json +2 -1
  480. package/registry/taped-photo.json +1 -1
  481. package/registry/terminal-replay.json +14 -5
  482. package/registry/text-style.json +5 -5
  483. package/registry/theme.json +2 -1
  484. package/registry/toast.json +2 -1
  485. package/registry/toc.json +1 -1
  486. package/registry/tooltip.json +2 -2
  487. package/registry/tree-view.json +6 -2
  488. package/registry/txt.json +1 -0
  489. package/registry/update-prompt.json +14 -5
  490. package/registry/upload-queue.json +1 -1
  491. package/registry/verified-badge.json +6 -6
  492. package/registry/vertical-video.json +8 -3
  493. package/registry/video-player.json +5 -6
  494. package/registry/video-trimmer.json +13 -5
  495. package/registry/virtual.json +2 -2
  496. package/registry/waveform.json +4 -3
  497. package/dist/chunk-4LYKBSOG.js.map +0 -1
  498. package/dist/chunk-HHFWK2HH.js +0 -163
  499. package/dist/chunk-HHFWK2HH.js.map +0 -1
  500. package/dist/chunk-R3LTSMS5.js +0 -75
  501. package/dist/chunk-R3LTSMS5.js.map +0 -1
  502. package/dist/chunk-YGIN2YIY.js.map +0 -1
  503. package/dist/chunk-YHKTYFOQ.js.map +0 -1
  504. /package/dist/{chunk-ZQW7LF4Y.js.map → chunk-OIMXKRXF.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/app-shell/app-shell.tsx","../src/kbd/kbd.tsx","../src/app-shell/shortcuts.ts","../src/media.ts"],"sourcesContent":["// 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 overflow-x-clip 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\",\n brand:\n \"flex h-14 shrink-0 items-center gap-2.5 overflow-hidden whitespace-nowrap px-4 font-display text-[15px] font-bold tracking-tight transition-[font-size,gap,padding] duration-300 motion-reduce:transition-none [[data-desktop]_&]:h-11 \" +\n \"[[data-collapsed]_&]:justify-center [[data-collapsed]_&]:gap-0 [[data-collapsed]_&]:px-0 [[data-collapsed]_&]:text-[0px] [[data-collapsed]_&_a]:gap-0 [[data-collapsed]_&_a]:text-[0px]\",\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 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-sm 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-sm 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 overflow-hidden border-t border-border-subtle p-2\",\n // The words the app puts in the footer (account, version): a text-only footer fades out first (a footer with controls stays, clipped) and the box narrows with the sidebar, so nothing spills over the content; they stay in the tree for screen readers.\n footerContent: \"max-w-full overflow-hidden whitespace-nowrap opacity-100 transition-[max-width,opacity] duration-300 motion-reduce:transition-none [[data-collapsed]_&:not(:has(a,button,input,[role=button]))]:max-w-0 [[data-collapsed]_&:not(:has(a,button,input,[role=button]))]:opacity-0 [[data-collapsed]_&:not(:has(a,button,input,[role=button]))]:duration-150\",\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 px-4 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 && <div className={s.footerContent()}>{footer}</div>}\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","// Server-safe. A key, or a shortcut of several (`<Kbd>⌘</Kbd><Kbd>K</Kbd>`).\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const kbdVariants = tv({\n base:\n \"inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 \" +\n \"font-mono font-semibold text-fg-secondary\",\n variants: { size: { sm: \"h-5 min-w-5 px-1 text-[10px]\", md: \"h-6 min-w-6 px-1.5 text-xs\" } },\n defaultVariants: { size: \"md\" },\n});\n\nexport type KbdProps = React.ComponentProps<\"kbd\"> & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: VariantProps<typeof kbdVariants>[\"size\"];\n};\n\nexport function Kbd({ size, className, ...props }: KbdProps) {\n return <kbd className={kbdVariants({ size, className })} {...props} />;\n}\n","// 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","// Shared by the data and media primitives (client): the clock format, the reduced-motion preference, the\n// in-view observer, a debounced callback. Never an entry of its own.\nimport * as React from \"react\";\n\n/** Seconds as a clock: `75` → `1:15`, `3725` → `1:02:05`. Negative or unknown values read `0:00`. */\nexport function formatClock(seconds: number): string {\n const s = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const h = Math.floor(s / 3600);\n const m = Math.floor((s % 3600) / 60);\n const rest = String(s % 60).padStart(2, \"0\");\n return h > 0 ? `${h}:${String(m).padStart(2, \"0\")}:${rest}` : `${m}:${rest}`;\n}\n\n/** Clamps `value` between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst REDUCE = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduce = (notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => undefined;\n const query = window.matchMedia(REDUCE);\n query.addEventListener?.(\"change\", notify);\n return () => query.removeEventListener?.(\"change\", notify);\n};\n\n/** `true` when the person asked for less motion (`prefers-reduced-motion: reduce`); follows a change of the setting. */\nexport function usePrefersReducedMotion(): boolean {\n return React.useSyncExternalStore(\n subscribeReduce,\n () => (typeof window !== \"undefined\" && window.matchMedia ? window.matchMedia(REDUCE).matches : false),\n () => false,\n );\n}\n\n/** The latest value of a callback, for an effect or an event that must not re-subscribe when it changes. */\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/** Calls `onChange(visible)` when at least `threshold` of the element enters or leaves the viewport. */\nexport function useInView(ref: React.RefObject<Element | null>, onChange: (visible: boolean) => void, enabled = true, threshold = 0.25) {\n const latest = useLatest(onChange);\n React.useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled, threshold, latest]);\n}\n\n/** A value controlled by a prop when it is given, held inside otherwise; `set` calls `onChange` either way. */\nexport function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/** Starts a media element without an unhandled rejection (autoplay refused, the source replaced meanwhile). */\nexport function playSafely(media: HTMLMediaElement | null | undefined) {\n try {\n const started = media?.play() as Promise<void> | undefined;\n started?.catch?.(() => undefined);\n } catch {\n // Not playable here (no media support): the controls stay as they are.\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAWA,SAAS,UAAU,iBAAiB,YAAY;AAChD,YAAYA,YAAW;AACvB,SAAS,MAAAC,WAAU;;;ACXnB,SAAS,UAA6B;AAmB7B;AAjBF,IAAM,cAAc,GAAG;AAAA,EAC5B,MACE;AAAA,EAEF,UAAU,EAAE,MAAM,EAAE,IAAI,gCAAgC,IAAI,6BAA6B,EAAE;AAAA,EAC3F,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;AAUM,SAAS,IAAI,EAAE,MAAM,WAAW,GAAG,MAAM,GAAa;AAC3D,SAAO,oBAAC,SAAI,WAAW,YAAY,EAAE,MAAM,UAAU,CAAC,GAAI,GAAG,OAAO;AACtE;;;ACnBA,YAAYC,YAAW;;;ACDvB,YAAY,WAAW;AAgChB,SAAS,UAAa,OAAU;AACrC,QAAM,MAAY,aAAO,KAAK;AAC9B,EAAM,sBAAgB,MAAM;AAC1B,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO;AACT;;;AD/BA,IAAM,UAAU,MAAM,OAAO,cAAc,eAAe,kBAAkB,KAAK,UAAU,YAAY,UAAU,SAAS;AAE1H,IAAM,UAAkC,EAAE,KAAK,UAAU,QAAQ,SAAS,OAAO,KAAK,UAAU,KAAK,IAAI,WAAW,MAAM,aAAa,MAAM,aAAa,OAAO,cAAc,KAAK,UAAU,MAAM,IAAI;AAMjM,SAAS,WAAW,OAAsB;AAC/C,QAAM,QAAQ,MAAM,YAAY,EAAE,MAAM,GAAG,EAAE,OAAO,OAAO;AAC3D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ACF;AAAA,IACC,SACC,gBAAAA,KAAC,QAAG,WAAW,EAAE,MAAM,GAAI,GAAG,MAC3B,iBACH;AAAA,IAED;AAAA,IACA,WAAW,gBAAAA,KAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,KACpD;AAEJ;AAeO,SAAS,eAAe,EAAE,OAAO,QAAQ,WAAW,SAAS,WAAW,GAAG,MAAM,GAAwB;AAC9G,QAAM,QAAQ,SAAS;AACvB,eAAa,EAAE,CAAC,QAAQ,GAAG,MAAM,OAAO,EAAE,CAAC;AAC3C,SACE,qBAAC,YAAO,MAAK,UAAS,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,GAAG,qBAAmB,iBAAiB,UAAU,KAAK,GAAG,SAAS,QAAS,GAAG,OACnI;AAAA,oBAAAA,KAAC,eAAY;AAAA,IACb,gBAAAA,KAAC,UAAK,WAAW,EAAE,YAAY,GAAI,iBAAM;AAAA,IACzC,gBAAAA,KAAC,UAAK,WAAW,EAAE,WAAW,GAAG,eAAW,MACzC,yBAAe,UAAU,KAAK,EAAE,IAAI,CAAC,QACpC,gBAAAA,KAAC,OAAc,MAAK,MACjB,iBADO,GAEV,CACD,GACH;AAAA,KACF;AAEJ;AAGO,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAiC;AAClF,SAAO,gBAAAA,KAAC,UAAK,IAAG,WAAU,UAAU,IAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACvF;AAEO,IAAM,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;","names":["React","tv","React","key","jsx","tv","value"]}
1
+ {"version":3,"sources":["../src/app-shell/app-shell.tsx","../src/app-shell/shortcuts.ts","../src/media.ts"],"sourcesContent":["// 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 overflow-x-clip 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\",\n brand:\n \"flex h-14 shrink-0 items-center gap-2.5 overflow-hidden whitespace-nowrap px-4 font-display text-[15px] font-bold tracking-tight transition-[font-size,gap,padding] duration-300 motion-reduce:transition-none [[data-desktop]_&]:h-11 \" +\n \"[[data-collapsed]_&]:justify-center [[data-collapsed]_&]:gap-0 [[data-collapsed]_&]:px-0 [[data-collapsed]_&]:text-[0px] [[data-collapsed]_&_a]:gap-0 [[data-collapsed]_&_a]:text-[0px]\",\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 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-sm 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-sm 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 overflow-hidden border-t border-border-subtle p-2\",\n // The words the app puts in the footer (account, version): a text-only footer fades out first (a footer with controls stays, clipped) and the box narrows with the sidebar, so nothing spills over the content; they stay in the tree for screen readers.\n footerContent: \"max-w-full overflow-hidden whitespace-nowrap opacity-100 transition-[max-width,opacity] duration-300 motion-reduce:transition-none [[data-collapsed]_&:not(:has(a,button,input,[role=button]))]:max-w-0 [[data-collapsed]_&:not(:has(a,button,input,[role=button]))]:opacity-0 [[data-collapsed]_&:not(:has(a,button,input,[role=button]))]:duration-150\",\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 px-4 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 && <div className={s.footerContent()}>{footer}</div>}\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","// 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","// Shared by the data and media primitives (client): the clock format, the reduced-motion preference, the\n// in-view observer, a debounced callback. Never an entry of its own.\nimport * as React from \"react\";\n\n/** Seconds as a clock: `75` → `1:15`, `3725` → `1:02:05`. Negative or unknown values read `0:00`. */\nexport function formatClock(seconds: number): string {\n const s = Number.isFinite(seconds) && seconds > 0 ? Math.floor(seconds) : 0;\n const h = Math.floor(s / 3600);\n const m = Math.floor((s % 3600) / 60);\n const rest = String(s % 60).padStart(2, \"0\");\n return h > 0 ? `${h}:${String(m).padStart(2, \"0\")}:${rest}` : `${m}:${rest}`;\n}\n\n/** Clamps `value` between `min` and `max`. */\nexport const clamp = (value: number, min: number, max: number) => Math.min(max, Math.max(min, value));\n\nconst REDUCE = \"(prefers-reduced-motion: reduce)\";\nconst subscribeReduce = (notify: () => void) => {\n if (typeof window === \"undefined\" || !window.matchMedia) return () => undefined;\n const query = window.matchMedia(REDUCE);\n query.addEventListener?.(\"change\", notify);\n return () => query.removeEventListener?.(\"change\", notify);\n};\n\n/** `true` when the person asked for less motion (`prefers-reduced-motion: reduce`); follows a change of the setting. */\nexport function usePrefersReducedMotion(): boolean {\n return React.useSyncExternalStore(\n subscribeReduce,\n () => (typeof window !== \"undefined\" && window.matchMedia ? window.matchMedia(REDUCE).matches : false),\n () => false,\n );\n}\n\n/** The latest value of a callback, for an effect or an event that must not re-subscribe when it changes. */\nexport function useLatest<T>(value: T) {\n const ref = React.useRef(value);\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/** Calls `onChange(visible)` when at least `threshold` of the element enters or leaves the viewport. */\nexport function useInView(ref: React.RefObject<Element | null>, onChange: (visible: boolean) => void, enabled = true, threshold = 0.25) {\n const latest = useLatest(onChange);\n React.useEffect(() => {\n const element = ref.current;\n if (!enabled || !element || typeof IntersectionObserver === \"undefined\") return;\n const observer = new IntersectionObserver(([entry]) => entry && latest.current(entry.isIntersecting), { threshold });\n observer.observe(element);\n return () => observer.disconnect();\n }, [ref, enabled, threshold, latest]);\n}\n\n/** A value controlled by a prop when it is given, held inside otherwise; `set` calls `onChange` either way. */\nexport function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (next: T) => void) {\n const [inner, setInner] = React.useState(defaultValue);\n const controlled = value !== undefined;\n const current = controlled ? value : inner;\n const set = React.useCallback(\n (next: T) => {\n if (!controlled) setInner(next);\n onChange?.(next);\n },\n [controlled, onChange],\n );\n return [current, set] as const;\n}\n\n/** Starts a media element without an unhandled rejection (autoplay refused, the source replaced meanwhile). */\nexport function playSafely(media: HTMLMediaElement | null | undefined) {\n try {\n const started = media?.play() as Promise<void> | undefined;\n started?.catch?.(() => undefined);\n } catch {\n // Not playable here (no media support): the controls stay as they are.\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,SAAS,UAAU,iBAAiB,YAAY;AAChD,YAAYA,YAAW;AACvB,SAAS,UAAU;;;ACVnB,YAAYC,YAAW;;;ACDvB,YAAY,WAAW;AAgChB,SAAS,UAAa,OAAU;AACrC,QAAM,MAAY,aAAO,KAAK;AAC9B,EAAM,sBAAgB,MAAM;AAC1B,QAAI,UAAU;AAAA,EAChB,CAAC;AACD,SAAO;AACT;;;AD/BA,IAAM,UAAU,MAAM,OAAO,cAAc,eAAe,kBAAkB,KAAK,UAAU,YAAY,UAAU,SAAS;AAE1H,IAAM,UAAkC,EAAE,KAAK,UAAU,QAAQ,SAAS,OAAO,KAAK,UAAU,KAAK,IAAI,WAAW,MAAM,aAAa,MAAM,aAAa,OAAO,cAAc,KAAK,UAAU,MAAM,IAAI;AAMjM,SAAS,WAAW,OAAsB;AAC/C,QAAM,QAAQ,MAAM,YAAY,EAAE,MAAM,GAAG,EAAE,OAAO,OAAO;AAC3D,QAAM,MAAM,QAAQ,MAAM,GAAG,EAAE,KAAK,EAAE,KAAK,MAAM,GAAG,EAAE,KAAK;AAC3D,QAAM,MAAM,CAAC,SAAmB,MAAM,MAAM,GAAG,EAAE,EAAE,SAAS,IAAI;AAChE,SAAO,EAAE,KAAK,KAAK,IAAI,KAAK,GAAG,MAAM,IAAI,MAAM,GAAG,KAAK,IAAI,KAAK,GAAG,OAAO,IAA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OACnI;AAAA,wBAAC,eAAY;AAAA,IACb,oBAAC,UAAK,WAAW,EAAE,YAAY,GAAI,iBAAM;AAAA,IACzC,oBAAC,UAAK,WAAW,EAAE,WAAW,GAAG,eAAW,MACzC,yBAAe,UAAU,KAAK,EAAE,IAAI,CAAC,QACpC,oBAAC,OAAc,MAAK,MACjB,iBADO,GAEV,CACD,GACH;AAAA,KACF;AAEJ;AAGO,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAiC;AAClF,SAAO,oBAAC,UAAK,IAAG,WAAU,UAAU,IAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACvF;AAEO,IAAM,WAAW;AAAA,EACtB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,MAAM;AACR;","names":["React","React","key","value"]}
@@ -1,9 +1,9 @@
1
- import {
2
- cardHoverClass
3
- } from "./chunk-7JG3VR4C.js";
4
1
  import {
5
2
  Facts
6
3
  } from "./chunk-YKEIOYJ5.js";
4
+ import {
5
+ cardHoverClass
6
+ } from "./chunk-7JG3VR4C.js";
7
7
  import {
8
8
  BlockLink
9
9
  } from "./chunk-FVGFPB73.js";
@@ -24,6 +24,8 @@ type BirdPlateProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
24
24
  start?: number;
25
25
  /** The word before the number. @default "fig." */
26
26
  figureLabel?: string;
27
+ /** The separator between the figure number and its label. @default " · " */
28
+ separator?: string;
27
29
  /**
28
30
  * `grid` — the figures side by side (two to five); `single` — one large figure, its caption beside it.
29
31
  * @default "grid"
@@ -33,6 +35,6 @@ type BirdPlateProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
33
35
  animated?: boolean;
34
36
  };
35
37
  /** A naturalist's plate of the flock: numbered figures, a leader line from each bird to its caption, its promise. */
36
- declare function BirdPlate({ title, subtitle, figures, start, figureLabel, layout, animated, className, ...props }: BirdPlateProps): React.JSX.Element;
38
+ declare function BirdPlate({ title, subtitle, figures, start, figureLabel, separator, layout, animated, className, ...props }: BirdPlateProps): React.JSX.Element;
37
39
 
38
40
  export { BirdPlate, type BirdPlateProps, type PlateFigure };
@@ -8,7 +8,7 @@ import {
8
8
 
9
9
  // src/bird-plate/bird-plate.tsx
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
11
- function BirdPlate({ title, subtitle, figures, start = 1, figureLabel = "fig.", layout = "grid", animated = false, className, ...props }) {
11
+ function BirdPlate({ title, subtitle, figures, start = 1, figureLabel = "fig.", separator = " \xB7 ", layout = "grid", animated = false, className, ...props }) {
12
12
  const single = layout === "single";
13
13
  return /* @__PURE__ */ jsxs("figure", { className: cn("kz-plate", className), "data-layout": single ? "single" : void 0, ...props, children: [
14
14
  (title || subtitle) && /* @__PURE__ */ jsxs("figcaption", { className: "kz-plate-head", children: [
@@ -22,7 +22,7 @@ function BirdPlate({ title, subtitle, figures, start = 1, figureLabel = "fig.",
22
22
  figureLabel,
23
23
  " ",
24
24
  start + i,
25
- " \u2014 ",
25
+ separator,
26
26
  f.label
27
27
  ] }),
28
28
  f.promise && /* @__PURE__ */ jsxs("span", { children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/bird-plate/bird-plate.tsx"],"sourcesContent":["// Client (each bird has an id per instance). The bird plate of the Cahier (ADR-004, blocks.css): the flock drawn as a\n// naturalist's plate — each bird a figure, numbered, a hairline leading from the drawing to its caption, and the\n// caption is the bird's promise as the film says it. The birds are the `Mascot` renders, never redrawn; one bird per\n// subject (the brand reference, §5).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type MascotBird, type MascotMood, type MascotTone } from \"../mascots/geometry\";\nimport { Mascot } from \"../mascots/mascot\";\n\nexport interface PlateFigure {\n /** The bird. */\n bird: MascotBird;\n /** Its mood. @default \"welcome\" */\n mood?: MascotMood;\n /** `own` — the bird's signature colours (the film's); `brand` — the host's accent. @default \"own\" */\n tone?: MascotTone;\n /** Its name in the caption: `the falcon`. */\n label: React.ReactNode;\n /** Its promise, word for word as the film says it: `keeps watch: security comes first.` */\n promise?: React.ReactNode;\n}\n\nexport type BirdPlateProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The plate's title: `Plate I · The flock`. */\n title?: React.ReactNode;\n /** One line under the title. */\n subtitle?: React.ReactNode;\n /** The figures, in order: each is numbered `fig. n`. */\n figures: readonly PlateFigure[];\n /** The first figure's number (a page that continues a plate). @default 1 */\n start?: number;\n /** The word before the number. @default \"fig.\" */\n figureLabel?: string;\n /**\n * `grid` — the figures side by side (two to five); `single` — one large figure, its caption beside it.\n * @default \"grid\"\n */\n layout?: \"grid\" | \"single\";\n /** The birds' idle loops (they pause off screen and stop under reduced motion). @default false */\n animated?: boolean;\n};\n\n/** A naturalist's plate of the flock: numbered figures, a leader line from each bird to its caption, its promise. */\nexport function BirdPlate({ title, subtitle, figures, start = 1, figureLabel = \"fig.\", layout = \"grid\", animated = false, className, ...props }: BirdPlateProps) {\n const single = layout === \"single\";\n return (\n <figure className={cn(\"kz-plate\", className)} data-layout={single ? \"single\" : undefined} {...props}>\n {(title || subtitle) && (\n <figcaption className=\"kz-plate-head\">\n {title && <span className=\"kz-plate-title\">{title}</span>}\n {subtitle && <span className=\"kz-plate-sub\">{subtitle}</span>}\n </figcaption>\n )}\n <ol className=\"kz-plate-figures\" start={start}>\n {figures.map((f, i) => (\n <li key={i} className=\"kz-plate-figure\">\n <Mascot bird={f.bird} mood={f.mood ?? \"welcome\"} tone={f.tone ?? \"own\"} size={single ? 168 : 112} animated={animated} className=\"kz-plate-bird\" aria-hidden />\n <p className=\"kz-plate-caption\">\n <b>\n {figureLabel} {start + i} — {f.label}\n </b>\n {f.promise && <span> {f.promise}</span>}\n </p>\n </li>\n ))}\n </ol>\n </figure>\n );\n}\n"],"mappings":";;;;;;;;;AAiDQ,SACY,KADZ;AALD,SAAS,UAAU,EAAE,OAAO,UAAU,SAAS,QAAQ,GAAG,cAAc,QAAQ,SAAS,QAAQ,WAAW,OAAO,WAAW,GAAG,MAAM,GAAmB;AAC/J,QAAM,SAAS,WAAW;AAC1B,SACE,qBAAC,YAAO,WAAW,GAAG,YAAY,SAAS,GAAG,eAAa,SAAS,WAAW,QAAY,GAAG,OAC1F;AAAA,cAAS,aACT,qBAAC,gBAAW,WAAU,iBACnB;AAAA,eAAS,oBAAC,UAAK,WAAU,kBAAkB,iBAAM;AAAA,MACjD,YAAY,oBAAC,UAAK,WAAU,gBAAgB,oBAAS;AAAA,OACxD;AAAA,IAEF,oBAAC,QAAG,WAAU,oBAAmB,OAC9B,kBAAQ,IAAI,CAAC,GAAG,MACf,qBAAC,QAAW,WAAU,mBACpB;AAAA,0BAAC,UAAO,MAAM,EAAE,MAAM,MAAM,EAAE,QAAQ,WAAW,MAAM,EAAE,QAAQ,OAAO,MAAM,SAAS,MAAM,KAAK,UAAoB,WAAU,iBAAgB,eAAW,MAAC;AAAA,MAC5J,qBAAC,OAAE,WAAU,oBACX;AAAA,6BAAC,OACE;AAAA;AAAA,UAAY;AAAA,UAAE,QAAQ;AAAA,UAAE;AAAA,UAAI,EAAE;AAAA,WACjC;AAAA,QACC,EAAE,WAAW,qBAAC,UAAK;AAAA;AAAA,UAAE,EAAE;AAAA,WAAQ;AAAA,SAClC;AAAA,SAPO,CAQT,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/bird-plate/bird-plate.tsx"],"sourcesContent":["// Client (each bird has an id per instance). The bird plate of the Cahier (ADR-004, blocks.css): the flock drawn as a\n// naturalist's plate — each bird a figure, numbered, a hairline leading from the drawing to its caption, and the\n// caption is the bird's promise as the film says it. The birds are the `Mascot` renders, never redrawn; one bird per\n// subject (the brand reference, §5).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type MascotBird, type MascotMood, type MascotTone } from \"../mascots/geometry\";\nimport { Mascot } from \"../mascots/mascot\";\n\nexport interface PlateFigure {\n /** The bird. */\n bird: MascotBird;\n /** Its mood. @default \"welcome\" */\n mood?: MascotMood;\n /** `own` — the bird's signature colours (the film's); `brand` — the host's accent. @default \"own\" */\n tone?: MascotTone;\n /** Its name in the caption: `the falcon`. */\n label: React.ReactNode;\n /** Its promise, word for word as the film says it: `keeps watch: security comes first.` */\n promise?: React.ReactNode;\n}\n\nexport type BirdPlateProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The plate's title: `Plate I · The flock`. */\n title?: React.ReactNode;\n /** One line under the title. */\n subtitle?: React.ReactNode;\n /** The figures, in order: each is numbered `fig. n`. */\n figures: readonly PlateFigure[];\n /** The first figure's number (a page that continues a plate). @default 1 */\n start?: number;\n /** The word before the number. @default \"fig.\" */\n figureLabel?: string;\n /** The separator between the figure number and its label. @default \" · \" */\n separator?: string;\n /**\n * `grid` — the figures side by side (two to five); `single` — one large figure, its caption beside it.\n * @default \"grid\"\n */\n layout?: \"grid\" | \"single\";\n /** The birds' idle loops (they pause off screen and stop under reduced motion). @default false */\n animated?: boolean;\n};\n\n/** A naturalist's plate of the flock: numbered figures, a leader line from each bird to its caption, its promise. */\nexport function BirdPlate({ title, subtitle, figures, start = 1, figureLabel = \"fig.\", separator = \" · \", layout = \"grid\", animated = false, className, ...props }: BirdPlateProps) {\n const single = layout === \"single\";\n return (\n <figure className={cn(\"kz-plate\", className)} data-layout={single ? \"single\" : undefined} {...props}>\n {(title || subtitle) && (\n <figcaption className=\"kz-plate-head\">\n {title && <span className=\"kz-plate-title\">{title}</span>}\n {subtitle && <span className=\"kz-plate-sub\">{subtitle}</span>}\n </figcaption>\n )}\n <ol className=\"kz-plate-figures\" start={start}>\n {figures.map((f, i) => (\n <li key={i} className=\"kz-plate-figure\">\n <Mascot bird={f.bird} mood={f.mood ?? \"welcome\"} tone={f.tone ?? \"own\"} size={single ? 168 : 112} animated={animated} className=\"kz-plate-bird\" aria-hidden />\n <p className=\"kz-plate-caption\">\n <b>\n {figureLabel} {start + i}{separator}{f.label}\n </b>\n {f.promise && <span> {f.promise}</span>}\n </p>\n </li>\n ))}\n </ol>\n </figure>\n );\n}\n"],"mappings":";;;;;;;;;AAmDQ,SACY,KADZ;AALD,SAAS,UAAU,EAAE,OAAO,UAAU,SAAS,QAAQ,GAAG,cAAc,QAAQ,YAAY,UAAO,SAAS,QAAQ,WAAW,OAAO,WAAW,GAAG,MAAM,GAAmB;AAClL,QAAM,SAAS,WAAW;AAC1B,SACE,qBAAC,YAAO,WAAW,GAAG,YAAY,SAAS,GAAG,eAAa,SAAS,WAAW,QAAY,GAAG,OAC1F;AAAA,cAAS,aACT,qBAAC,gBAAW,WAAU,iBACnB;AAAA,eAAS,oBAAC,UAAK,WAAU,kBAAkB,iBAAM;AAAA,MACjD,YAAY,oBAAC,UAAK,WAAU,gBAAgB,oBAAS;AAAA,OACxD;AAAA,IAEF,oBAAC,QAAG,WAAU,oBAAmB,OAC9B,kBAAQ,IAAI,CAAC,GAAG,MACf,qBAAC,QAAW,WAAU,mBACpB;AAAA,0BAAC,UAAO,MAAM,EAAE,MAAM,MAAM,EAAE,QAAQ,WAAW,MAAM,EAAE,QAAQ,OAAO,MAAM,SAAS,MAAM,KAAK,UAAoB,WAAU,iBAAgB,eAAW,MAAC;AAAA,MAC5J,qBAAC,OAAE,WAAU,oBACX;AAAA,6BAAC,OACE;AAAA;AAAA,UAAY;AAAA,UAAE,QAAQ;AAAA,UAAG;AAAA,UAAW,EAAE;AAAA,WACzC;AAAA,QACC,EAAE,WAAW,qBAAC,UAAK;AAAA;AAAA,UAAE,EAAE;AAAA,WAAQ;AAAA,SAClC;AAAA,SAPO,CAQT,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}