@krizaka/ui 3.61.0 → 3.63.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 (456) hide show
  1. package/README.md +13 -16
  2. package/dist/account-menu.d.ts +1 -1
  3. package/dist/account-menu.js +1 -1
  4. package/dist/account-settings.d.ts +1 -1
  5. package/dist/account-settings.js +1 -1
  6. package/dist/achievement.d.ts +2 -2
  7. package/dist/achievement.js +1 -1
  8. package/dist/achievement.js.map +1 -1
  9. package/dist/activity-feed.d.ts +1 -1
  10. package/dist/activity-feed.js.map +1 -1
  11. package/dist/app-shell.js.map +1 -1
  12. package/dist/auth-layout.d.ts +1 -1
  13. package/dist/auth-layout.js.map +1 -1
  14. package/dist/avatar/defaults.d.ts +2 -1
  15. package/dist/avatar/defaults.js.map +1 -1
  16. package/dist/{avatar-iajODANU.d.ts → avatar-BL2iG_Js.d.ts} +2 -1
  17. package/dist/avatar.d.ts +3 -2
  18. package/dist/avatar.js.map +1 -1
  19. package/dist/bird-plate.d.ts +1 -1
  20. package/dist/bird-plate.js +1 -1
  21. package/dist/chat.js +1 -1
  22. package/dist/choice-grid.d.ts +1 -1
  23. package/dist/choice-grid.js +1 -1
  24. package/dist/choice-grid.js.map +1 -1
  25. package/dist/{chunk-KB7OLYIJ.js → chunk-7AZ23BUX.js} +1 -1
  26. package/dist/chunk-7AZ23BUX.js.map +1 -0
  27. package/dist/{chunk-4E5IUZHR.js → chunk-B2HS5EAH.js} +1 -1
  28. package/dist/chunk-B2HS5EAH.js.map +1 -0
  29. package/dist/{chunk-MHUUNC5W.js → chunk-DRTIE44Z.js} +1 -1
  30. package/dist/chunk-DRTIE44Z.js.map +1 -0
  31. package/dist/{chunk-555LWYIN.js → chunk-EHTXLZSM.js} +1 -1
  32. package/dist/{chunk-555LWYIN.js.map → chunk-EHTXLZSM.js.map} +1 -1
  33. package/dist/{chunk-3RVFD3UX.js → chunk-PW2FVPTV.js} +1 -1
  34. package/dist/chunk-PW2FVPTV.js.map +1 -0
  35. package/dist/{chunk-MIMOTE4W.js → chunk-RCHKIOVV.js} +1 -1
  36. package/dist/chunk-RCHKIOVV.js.map +1 -0
  37. package/dist/{chunk-XVFQZ3ZG.js → chunk-TPITVAUW.js} +1 -1
  38. package/dist/{chunk-XVFQZ3ZG.js.map → chunk-TPITVAUW.js.map} +1 -1
  39. package/dist/{chunk-LE5NSQEA.js → chunk-Y5YBTHVD.js} +11 -17
  40. package/dist/chunk-Y5YBTHVD.js.map +1 -0
  41. package/dist/continue-prompt.js +1 -1
  42. package/dist/dashboard-layout.js.map +1 -1
  43. package/dist/date-picker.d.ts +15 -15
  44. package/dist/detail-layout.js.map +1 -1
  45. package/dist/elephant.js.map +1 -1
  46. package/dist/engine-flow.d.ts +19 -6
  47. package/dist/engine-flow.js +24 -7
  48. package/dist/engine-flow.js.map +1 -1
  49. package/dist/environment-notice.d.ts +110 -0
  50. package/dist/environment-notice.js +47 -0
  51. package/dist/environment-notice.js.map +1 -0
  52. package/dist/file-upload.d.ts +2 -2
  53. package/dist/filter-bar.d.ts +3 -3
  54. package/dist/flock.js +1 -1
  55. package/dist/{geometry-DZ4Q3hDQ.d.ts → geometry-DDlFDtiQ.d.ts} +3 -4
  56. package/dist/{geometry-DncHaYP8.d.ts → geometry-DuUQyHZ1.d.ts} +3 -4
  57. package/dist/goal-gauge.d.ts +1 -1
  58. package/dist/goal-gauge.js +1 -1
  59. package/dist/goal-gauge.js.map +1 -1
  60. package/dist/index.d.ts +15 -1
  61. package/dist/index.js +1 -1
  62. package/dist/landing-page.d.ts +1 -1
  63. package/dist/landing-page.js.map +1 -1
  64. package/dist/loader.d.ts +1 -1
  65. package/dist/loader.js.map +1 -1
  66. package/dist/mascot-quote.d.ts +1 -1
  67. package/dist/mascot-quote.js +1 -1
  68. package/dist/mascot-state.js +1 -1
  69. package/dist/mascots.d.ts +2 -2
  70. package/dist/mascots.js +1 -1
  71. package/dist/match-dialog.js +1 -1
  72. package/dist/media-grid.d.ts +1 -0
  73. package/dist/media-grid.js +1 -1
  74. package/dist/motion.css +15 -5
  75. package/dist/native.d.ts +39 -10
  76. package/dist/native.js +905 -870
  77. package/dist/native.js.map +1 -1
  78. package/dist/nav-bar.d.ts +1 -1
  79. package/dist/nav-bar.js +2 -2
  80. package/dist/product-page.d.ts +1 -1
  81. package/dist/product-page.js.map +1 -1
  82. package/dist/profile-card.d.ts +1 -1
  83. package/dist/profile-card.js +1 -1
  84. package/dist/profile-card.js.map +1 -1
  85. package/dist/promise-card.js +1 -1
  86. package/dist/rail-nav.d.ts +4 -0
  87. package/dist/scroll-stage.d.ts +1 -1
  88. package/dist/scroll-stage.js +1 -1
  89. package/dist/scroll-stage.js.map +1 -1
  90. package/dist/site-cahier.d.ts +10 -2
  91. package/dist/site-cahier.js +10 -16
  92. package/dist/site-cahier.js.map +1 -1
  93. package/dist/site-footer.d.ts +1 -1
  94. package/dist/site-footer.js +2 -2
  95. package/dist/{sites-BKz1beUK.d.ts → sites-CEnywB89.d.ts} +10 -2
  96. package/dist/sites.d.ts +13 -5
  97. package/dist/sites.js +9 -15
  98. package/dist/sites.js.map +1 -1
  99. package/dist/stage-banner.d.ts +1 -1
  100. package/dist/stage-banner.js +1 -1
  101. package/dist/stage-banner.js.map +1 -1
  102. package/dist/status-page.d.ts +1 -1
  103. package/dist/status-page.js.map +1 -1
  104. package/dist/versus-card.js +1 -1
  105. package/dist/vertical-video.js +1 -1
  106. package/package.json +23 -11
  107. package/registry/account-menu.json +1 -1
  108. package/registry/account-settings.json +1 -1
  109. package/registry/achievement.json +8 -8
  110. package/registry/action-bar.json +1 -1
  111. package/registry/activity-feed.json +8 -8
  112. package/registry/agenda.json +1 -1
  113. package/registry/alert.json +1 -1
  114. package/registry/anatomy-plate.json +1 -1
  115. package/registry/app-header.json +3 -3
  116. package/registry/app-shell.json +10 -10
  117. package/registry/argument-card.json +1 -1
  118. package/registry/audio-player.json +6 -6
  119. package/registry/auth-layout.json +9 -9
  120. package/registry/avatar.json +8 -8
  121. package/registry/badge.json +1 -1
  122. package/registry/bird-plate.json +1 -1
  123. package/registry/button.json +1 -1
  124. package/registry/captcha.json +1 -1
  125. package/registry/card-grid.json +6 -6
  126. package/registry/card.json +1 -1
  127. package/registry/catalogue-page.json +1 -1
  128. package/registry/changelog-page.json +1 -1
  129. package/registry/chapter.json +1 -1
  130. package/registry/chat.json +3 -3
  131. package/registry/checkbox.json +1 -1
  132. package/registry/chip-link.json +1 -1
  133. package/registry/chip-row.json +1 -1
  134. package/registry/chip.json +1 -1
  135. package/registry/choice-grid.json +6 -6
  136. package/registry/code-block.json +1 -1
  137. package/registry/combobox.json +1 -1
  138. package/registry/command.json +1 -1
  139. package/registry/comparison-table.json +1 -1
  140. package/registry/component-page.json +1 -1
  141. package/registry/confirm-button.json +1 -1
  142. package/registry/contact-page.json +1 -1
  143. package/registry/continue-prompt.json +2 -2
  144. package/registry/countdown.json +1 -1
  145. package/registry/cover-hero.json +1 -1
  146. package/registry/cta-panel.json +1 -1
  147. package/registry/dashboard-layout.json +2 -2
  148. package/registry/data-table.json +1 -1
  149. package/registry/date-picker.json +2 -2
  150. package/registry/decision-list.json +1 -1
  151. package/registry/description-list.json +1 -1
  152. package/registry/detail-layout.json +6 -6
  153. package/registry/dialog.json +1 -1
  154. package/registry/docs-article-page.json +1 -1
  155. package/registry/docs-hub-page.json +3 -3
  156. package/registry/docs-layout.json +1 -1
  157. package/registry/docs-nav.json +1 -1
  158. package/registry/document-viewer.json +1 -1
  159. package/registry/doodle.json +1 -1
  160. package/registry/drop-overlay.json +1 -1
  161. package/registry/dropdown-menu.json +1 -1
  162. package/registry/elephant.json +7 -7
  163. package/registry/empty-state.json +2 -2
  164. package/registry/engine-flow.json +42 -8
  165. package/registry/environment-notice.json +270 -0
  166. package/registry/error-page.json +1 -1
  167. package/registry/examples/achievement/arcade.js +1 -1
  168. package/registry/examples/achievement/arcade.tsx +1 -1
  169. package/registry/examples/activity-feed/job-activity.tsx +1 -1
  170. package/registry/examples/app-shell/admin-console.js +1 -1
  171. package/registry/examples/app-shell/admin-console.tsx +2 -2
  172. package/registry/examples/app-shell/basic.js +1 -1
  173. package/registry/examples/app-shell/basic.tsx +1 -1
  174. package/registry/examples/app-shell/{orochia-studio.js → creator-studio.js} +6 -6
  175. package/registry/examples/app-shell/{orochia-studio.tsx → creator-studio.tsx} +4 -4
  176. package/registry/examples/audio-player/podcast.js +1 -1
  177. package/registry/examples/audio-player/podcast.tsx +1 -1
  178. package/registry/examples/audio-player/voice-note.js +1 -1
  179. package/registry/examples/audio-player/voice-note.tsx +1 -1
  180. package/registry/examples/auth-layout/onboarding.js +3 -3
  181. package/registry/examples/auth-layout/onboarding.tsx +3 -3
  182. package/registry/examples/auth-layout/sign-in.js +3 -3
  183. package/registry/examples/auth-layout/sign-in.tsx +3 -3
  184. package/registry/examples/avatar/default.js +1 -1
  185. package/registry/examples/avatar/default.tsx +1 -1
  186. package/registry/examples/card-grid/aligned.js +2 -2
  187. package/registry/examples/card-grid/aligned.tsx +2 -2
  188. package/registry/examples/card-grid/foundation.js +1 -2
  189. package/registry/examples/card-grid/foundation.tsx +1 -2
  190. package/registry/examples/card-grid/hover-quiet.js +1 -1
  191. package/registry/examples/card-grid/hover-quiet.tsx +1 -1
  192. package/registry/examples/card-grid/products.js +1 -1
  193. package/registry/examples/card-grid/products.tsx +1 -1
  194. package/registry/examples/choice-grid/line-up.js +1 -1
  195. package/registry/examples/choice-grid/line-up.tsx +1 -1
  196. package/registry/examples/detail-layout/checkout.js +1 -1
  197. package/registry/examples/detail-layout/checkout.tsx +2 -2
  198. package/registry/examples/detail-layout/video.js +1 -1
  199. package/registry/examples/detail-layout/video.tsx +2 -2
  200. package/registry/examples/docs-hub-page/krizaka.js +1 -1
  201. package/registry/examples/docs-hub-page/krizaka.tsx +1 -1
  202. package/registry/examples/empty-state/library.js +1 -1
  203. package/registry/examples/empty-state/library.tsx +1 -1
  204. package/registry/examples/engine-flow/calm.js +28 -0
  205. package/registry/examples/engine-flow/calm.tsx +25 -0
  206. package/registry/examples/engine-flow/compact.js +4 -4
  207. package/registry/examples/engine-flow/compact.tsx +4 -4
  208. package/registry/examples/engine-flow/radial.js +2 -6
  209. package/registry/examples/engine-flow/radial.tsx +1 -5
  210. package/registry/examples/environment-notice/development.d.ts +4 -0
  211. package/registry/examples/environment-notice/development.js +15 -0
  212. package/registry/examples/environment-notice/development.tsx +13 -0
  213. package/registry/examples/environment-notice/native/development.d.ts +4 -0
  214. package/registry/examples/environment-notice/native/development.dark.png +0 -0
  215. package/registry/examples/environment-notice/native/development.js +21 -0
  216. package/registry/examples/environment-notice/native/development.light.png +0 -0
  217. package/registry/examples/environment-notice/native/development.tsx +17 -0
  218. package/registry/examples/environment-notice/staging.d.ts +4 -0
  219. package/registry/examples/environment-notice/staging.js +11 -0
  220. package/registry/examples/environment-notice/staging.tsx +6 -0
  221. package/registry/examples/force-update-screen/default.js +1 -1
  222. package/registry/examples/force-update-screen/default.tsx +1 -1
  223. package/registry/examples/force-update-screen/native/default.dark.png +0 -0
  224. package/registry/examples/force-update-screen/native/default.js +1 -1
  225. package/registry/examples/force-update-screen/native/default.light.png +0 -0
  226. package/registry/examples/force-update-screen/native/default.tsx +1 -1
  227. package/registry/examples/form/native/sign-up.js +2 -2
  228. package/registry/examples/form/native/sign-up.tsx +2 -2
  229. package/registry/examples/form/sign-up.js +1 -1
  230. package/registry/examples/form/sign-up.tsx +3 -3
  231. package/registry/examples/goal-gauge/arcade.js +1 -1
  232. package/registry/examples/goal-gauge/arcade.tsx +1 -1
  233. package/registry/examples/image-cropper/avatar.js +1 -1
  234. package/registry/examples/image-cropper/avatar.tsx +1 -1
  235. package/registry/examples/image-cropper/banner.js +1 -1
  236. package/registry/examples/image-cropper/banner.tsx +1 -1
  237. package/registry/examples/image-cropper/vertical-video.js +1 -2
  238. package/registry/examples/image-cropper/vertical-video.tsx +1 -3
  239. package/registry/examples/iso/creator-hero.d.ts +4 -0
  240. package/registry/examples/iso/{orochia-hero.js → creator-hero.js} +3 -3
  241. package/registry/examples/iso/{orochia-hero.tsx → creator-hero.tsx} +1 -1
  242. package/registry/examples/landing-page/krizaka.js +2 -2
  243. package/registry/examples/landing-page/krizaka.tsx +2 -2
  244. package/registry/examples/link-card/docs-hub.js +1 -1
  245. package/registry/examples/link-card/docs-hub.tsx +1 -1
  246. package/registry/examples/link-card/hover-quiet.js +1 -1
  247. package/registry/examples/link-card/hover-quiet.tsx +1 -1
  248. package/registry/examples/loader/branded.js +2 -2
  249. package/registry/examples/loader/branded.tsx +3 -3
  250. package/registry/examples/loader/native/branded.dark.png +0 -0
  251. package/registry/examples/loader/native/branded.js +1 -1
  252. package/registry/examples/loader/native/branded.light.png +0 -0
  253. package/registry/examples/loader/native/branded.tsx +2 -2
  254. package/registry/examples/longform-page/story.js +3 -3
  255. package/registry/examples/longform-page/story.tsx +3 -3
  256. package/registry/examples/marketing-layout/docs-hub.js +1 -1
  257. package/registry/examples/marketing-layout/docs-hub.tsx +1 -1
  258. package/registry/examples/mascots/flock.tsx +2 -2
  259. package/registry/examples/nav-bar/family-admin.js +5 -5
  260. package/registry/examples/nav-bar/family-admin.tsx +4 -4
  261. package/registry/examples/nav-bar/site.js +1 -1
  262. package/registry/examples/nav-bar/site.tsx +1 -1
  263. package/registry/examples/permission-prompt/native/blocked.dark.png +0 -0
  264. package/registry/examples/permission-prompt/native/blocked.js +1 -1
  265. package/registry/examples/permission-prompt/native/blocked.tsx +1 -1
  266. package/registry/examples/permission-prompt/native/camera.dark.png +0 -0
  267. package/registry/examples/permission-prompt/native/camera.js +1 -1
  268. package/registry/examples/permission-prompt/native/camera.light.png +0 -0
  269. package/registry/examples/permission-prompt/native/camera.tsx +1 -1
  270. package/registry/examples/profile-card/match.js +1 -1
  271. package/registry/examples/profile-card/match.tsx +1 -1
  272. package/registry/examples/promise-card/arcade.js +1 -1
  273. package/registry/examples/promise-card/arcade.tsx +1 -1
  274. package/registry/examples/pull-to-refresh/native/branded.dark.png +0 -0
  275. package/registry/examples/pull-to-refresh/native/branded.js +1 -1
  276. package/registry/examples/pull-to-refresh/native/branded.light.png +0 -0
  277. package/registry/examples/pull-to-refresh/native/branded.tsx +1 -1
  278. package/registry/examples/rail-nav/expandable.js +3 -3
  279. package/registry/examples/rail-nav/expandable.tsx +3 -3
  280. package/registry/examples/retro-tv/cabinet.js +1 -2
  281. package/registry/examples/retro-tv/cabinet.tsx +1 -3
  282. package/registry/examples/retro-tv/portable.js +1 -2
  283. package/registry/examples/retro-tv/portable.tsx +1 -3
  284. package/registry/examples/scroll-stage/arcade.js +1 -1
  285. package/registry/examples/scroll-stage/arcade.tsx +1 -1
  286. package/registry/examples/search-field/global.js +1 -1
  287. package/registry/examples/search-field/global.tsx +1 -1
  288. package/registry/examples/sites/french.js +1 -1
  289. package/registry/examples/sites/french.tsx +1 -1
  290. package/registry/examples/specimen-tag/wire.js +2 -2
  291. package/registry/examples/specimen-tag/wire.tsx +2 -2
  292. package/registry/examples/splash-handoff/native/default.dark.png +0 -0
  293. package/registry/examples/splash-handoff/native/default.js +1 -1
  294. package/registry/examples/splash-handoff/native/default.light.png +0 -0
  295. package/registry/examples/splash-handoff/native/default.tsx +1 -1
  296. package/registry/examples/split-view/messages.tsx +1 -1
  297. package/registry/examples/split-view/notifications.js +1 -1
  298. package/registry/examples/split-view/notifications.tsx +1 -1
  299. package/registry/examples/status-page/building.js +2 -2
  300. package/registry/examples/status-page/building.tsx +2 -2
  301. package/registry/examples/status-page/operational.js +1 -1
  302. package/registry/examples/status-page/operational.tsx +1 -1
  303. package/registry/examples/tab-bar/native/main-sections.tsx +1 -1
  304. package/registry/examples/tree-view/docs.js +1 -1
  305. package/registry/examples/tree-view/docs.tsx +1 -1
  306. package/registry/examples/video-player/default.js +1 -2
  307. package/registry/examples/video-player/default.tsx +1 -3
  308. package/registry/examples/video-player/gated.js +2 -3
  309. package/registry/examples/video-player/gated.tsx +2 -4
  310. package/registry/examples/video-player/native/default.dark.png +0 -0
  311. package/registry/examples/video-player/native/default.js +3 -3
  312. package/registry/examples/video-player/native/default.light.png +0 -0
  313. package/registry/examples/video-player/native/default.tsx +3 -3
  314. package/registry/examples/video-player/signed-source.js +2 -3
  315. package/registry/examples/video-player/signed-source.tsx +2 -4
  316. package/registry/examples/video-player/vertical.js +1 -2
  317. package/registry/examples/video-player/vertical.tsx +1 -3
  318. package/registry/examples/video-trimmer/filmstrip.js +10 -2
  319. package/registry/examples/video-trimmer/filmstrip.tsx +11 -2
  320. package/registry/examples/video-trimmer/playhead.js +8 -1
  321. package/registry/examples/video-trimmer/playhead.tsx +9 -1
  322. package/registry/field.json +1 -1
  323. package/registry/file-upload.json +2 -2
  324. package/registry/filter-bar.json +1 -1
  325. package/registry/flock.json +1 -1
  326. package/registry/footnote.json +1 -1
  327. package/registry/force-update-screen.json +4 -4
  328. package/registry/form.json +7 -7
  329. package/registry/gallery-page.json +1 -1
  330. package/registry/genui.json +2 -2
  331. package/registry/glossary-term.json +1 -1
  332. package/registry/glossary.json +1 -1
  333. package/registry/glow-card.json +1 -1
  334. package/registry/goal-gauge.json +6 -6
  335. package/registry/grade-stamp.json +1 -1
  336. package/registry/how-it-works-page.json +1 -1
  337. package/registry/image-cropper.json +5 -5
  338. package/registry/index.json +54 -25
  339. package/registry/iso.json +7 -7
  340. package/registry/kanban.json +3 -3
  341. package/registry/kbd.json +1 -1
  342. package/registry/kind-config-editor.json +1 -1
  343. package/registry/kpi-explained.json +2 -2
  344. package/registry/landing-page.json +6 -6
  345. package/registry/landscape.json +1 -1
  346. package/registry/language-switch.json +1 -1
  347. package/registry/legal-page.json +1 -1
  348. package/registry/link-card.json +4 -4
  349. package/registry/list.json +3 -3
  350. package/registry/loader.json +11 -11
  351. package/registry/longform-page.json +3 -3
  352. package/registry/maintenance-screen.json +1 -1
  353. package/registry/map.json +2 -2
  354. package/registry/markdown.json +1 -1
  355. package/registry/marketing-layout.json +2 -2
  356. package/registry/marquee.json +1 -1
  357. package/registry/mascot-quote.json +1 -1
  358. package/registry/mascot-state.json +1 -1
  359. package/registry/mascots.json +5 -5
  360. package/registry/match-dialog.json +1 -1
  361. package/registry/media-capture.json +1 -1
  362. package/registry/media-gallery.json +1 -1
  363. package/registry/media-grid.json +3 -3
  364. package/registry/meta-row.json +1 -1
  365. package/registry/meter.json +1 -1
  366. package/registry/nav-bar.json +9 -9
  367. package/registry/next-actions.json +1 -1
  368. package/registry/notification-preferences.json +3 -3
  369. package/registry/number-ticker.json +1 -1
  370. package/registry/onboarding.json +1 -1
  371. package/registry/opening-hours.json +1 -1
  372. package/registry/page-header.json +1 -1
  373. package/registry/page-hero.json +1 -1
  374. package/registry/page-index.json +1 -1
  375. package/registry/page.json +1 -1
  376. package/registry/pagination.json +1 -1
  377. package/registry/permission-prompt.json +3 -3
  378. package/registry/photo-grid.json +1 -1
  379. package/registry/pointer-light.json +1 -1
  380. package/registry/popover.json +1 -1
  381. package/registry/pricing-page.json +1 -1
  382. package/registry/product-page.json +6 -6
  383. package/registry/profile-card.json +7 -7
  384. package/registry/progress.json +1 -1
  385. package/registry/promise-card.json +3 -3
  386. package/registry/pull-to-refresh.json +2 -2
  387. package/registry/quota-meter.json +1 -1
  388. package/registry/radio-group.json +1 -1
  389. package/registry/rail-nav.json +10 -10
  390. package/registry/recipes.json +1 -1
  391. package/registry/retro-tv.json +4 -4
  392. package/registry/router.json +1 -1
  393. package/registry/scroll-stage.json +6 -6
  394. package/registry/search-field.json +3 -3
  395. package/registry/section-backdrop.json +1 -1
  396. package/registry/separator.json +1 -1
  397. package/registry/service-card.json +1 -1
  398. package/registry/settings-layout.json +1 -1
  399. package/registry/showcase.json +1 -1
  400. package/registry/signature.json +1 -1
  401. package/registry/site-cahier.json +1 -1
  402. package/registry/site-footer.json +7 -7
  403. package/registry/sites.json +4 -4
  404. package/registry/skeleton.json +1 -1
  405. package/registry/skip-link.json +1 -1
  406. package/registry/slider.json +1 -1
  407. package/registry/slot-picker.json +1 -1
  408. package/registry/slot.json +1 -1
  409. package/registry/specimen-tag.json +2 -2
  410. package/registry/speed-lines.json +1 -1
  411. package/registry/spinner.json +1 -1
  412. package/registry/splash-handoff.json +4 -4
  413. package/registry/split-view.json +4 -4
  414. package/registry/stage-banner.json +10 -6
  415. package/registry/stat.json +3 -3
  416. package/registry/status-chip.json +1 -1
  417. package/registry/status-page.json +9 -9
  418. package/registry/step-progress.json +1 -1
  419. package/registry/step-showcase.json +1 -1
  420. package/registry/stepper.json +1 -1
  421. package/registry/sticky-action.json +1 -1
  422. package/registry/stuck.json +1 -1
  423. package/registry/swipe-deck.json +1 -1
  424. package/registry/switch.json +1 -1
  425. package/registry/tab-bar.json +2 -2
  426. package/registry/tabs.json +1 -1
  427. package/registry/tag-input.json +1 -1
  428. package/registry/tag-selector.json +1 -1
  429. package/registry/taped-photo.json +1 -1
  430. package/registry/terminal-replay.json +1 -1
  431. package/registry/text-style.json +1 -1
  432. package/registry/theme.json +1 -1
  433. package/registry/toast.json +1 -1
  434. package/registry/toc.json +1 -1
  435. package/registry/tooltip.json +1 -1
  436. package/registry/tree-view.json +3 -3
  437. package/registry/update-prompt.json +1 -1
  438. package/registry/upload-queue.json +1 -1
  439. package/registry/verified-badge.json +1 -1
  440. package/registry/versus-card.json +1 -1
  441. package/registry/vertical-video.json +4 -4
  442. package/registry/video-player.json +7 -7
  443. package/registry/video-trimmer.json +6 -6
  444. package/registry/virtual.json +1 -1
  445. package/registry/wall.json +1 -1
  446. package/registry/waveform.json +1 -1
  447. package/skills/form/SKILL.md +1 -1
  448. package/skills/map/SKILL.md +2 -2
  449. package/dist/chunk-3RVFD3UX.js.map +0 -1
  450. package/dist/chunk-4E5IUZHR.js.map +0 -1
  451. package/dist/chunk-KB7OLYIJ.js.map +0 -1
  452. package/dist/chunk-LE5NSQEA.js.map +0 -1
  453. package/dist/chunk-MHUUNC5W.js.map +0 -1
  454. package/dist/chunk-MIMOTE4W.js.map +0 -1
  455. /package/registry/examples/app-shell/{orochia-studio.d.ts → creator-studio.d.ts} +0 -0
  456. /package/registry/examples/{iso/orochia-hero.d.ts → engine-flow/calm.d.ts} +0 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  **The Krizaka front-end platform's components, shared by every product.**
11
11
  The primitives (button, badge, avatar, field, theme, countdown…) on the semantic `--kz-*` tokens, the animated marks
12
- of Krizaka, Orazaka, Orochia, Yasakia, Yororis, Yomizaka, Kachizaka and Akinaza, and the Krizaka motion signature — one easing, one way to enter, reveal, roll, shine
12
+ of Krizaka, Orazaka, Yomizaka and Akinaza (the paused products' marks — Orochia, Yasakia, Yororis, Kachizaka — still ship, deprecated until the next major), and the Krizaka motion signature — one easing, one way to enter, reveal, roll, shine
13
13
  and open.
14
14
 
15
15
  [![npm](https://img.shields.io/npm/v/@krizaka/ui?color=196df5&label=npm)](https://www.npmjs.com/package/@krizaka/ui)
@@ -324,13 +324,13 @@ boundary stays where it is: a template is a Server Component.
324
324
 
325
325
  > Category **layouts** of ui.krizaka.com, and **templates**: whole screens composed from the platform.
326
326
 
327
- The shells of the products' screens, read from their real screens (Orochia web, admin and mobile; Orazaka web-client,
327
+ The shells of the products' screens, read from their real screens (Orazaka web-client,
328
328
  web-admin and mobile; krizaka.com): `AppShell` (sidebar that collapses, header, drawer on a phone), `DashboardLayout`
329
329
  (a grid of widgets), `SettingsLayout`, `AuthLayout`, `DetailLayout`, `SplitView`, and for a site `MarketingLayout` and
330
330
  `DocsLayout`. Every layout is responsive by construction — one column, a drawer, chips or a disclosure on a phone.
331
331
 
332
332
  A **template** is an example flagged `template: true` in its layout's `meta.ts` (≤ 160 lines): a complete screen with
333
- real words — Orochia's creator studio, Orazaka's console for Eric, an administration console, sign-in, onboarding,
333
+ real words — a creator studio, Orazaka's console for Eric, an administration console, sign-in, onboarding,
334
334
  settings, a video's page, messages, a product page, pricing and credits, a documentation hub. Each has a phone story
335
335
  (`parameters.phone`: captured at 390 × 844). Copy one into the product, keep its structure, change the words. The
336
336
  React Native shells are `@krizaka/ui/native`'s (DS4): same names where the concept is the same.
@@ -380,8 +380,7 @@ A site that renders the examples adds them to Tailwind's sources: `@source "../n
380
380
 
381
381
  ## React Native
382
382
 
383
- `@krizaka/ui/native` is the platform for the React Native apps
384
- ([orochia-mobile](https://github.com/krizaka/orochia-mobile)): the same primitives as the web, **the same prop names
383
+ `@krizaka/ui/native` is the platform for the React Native apps: the same primitives as the web, **the same prop names
385
384
  where the concept is the same**, the same tokens — `StyleSheet` only, no NativeWind, no dependency beyond
386
385
  `react-native` (≥ 0.76) and `react-native-svg` (≥ 15), which the apps already have. The `@krizaka/tokens/native` values
387
386
  are inlined in the bundle: the app installs nothing else. `react-dom`, `react-native` and `react-native-svg` are
@@ -394,13 +393,13 @@ npm install @krizaka/ui # react, react-native and react-native-svg come from t
394
393
  ### Theme
395
394
 
396
395
  Once, at the root. `mode` is `dark` · `light` · `system` (followed through `useColorScheme`); `overrides` are a
397
- product's roles over the platform's, per theme — e.g. `nativeTheme` from `@krizaka/orochia-design-system/tokens`.
396
+ product's roles over the platform's, per theme — e.g. `nativeTheme` from your product's design system (`@krizaka/<product>-design-system/tokens`).
398
397
  Without a provider, `useTheme()` follows the system with the platform's roles. No storage dependency: the app
399
398
  persists the choice in `onModeChange`.
400
399
 
401
400
  ```tsx
402
401
  import { ThemeProvider, Toaster, useTheme } from "@krizaka/ui/native";
403
- import { nativeTheme } from "@krizaka/orochia-design-system/tokens";
402
+ import { nativeTheme } from "./theme"; // your product's roles
404
403
 
405
404
  <ThemeProvider mode={mode} onModeChange={saveMode} overrides={nativeTheme} fonts={{ display: "Outfit-Bold" }}>
406
405
  <App />
@@ -427,7 +426,7 @@ const { theme, scheme, mode, setMode, radius } = useTheme(); // theme.surface1,
427
426
  | `Segmented` | `options` (`value`, `label`, `disabled`), `value`, `onValueChange`, `size` | The web `Tabs variant="segmented"` (a tab list). To filter, `Chip.Group`. |
428
427
  | `Progress` | `variant` bar·ring, `size`, `value`/`max`, `label`, `valueText`, a ring's centre as children | The fill is the `accent` → `accent2` gradient (react-native-svg); it animates to each new value. |
429
428
  | `Toaster`, `toast` | `toast(title, { description, tone, icon, action, onPress, id, duration, onDismiss })`, `toast.success/warning/error/info`, `toast.dismiss(id?)`; `Toaster closeLabel position offset duration max` | No sonner: a light queue of its own. `offset` takes the safe-area inset (no safe-area dependency). |
430
- | `KrizakaMark`, `OrazakaMark`, `OrochiaMark`, `YasakiaMark`, `YororisMark`, `YomizakaMark`, `KachizakaMark`, `AkinazaMark`, `ProductMark` (`id`) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
429
+ | `KrizakaMark`, `OrazakaMark`, `YomizakaMark`, `AkinazaMark`, `ProductMark` (`id`) — `OrochiaMark`, `YasakiaMark`, `YororisMark`, `KachizakaMark` deprecated (paused products) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
431
430
 
432
431
  Every animation (skeleton, badge dot, urgent countdown, progress, toast entrance, the marks) stops when the system
433
432
  asks to reduce motion (`useReducedMotion()`). Accessibility goes through `role` and `aria-*` (RN ≥ 0.71): headings,
@@ -435,7 +434,7 @@ asks to reduce motion (`useReducedMotion()`). Accessibility goes through `role`
435
434
  region for the toasts.
436
435
 
437
436
  ```tsx
438
- import { Button, Card, Countdown, OrochiaMark } from "@krizaka/ui/native";
437
+ import { Button, Card, Countdown, OrazakaMark } from "@krizaka/ui/native";
439
438
 
440
439
  <Card.Root onPress={open}>
441
440
  <Card.Body>
@@ -445,7 +444,7 @@ import { Button, Card, Countdown, OrochiaMark } from "@krizaka/ui/native";
445
444
  </Card.Body>
446
445
  </Card.Root>
447
446
 
448
- <OrochiaMark size={72} title="Orochia" neutral={theme.borderDefault} />
447
+ <OrazakaMark size={72} title="Orazaka" neutral={theme.borderDefault} />
449
448
  ```
450
449
 
451
450
  The native stories (`Native/*`, rendering the `registry/examples/<name>/native` examples) render through
@@ -457,15 +456,12 @@ Testing Library (`src/native/*.test.tsx`); `scripts/native-dist.mjs` checks that
457
456
  ## The marks
458
457
 
459
458
  ```tsx
460
- import { AkinazaLogo, KachizakaLogo, KrizakaLogo, OrazakaLogo, OrochiaLogo, ProductLogo, WuSamaMark, YasakiaLogo, YomizakaLogo, YororisLogo } from "@krizaka/ui";
459
+ import { AkinazaLogo, KrizakaLogo, OrazakaLogo, ProductLogo, WuSamaMark, YomizakaLogo } from "@krizaka/ui";
461
460
 
462
- <OrochiaLogo size={36} /> // decorative (aria-hidden)
461
+ <OrazakaLogo size={36} /> // decorative (aria-hidden)
463
462
  <KrizakaLogo size={48} title="Krizaka" /> // an image with an accessible name
464
463
  <ProductLogo id="orazaka" animated={false} /> // by id, still
465
- <YasakiaLogo size={32} /> // Yasakia: emerald → turquoise, two voices that meet
466
- <YororisLogo size={32} /> // Yororis: sand → sage, the hold
467
464
  <YomizakaLogo size={32} /> // Yomizaka: ink → indigo, the reading
468
- <KachizakaLogo size={32} /> // Kachizaka: cobalt → gold, the sealed cup
469
465
  <AkinazaLogo size={32} /> // Akinaza: forest → copper, the open shop
470
466
  <WuSamaMark size={32} title="Wu-sama" /> // the founder's byline mark (a person, not a product): a gold W in the Krizaka hexagon
471
467
  ```
@@ -539,7 +535,8 @@ Releases go through [Changesets](https://github.com/changesets/changesets): a pu
539
535
  ## Used by
540
536
 
541
537
  [krizaka.com](https://github.com/krizaka/krizaka-com) ·
542
- [Orochia](https://github.com/krizaka/orochia) (through [`@krizaka/orochia-design-system`](https://github.com/krizaka/orochia-design-system)) ·
538
+ [Yomizaka](https://github.com/krizaka/yomizaka) ·
539
+ [Akinaza](https://github.com/krizaka/akinaza) ·
543
540
  [Orazaka](https://github.com/krizaka/orazaka)
544
541
 
545
542
  ---
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { A as AvatarProps } from './avatar-iajODANU.js';
2
+ import { A as AvatarProps } from './avatar-BL2iG_Js.js';
3
3
  import 'tailwind-variants';
4
4
 
5
5
  interface AccountMenuLink {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Avatar
3
- } from "./chunk-3RVFD3UX.js";
3
+ } from "./chunk-PW2FVPTV.js";
4
4
  import {
5
5
  cn
6
6
  } from "./chunk-S6NYGOJT.js";
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { A as AvatarProps, D as DefaultAvatar } from './avatar-iajODANU.js';
2
+ import { A as AvatarProps, D as DefaultAvatar } from './avatar-BL2iG_Js.js';
3
3
  import { RadioGroup as RadioGroup$1 } from 'radix-ui';
4
4
  import 'tailwind-variants';
5
5
 
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  Avatar,
10
10
  defaultAvatarUrl
11
- } from "./chunk-3RVFD3UX.js";
11
+ } from "./chunk-PW2FVPTV.js";
12
12
  import {
13
13
  cn,
14
14
  twMergeConfig
@@ -19,7 +19,7 @@ type AchievementProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
19
19
  * @default "default"
20
20
  */
21
21
  variant?: StoryVariant;
22
- /** A brand scope (`orochia` → `.brand-orochia`). */
22
+ /** A brand scope (`orazaka` → `.brand-orazaka`). */
23
23
  brand?: string;
24
24
  };
25
25
  /** Something done: an eyebrow, a badge, what it replaced (struck through) and the outcome. */
@@ -34,7 +34,7 @@ type AchievementListProps = React.OlHTMLAttributes<HTMLOListElement> & {
34
34
  minWidth?: string;
35
35
  /** The look of every card: `default` or `arcade`. */
36
36
  variant?: StoryVariant;
37
- /** A brand scope (`orochia` → `.brand-orochia`). */
37
+ /** A brand scope (`orazaka` → `.brand-orazaka`). */
38
38
  brand?: string;
39
39
  };
40
40
  /** An ordered list of `Achievement`s on one grid of hairlines. */
@@ -2,7 +2,7 @@ import {
2
2
  brandClass,
3
3
  cn,
4
4
  storyVariantClass
5
- } from "./chunk-XVFQZ3ZG.js";
5
+ } from "./chunk-TPITVAUW.js";
6
6
 
7
7
  // src/achievement/achievement.tsx
8
8
  import * as React from "react";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/achievement/achievement.tsx"],"sourcesContent":["// Server-safe. Something done, and what it replaced (story.css): a milestone reached, a dare completed, a problem out of\n// the way. A list of them shares one grid of hairlines; in a `Scene` of a `ScrollStage` their badges arrive one by one.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type AchievementProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** What was achieved: the outcome, in a few words. */\n title: React.ReactNode;\n /** A small line above: its number, its kind (“Milestone 03”). */\n eyebrow?: React.ReactNode;\n /** A glyph before the eyebrow (an `Emblem`, an icon). Decorative. */\n icon?: React.ReactNode;\n /** The badge in the corner (“Done”, “Unlocked”, arcade “Sealed”). */\n badge?: React.ReactNode;\n /** What it replaced or overcame, struck through above the title (“Paying 30 % to a platform”). */\n replaced?: React.ReactNode;\n /** Not reached yet: muted, its badge neutral. Say it in the badge too (“Locked”). */\n locked?: boolean;\n /**\n * `default`: a calm badge. `arcade`: a mono stamp that slams onto the card.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`). */\n brand?: string;\n};\n\n/** Something done: an eyebrow, a badge, what it replaced (struck through) and the outcome. */\nexport function Achievement({ title, eyebrow, icon, badge, replaced, locked, variant, brand, className, ...props }: AchievementProps) {\n return (\n <div data-locked={locked ? \"\" : undefined} className={cn(\"kzs-achievement\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n {(eyebrow || badge || icon) && (\n <div className=\"kzs-achievement-head\">\n <span className=\"kzs-achievement-eyebrow\">\n {icon && <span aria-hidden>{icon}</span>}\n {eyebrow}\n </span>\n {badge && <span className=\"kzs-achievement-badge\">{badge}</span>}\n </div>\n )}\n {replaced && (\n <del className=\"kzs-achievement-replaced\" style={{ textDecorationLine: \"line-through\" }}>\n {replaced}\n </del>\n )}\n <p className=\"kzs-achievement-title\">{title}</p>\n </div>\n );\n}\n\nexport type AchievementListProps = React.OlHTMLAttributes<HTMLOListElement> & {\n /** The `Achievement`s, in order: each one becomes an item of the list (its badge arrives after the previous one's). */\n children: React.ReactNode;\n /**\n * The narrowest a card gets before the grid drops a column.\n * @default \"220px\"\n */\n minWidth?: string;\n /** The look of every card: `default` or `arcade`. */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`). */\n brand?: string;\n};\n\n/** An ordered list of `Achievement`s on one grid of hairlines. */\nexport function AchievementList({ children, minWidth, variant, brand, className, style, ...props }: AchievementListProps) {\n const items = React.Children.toArray(children);\n return (\n <ol\n className={cn(\"kzs-achievements\", storyVariantClass(variant), brandClass(brand), className)}\n style={minWidth ? ({ \"--kzs-min\": minWidth, ...style } as React.CSSProperties) : style}\n {...props}\n >\n {items.map((child, i) => (\n <li key={React.isValidElement(child) && child.key != null ? child.key : i} style={{ \"--i\": i } as React.CSSProperties}>\n {child}\n </li>\n ))}\n </ol>\n );\n}\n\nexport type EmblemProps = Omit<React.SVGProps<SVGSVGElement>, \"children\"> & {\n /** The emblem: `sword` (courage, the first step), `mirror` (clarity, honesty), `jewel` (care, what is kept). */\n kind: \"sword\" | \"mirror\" | \"jewel\";\n /**\n * Width and height in pixels.\n * @default 20\n */\n size?: number;\n};\n\n/** Three line emblems for achievements and choices (`currentColor`, decorative). */\nexport function Emblem({ kind, size = 20, ...props }: EmblemProps) {\n return (\n <svg\n viewBox=\"0 0 48 48\"\n width={size}\n height={size}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.4}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n {...props}\n >\n {kind === \"sword\" && (\n <>\n <path d=\"M24 3 L27 28 L24 36 L21 28 Z\" />\n <path d=\"M15 30 H33 M24 36 V45\" />\n </>\n )}\n {kind === \"mirror\" && (\n <>\n <circle cx=\"24\" cy=\"24\" r=\"17\" />\n <circle cx=\"24\" cy=\"24\" r=\"9\" />\n <path d=\"M24 2 V6 M24 42 V46 M2 24 H6 M42 24 H46\" />\n </>\n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,EAAE,GAC1F,mBADY,qBAAe,KAAK,KAAK,MAAM,OAAO,OAAO,MAAM,MAAM,CAExE,CACD;AAAA;AAAA,EACH;AAEJ;AAaO,SAAS,OAAO,EAAE,MAAM,OAAO,IAAI,GAAG,MAAM,GAAgB;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAa;AAAA,MACb,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MACT,GAAG;AAAA,MAEH;AAAA,iBAAS,WACR,iCACE;AAAA,8BAAC,UAAK,GAAE,gCAA+B;AAAA,UACvC,oBAAC,UAAK,GAAE,yBAAwB;AAAA,WAClC;AAAA,QAED,SAAS,YACR,iCACE;AAAA,8BAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,UAC/B,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,UAC9B,oBAAC,UAAK,GAAE,2CAA0C;AAAA,WACpD;AAAA,QAED,SAAS,WACR,iCACE;AAAA,8BAAC,UAAK,GAAE,iEAAgE;AAAA,UACxE,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,OAAM,MAAK,gBAAe,QAAO,QAAO;AAAA,WACpE;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/achievement/achievement.tsx"],"sourcesContent":["// Server-safe. Something done, and what it replaced (story.css): a milestone reached, a dare completed, a problem out of\n// the way. A list of them shares one grid of hairlines; in a `Scene` of a `ScrollStage` their badges arrive one by one.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type AchievementProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** What was achieved: the outcome, in a few words. */\n title: React.ReactNode;\n /** A small line above: its number, its kind (“Milestone 03”). */\n eyebrow?: React.ReactNode;\n /** A glyph before the eyebrow (an `Emblem`, an icon). Decorative. */\n icon?: React.ReactNode;\n /** The badge in the corner (“Done”, “Unlocked”, arcade “Sealed”). */\n badge?: React.ReactNode;\n /** What it replaced or overcame, struck through above the title (“Paying 30 % to a platform”). */\n replaced?: React.ReactNode;\n /** Not reached yet: muted, its badge neutral. Say it in the badge too (“Locked”). */\n locked?: boolean;\n /**\n * `default`: a calm badge. `arcade`: a mono stamp that slams onto the card.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orazaka` → `.brand-orazaka`). */\n brand?: string;\n};\n\n/** Something done: an eyebrow, a badge, what it replaced (struck through) and the outcome. */\nexport function Achievement({ title, eyebrow, icon, badge, replaced, locked, variant, brand, className, ...props }: AchievementProps) {\n return (\n <div data-locked={locked ? \"\" : undefined} className={cn(\"kzs-achievement\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n {(eyebrow || badge || icon) && (\n <div className=\"kzs-achievement-head\">\n <span className=\"kzs-achievement-eyebrow\">\n {icon && <span aria-hidden>{icon}</span>}\n {eyebrow}\n </span>\n {badge && <span className=\"kzs-achievement-badge\">{badge}</span>}\n </div>\n )}\n {replaced && (\n <del className=\"kzs-achievement-replaced\" style={{ textDecorationLine: \"line-through\" }}>\n {replaced}\n </del>\n )}\n <p className=\"kzs-achievement-title\">{title}</p>\n </div>\n );\n}\n\nexport type AchievementListProps = React.OlHTMLAttributes<HTMLOListElement> & {\n /** The `Achievement`s, in order: each one becomes an item of the list (its badge arrives after the previous one's). */\n children: React.ReactNode;\n /**\n * The narrowest a card gets before the grid drops a column.\n * @default \"220px\"\n */\n minWidth?: string;\n /** The look of every card: `default` or `arcade`. */\n variant?: StoryVariant;\n /** A brand scope (`orazaka` → `.brand-orazaka`). */\n brand?: string;\n};\n\n/** An ordered list of `Achievement`s on one grid of hairlines. */\nexport function AchievementList({ children, minWidth, variant, brand, className, style, ...props }: AchievementListProps) {\n const items = React.Children.toArray(children);\n return (\n <ol\n className={cn(\"kzs-achievements\", storyVariantClass(variant), brandClass(brand), className)}\n style={minWidth ? ({ \"--kzs-min\": minWidth, ...style } as React.CSSProperties) : style}\n {...props}\n >\n {items.map((child, i) => (\n <li key={React.isValidElement(child) && child.key != null ? child.key : i} style={{ \"--i\": i } as React.CSSProperties}>\n {child}\n </li>\n ))}\n </ol>\n );\n}\n\nexport type EmblemProps = Omit<React.SVGProps<SVGSVGElement>, \"children\"> & {\n /** The emblem: `sword` (courage, the first step), `mirror` (clarity, honesty), `jewel` (care, what is kept). */\n kind: \"sword\" | \"mirror\" | \"jewel\";\n /**\n * Width and height in pixels.\n * @default 20\n */\n size?: number;\n};\n\n/** Three line emblems for achievements and choices (`currentColor`, decorative). */\nexport function Emblem({ kind, size = 20, ...props }: EmblemProps) {\n return (\n <svg\n viewBox=\"0 0 48 48\"\n width={size}\n height={size}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.4}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n {...props}\n >\n {kind === \"sword\" && (\n <>\n <path d=\"M24 3 L27 28 L24 36 L21 28 Z\" />\n <path d=\"M15 30 H33 M24 36 V45\" />\n </>\n )}\n {kind === \"mirror\" && (\n <>\n <circle cx=\"24\" cy=\"24\" r=\"17\" />\n <circle cx=\"24\" cy=\"24\" r=\"9\" />\n <path d=\"M24 2 V6 M24 42 V46 M2 24 H6 M42 24 H46\" />\n </>\n )}\n {kind === \"jewel\" && (\n <>\n <path d=\"M31 10 a13 13 0 1 1 -15 19 a8 8 0 0 0 8 -9 a8 8 0 0 1 7 -10 Z\" />\n <circle cx=\"29\" cy=\"17\" r=\"2.6\" fill=\"currentColor\" stroke=\"none\" />\n </>\n )}\n </svg>\n );\n}\n"],"mappings":";;;;;;;AAEA,YAAY,WAAW;AAiCb,SA4EF,UA3Ea,KADX;AALH,SAAS,YAAY,EAAE,OAAO,S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A,MACP,aAAa;AAAA,MACb,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MACT,GAAG;AAAA,MAEH;AAAA,iBAAS,WACR,iCACE;AAAA,8BAAC,UAAK,GAAE,gCAA+B;AAAA,UACvC,oBAAC,UAAK,GAAE,yBAAwB;AAAA,WAClC;AAAA,QAED,SAAS,YACR,iCACE;AAAA,8BAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,UAC/B,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,UAC9B,oBAAC,UAAK,GAAE,2CAA0C;AAAA,WACpD;AAAA,QAED,SAAS,WACR,iCACE;AAAA,8BAAC,UAAK,GAAE,iEAAgE;AAAA,UACxE,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,OAAM,MAAK,gBAAe,QAAO,QAAO;AAAA,WACpE;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -178,7 +178,7 @@ type ActivityFeedProps<T extends ActivityEvent> = {
178
178
  };
179
179
  /**
180
180
  * What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events
181
- * announced when `live`. Orazaka's job activity, Orochia's notifications, the console's audit log.
181
+ * announced when `live`. Orazaka's job activity, a creator's notifications, the console's audit log.
182
182
  */
183
183
  declare function ActivityFeed<T extends ActivityEvent>({ events, "aria-label": label, locale, now: given, ticking, fold, live, leading, action, labels: words, empty, className }: ActivityFeedProps<T>): React.JSX.Element;
184
184
  type TimelineProps<T extends ActivityEvent> = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/activity-feed/activity-feed.tsx","../src/activity-feed/group.ts"],"sourcesContent":["// Client (the clock of “… ago”, the announcement of new events). What happened, newest first: an activity feed\n// grouped by day with folded runs and relative times, announced politely when it is live; and a `Timeline` — one\n// thing's history on a rail, oldest first. Words are props.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { type ActivityEvent, type ActivityTone, groupActivity, timeAgo } from \"./group\";\n\nexport const activityFeed = tv({\n slots: {\n root: \"flex flex-col gap-5\",\n group: \"flex flex-col gap-1\",\n heading: \"sticky top-0 z-10 bg-surface-0 py-1 text-xs font-semibold text-fg-secondary\",\n ol: \"m-0 flex list-none flex-col p-0\",\n item: \"relative flex gap-3 py-2.5\",\n marker: \"relative mt-1 flex h-2.5 w-2.5 shrink-0 rounded-full bg-[var(--kz-af-tone)] ring-4 ring-surface-0\",\n rail: \"absolute left-[4.5px] top-5 -bottom-1 w-px bg-border-default\",\n body: \"flex min-w-0 flex-1 flex-col\",\n title: \"text-sm text-fg\",\n count: \"ml-1.5 inline-flex rounded-sm bg-surface-3 px-1.5 text-xs font-semibold tabular-nums text-fg-secondary\",\n description: \"text-xs text-fg-secondary\",\n time: \"shrink-0 pt-0.5 text-xs tabular-nums text-fg-secondary\",\n leading: \"shrink-0\",\n },\n});\n\nconst TONE: Record<ActivityTone, string> = {\n neutral: \"var(--kz-border-strong)\",\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success)\",\n warning: \"var(--kz-warning)\",\n danger: \"var(--kz-danger)\",\n info: \"var(--kz-info)\",\n};\n\nexport type ActivityFeedLabels = {\n /** The heading of today's events. */\n today: string;\n /** The heading of yesterday's. */\n yesterday: string;\n /** A folded run: `(n) => \"×\" + n` (“3 times”). */\n times: (count: number) => string;\n /** Announced when new events arrive in a live feed: `(n) => n + \" new events\"`. */\n newEvents: (count: number) => string;\n};\n\nexport const activityFeedLabels: ActivityFeedLabels = {\n today: \"Today\",\n yesterday: \"Yesterday\",\n times: (count) => `×${count}`,\n newEvents: (count) => (count === 1 ? \"1 new event\" : `${count} new events`),\n};\n\nexport type ActivityFeedProps<T extends ActivityEvent> = {\n /** The events, in any order. */\n events: readonly T[];\n /** The feed's accessible name (“Activity”). */\n \"aria-label\": string;\n /** The locale of the dates and the “… ago”. Default `en-US`. */\n locale?: string;\n /** Now, for the “… ago” and the day headings (pass it from the server for the same text on both sides). */\n now?: Date;\n /** Refresh the “… ago” every minute. Default true. */\n ticking?: boolean;\n /** Fold the runs of the same actor and kind. Default true. */\n fold?: boolean;\n /** Announce new events politely (a stream). */\n live?: boolean;\n /** Before an event's text: its actor's `Avatar`, an icon. */\n leading?: (event: T) => React.ReactNode;\n /** After an event's text: an action (Reply, View). */\n action?: (event: T) => React.ReactNode;\n /** The words, passed translated; English by default. */\n labels?: Partial<ActivityFeedLabels>;\n /** Shown when there is no event (an `EmptyState`). */\n empty?: React.ReactNode;\n /** Classes merged on the root. */\n className?: string;\n};\n\nfunction useNow(initial: Date | undefined, ticking: boolean) {\n const [now, setNow] = React.useState(() => initial ?? new Date());\n React.useEffect(() => {\n if (!ticking) return;\n const timer = setInterval(() => setNow(new Date()), 60_000);\n return () => clearInterval(timer);\n }, [ticking]);\n return now;\n}\n\n/**\n * What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events\n * announced when `live`. Orazaka's job activity, Orochia's notifications, the console's audit log.\n */\nexport function ActivityFeed<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", now: given, ticking = true, fold = true, live, leading, action, labels: words, empty, className }: ActivityFeedProps<T>) {\n const labels = { ...activityFeedLabels, ...words };\n const s = activityFeed();\n const now = useNow(given, ticking && !given);\n const groups = groupActivity(events, { now, locale, today: labels.today, yesterday: labels.yesterday, fold });\n const seen = React.useRef(events.length);\n const [announcement, setAnnouncement] = React.useState(\"\");\n React.useEffect(() => {\n const added = events.length - seen.current;\n seen.current = events.length;\n if (!live || added <= 0) return;\n const timer = setTimeout(() => setAnnouncement(labels.newEvents(added)), 0);\n return () => clearTimeout(timer);\n }, [events.length, live]); // eslint-disable-line react-hooks/exhaustive-deps -- announce on a new count only\n return (\n <section aria-label={label} className={s.root({ className })}>\n {live ? (\n <p className=\"sr-only\" aria-live=\"polite\">\n {announcement}\n </p>\n ) : null}\n {groups.length === 0 && empty ? empty : null}\n {groups.map((group) => (\n <div key={group.label} className={s.group()}>\n <h3 className={s.heading()}>{group.label}</h3>\n <ol className={s.ol()}>\n {group.events.map(({ event, count }) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n {leading ? <span className={s.leading()}>{leading(event)}</span> : <span aria-hidden className={s.marker()} />}\n <span className={s.body()}>\n <span className={s.title()}>\n {event.title}\n {count > 1 ? <span className={s.count()}>{labels.times(count)}</span> : null}\n </span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} title={date.toLocaleString(locale)} className={s.time()}>\n {timeAgo(date, { now, locale })}\n </time>\n {action ? <span className=\"shrink-0\">{action(event)}</span> : null}\n </li>\n );\n })}\n </ol>\n </div>\n ))}\n </section>\n );\n}\n\nexport type TimelineProps<T extends ActivityEvent> = {\n /** One thing's events, oldest first (a job's run, a payout's life). */\n events: readonly T[];\n /** The timeline's accessible name (“History of the payout”). */\n \"aria-label\": string;\n /** The locale of the times. Default `en-US`. */\n locale?: string;\n /** How a time is written: `time` (14:02, default), `datetime`, `date`. */\n timeStyle?: \"time\" | \"datetime\" | \"date\";\n /** Classes merged on the list. */\n className?: string;\n};\n\n/** One thing's history on a rail, oldest first: each event a marker in its tone, its time and its words. */\nexport function Timeline<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", timeStyle = \"time\", className }: TimelineProps<T>) {\n const s = activityFeed();\n const options: Intl.DateTimeFormatOptions =\n timeStyle === \"time\" ? { hour: \"2-digit\", minute: \"2-digit\" } : timeStyle === \"date\" ? { dateStyle: \"medium\" } : { dateStyle: \"medium\", timeStyle: \"short\" };\n const write = new Intl.DateTimeFormat(locale, options);\n return (\n <ol aria-label={label} className={s.ol({ className })}>\n {events.map((event, i) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n <span aria-hidden className={s.marker()} />\n {i < events.length - 1 ? <span aria-hidden className={s.rail()} /> : null}\n <span className={s.body()}>\n <span className={s.title()}>{event.title}</span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} className={s.time()}>\n {write.format(date)}\n </time>\n </li>\n );\n })}\n </ol>\n );\n}\n","// Shared by the web and React Native ActivityFeed: the events grouped by day (“Today”, “Yesterday”, a date), the same\n// events of one actor in a row folded into one (“Mina tipped 3 times”), and how long ago each happened — Intl only.\n\nexport type ActivityTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport type ActivityEvent = {\n /** A stable id. */\n id: string;\n /** When it happened: an ISO date-time, an epoch in ms or a `Date`. */\n at: string | number | Date;\n /** What happened, in a sentence — passed translated (“Mina tipped your video $5”). */\n title: string;\n /** A detail under it. */\n description?: string;\n /** Who did it (folds a run of the same `kind` by the same actor). */\n actor?: string;\n /** The kind of event (`tip`, `bid`, `job.done`): with `actor`, what folds. */\n kind?: string;\n /** The tone of its marker: success for a payout, danger for a failure. */\n tone?: ActivityTone;\n};\n\nexport type ActivityGroup<T extends ActivityEvent> = {\n /** The day's heading (“Today”, “Yesterday”, “Monday, Oct 6”). */\n label: string;\n /** Its events, newest first; a folded run is its newest event with `count` > 1. */\n events: { event: T; count: number }[];\n};\n\nconst dayKey = (date: Date) => `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;\n\n/** Groups events (any order) by day, newest first, folding runs of the same actor and kind when `fold` is set. */\nexport function groupActivity<T extends ActivityEvent>(\n events: readonly T[],\n { now = new Date(), locale = \"en-US\", today = \"Today\", yesterday = \"Yesterday\", fold = true }: { now?: Date; locale?: string; today?: string; yesterday?: string; fold?: boolean } = {},\n): ActivityGroup<T>[] {\n const sorted = [...events].sort((a, b) => new Date(b.at).getTime() - new Date(a.at).getTime());\n const day = new Intl.DateTimeFormat(locale, { weekday: \"long\", month: \"short\", day: \"numeric\" });\n const todayKey = dayKey(now);\n const yesterdayKey = dayKey(new Date(now.getTime() - 86_400_000));\n const groups: ActivityGroup<T>[] = [];\n let current: ActivityGroup<T> | null = null;\n let currentKey = \"\";\n for (const event of sorted) {\n const date = new Date(event.at);\n const key = dayKey(date);\n if (!current || key !== currentKey) {\n currentKey = key;\n current = { label: key === todayKey ? today : key === yesterdayKey ? yesterday : day.format(date), events: [] };\n groups.push(current);\n }\n const last = current.events[current.events.length - 1];\n if (fold && last && event.actor && event.kind && last.event.actor === event.actor && last.event.kind === event.kind) last.count += 1;\n else current.events.push({ event, count: 1 });\n }\n return groups;\n}\n\nconst UNITS: [Intl.RelativeTimeFormatUnit, number][] = [\n [\"second\", 60],\n [\"minute\", 60],\n [\"hour\", 24],\n [\"day\", 7],\n [\"week\", 4.35],\n [\"month\", 12],\n [\"year\", Number.POSITIVE_INFINITY],\n];\n\n/** “2 minutes ago”, “yesterday”: how long ago, in the largest unit that reads well (`style` short: “2 min. ago”). */\nexport function timeAgo(at: string | number | Date, { now = new Date(), locale = \"en-US\", style = \"short\" }: { now?: Date; locale?: string; style?: \"long\" | \"short\" | \"narrow\" } = {}): string {\n let value = (new Date(at).getTime() - now.getTime()) / 1000;\n let unit: Intl.RelativeTimeFormatUnit = \"second\";\n for (const [name, size] of UNITS) {\n unit = name;\n if (Math.abs(value) < size - 0.5) break;\n value /= size;\n }\n return new Intl.RelativeTimeFormat(locale, { numeric: \"auto\", style }).format(Math.round(value) + 0, unit);\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACyBnB,IAAM,SAAS,CAAC,SAAe,GAAG,KAAK,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC;AAGlF,SAAS,cACd,QACA,EAAE,MAAM,oBAAI,KAAK,GAAG,SAAS,SAAS,QAAQ,SAAS,YAAY,aAAa,OAAO,KAAK,IAAyF,CAAC,GAClK;AACpB,QAAM,SAAS,CAAC,GAAG,MAAM,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O,WAAW,EAAE,GAAG,EAAE,UAAU,CAAC,GACjD,iBAAO,IAAI,CAAC,OAAO,MAAM;AACxB,UAAM,OAAO,IAAI,KAAK,MAAM,EAAE;AAC9B,WACE,qBAAC,QAAkB,WAAW,EAAE,KAAK,GAAG,OAAO,EAAE,CAAC,cAAwB,GAAG,KAAK,MAAM,QAAQ,SAAS,EAAE,GACzG;AAAA,0BAAC,UAAK,eAAW,MAAC,WAAW,EAAE,OAAO,GAAG;AAAA,MACxC,IAAI,OAAO,SAAS,IAAI,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,MACrE,qBAAC,UAAK,WAAW,EAAE,KAAK,GACtB;AAAA,4BAAC,UAAK,WAAW,EAAE,MAAM,GAAI,gBAAM,OAAM;AAAA,QACxC,MAAM,cAAc,oBAAC,UAAK,WAAW,EAAE,YAAY,GAAI,gBAAM,aAAY,IAAU;AAAA,SACtF;AAAA,MACA,oBAAC,UAAK,UAAU,KAAK,YAAY,GAAG,WAAW,EAAE,KAAK,GACnD,gBAAM,OAAO,IAAI,GACpB;AAAA,SATO,MAAM,EAUf;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/activity-feed/activity-feed.tsx","../src/activity-feed/group.ts"],"sourcesContent":["// Client (the clock of “… ago”, the announcement of new events). What happened, newest first: an activity feed\n// grouped by day with folded runs and relative times, announced politely when it is live; and a `Timeline` — one\n// thing's history on a rail, oldest first. Words are props.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { type ActivityEvent, type ActivityTone, groupActivity, timeAgo } from \"./group\";\n\nexport const activityFeed = tv({\n slots: {\n root: \"flex flex-col gap-5\",\n group: \"flex flex-col gap-1\",\n heading: \"sticky top-0 z-10 bg-surface-0 py-1 text-xs font-semibold text-fg-secondary\",\n ol: \"m-0 flex list-none flex-col p-0\",\n item: \"relative flex gap-3 py-2.5\",\n marker: \"relative mt-1 flex h-2.5 w-2.5 shrink-0 rounded-full bg-[var(--kz-af-tone)] ring-4 ring-surface-0\",\n rail: \"absolute left-[4.5px] top-5 -bottom-1 w-px bg-border-default\",\n body: \"flex min-w-0 flex-1 flex-col\",\n title: \"text-sm text-fg\",\n count: \"ml-1.5 inline-flex rounded-sm bg-surface-3 px-1.5 text-xs font-semibold tabular-nums text-fg-secondary\",\n description: \"text-xs text-fg-secondary\",\n time: \"shrink-0 pt-0.5 text-xs tabular-nums text-fg-secondary\",\n leading: \"shrink-0\",\n },\n});\n\nconst TONE: Record<ActivityTone, string> = {\n neutral: \"var(--kz-border-strong)\",\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success)\",\n warning: \"var(--kz-warning)\",\n danger: \"var(--kz-danger)\",\n info: \"var(--kz-info)\",\n};\n\nexport type ActivityFeedLabels = {\n /** The heading of today's events. */\n today: string;\n /** The heading of yesterday's. */\n yesterday: string;\n /** A folded run: `(n) => \"×\" + n` (“3 times”). */\n times: (count: number) => string;\n /** Announced when new events arrive in a live feed: `(n) => n + \" new events\"`. */\n newEvents: (count: number) => string;\n};\n\nexport const activityFeedLabels: ActivityFeedLabels = {\n today: \"Today\",\n yesterday: \"Yesterday\",\n times: (count) => `×${count}`,\n newEvents: (count) => (count === 1 ? \"1 new event\" : `${count} new events`),\n};\n\nexport type ActivityFeedProps<T extends ActivityEvent> = {\n /** The events, in any order. */\n events: readonly T[];\n /** The feed's accessible name (“Activity”). */\n \"aria-label\": string;\n /** The locale of the dates and the “… ago”. Default `en-US`. */\n locale?: string;\n /** Now, for the “… ago” and the day headings (pass it from the server for the same text on both sides). */\n now?: Date;\n /** Refresh the “… ago” every minute. Default true. */\n ticking?: boolean;\n /** Fold the runs of the same actor and kind. Default true. */\n fold?: boolean;\n /** Announce new events politely (a stream). */\n live?: boolean;\n /** Before an event's text: its actor's `Avatar`, an icon. */\n leading?: (event: T) => React.ReactNode;\n /** After an event's text: an action (Reply, View). */\n action?: (event: T) => React.ReactNode;\n /** The words, passed translated; English by default. */\n labels?: Partial<ActivityFeedLabels>;\n /** Shown when there is no event (an `EmptyState`). */\n empty?: React.ReactNode;\n /** Classes merged on the root. */\n className?: string;\n};\n\nfunction useNow(initial: Date | undefined, ticking: boolean) {\n const [now, setNow] = React.useState(() => initial ?? new Date());\n React.useEffect(() => {\n if (!ticking) return;\n const timer = setInterval(() => setNow(new Date()), 60_000);\n return () => clearInterval(timer);\n }, [ticking]);\n return now;\n}\n\n/**\n * What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events\n * announced when `live`. Orazaka's job activity, a creator's notifications, the console's audit log.\n */\nexport function ActivityFeed<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", now: given, ticking = true, fold = true, live, leading, action, labels: words, empty, className }: ActivityFeedProps<T>) {\n const labels = { ...activityFeedLabels, ...words };\n const s = activityFeed();\n const now = useNow(given, ticking && !given);\n const groups = groupActivity(events, { now, locale, today: labels.today, yesterday: labels.yesterday, fold });\n const seen = React.useRef(events.length);\n const [announcement, setAnnouncement] = React.useState(\"\");\n React.useEffect(() => {\n const added = events.length - seen.current;\n seen.current = events.length;\n if (!live || added <= 0) return;\n const timer = setTimeout(() => setAnnouncement(labels.newEvents(added)), 0);\n return () => clearTimeout(timer);\n }, [events.length, live]); // eslint-disable-line react-hooks/exhaustive-deps -- announce on a new count only\n return (\n <section aria-label={label} className={s.root({ className })}>\n {live ? (\n <p className=\"sr-only\" aria-live=\"polite\">\n {announcement}\n </p>\n ) : null}\n {groups.length === 0 && empty ? empty : null}\n {groups.map((group) => (\n <div key={group.label} className={s.group()}>\n <h3 className={s.heading()}>{group.label}</h3>\n <ol className={s.ol()}>\n {group.events.map(({ event, count }) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n {leading ? <span className={s.leading()}>{leading(event)}</span> : <span aria-hidden className={s.marker()} />}\n <span className={s.body()}>\n <span className={s.title()}>\n {event.title}\n {count > 1 ? <span className={s.count()}>{labels.times(count)}</span> : null}\n </span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} title={date.toLocaleString(locale)} className={s.time()}>\n {timeAgo(date, { now, locale })}\n </time>\n {action ? <span className=\"shrink-0\">{action(event)}</span> : null}\n </li>\n );\n })}\n </ol>\n </div>\n ))}\n </section>\n );\n}\n\nexport type TimelineProps<T extends ActivityEvent> = {\n /** One thing's events, oldest first (a job's run, a payout's life). */\n events: readonly T[];\n /** The timeline's accessible name (“History of the payout”). */\n \"aria-label\": string;\n /** The locale of the times. Default `en-US`. */\n locale?: string;\n /** How a time is written: `time` (14:02, default), `datetime`, `date`. */\n timeStyle?: \"time\" | \"datetime\" | \"date\";\n /** Classes merged on the list. */\n className?: string;\n};\n\n/** One thing's history on a rail, oldest first: each event a marker in its tone, its time and its words. */\nexport function Timeline<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", timeStyle = \"time\", className }: TimelineProps<T>) {\n const s = activityFeed();\n const options: Intl.DateTimeFormatOptions =\n timeStyle === \"time\" ? { hour: \"2-digit\", minute: \"2-digit\" } : timeStyle === \"date\" ? { dateStyle: \"medium\" } : { dateStyle: \"medium\", timeStyle: \"short\" };\n const write = new Intl.DateTimeFormat(locale, options);\n return (\n <ol aria-label={label} className={s.ol({ className })}>\n {events.map((event, i) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n <span aria-hidden className={s.marker()} />\n {i < events.length - 1 ? <span aria-hidden className={s.rail()} /> : null}\n <span className={s.body()}>\n <span className={s.title()}>{event.title}</span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} className={s.time()}>\n {write.format(date)}\n </time>\n </li>\n );\n })}\n </ol>\n );\n}\n","// Shared by the web and React Native ActivityFeed: the events grouped by day (“Today”, “Yesterday”, a date), the same\n// events of one actor in a row folded into one (“Mina tipped 3 times”), and how long ago each happened — Intl only.\n\nexport type ActivityTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport type ActivityEvent = {\n /** A stable id. */\n id: string;\n /** When it happened: an ISO date-time, an epoch in ms or a `Date`. */\n at: string | number | Date;\n /** What happened, in a sentence — passed translated (“Mina tipped your video $5”). */\n title: string;\n /** A detail under it. */\n description?: string;\n /** Who did it (folds a run of the same `kind` by the same actor). */\n actor?: string;\n /** The kind of event (`tip`, `bid`, `job.done`): with `actor`, what folds. */\n kind?: string;\n /** The tone of its marker: success for a payout, danger for a failure. */\n tone?: ActivityTone;\n};\n\nexport type ActivityGroup<T extends ActivityEvent> = {\n /** The day's heading (“Today”, “Yesterday”, “Monday, Oct 6”). */\n label: string;\n /** Its events, newest first; a folded run is its newest event with `count` > 1. */\n events: { event: T; count: number }[];\n};\n\nconst dayKey = (date: Date) => `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;\n\n/** Groups events (any order) by day, newest first, folding runs of the same actor and kind when `fold` is set. */\nexport function groupActivity<T extends ActivityEvent>(\n events: readonly T[],\n { now = new Date(), locale = \"en-US\", today = \"Today\", yesterday = \"Yesterday\", fold = true }: { now?: Date; locale?: string; today?: string; yesterday?: string; fold?: boolean } = {},\n): ActivityGroup<T>[] {\n const sorted = [...events].sort((a, b) => new Date(b.at).getTime() - new Date(a.at).getTime());\n const day = new Intl.DateTimeFormat(locale, { weekday: \"long\", month: \"short\", day: \"numeric\" });\n const todayKey = dayKey(now);\n const yesterdayKey = dayKey(new Date(now.getTime() - 86_400_000));\n const groups: ActivityGroup<T>[] = [];\n let current: ActivityGroup<T> | null = null;\n let currentKey = \"\";\n for (const event of sorted) {\n const date = new Date(event.at);\n const key = dayKey(date);\n if (!current || key !== currentKey) {\n currentKey = key;\n current = { label: key === todayKey ? today : key === yesterdayKey ? yesterday : day.format(date), events: [] };\n groups.push(current);\n }\n const last = current.events[current.events.length - 1];\n if (fold && last && event.actor && event.kind && last.event.actor === event.actor && last.event.kind === event.kind) last.count += 1;\n else current.events.push({ event, count: 1 });\n }\n return groups;\n}\n\nconst UNITS: [Intl.RelativeTimeFormatUnit, number][] = [\n [\"second\", 60],\n [\"minute\", 60],\n [\"hour\", 24],\n [\"day\", 7],\n [\"week\", 4.35],\n [\"month\", 12],\n [\"year\", Number.POSITIVE_INFINITY],\n];\n\n/** “2 minutes ago”, “yesterday”: how long ago, in the largest unit that reads well (`style` short: “2 min. ago”). */\nexport function timeAgo(at: string | number | Date, { now = new Date(), locale = \"en-US\", style = \"short\" }: { now?: Date; locale?: string; style?: \"long\" | \"short\" | \"narrow\" } = {}): string {\n let value = (new Date(at).getTime() - now.getTime()) / 1000;\n let unit: Intl.RelativeTimeFormatUnit = \"second\";\n for (const [name, size] of UNITS) {\n unit = name;\n if (Math.abs(value) < size - 0.5) break;\n value /= size;\n }\n return new Intl.RelativeTimeFormat(locale, { numeric: \"auto\", style }).format(Math.round(value) + 0, unit);\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACyBnB,IAAM,SAAS,CAAC,SAAe,GAAG,KAAK,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC;AAGlF,SAAS,cACd,QACA,EAAE,MAAM,oBAAI,KAAK,GAAG,SAAS,SAAS,QAAQ,SAAS,YAAY,aAAa,OAAO,KAAK,IAAyF,CAAC,GAClK;AACpB,QAAM,SAAS,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE,EAAE,QAAQ,CAAC;AAC7F,QAAM,MAAM,IAAI,KAAK,eAAe,QAAQ,EAAE,SAAS,QAAQ,OAAO,SAAS,KAAK,UAAU,CAAC;AAC/F,QAAM,WAAW,OAAO,GAAG;AAC3B,QAAM,eAAe,OAAO,I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WAAW,EAAE,OAAO,GAAG;AAAA,MACxC,IAAI,OAAO,SAAS,IAAI,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,MACrE,qBAAC,UAAK,WAAW,EAAE,KAAK,GACtB;AAAA,4BAAC,UAAK,WAAW,EAAE,MAAM,GAAI,gBAAM,OAAM;AAAA,QACxC,MAAM,cAAc,oBAAC,UAAK,WAAW,EAAE,YAAY,GAAI,gBAAM,aAAY,IAAU;AAAA,SACtF;AAAA,MACA,oBAAC,UAAK,UAAU,KAAK,YAAY,GAAG,WAAW,EAAE,KAAK,GACnD,gBAAM,OAAO,IAAI,GACpB;AAAA,SATO,MAAM,EAUf;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
@@ -1 +1 @@
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,S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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// (a creator studio and its admin, 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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EAAE,UAAU,CAAC,GAAG,qBAAmB,iBAAiB,UAAU,KAAK,GAAG,SAAS,QAAS,GAAG,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"]}
@@ -111,7 +111,7 @@ declare const authLayout: tailwind_variants.TVReturnType<{
111
111
  legal: string;
112
112
  }>>;
113
113
  type AuthLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
114
- /** The product's mark and name (`<ProductLogo id="orochia" /> Orochia`): in the brand panel, and above the form on a phone. */
114
+ /** The product's mark and name (`<ProductLogo id="orazaka" /> Orazaka`): in the brand panel, and above the form on a phone. */
115
115
  brand: React.ReactNode;
116
116
  /** The form's title (`Welcome back`): the `h1`. */
117
117
  title: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth-layout/auth-layout.tsx","../src/section-backdrop/section-backdrop.tsx"],"sourcesContent":["// Server-safe. Sign in, sign up, verify, reset — read from the products' entry screens: on a desktop the product's\n// brand panel (its gradient, a sentence, a quote or an illustration) beside a calm column with the form; on a phone\n// one column, the brand reduced to its mark above the form. Words and the product's mark arrive as props.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { SectionBackdrop } from \"../section-backdrop/section-backdrop\";\n\nexport const authLayout = tv({\n slots: {\n root: \"grid min-h-dvh w-full bg-surface-0 text-fg lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]\",\n aside: \"relative hidden flex-col justify-between overflow-hidden border-r border-border-subtle p-10 lg:flex\",\n asideBrand: \"relative flex items-center gap-2.5 font-display text-base font-bold tracking-tight\",\n asideBody: \"relative flex max-w-md flex-col gap-4\",\n asideTitle: \"font-display text-3xl font-extrabold leading-tight tracking-tight text-fg\",\n asideText: \"text-[15px] leading-relaxed text-fg-secondary\",\n asideFoot: \"relative text-xs text-fg-secondary\",\n main: \"flex flex-col items-center justify-center px-4 py-10 sm:px-8\",\n column: \"flex w-full max-w-sm flex-col gap-6\",\n mobileBrand: \"flex items-center gap-2.5 font-display text-base font-bold tracking-tight lg:hidden\",\n head: \"flex flex-col gap-1.5\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"text-sm text-fg-secondary\",\n footer: \"text-center text-sm text-fg-secondary\",\n legal: \"text-center text-xs leading-relaxed text-fg-secondary\",\n },\n});\nconst s = authLayout();\n\nexport type AuthLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The product's mark and name (`<ProductLogo id=\"orochia\" /> Orochia`): in the brand panel, and above the form on a phone. */\n brand: React.ReactNode;\n /** The form's title (`Welcome back`): the `h1`. */\n title: React.ReactNode;\n /** One sentence under the title. */\n description?: React.ReactNode;\n /** The form: fields, the primary Button, the alternatives (a passkey, a magic link). */\n children: React.ReactNode;\n /** Under the form: the other way (`No account yet? Create one`). */\n footer?: React.ReactNode;\n /** The fine print at the very bottom (terms, privacy). */\n legal?: React.ReactNode;\n /** The brand panel's promise, large (desktop). */\n promise?: React.ReactNode;\n /** The brand panel's sentence or quote under the promise (a MascotQuote, a creator's words). */\n aside?: React.ReactNode;\n /** The brand panel's foot (`© Krizaka · Montréal`). */\n asideFooter?: React.ReactNode;\n};\n\n/** An entry screen: the product's brand panel beside the form (one column on a phone). */\nexport function AuthLayout({ brand, title, description, children, footer, legal, promise, aside, asideFooter, className, ...props }: AuthLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n <SectionBackdrop as=\"div\" grid className={s.aside()} aria-hidden={!promise && !aside ? true : undefined}>\n <div className={s.asideBrand()}>{brand}</div>\n <div className={s.asideBody()}>\n {promise && <p className={s.asideTitle()}>{promise}</p>}\n {aside && <div className={s.asideText()}>{aside}</div>}\n </div>\n <div className={s.asideFoot()}>{asideFooter}</div>\n </SectionBackdrop>\n <main className={s.main()}>\n <div className={s.column()}>\n <div className={s.mobileBrand()}>{brand}</div>\n <div className={s.head()}>\n <h1 className={s.title()}>{title}</h1>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {children}\n {footer && <p className={s.footer()}>{footer}</p>}\n {legal && <p className={s.legal()}>{legal}</p>}\n </div>\n </main>\n </div>\n );\n}\n","// Server-safe. The backdrop of a page section in the brand's visual language (packages/tokens/BRAND.md).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const sectionBackdropVariants = tv({\n slots: {\n root: \"kz-backdrop\",\n drift: \"kz-backdrop-drift\",\n dome: \"kz-backdrop-dome\",\n grid: \"kz-backdrop-grid\",\n media: \"kz-backdrop-media\",\n },\n});\n\nexport interface SectionBackdropProps extends React.HTMLAttributes<HTMLElement> {\n /** The element: `section` (default), `header`, `footer` or `div`. */\n as?: \"section\" | \"header\" | \"footer\" | \"div\";\n /** Where the brand tint sits: `down` (default) starts tinted and ends on the page surface; `up` ends tinted (a closing call to action). */\n direction?: \"down\" | \"up\";\n /** The light dome above the content (the halo of a hero). Default true. */\n dome?: boolean;\n /** A floor of perspective lines under the content. Default false. */\n grid?: boolean;\n /** A foreground illustration or image, blurred for depth of field, behind the content (decorative: hidden from assistive technology). */\n media?: React.ReactNode;\n /** The very slow drift of the light (40 s); always still under prefers-reduced-motion. Default true. */\n animated?: boolean;\n}\n\n/**\n * A section of a page in the Krizaka visual language: the brand's section gradient (`--kz-brand-gradient-*`, so it\n * follows the brand theme and dark/light), a light dome, an optional perspective grid and a blurred foreground. Every\n * section ends on the page surface, so consecutive sections glide from one tint to the next. Text on it reads at AA\n * (tested in @krizaka/tokens).\n */\nexport function SectionBackdrop({ as: Tag = \"section\", direction = \"down\", dome = true, grid = false, media, animated = true, className, children, ...props }: SectionBackdropProps) {\n const s = sectionBackdropVariants();\n return (\n <Tag className={s.root({ className })} data-direction={direction} {...props}>\n {animated ? <div data-backdrop-layer aria-hidden className={s.drift()} /> : null}\n {dome ? <div data-backdrop-layer aria-hidden className={s.dome()} /> : null}\n {grid ? <div data-backdrop-layer aria-hidden className={s.grid()} /> : null}\n {media ? (\n <div data-backdrop-layer aria-hidden className={s.media()}>\n {media}\n </div>\n ) : null}\n {children}\n </Tag>\n );\n}\n"],"mappings":";AAIA,SAAS,MAAAA,WAAU;;;ACFnB,SAAS,UAAU;AAoCf,SACc,KADd;AAlCG,IAAM,0BAA0B,GAAG;AAAA,EACxC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AAuBM,SAAS,gBAAgB,EAAE,IAAI,MAAM,WAAW,YAAY,QAAQ,OAAO,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,WAAW,UAAU,GAAG,MAAM,GAAyB;AACnL,QAAMC,KAAI,wBAAwB;AAClC,SACE,qBAAC,OAAI,WAAWA,GAAE,KAAK,EAAE,UAAU,CAAC,GAAG,kBAAgB,WAAY,GAAG,OACnE;AAAA,eAAW,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,MAAM,GAAG,IAAK;AAAA,IAC3E,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,KAAK,GAAG,IAAK;AAAA,IACtE,OAAO,oBAAC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gBAAAA,KAAC,UAAK,WAAW,EAAE,KAAK,GACtB,0BAAAC,MAAC,SAAI,WAAW,EAAE,OAAO,GACvB;AAAA,sBAAAD,KAAC,SAAI,WAAW,EAAE,YAAY,GAAI,iBAAM;AAAA,MACxC,gBAAAC,MAAC,SAAI,WAAW,EAAE,KAAK,GACrB;AAAA,wBAAAD,KAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,QAChC,eAAe,gBAAAA,KAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,SAC9D;AAAA,MACC;AAAA,MACA,UAAU,gBAAAA,KAAC,OAAE,WAAW,EAAE,OAAO,GAAI,kBAAO;AAAA,MAC5C,SAAS,gBAAAA,KAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,OAC5C,GACF;AAAA,KACF;AAEJ;","names":["tv","s","jsx","jsxs","tv"]}
1
+ {"version":3,"sources":["../src/auth-layout/auth-layout.tsx","../src/section-backdrop/section-backdrop.tsx"],"sourcesContent":["// Server-safe. Sign in, sign up, verify, reset — read from the products' entry screens: on a desktop the product's\n// brand panel (its gradient, a sentence, a quote or an illustration) beside a calm column with the form; on a phone\n// one column, the brand reduced to its mark above the form. Words and the product's mark arrive as props.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { SectionBackdrop } from \"../section-backdrop/section-backdrop\";\n\nexport const authLayout = tv({\n slots: {\n root: \"grid min-h-dvh w-full bg-surface-0 text-fg lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]\",\n aside: \"relative hidden flex-col justify-between overflow-hidden border-r border-border-subtle p-10 lg:flex\",\n asideBrand: \"relative flex items-center gap-2.5 font-display text-base font-bold tracking-tight\",\n asideBody: \"relative flex max-w-md flex-col gap-4\",\n asideTitle: \"font-display text-3xl font-extrabold leading-tight tracking-tight text-fg\",\n asideText: \"text-[15px] leading-relaxed text-fg-secondary\",\n asideFoot: \"relative text-xs text-fg-secondary\",\n main: \"flex flex-col items-center justify-center px-4 py-10 sm:px-8\",\n column: \"flex w-full max-w-sm flex-col gap-6\",\n mobileBrand: \"flex items-center gap-2.5 font-display text-base font-bold tracking-tight lg:hidden\",\n head: \"flex flex-col gap-1.5\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"text-sm text-fg-secondary\",\n footer: \"text-center text-sm text-fg-secondary\",\n legal: \"text-center text-xs leading-relaxed text-fg-secondary\",\n },\n});\nconst s = authLayout();\n\nexport type AuthLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The product's mark and name (`<ProductLogo id=\"orazaka\" /> Orazaka`): in the brand panel, and above the form on a phone. */\n brand: React.ReactNode;\n /** The form's title (`Welcome back`): the `h1`. */\n title: React.ReactNode;\n /** One sentence under the title. */\n description?: React.ReactNode;\n /** The form: fields, the primary Button, the alternatives (a passkey, a magic link). */\n children: React.ReactNode;\n /** Under the form: the other way (`No account yet? Create one`). */\n footer?: React.ReactNode;\n /** The fine print at the very bottom (terms, privacy). */\n legal?: React.ReactNode;\n /** The brand panel's promise, large (desktop). */\n promise?: React.ReactNode;\n /** The brand panel's sentence or quote under the promise (a MascotQuote, a creator's words). */\n aside?: React.ReactNode;\n /** The brand panel's foot (`© Krizaka · Montréal`). */\n asideFooter?: React.ReactNode;\n};\n\n/** An entry screen: the product's brand panel beside the form (one column on a phone). */\nexport function AuthLayout({ brand, title, description, children, footer, legal, promise, aside, asideFooter, className, ...props }: AuthLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n <SectionBackdrop as=\"div\" grid className={s.aside()} aria-hidden={!promise && !aside ? true : undefined}>\n <div className={s.asideBrand()}>{brand}</div>\n <div className={s.asideBody()}>\n {promise && <p className={s.asideTitle()}>{promise}</p>}\n {aside && <div className={s.asideText()}>{aside}</div>}\n </div>\n <div className={s.asideFoot()}>{asideFooter}</div>\n </SectionBackdrop>\n <main className={s.main()}>\n <div className={s.column()}>\n <div className={s.mobileBrand()}>{brand}</div>\n <div className={s.head()}>\n <h1 className={s.title()}>{title}</h1>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {children}\n {footer && <p className={s.footer()}>{footer}</p>}\n {legal && <p className={s.legal()}>{legal}</p>}\n </div>\n </main>\n </div>\n );\n}\n","// Server-safe. The backdrop of a page section in the brand's visual language (packages/tokens/BRAND.md).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const sectionBackdropVariants = tv({\n slots: {\n root: \"kz-backdrop\",\n drift: \"kz-backdrop-drift\",\n dome: \"kz-backdrop-dome\",\n grid: \"kz-backdrop-grid\",\n media: \"kz-backdrop-media\",\n },\n});\n\nexport interface SectionBackdropProps extends React.HTMLAttributes<HTMLElement> {\n /** The element: `section` (default), `header`, `footer` or `div`. */\n as?: \"section\" | \"header\" | \"footer\" | \"div\";\n /** Where the brand tint sits: `down` (default) starts tinted and ends on the page surface; `up` ends tinted (a closing call to action). */\n direction?: \"down\" | \"up\";\n /** The light dome above the content (the halo of a hero). Default true. */\n dome?: boolean;\n /** A floor of perspective lines under the content. Default false. */\n grid?: boolean;\n /** A foreground illustration or image, blurred for depth of field, behind the content (decorative: hidden from assistive technology). */\n media?: React.ReactNode;\n /** The very slow drift of the light (40 s); always still under prefers-reduced-motion. Default true. */\n animated?: boolean;\n}\n\n/**\n * A section of a page in the Krizaka visual language: the brand's section gradient (`--kz-brand-gradient-*`, so it\n * follows the brand theme and dark/light), a light dome, an optional perspective grid and a blurred foreground. Every\n * section ends on the page surface, so consecutive sections glide from one tint to the next. Text on it reads at AA\n * (tested in @krizaka/tokens).\n */\nexport function SectionBackdrop({ as: Tag = \"section\", direction = \"down\", dome = true, grid = false, media, animated = true, className, children, ...props }: SectionBackdropProps) {\n const s = sectionBackdropVariants();\n return (\n <Tag className={s.root({ className })} data-direction={direction} {...props}>\n {animated ? <div data-backdrop-layer aria-hidden className={s.drift()} /> : null}\n {dome ? <div data-backdrop-layer aria-hidden className={s.dome()} /> : null}\n {grid ? <div data-backdrop-layer aria-hidden className={s.grid()} /> : null}\n {media ? (\n <div data-backdrop-layer aria-hidden className={s.media()}>\n {media}\n </div>\n ) : null}\n {children}\n </Tag>\n );\n}\n"],"mappings":";AAIA,SAAS,MAAAA,WAAU;;;ACFnB,SAAS,UAAU;AAoCf,SACc,KADd;AAlCG,IAAM,0BAA0B,GAAG;AAAA,EACxC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AAuBM,SAAS,gBAAgB,EAAE,IAAI,MAAM,WAAW,YAAY,QAAQ,OAAO,MAAM,OAAO,OAAO,OAAO,WAAW,MAAM,WAAW,UAAU,GAAG,MAAM,GAAyB;AACnL,QAAMC,KAAI,wBAAwB;AAClC,SACE,qBAAC,OAAI,WAAWA,GAAE,KAAK,EAAE,UAAU,CAAC,GAAG,kBAAgB,WAAY,GAAG,OACnE;AAAA,eAAW,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,MAAM,GAAG,IAAK;AAAA,IAC3E,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,KAAK,GAAG,IAAK;AAAA,IACtE,OAAO,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,KAAK,GAAG,IAAK;AAAA,IACtE,QACC,oBAAC,SAAI,uBAAmB,MAAC,eAAW,MAAC,WAAWA,GAAE,MAAM,GACrD,iBACH,IACE;AAAA,IACH;AAAA,KACH;AAEJ;;;ADKQ,gBAAAC,MACA,QAAAC,aADA;AA/CD,IAAM,aAAaC,IAAG;AAAA,EAC3B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,WAAW;AAAA,IACX,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,aAAa;AAAA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BAAAA,KAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,OAC5C,GACF;AAAA,KACF;AAEJ;","names":["tv","s","jsx","jsxs","tv"]}
@@ -1,3 +1,4 @@
1
+ /** A brand of the default avatars. `orochia`, `yasakia`, `yororis` and `kachizaka` are deprecated: paused products (2026-10-25), removed in the next major; their pictures stay served until then. */
1
2
  type DefaultAvatarBrand = "krizaka" | "orazaka" | "orochia" | "yasakia" | "yororis" | "yomizaka" | "kachizaka" | "akinaza";
2
3
  /** `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials. */
3
4
  type DefaultAvatarKind = "person" | "plain";
@@ -29,7 +30,7 @@ declare function defaultAvatarToneOf(seed: string | number | undefined): number;
29
30
  /** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */
30
31
  declare function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | "svg"): string;
31
32
  /**
32
- * The URL of a default avatar: `defaultAvatarUrl({ brand: "orochia", seed: user.id })`.
33
+ * The URL of a default avatar: `defaultAvatarUrl({ brand: "orazaka", seed: user.id })`.
33
34
  * @param size 256 for lists, 512 for a profile; `"svg"` for the vector.
34
35
  * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.
35
36
  */