@krizaka/ui 3.87.0 → 4.0.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 (655) hide show
  1. package/README.md +14 -14
  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 +4 -4
  10. package/dist/activity-feed.js +11 -5
  11. package/dist/activity-feed.js.map +1 -1
  12. package/dist/app-frame.d.ts +4 -4
  13. package/dist/app-frame.js.map +1 -1
  14. package/dist/app-header.d.ts +2 -2
  15. package/dist/app-header.js.map +1 -1
  16. package/dist/app-shell.d.ts +1 -1
  17. package/dist/app-shell.js +1 -1
  18. package/dist/app-shell.js.map +1 -1
  19. package/dist/auth-layout.d.ts +1 -1
  20. package/dist/auth-layout.js.map +1 -1
  21. package/dist/avatar/defaults.d.ts +2 -2
  22. package/dist/avatar/defaults.js +4 -4
  23. package/dist/avatar/defaults.js.map +1 -1
  24. package/dist/{avatar-CNV6ld8l.d.ts → avatar-Cd2uJgRh.d.ts} +2 -2
  25. package/dist/avatar.d.ts +3 -3
  26. package/dist/avatar.js +4 -4
  27. package/dist/avatar.js.map +1 -1
  28. package/dist/bird-plate.d.ts +1 -1
  29. package/dist/bird-plate.js +1 -1
  30. package/dist/blocks.css +5 -5
  31. package/dist/card-grid.d.ts +1 -1
  32. package/dist/card-grid.js.map +1 -1
  33. package/dist/changelog-page.d.ts +1 -1
  34. package/dist/changelog-page.js +18 -6
  35. package/dist/changelog-page.js.map +1 -1
  36. package/dist/chat.js +1 -1
  37. package/dist/chip.js +1 -1
  38. package/dist/choice-grid.d.ts +2 -2
  39. package/dist/choice-grid.js +1 -1
  40. package/dist/choice-grid.js.map +1 -1
  41. package/dist/{chunk-RCHKIOVV.js → chunk-2DHL7NJW.js} +2 -2
  42. package/dist/chunk-2DHL7NJW.js.map +1 -0
  43. package/dist/{chunk-TN5JJ6JI.js → chunk-2YBG4ZCY.js} +23 -2
  44. package/dist/{chunk-TN5JJ6JI.js.map → chunk-2YBG4ZCY.js.map} +1 -1
  45. package/dist/{chunk-6KZDARNX.js → chunk-54WTUZWE.js} +16 -12
  46. package/dist/chunk-54WTUZWE.js.map +1 -0
  47. package/dist/{chunk-DSDFXPL6.js → chunk-757ZTGU5.js} +2 -2
  48. package/dist/chunk-CDNOT2KR.js +310 -0
  49. package/dist/chunk-CDNOT2KR.js.map +1 -0
  50. package/dist/{chunk-IOTY5HYG.js → chunk-EOWV6BNQ.js} +4 -4
  51. package/dist/chunk-EOWV6BNQ.js.map +1 -0
  52. package/dist/{chunk-DRTIE44Z.js → chunk-FM42KOAU.js} +2 -2
  53. package/dist/chunk-FM42KOAU.js.map +1 -0
  54. package/dist/{chunk-CEW3LQOZ.js → chunk-IEGTRCDI.js} +5 -5
  55. package/dist/{chunk-KVDB4GXV.js → chunk-KR2W4ONJ.js} +2 -2
  56. package/dist/{chunk-TPITVAUW.js → chunk-LH5J3VLZ.js} +1 -1
  57. package/dist/{chunk-TPITVAUW.js.map → chunk-LH5J3VLZ.js.map} +1 -1
  58. package/dist/{chunk-E46AEUPH.js → chunk-PK3L6WQT.js} +4 -4
  59. package/dist/chunk-PK3L6WQT.js.map +1 -0
  60. package/dist/{chunk-GOGEYAYK.js → chunk-PRD7JRQX.js} +3 -3
  61. package/dist/{chunk-VYZFQE3P.js → chunk-QD6SNXF5.js} +2 -2
  62. package/dist/{chunk-M3T5RQYV.js → chunk-SB5WSVPI.js} +1 -1
  63. package/dist/chunk-SB5WSVPI.js.map +1 -0
  64. package/dist/{chunk-UYGUSYIC.js → chunk-SNSQLGGS.js} +1 -1
  65. package/dist/{chunk-BQ4EOR2O.js.map → chunk-SNSQLGGS.js.map} +1 -1
  66. package/dist/{chunk-YQWYGQTV.js → chunk-UIP3WX5O.js} +2 -2
  67. package/dist/{chunk-EHTXLZSM.js → chunk-VS3MWRBX.js} +1 -1
  68. package/dist/{chunk-EHTXLZSM.js.map → chunk-VS3MWRBX.js.map} +1 -1
  69. package/dist/{chunk-BQ4EOR2O.js → chunk-XWJDBQU7.js} +1 -1
  70. package/dist/{chunk-UYGUSYIC.js.map → chunk-XWJDBQU7.js.map} +1 -1
  71. package/dist/{chunk-ZKKMYIDN.js → chunk-Y3P5B4XS.js} +2 -2
  72. package/dist/{chunk-GW5EI7MI.js → chunk-YXETEQQJ.js} +3 -3
  73. package/dist/{chunk-FZBWEDQI.js → chunk-ZSCNMFE6.js} +1 -1
  74. package/dist/{chunk-FZBWEDQI.js.map → chunk-ZSCNMFE6.js.map} +1 -1
  75. package/dist/collection-switcher.d.ts +1 -1
  76. package/dist/combobox.js +3 -3
  77. package/dist/continue-prompt.js +1 -1
  78. package/dist/dashboard-layout.js +1 -1
  79. package/dist/dashboard-layout.js.map +1 -1
  80. package/dist/data-table.js +6 -6
  81. package/dist/date-picker.js +1 -1
  82. package/dist/{default-avatar-Bh4atFDo.d.ts → default-avatar-DHv7g-K1.d.ts} +1 -1
  83. package/dist/detail-layout.js.map +1 -1
  84. package/dist/docs-hub-page.d.ts +1 -1
  85. package/dist/docs-hub-page.js.map +1 -1
  86. package/dist/document-viewer.js +1 -1
  87. package/dist/engine-flow.d.ts +6 -6
  88. package/dist/engine-flow.js.map +1 -1
  89. package/dist/entity-header.d.ts +1 -1
  90. package/dist/file-upload.js +1 -1
  91. package/dist/filter-bar.d.ts +3 -3
  92. package/dist/filter-bar.js +2 -2
  93. package/dist/flock.js +1 -1
  94. package/dist/{frame-CNZ5VgDD.d.ts → frame-CmDztC_y.d.ts} +1 -1
  95. package/dist/genui.js +6 -6
  96. package/dist/genui.js.map +1 -1
  97. package/dist/{geometry-DDlFDtiQ.d.ts → geometry-8O5Nq-yA.d.ts} +2 -2
  98. package/dist/{geometry-DuUQyHZ1.d.ts → geometry-haB2EgO4.d.ts} +2 -2
  99. package/dist/goal-gauge.d.ts +1 -1
  100. package/dist/goal-gauge.js +1 -1
  101. package/dist/goal-gauge.js.map +1 -1
  102. package/dist/image-cropper.js +1 -1
  103. package/dist/index.d.ts +27 -38
  104. package/dist/index.js +10 -18
  105. package/dist/index.js.map +1 -1
  106. package/dist/kind-config-editor.js +1 -1
  107. package/dist/list.js +1 -1
  108. package/dist/loader.d.ts +1 -1
  109. package/dist/loader.js +2 -2
  110. package/dist/loader.js.map +1 -1
  111. package/dist/map.js +3 -3
  112. package/dist/map.js.map +1 -1
  113. package/dist/mascot-quote.d.ts +1 -1
  114. package/dist/mascot-quote.js +1 -1
  115. package/dist/mascot-state.js +1 -1
  116. package/dist/mascots.d.ts +2 -2
  117. package/dist/mascots.js +1 -1
  118. package/dist/match-dialog.js +1 -1
  119. package/dist/media-capture.js +1 -1
  120. package/dist/media-carousel.d.ts +115 -45
  121. package/dist/media-carousel.js +378 -56
  122. package/dist/media-carousel.js.map +1 -1
  123. package/dist/media-gallery.d.ts +3 -3
  124. package/dist/media-guard-bin.js +171 -0
  125. package/dist/media-guard-bin.js.map +1 -0
  126. package/dist/media-guard.d.ts +88 -0
  127. package/dist/media-guard.js +153 -0
  128. package/dist/media-guard.js.map +1 -0
  129. package/dist/media-player.d.ts +3 -3
  130. package/dist/media-player.js +3 -3
  131. package/dist/native/map.js +3 -3
  132. package/dist/native/map.js.map +1 -1
  133. package/dist/native.d.ts +43 -43
  134. package/dist/native.js +1233 -1210
  135. package/dist/native.js.map +1 -1
  136. package/dist/nav-bar.d.ts +1 -1
  137. package/dist/nav-bar.js +2 -2
  138. package/dist/notification-preferences.js +1 -1
  139. package/dist/pausable-loop.js +3 -13
  140. package/dist/pausable-loop.js.map +1 -1
  141. package/dist/{player-lightbox-ASFOSUSD.js → player-lightbox-BYQ57OXT.js} +3 -3
  142. package/dist/product-page.d.ts +1 -1
  143. package/dist/product-page.js.map +1 -1
  144. package/dist/profile-card.d.ts +2 -2
  145. package/dist/profile-card.js +1 -1
  146. package/dist/profile-card.js.map +1 -1
  147. package/dist/promise-card.d.ts +1 -1
  148. package/dist/promise-card.js +1 -1
  149. package/dist/promise-card.js.map +1 -1
  150. package/dist/rail-nav.d.ts +6 -6
  151. package/dist/rail-nav.js.map +1 -1
  152. package/dist/retro-tv-playlist.js.map +1 -1
  153. package/dist/retro-tv.js +2 -2
  154. package/dist/schema-form.d.ts +13 -1
  155. package/dist/schema-form.js +24 -13
  156. package/dist/schema-form.js.map +1 -1
  157. package/dist/scroll-stage.d.ts +1 -1
  158. package/dist/scroll-stage.js +1 -1
  159. package/dist/scroll-stage.js.map +1 -1
  160. package/dist/search-field.js +2 -2
  161. package/dist/shop/booking.js +1 -1
  162. package/dist/shop/bulletin.js +1 -1
  163. package/dist/shop/faq.js +1 -1
  164. package/dist/shop/gallery.js +1 -1
  165. package/dist/shop/look.js.map +1 -1
  166. package/dist/shop/policies.js +1 -1
  167. package/dist/shop/reviews.js +1 -1
  168. package/dist/shop/services.js +1 -1
  169. package/dist/shop/social.js +1 -1
  170. package/dist/shop/story.js +1 -1
  171. package/dist/shop/team.js +1 -1
  172. package/dist/shop/video.js +1 -1
  173. package/dist/shop/visit.js +1 -1
  174. package/dist/shop-composer.d.ts +1 -1
  175. package/dist/shop-composer.js +2 -2
  176. package/dist/shop-composer.js.map +1 -1
  177. package/dist/shop.d.ts +1 -1
  178. package/dist/shop.js +2 -2
  179. package/dist/shop.js.map +1 -1
  180. package/dist/site-cahier.d.ts +1 -1
  181. package/dist/site-cahier.js +188 -181
  182. package/dist/site-cahier.js.map +1 -1
  183. package/dist/site-footer.d.ts +1 -1
  184. package/dist/site-footer.js +2 -2
  185. package/dist/{sites-CSBwUnbJ.d.ts → sites-A5cNWG2Z.d.ts} +1 -1
  186. package/dist/sites.d.ts +2 -2
  187. package/dist/sites.js +15 -11
  188. package/dist/sites.js.map +1 -1
  189. package/dist/stage-banner.d.ts +1 -1
  190. package/dist/stage-banner.js +1 -1
  191. package/dist/stage-banner.js.map +1 -1
  192. package/dist/status-page.d.ts +1 -1
  193. package/dist/status-page.js.map +1 -1
  194. package/dist/step-showcase.d.ts +2 -2
  195. package/dist/step-showcase.js.map +1 -1
  196. package/dist/swipe-deck.js +1 -1
  197. package/dist/tag-input.js +3 -3
  198. package/dist/tag-selector.js +1 -1
  199. package/dist/terminal-replay.d.ts +1 -1
  200. package/dist/terminal-replay.js.map +1 -1
  201. package/dist/tree-view.js +1 -1
  202. package/dist/update-prompt.d.ts +1 -1
  203. package/dist/update-prompt.js.map +1 -1
  204. package/dist/versus-card.js +1 -1
  205. package/dist/vertical-video.js +1 -1
  206. package/dist/video-player.js +2 -2
  207. package/dist/video-trimmer.js +1 -1
  208. package/dist/virtual.js +2 -2
  209. package/dist/waveform.js.map +1 -1
  210. package/package.json +24 -11
  211. package/registry/account-menu.json +3 -3
  212. package/registry/account-settings.json +6 -6
  213. package/registry/achievement.json +8 -8
  214. package/registry/action-bar.json +4 -4
  215. package/registry/activity-feed.json +24 -24
  216. package/registry/agenda.json +3 -3
  217. package/registry/alert.json +1 -1
  218. package/registry/analysis-report.json +3 -3
  219. package/registry/anatomy-plate.json +1 -1
  220. package/registry/app-frame.json +33 -29
  221. package/registry/app-header.json +16 -16
  222. package/registry/app-shell.json +13 -13
  223. package/registry/argument-card.json +3 -3
  224. package/registry/auth-layout.json +9 -9
  225. package/registry/avatar.json +8 -8
  226. package/registry/badge.json +1 -1
  227. package/registry/bird-plate.json +2 -2
  228. package/registry/button.json +1 -1
  229. package/registry/captcha.json +1 -1
  230. package/registry/card-grid.json +9 -9
  231. package/registry/card.json +1 -1
  232. package/registry/catalogue-page.json +2 -2
  233. package/registry/changelog-page.json +2 -2
  234. package/registry/chapter.json +5 -5
  235. package/registry/chat.json +1 -1
  236. package/registry/checkbox.json +1 -1
  237. package/registry/chip-link.json +1 -1
  238. package/registry/chip-row.json +1 -1
  239. package/registry/chip.json +2 -2
  240. package/registry/choice-grid.json +6 -6
  241. package/registry/code-block.json +1 -1
  242. package/registry/collection-switcher.json +2 -2
  243. package/registry/combobox.json +2 -2
  244. package/registry/command.json +1 -1
  245. package/registry/comparison-table.json +5 -5
  246. package/registry/component-page.json +1 -1
  247. package/registry/confirm-button.json +1 -1
  248. package/registry/contact-page.json +1 -1
  249. package/registry/continue-prompt.json +2 -2
  250. package/registry/copy-button.json +1 -1
  251. package/registry/countdown.json +1 -1
  252. package/registry/cover-hero.json +1 -1
  253. package/registry/cta-panel.json +3 -3
  254. package/registry/dashboard-layout.json +11 -11
  255. package/registry/data-table.json +2 -2
  256. package/registry/date-picker.json +2 -2
  257. package/registry/decision-list.json +1 -1
  258. package/registry/description-list.json +1 -1
  259. package/registry/desktop-window.json +5 -5
  260. package/registry/detail-layout.json +7 -7
  261. package/registry/dialog.json +1 -1
  262. package/registry/docs-article-page.json +6 -6
  263. package/registry/docs-hub-page.json +4 -4
  264. package/registry/docs-layout.json +3 -3
  265. package/registry/docs-nav.json +1 -1
  266. package/registry/document-viewer.json +4 -4
  267. package/registry/doodle.json +1 -1
  268. package/registry/drop-overlay.json +3 -3
  269. package/registry/dropdown-menu.json +1 -1
  270. package/registry/elephant.json +1 -1
  271. package/registry/embed-facade.json +1 -1
  272. package/registry/empty-state.json +2 -2
  273. package/registry/engine-flow.json +8 -8
  274. package/registry/entity-header.json +1 -1
  275. package/registry/environment-notice.json +1 -1
  276. package/registry/error-page.json +1 -1
  277. package/registry/examples/account-menu/default.js +2 -2
  278. package/registry/examples/account-menu/default.tsx +2 -2
  279. package/registry/examples/account-settings/appearance.js +2 -2
  280. package/registry/examples/account-settings/appearance.tsx +2 -2
  281. package/registry/examples/account-settings/avatar-picker-folder.js +1 -1
  282. package/registry/examples/account-settings/avatar-picker-folder.tsx +1 -1
  283. package/registry/examples/account-settings/avatar-picker.js +1 -1
  284. package/registry/examples/account-settings/avatar-picker.tsx +1 -1
  285. package/registry/examples/account-settings/profile.js +2 -2
  286. package/registry/examples/account-settings/profile.tsx +3 -3
  287. package/registry/examples/achievement/arcade.js +1 -1
  288. package/registry/examples/achievement/arcade.tsx +1 -1
  289. package/registry/examples/action-bar/buttons.js +1 -1
  290. package/registry/examples/action-bar/buttons.tsx +1 -1
  291. package/registry/examples/action-bar/icons.js +1 -1
  292. package/registry/examples/action-bar/icons.tsx +1 -1
  293. package/registry/examples/activity-feed/job-activity.tsx +1 -1
  294. package/registry/examples/app-frame/admin.js +3 -3
  295. package/registry/examples/app-frame/admin.tsx +3 -3
  296. package/registry/examples/app-frame/app.js +5 -5
  297. package/registry/examples/app-frame/app.tsx +6 -6
  298. package/registry/examples/app-frame/touch.js +3 -3
  299. package/registry/examples/app-frame/touch.tsx +3 -3
  300. package/registry/examples/app-header/basic.js +2 -2
  301. package/registry/examples/app-header/basic.tsx +2 -2
  302. package/registry/examples/app-header/family.js +3 -3
  303. package/registry/examples/app-header/family.tsx +3 -3
  304. package/registry/examples/app-header/native/family.dark.png +0 -0
  305. package/registry/examples/app-header/native/family.js +2 -2
  306. package/registry/examples/app-header/native/family.light.png +0 -0
  307. package/registry/examples/app-header/native/family.tsx +2 -2
  308. package/registry/examples/app-shell/admin-console.js +1 -1
  309. package/registry/examples/app-shell/admin-console.tsx +1 -1
  310. package/registry/examples/app-shell/basic.js +1 -1
  311. package/registry/examples/app-shell/basic.tsx +1 -1
  312. package/registry/examples/app-shell/collapse-overflow.js +4 -4
  313. package/registry/examples/app-shell/collapse-overflow.tsx +4 -4
  314. package/registry/examples/app-shell/creator-studio.js +2 -2
  315. package/registry/examples/app-shell/creator-studio.tsx +2 -2
  316. package/registry/examples/app-shell/desktop.js +3 -3
  317. package/registry/examples/app-shell/desktop.tsx +1 -1
  318. package/registry/examples/argument-card/building-block.js +1 -1
  319. package/registry/examples/argument-card/building-block.tsx +1 -1
  320. package/registry/examples/auth-layout/onboarding.js +2 -2
  321. package/registry/examples/auth-layout/onboarding.tsx +2 -2
  322. package/registry/examples/auth-layout/sign-in.js +2 -2
  323. package/registry/examples/auth-layout/sign-in.tsx +2 -2
  324. package/registry/examples/avatar/default.js +1 -1
  325. package/registry/examples/avatar/default.tsx +1 -1
  326. package/registry/examples/bird-plate/single.tsx +1 -1
  327. package/registry/examples/card-grid/aligned.js +3 -3
  328. package/registry/examples/card-grid/aligned.tsx +3 -3
  329. package/registry/examples/card-grid/foundation.js +6 -6
  330. package/registry/examples/card-grid/foundation.tsx +6 -6
  331. package/registry/examples/card-grid/hover-quiet.js +3 -3
  332. package/registry/examples/card-grid/hover-quiet.tsx +3 -3
  333. package/registry/examples/card-grid/products.js +2 -2
  334. package/registry/examples/card-grid/products.tsx +2 -2
  335. package/registry/examples/catalogue-page/clients.js +1 -1
  336. package/registry/examples/catalogue-page/clients.tsx +1 -1
  337. package/registry/examples/chapter/detail.js +1 -1
  338. package/registry/examples/chapter/detail.tsx +1 -1
  339. package/registry/examples/chapter/foot.js +1 -1
  340. package/registry/examples/chapter/foot.tsx +1 -1
  341. package/registry/examples/chapter/index.js +1 -1
  342. package/registry/examples/chapter/index.tsx +1 -1
  343. package/registry/examples/choice-grid/line-up.js +2 -2
  344. package/registry/examples/choice-grid/line-up.tsx +2 -2
  345. package/registry/examples/collection-switcher/entity.js +2 -2
  346. package/registry/examples/collection-switcher/entity.tsx +2 -2
  347. package/registry/examples/comparison-table/versus.js +5 -5
  348. package/registry/examples/comparison-table/versus.tsx +5 -5
  349. package/registry/examples/cta-panel/discuss.js +1 -1
  350. package/registry/examples/cta-panel/discuss.tsx +1 -1
  351. package/registry/examples/dashboard-layout/{orazaka-eric.js → sovkora-eric.js} +4 -4
  352. package/registry/examples/dashboard-layout/{orazaka-eric.tsx → sovkora-eric.tsx} +3 -3
  353. package/registry/examples/dashboard-layout/today.js +1 -1
  354. package/registry/examples/dashboard-layout/today.tsx +1 -1
  355. package/registry/examples/desktop-window/library.js +2 -2
  356. package/registry/examples/desktop-window/library.tsx +1 -1
  357. package/registry/examples/detail-layout/checkout.js +1 -1
  358. package/registry/examples/detail-layout/checkout.tsx +1 -1
  359. package/registry/examples/detail-layout/client.js +1 -1
  360. package/registry/examples/detail-layout/client.tsx +1 -1
  361. package/registry/examples/detail-layout/new-invoice.js +1 -1
  362. package/registry/examples/detail-layout/new-invoice.tsx +1 -1
  363. package/registry/examples/detail-layout/profile.js +1 -1
  364. package/registry/examples/detail-layout/profile.tsx +1 -1
  365. package/registry/examples/detail-layout/video.js +1 -1
  366. package/registry/examples/detail-layout/video.tsx +1 -1
  367. package/registry/examples/docs-article-page/cli.js +5 -5
  368. package/registry/examples/docs-article-page/cli.tsx +6 -6
  369. package/registry/examples/docs-article-page/faq.js +4 -4
  370. package/registry/examples/docs-article-page/faq.tsx +4 -4
  371. package/registry/examples/docs-hub-page/krizaka.js +5 -5
  372. package/registry/examples/docs-hub-page/krizaka.tsx +5 -5
  373. package/registry/examples/docs-layout/page.js +1 -1
  374. package/registry/examples/docs-layout/page.tsx +1 -1
  375. package/registry/examples/empty-state/library.js +1 -1
  376. package/registry/examples/empty-state/library.tsx +1 -1
  377. package/registry/examples/engine-flow/calm.js +4 -4
  378. package/registry/examples/engine-flow/calm.tsx +4 -4
  379. package/registry/examples/engine-flow/compact.js +5 -5
  380. package/registry/examples/engine-flow/compact.tsx +5 -5
  381. package/registry/examples/engine-flow/radial.js +6 -6
  382. package/registry/examples/engine-flow/radial.tsx +6 -6
  383. package/registry/examples/force-update-screen/default.js +1 -1
  384. package/registry/examples/force-update-screen/default.tsx +1 -1
  385. package/registry/examples/force-update-screen/native/default.js +1 -1
  386. package/registry/examples/force-update-screen/native/default.tsx +1 -1
  387. package/registry/examples/form/native/sign-up.js +1 -1
  388. package/registry/examples/form/native/sign-up.tsx +1 -1
  389. package/registry/examples/gallery-page/made-here.js +2 -2
  390. package/registry/examples/gallery-page/made-here.tsx +3 -3
  391. package/registry/examples/goal-gauge/arcade.js +1 -1
  392. package/registry/examples/goal-gauge/arcade.tsx +1 -1
  393. package/registry/examples/landing-page/krizaka.js +5 -5
  394. package/registry/examples/landing-page/krizaka.tsx +5 -5
  395. package/registry/examples/landscape/brand.js +1 -1
  396. package/registry/examples/landscape/brand.tsx +1 -1
  397. package/registry/examples/link-card/docs-hub.js +3 -3
  398. package/registry/examples/link-card/docs-hub.tsx +3 -3
  399. package/registry/examples/link-card/hover-quiet.js +3 -3
  400. package/registry/examples/link-card/hover-quiet.tsx +3 -3
  401. package/registry/examples/link-card/stack.js +3 -3
  402. package/registry/examples/link-card/stack.tsx +3 -3
  403. package/registry/examples/list/jobs.tsx +1 -1
  404. package/registry/examples/loader/branded.js +2 -2
  405. package/registry/examples/loader/branded.tsx +3 -3
  406. package/registry/examples/loader/native/branded.js +1 -1
  407. package/registry/examples/loader/native/branded.tsx +2 -2
  408. package/registry/examples/loader/native/job-wait.tsx +1 -1
  409. package/registry/examples/longform-page/case-study.js +2 -2
  410. package/registry/examples/longform-page/case-study.tsx +3 -3
  411. package/registry/examples/longform-page/story.js +2 -2
  412. package/registry/examples/longform-page/story.tsx +2 -2
  413. package/registry/examples/maintenance-screen/default.js +1 -1
  414. package/registry/examples/maintenance-screen/default.tsx +1 -1
  415. package/registry/examples/maintenance-screen/native/default.js +1 -1
  416. package/registry/examples/maintenance-screen/native/default.tsx +1 -1
  417. package/registry/examples/marketing-layout/docs-hub.js +3 -3
  418. package/registry/examples/marketing-layout/docs-hub.tsx +3 -3
  419. package/registry/examples/marketing-layout/product-page.js +3 -3
  420. package/registry/examples/marketing-layout/product-page.tsx +3 -3
  421. package/registry/examples/mascots/flock.tsx +2 -2
  422. package/registry/examples/media-gallery/carousel-autoplay.js +23 -0
  423. package/registry/examples/media-gallery/carousel-autoplay.tsx +21 -0
  424. package/registry/examples/media-gallery/carousel-cahier.d.ts +4 -0
  425. package/registry/examples/media-gallery/carousel-cahier.js +27 -0
  426. package/registry/examples/media-gallery/carousel-cahier.tsx +26 -0
  427. package/registry/examples/media-gallery/carousel-demo.d.ts +4 -0
  428. package/registry/examples/media-gallery/carousel-demo.js +36 -0
  429. package/registry/examples/media-gallery/carousel-demo.tsx +34 -0
  430. package/registry/examples/nav-bar/family-admin.js +5 -5
  431. package/registry/examples/nav-bar/family-admin.tsx +4 -4
  432. package/registry/examples/nav-bar/family-java.js +1 -1
  433. package/registry/examples/nav-bar/family-java.tsx +1 -1
  434. package/registry/examples/nav-bar/family-product.js +4 -4
  435. package/registry/examples/nav-bar/family-product.tsx +3 -3
  436. package/registry/examples/nav-bar/site.js +2 -2
  437. package/registry/examples/nav-bar/site.tsx +2 -2
  438. package/registry/examples/pricing-page/credits.js +1 -1
  439. package/registry/examples/pricing-page/credits.tsx +2 -2
  440. package/registry/examples/product-page/sovkora.d.ts +4 -0
  441. package/registry/examples/product-page/{orazaka.js → sovkora.js} +7 -7
  442. package/registry/examples/product-page/{orazaka.tsx → sovkora.tsx} +5 -5
  443. package/registry/examples/profile-card/arcade.js +2 -2
  444. package/registry/examples/profile-card/arcade.tsx +2 -2
  445. package/registry/examples/profile-card/banner.js +2 -2
  446. package/registry/examples/profile-card/banner.tsx +2 -2
  447. package/registry/examples/profile-card/match.js +1 -1
  448. package/registry/examples/profile-card/match.tsx +1 -1
  449. package/registry/examples/profile-card/native/banner.js +1 -1
  450. package/registry/examples/profile-card/native/banner.tsx +1 -1
  451. package/registry/examples/promise-card/arcade.js +1 -1
  452. package/registry/examples/promise-card/arcade.tsx +1 -1
  453. package/registry/examples/pull-to-refresh/native/branded.js +1 -1
  454. package/registry/examples/pull-to-refresh/native/branded.tsx +1 -1
  455. package/registry/examples/rail-nav/expandable.js +3 -3
  456. package/registry/examples/rail-nav/expandable.tsx +3 -3
  457. package/registry/examples/rail-nav/shortcuts.js +6 -6
  458. package/registry/examples/rail-nav/shortcuts.tsx +6 -6
  459. package/registry/examples/rail-nav/studio.js +5 -5
  460. package/registry/examples/rail-nav/studio.tsx +5 -5
  461. package/registry/examples/scroll-stage/arcade.js +1 -1
  462. package/registry/examples/scroll-stage/arcade.tsx +1 -1
  463. package/registry/examples/shop/booking-closing-mark.js +2 -2
  464. package/registry/examples/shop/booking-closing-mark.tsx +2 -2
  465. package/registry/examples/site-footer/app.js +1 -1
  466. package/registry/examples/site-footer/app.tsx +2 -2
  467. package/registry/examples/site-footer/configured.js +1 -1
  468. package/registry/examples/site-footer/configured.tsx +1 -1
  469. package/registry/examples/site-footer/product.js +3 -3
  470. package/registry/examples/site-footer/product.tsx +4 -4
  471. package/registry/examples/sites/french.js +1 -1
  472. package/registry/examples/sites/french.tsx +1 -1
  473. package/registry/examples/specimen-tag/product.js +4 -4
  474. package/registry/examples/specimen-tag/product.tsx +4 -4
  475. package/registry/examples/specimen-tag/wire.js +3 -3
  476. package/registry/examples/specimen-tag/wire.tsx +3 -3
  477. package/registry/examples/splash-handoff/native/default.js +1 -1
  478. package/registry/examples/splash-handoff/native/default.tsx +1 -1
  479. package/registry/examples/split-view/notifications.js +1 -1
  480. package/registry/examples/split-view/notifications.tsx +1 -1
  481. package/registry/examples/stage-banner/steps.js +1 -1
  482. package/registry/examples/stage-banner/steps.tsx +1 -1
  483. package/registry/examples/status-page/building.js +1 -1
  484. package/registry/examples/status-page/building.tsx +1 -1
  485. package/registry/examples/status-page/operational.js +1 -1
  486. package/registry/examples/status-page/operational.tsx +1 -1
  487. package/registry/examples/step-showcase/desktop.js +2 -2
  488. package/registry/examples/step-showcase/desktop.tsx +2 -2
  489. package/registry/examples/step-showcase/phone.js +1 -1
  490. package/registry/examples/step-showcase/phone.tsx +1 -1
  491. package/registry/examples/stepper/native/run.tsx +1 -1
  492. package/registry/examples/stuck/card.js +1 -1
  493. package/registry/examples/stuck/card.tsx +1 -1
  494. package/registry/examples/stuck/tag.js +1 -1
  495. package/registry/examples/stuck/tag.tsx +2 -2
  496. package/registry/examples/tree-view/docs.js +4 -4
  497. package/registry/examples/tree-view/docs.tsx +4 -4
  498. package/registry/examples/update-prompt/default.js +1 -1
  499. package/registry/examples/update-prompt/default.tsx +1 -1
  500. package/registry/examples/update-prompt/native/default.js +1 -1
  501. package/registry/examples/update-prompt/native/default.tsx +1 -1
  502. package/registry/examples/video-player/signed-source.js +1 -1
  503. package/registry/examples/video-player/signed-source.tsx +1 -1
  504. package/registry/field.json +1 -1
  505. package/registry/file-upload.json +2 -2
  506. package/registry/filter-bar.json +1 -1
  507. package/registry/flock.json +1 -1
  508. package/registry/footnote.json +1 -1
  509. package/registry/force-update-screen.json +4 -4
  510. package/registry/form-flow.json +1 -1
  511. package/registry/form.json +2 -2
  512. package/registry/gallery-page.json +5 -5
  513. package/registry/genui.json +4 -4
  514. package/registry/glossary-term.json +1 -1
  515. package/registry/glossary.json +1 -1
  516. package/registry/glow-card.json +1 -1
  517. package/registry/goal-gauge.json +6 -6
  518. package/registry/grade-stamp.json +1 -1
  519. package/registry/identity-card.json +1 -1
  520. package/registry/image-cropper.json +2 -2
  521. package/registry/index.json +33 -33
  522. package/registry/kanban.json +1 -1
  523. package/registry/kbd.json +1 -1
  524. package/registry/kind-config-editor.json +1 -1
  525. package/registry/kpi-explained.json +1 -1
  526. package/registry/landing-page.json +3 -3
  527. package/registry/landscape.json +2 -2
  528. package/registry/language-switch.json +1 -1
  529. package/registry/legal-page.json +1 -1
  530. package/registry/link-card.json +5 -5
  531. package/registry/list.json +7 -7
  532. package/registry/loader.json +12 -12
  533. package/registry/longform-page.json +4 -4
  534. package/registry/maintenance-screen.json +4 -4
  535. package/registry/map.json +3 -3
  536. package/registry/margin-layout.json +1 -1
  537. package/registry/markdown.json +1 -1
  538. package/registry/marketing-layout.json +6 -6
  539. package/registry/mascot-quote.json +1 -1
  540. package/registry/mascot-state.json +1 -1
  541. package/registry/mascots.json +5 -5
  542. package/registry/match-dialog.json +1 -1
  543. package/registry/media-capture.json +2 -2
  544. package/registry/media-gallery.json +62 -10
  545. package/registry/meter.json +1 -1
  546. package/registry/money-input.json +1 -1
  547. package/registry/nav-bar.json +27 -23
  548. package/registry/next-actions.json +1 -1
  549. package/registry/notification-preferences.json +1 -1
  550. package/registry/number-ticker.json +1 -1
  551. package/registry/opening-hours.json +1 -1
  552. package/registry/page-header.json +1 -1
  553. package/registry/page-hero.json +1 -1
  554. package/registry/page-index.json +1 -1
  555. package/registry/page.json +1 -1
  556. package/registry/pagination.json +1 -1
  557. package/registry/pointer-light.json +1 -1
  558. package/registry/popover.json +1 -1
  559. package/registry/price-catalogue-editor.json +3 -3
  560. package/registry/pricing-page.json +5 -5
  561. package/registry/product-page.json +13 -13
  562. package/registry/profile-card.json +12 -12
  563. package/registry/progress.json +1 -1
  564. package/registry/promise-card.json +6 -6
  565. package/registry/promo-code-field.json +3 -3
  566. package/registry/proposal.json +4 -4
  567. package/registry/pull-to-refresh.json +2 -2
  568. package/registry/qr-code.json +1 -1
  569. package/registry/quota-meter.json +3 -3
  570. package/registry/radio-group.json +1 -1
  571. package/registry/rail-nav.json +38 -34
  572. package/registry/recipes.json +1 -1
  573. package/registry/retro-tv.json +2 -2
  574. package/registry/reviews.json +1 -1
  575. package/registry/router.json +1 -1
  576. package/registry/schema-form.json +4 -4
  577. package/registry/scroll-stage.json +6 -6
  578. package/registry/search-field.json +2 -2
  579. package/registry/section-backdrop.json +1 -1
  580. package/registry/separator.json +3 -3
  581. package/registry/service-card.json +1 -1
  582. package/registry/settings-layout.json +1 -1
  583. package/registry/shop-composer.json +8 -8
  584. package/registry/shop-gallery.json +3 -3
  585. package/registry/shop.json +12 -12
  586. package/registry/showcase.json +1 -1
  587. package/registry/signature.json +1 -1
  588. package/registry/site-cahier.json +1 -1
  589. package/registry/site-footer.json +29 -25
  590. package/registry/sites.json +3 -3
  591. package/registry/skeleton.json +1 -1
  592. package/registry/skip-link.json +1 -1
  593. package/registry/slider.json +1 -1
  594. package/registry/slot-picker.json +1 -1
  595. package/registry/slot.json +1 -1
  596. package/registry/specimen-tag.json +4 -4
  597. package/registry/speed-lines.json +1 -1
  598. package/registry/spinner.json +1 -1
  599. package/registry/splash-handoff.json +4 -4
  600. package/registry/split-view.json +2 -2
  601. package/registry/stage-banner.json +7 -7
  602. package/registry/stat.json +3 -3
  603. package/registry/state-screen.json +1 -1
  604. package/registry/status-chip.json +1 -1
  605. package/registry/status-page.json +9 -9
  606. package/registry/step-progress.json +1 -1
  607. package/registry/step-showcase.json +10 -10
  608. package/registry/stepper.json +2 -2
  609. package/registry/sticky-action.json +1 -1
  610. package/registry/stuck.json +4 -4
  611. package/registry/swipe-deck.json +2 -2
  612. package/registry/switch.json +1 -1
  613. package/registry/tabs.json +1 -1
  614. package/registry/tag-input.json +2 -2
  615. package/registry/tag-selector.json +1 -1
  616. package/registry/taped-photo.json +1 -1
  617. package/registry/terminal-replay.json +2 -2
  618. package/registry/text-style.json +1 -1
  619. package/registry/theme.json +1 -1
  620. package/registry/toast.json +1 -1
  621. package/registry/toc.json +1 -1
  622. package/registry/tooltip.json +1 -1
  623. package/registry/tree-view.json +4 -4
  624. package/registry/update-prompt.json +8 -8
  625. package/registry/upload-queue.json +3 -3
  626. package/registry/usage.json +3 -3
  627. package/registry/verified-badge.json +1 -1
  628. package/registry/versus-card.json +1 -1
  629. package/registry/vertical-video.json +1 -1
  630. package/registry/video-player.json +3 -3
  631. package/registry/video-trimmer.json +2 -2
  632. package/registry/virtual.json +2 -2
  633. package/registry/wall.json +1 -1
  634. package/registry/waveform.json +2 -2
  635. package/skills/form/SKILL.md +1 -1
  636. package/skills/map/SKILL.md +2 -2
  637. package/dist/chunk-6KZDARNX.js.map +0 -1
  638. package/dist/chunk-DRTIE44Z.js.map +0 -1
  639. package/dist/chunk-E46AEUPH.js.map +0 -1
  640. package/dist/chunk-IOTY5HYG.js.map +0 -1
  641. package/dist/chunk-LZK4IRVW.js +0 -307
  642. package/dist/chunk-LZK4IRVW.js.map +0 -1
  643. package/dist/chunk-M3T5RQYV.js.map +0 -1
  644. package/dist/chunk-RCHKIOVV.js.map +0 -1
  645. /package/dist/{chunk-DSDFXPL6.js.map → chunk-757ZTGU5.js.map} +0 -0
  646. /package/dist/{chunk-CEW3LQOZ.js.map → chunk-IEGTRCDI.js.map} +0 -0
  647. /package/dist/{chunk-KVDB4GXV.js.map → chunk-KR2W4ONJ.js.map} +0 -0
  648. /package/dist/{chunk-GOGEYAYK.js.map → chunk-PRD7JRQX.js.map} +0 -0
  649. /package/dist/{chunk-VYZFQE3P.js.map → chunk-QD6SNXF5.js.map} +0 -0
  650. /package/dist/{chunk-YQWYGQTV.js.map → chunk-UIP3WX5O.js.map} +0 -0
  651. /package/dist/{chunk-ZKKMYIDN.js.map → chunk-Y3P5B4XS.js.map} +0 -0
  652. /package/dist/{chunk-GW5EI7MI.js.map → chunk-YXETEQQJ.js.map} +0 -0
  653. /package/dist/{player-lightbox-ASFOSUSD.js.map → player-lightbox-BYQ57OXT.js.map} +0 -0
  654. /package/registry/examples/dashboard-layout/{orazaka-eric.d.ts → sovkora-eric.d.ts} +0 -0
  655. /package/registry/examples/{product-page/orazaka.d.ts → media-gallery/carousel-autoplay.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/app-shell/app-shell.tsx","../src/app-shell/shortcuts.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\">\n {/* Delegated close on link activation; keyboard activation of a link fires a click too. */}\n <div role=\"presentation\" className=\"contents\" onClick={(e) => (e.target as Element).closest(\"a\") && shell.setOpen(false)}>\n <SidebarContent {...content} />\n </div>\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((a, b) => a.localeCompare(b)).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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,SAAS,UAAU,iBAAiB,YAAY;AAChD,YAAYA,YAAW;AACvB,SAAS,UAAU;;;ACVnB,YAAY,WAAW;AAMvB,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,EAA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AAM,QAAQ,SAAS;AACvB,eAAa,EAAE,CAAC,QAAQ,GAAG,MAAM,OAAO,EAAE,CAAC;AAC3C,SACE,qBAAC,YAAO,MAAK,UAAS,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,GAAG,qBAAmB,iBAAiB,UAAU,KAAK,GAAG,SAAS,QAAS,GAAG,OACnI;AAAA,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","key","value"]}
1
+ {"version":3,"sources":["../src/app-shell/app-shell.tsx","../src/app-shell/shortcuts.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, Sovkora 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 Sovkora 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 Sovkora 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\">\n {/* Delegated close on link activation; keyboard activation of a link fires a click too. */}\n <div role=\"presentation\" className=\"contents\" onClick={(e) => (e.target as Element).closest(\"a\") && shell.setOpen(false)}>\n <SidebarContent {...content} />\n </div>\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((a, b) => a.localeCompare(b)).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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAWA,SAAS,UAAU,iBAAiB,YAAY;AAChD,YAAYA,YAAW;AACvB,SAAS,UAAU;;;ACVnB,YAAY,WAAW;AAMvB,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,OAA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2BAA0B,GACpC,GACF;AAAA,IACC,SACC,oBAAC,QAAG,WAAW,EAAE,MAAM,GAAI,GAAG,MAC3B,iBACH;AAAA,IAED;AAAA,IACA,WAAW,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,KACpD;AAEJ;AAeO,SAAS,eAAe,EAAE,OAAO,QAAQ,WAAW,SAAS,WAAW,GAAG,MAAM,GAAwB;AAC9G,QAAM,QAAQ,SAAS;AACvB,eAAa,EAAE,CAAC,QAAQ,GAAG,MAAM,OAAO,EAAE,CAAC;AAC3C,SACE,qBAAC,YAAO,MAAK,UAAS,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,GAAG,qBAAmB,iBAAiB,UAAU,KAAK,GAAG,SAAS,QAAS,GAAG,OACnI;AAAA,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","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="orazaka" /> Orazaka`): in the brand panel, and above the form on a phone. */
114
+ /** The product's mark and name (`<ProductLogo id="sovkora" /> Sovkora`): 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=\"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()} role={promise || aside ? \"complementary\" : undefined} 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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,MAAI,MAAC,WAAW,EAAE,MAAM,GAAG,MAAM,WAAW,QAAQ,kBAAkB,QAAW,eAAa,CAAC,WAAW,CAAC,QAAQ,OAAO,QAClJ;AAAA,sBAAAD,KAAC,SAAI,WAAW,EAAE,WAAW,GAAI,iBAAM;AAAA,MACvC,gBAAAC,MAAC,SAAI,WAAW,EAAE,UAAU,GACzB;AAAA,mBAAW,gBAAAD,KAAC,OAAE,WAAW,EAAE,WAAW,GAAI,mBAAQ;AAAA,QAClD,SAAS,gBAAAA,KAAC,SAAI,WAAW,EAAE,UAAU,GAAI,iBAAM;AAAA,SAClD;AAAA,MACA,gBAAAA,KAAC,SAAI,WAAW,EAAE,UAAU,GAAI,uBAAY;AAAA,OAC9C;AAAA,IACA,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=\"sovkora\" /> Sovkora`): 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()} role={promise || aside ? \"complementary\" : undefined} 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,GA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ACA,gBAAAA,KAAC,SAAI,WAAW,EAAE,UAAU,GAAI,uBAAY;AAAA,OAC9C;AAAA,IACA,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,5 +1,5 @@
1
1
  /** A brand of the default avatars. */
2
- type DefaultAvatarBrand = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
2
+ type DefaultAvatarBrand = "krizaka" | "sovkora" | "verikora" | "folioviv";
3
3
  /**
4
4
  * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.
5
5
  * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):
@@ -59,7 +59,7 @@ declare function pickDefaultPicture<T extends DefaultAvatarPicture>(set: readonl
59
59
  /** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */
60
60
  declare function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | "svg"): string;
61
61
  /**
62
- * The URL of a default avatar: `defaultAvatarUrl({ brand: "orazaka", seed: user.id })`.
62
+ * The URL of a default avatar: `defaultAvatarUrl({ brand: "sovkora", seed: user.id })`.
63
63
  * @param size 256 for lists, 512 for a profile; `"svg"` for the vector.
64
64
  * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.
65
65
  */
@@ -1,5 +1,5 @@
1
1
  // src/avatar/default-avatar.ts
2
- var DEFAULT_AVATAR_BRANDS = ["krizaka", "orazaka", "yomizaka", "akinaza"];
2
+ var DEFAULT_AVATAR_BRANDS = ["krizaka", "sovkora", "verikora", "folioviv"];
3
3
  var DEFAULT_AVATAR_KINDS = ["person", "plain"];
4
4
  var DEFAULT_AVATAR_ENTITY_KINDS = ["person", "folder", "organisation", "shop"];
5
5
  var DEFAULT_AVATAR_SIZES = [256, 512];
@@ -7,9 +7,9 @@ var DEFAULT_AVATAR_TONES = 6;
7
7
  var DEFAULT_AVATAR_BASE = "https://krizaka-assets.b-cdn.net/people/defaults/v1";
8
8
  var BRANDS = {
9
9
  krizaka: { from: [217, 92, 53], to: [217, 92, 68], spread: 14 },
10
- orazaka: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },
11
- yomizaka: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },
12
- akinaza: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 }
10
+ sovkora: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },
11
+ verikora: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },
12
+ folioviv: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 }
13
13
  };
14
14
  var MIN_CONTRAST = 3.2;
15
15
  var OFFSETS = [0, -1, 1, -2, 2, 3];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/avatar/default-avatar.ts"],"sourcesContent":["// The default profile pictures of the Krizaka family: what a product shows when a person has no photo.\n// They are generated from this file (tools/export-brand.mjs renders them to SVG and WebP and uploads them to Bunny,\n// `people/defaults/v1/<brand>/…`), so the pictures and the URLs that name them cannot drift apart.\n\n/** A brand of the default avatars. */\nexport type DefaultAvatarBrand = \"krizaka\" | \"orazaka\" | \"yomizaka\" | \"akinaza\";\n/**\n * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.\n * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):\n * a glyph on the gradient, never a silhouette. The central sets of these kinds are in the Krizaka org JSON (`defaults`, `@krizaka/org`).\n */\nexport type DefaultAvatarKind = \"person\" | \"plain\" | \"folder\" | \"organisation\" | \"shop\";\n/** The kinds of entity that have a set of default pictures of their own (`plain` is a style of `person`). */\nexport type DefaultAvatarEntityKind = \"person\" | \"folder\" | \"organisation\" | \"shop\";\nexport type DefaultAvatarSize = 256 | 512;\n\nexport const DEFAULT_AVATAR_BRANDS: readonly DefaultAvatarBrand[] = [\"krizaka\", \"orazaka\", \"yomizaka\", \"akinaza\"];\n/** The two styles of the legacy brand sets (`people/defaults/v1/<brand>`); the kinds of the central sets are `DEFAULT_AVATAR_ENTITY_KINDS`. */\nexport const DEFAULT_AVATAR_KINDS: readonly DefaultAvatarKind[] = [\"person\", \"plain\"];\nexport const DEFAULT_AVATAR_ENTITY_KINDS: readonly DefaultAvatarEntityKind[] = [\"person\", \"folder\", \"organisation\", \"shop\"];\nexport const DEFAULT_AVATAR_SIZES: readonly DefaultAvatarSize[] = [256, 512];\n/** How many tones each brand has: a person always gets the same one from their seed, so a list is not one colour. */\nexport const DEFAULT_AVATAR_TONES = 6;\n\n/** Where the set lives. `v1` is the set's version: a changed picture is a new version folder, never an overwrite. */\nexport const DEFAULT_AVATAR_BASE = \"https://krizaka-assets.b-cdn.net/people/defaults/v1\";\n\nexport interface DefaultAvatar {\n /** The brand of the product showing the avatar: its gradient, its hues. */\n brand: DefaultAvatarBrand;\n /** Any stable text or number of the person (their id): the same seed gives the same tone everywhere. */\n seed?: string | number;\n /** Force a tone, 1 to 6, instead of deriving it from `seed`. */\n tone?: number;\n /**\n * `person` (default): a silhouette. `plain`: the gradient alone. `folder`, `organisation`, `shop`: that thing's glyph, drawn here\n * (a data URL, no request) — a folder is never given a person.\n * @default \"person\"\n */\n kind?: DefaultAvatarKind;\n /**\n * The family's central set (`listDefaults(\"person\")` of `@krizaka/org`): when given with a `seed`, the avatar is the set's picture for that seed —\n * the same person has the same picture in every product — instead of the brand's silhouette. An empty set, or no seed, draws the silhouette.\n */\n set?: readonly DefaultAvatarPicture[];\n}\n\n/** The mark gradient of each brand (BRAND.md, `$extensions[\"com.krizaka\"].mark`) as [hue, saturation %, lightness %] and the hue spread of its tones. */\nconst BRANDS: Record<DefaultAvatarBrand, { from: [number, number, number]; to: [number, number, number]; spread: number }> = {\n krizaka: { from: [217, 92, 53], to: [217, 92, 68], spread: 14 },\n orazaka: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },\n yomizaka: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },\n akinaza: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 },\n};\n\n/** White on top of a stop must stay visible: a stop is darkened until the contrast reaches this (WCAG 1.4.11, non-text). */\nconst MIN_CONTRAST = 3.2;\nconst OFFSETS = [0, -1, 1, -2, 2, 3] as const;\n\nfunction hslToHex([h, s, l]: [number, number, number]): string {\n const sat = s / 100;\n const light = l / 100;\n const k = (n: number) => (n + (((h % 360) + 360) % 360) / 30) % 12;\n const a = sat * Math.min(light, 1 - light);\n const channel = (n: number) => Math.round(255 * (light - a * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1))));\n return `#${[0, 8, 4].map((n) => channel(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\nconst channelLuminance = (v: number) => (v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4);\nconst whiteContrast = (hex: string) => {\n const [r, g, b] = [1, 3, 5].map((i) => channelLuminance(Number.parseInt(hex.slice(i, i + 2), 16) / 255));\n return 1.05 / (0.2126 * r! + 0.7152 * g! + 0.0722 * b! + 0.05);\n};\n/** The stop, darkened one point of lightness at a time until white reads on it. */\nfunction readable([h, s, l]: [number, number, number]): string {\n let hex = hslToHex([h, s, l]);\n for (let light = l; whiteContrast(hex) < MIN_CONTRAST && light > 10; light -= 1) hex = hslToHex([h, s, light]);\n return hex;\n}\n\n/** The two stops (hex) of tone `tone` (1 to 6) of a brand. */\nexport function defaultAvatarTone(brand: DefaultAvatarBrand, tone: number): readonly [string, string] {\n const b = BRANDS[brand];\n const o = OFFSETS[(clampTone(tone) - 1) % OFFSETS.length] * b.spread;\n return [readable([b.from[0] + o, b.from[1], b.from[2]]), readable([b.to[0] + o, b.to[1], b.to[2]])];\n}\n\nconst clampTone = (tone: number) => Math.min(DEFAULT_AVATAR_TONES, Math.max(1, Math.round(tone)));\n\n/** 32-bit FNV-1a of a seed: the rule of the family's default pictures (`@krizaka/org`'s `seedHash` is the same function). */\nexport function defaultAvatarSeedHash(seed: string | number): number {\n let h = 0x811c9dc5;\n for (const ch of String(seed)) {\n h ^= ch.codePointAt(0)!;\n h = Math.imul(h, 0x01000193) >>> 0;\n }\n return h;\n}\n\n/** 1 to 6 from a seed (FNV-1a): stable across renders, devices and products. */\nexport function defaultAvatarToneOf(seed: string | number | undefined): number {\n if (seed === undefined) return 1;\n return (defaultAvatarSeedHash(seed) % DEFAULT_AVATAR_TONES) + 1;\n}\n\n/**\n * One picture of the family's central set, as `@krizaka/org` lists it (`listDefaults(\"person\")` items fit as they are): the sizes it is served in.\n * `disabled` pictures are never picked.\n */\nexport interface DefaultAvatarPicture {\n id: string;\n disabled?: boolean;\n urls: { webp: Readonly<Record<string, string>> };\n}\n\n/** The picture a seed gets from a set: `set[fnv1a(seed) mod n]` among the pictures not disabled, in the set's order — the same rule as `@krizaka/org`'s `defaultFor`. */\nexport function pickDefaultPicture<T extends DefaultAvatarPicture>(set: readonly T[], seed: string | number): T | undefined {\n const usable = set.filter((picture) => !picture.disabled);\n return usable[defaultAvatarSeedHash(seed) % usable.length];\n}\n\nconst resolveTone = (a: DefaultAvatar) => (a.tone === undefined ? defaultAvatarToneOf(a.seed) : clampTone(a.tone));\n\n/** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */\nexport function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | \"svg\"): string {\n return size === \"svg\" ? `${kind}-${tone}.svg` : `${kind}-${tone}-${size}.webp`;\n}\n\n/** Linear on purpose: a `/\\/+$/` regex backtracks quadratically on a long run of slashes. */\nfunction trimTrailingSlashes(value: string): string {\n let end = value.length;\n while (end > 0 && value[end - 1] === \"/\") end--;\n return value.slice(0, end);\n}\n\n/**\n * The URL of a default avatar: `defaultAvatarUrl({ brand: \"orazaka\", seed: user.id })`.\n * @param size 256 for lists, 512 for a profile; `\"svg\"` for the vector.\n * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.\n */\nexport function defaultAvatarUrl(avatar: DefaultAvatar, { size = 256, base = DEFAULT_AVATAR_BASE }: { size?: DefaultAvatarSize | \"svg\"; base?: string } = {}): string {\n if (isGlyphKind(avatar.kind)) return defaultAvatarDataUrl(avatar);\n if (avatar.set && avatar.seed !== undefined) {\n // The size asked, as the set serves it (256 and 512; the vector has none, so it stays the brand's silhouette).\n const picked = pickDefaultPicture(avatar.set, avatar.seed)?.urls.webp[size];\n if (picked) return picked;\n }\n return `${trimTrailingSlashes(base)}/${avatar.brand}/${defaultAvatarFile(avatar.kind ?? \"person\", resolveTone(avatar), size)}`;\n}\n\nconst GLYPHS: Record<\"folder\" | \"organisation\" | \"shop\", (from: string) => string> = {\n folder: () => `<path d=\"M96 176a28 28 0 0 1 28-28h92l40 44h132a28 28 0 0 1 28 28v152a28 28 0 0 1-28 28H124a28 28 0 0 1-28-28z\" fill=\"#fff\" fill-opacity=\".92\"/>`,\n organisation: (from) =>\n `<rect x=\"136\" y=\"104\" width=\"240\" height=\"304\" rx=\"16\" fill=\"#fff\" fill-opacity=\".92\"/>${[160, 226, 292]\n .flatMap((y) => [168, 236, 304].map((x) => `<rect x=\"${x}\" y=\"${y}\" width=\"40\" height=\"40\" rx=\"6\" fill=\"${from}\"/>`))\n .join(\"\")}<rect x=\"232\" y=\"352\" width=\"48\" height=\"56\" rx=\"6\" fill=\"${from}\"/>`,\n shop: (from) =>\n `<path d=\"M112 132h288l24 84a56 56 0 0 1-112 0 56 56 0 0 1-112 0 56 56 0 0 1-112 0z\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"136\" y=\"292\" width=\"240\" height=\"116\" rx=\"12\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"226\" y=\"326\" width=\"60\" height=\"82\" rx=\"8\" fill=\"${from}\"/><rect x=\"156\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/><rect x=\"308\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/>`,\n};\n\ntype GlyphKind = keyof typeof GLYPHS;\nconst isGlyphKind = (kind: DefaultAvatarKind | undefined): kind is GlyphKind => kind === \"folder\" || kind === \"organisation\" || kind === \"shop\";\n\n/** The picture as a `data:` URL: nothing to fetch, so a folder, an organisation or a shop always has its picture (offline, in a test, before the CDN answers). */\nexport function defaultAvatarDataUrl(avatar: DefaultAvatar): string {\n return `data:image/svg+xml,${encodeURIComponent(defaultAvatarSvg(avatar))}`;\n}\n\n/** The SVG source of a default avatar, 512 × 512 and square (the Avatar clips it round). */\nexport function defaultAvatarSvg(avatar: DefaultAvatar): string {\n const [from, to] = defaultAvatarTone(avatar.brand, resolveTone(avatar));\n const kind = avatar.kind ?? \"person\";\n const person = isGlyphKind(kind)\n ? GLYPHS[kind](from)\n : kind === \"person\"\n ? `<circle cx=\"256\" cy=\"200\" r=\"86\" fill=\"#fff\" fill-opacity=\".92\"/><path d=\"M84 512c0-108 78-182 172-182s172 74 172 182z\" fill=\"#fff\" fill-opacity=\".92\"/>`\n : \"\";\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width=\"512\" height=\"512\"><defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"${from}\"/><stop offset=\"1\" stop-color=\"${to}\"/></linearGradient><radialGradient id=\"l\" cx=\".28\" cy=\".18\" r=\".85\"><stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".24\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient></defs><rect width=\"512\" height=\"512\" fill=\"url(#g)\"/><rect width=\"512\" height=\"512\" fill=\"url(#l)\"/>${person}</svg>`;\n}\n"],"mappings":";AAgBO,IAAM,wBAAuD,CAAC,WAAW,WAAW,YAAY,SAAS;AAEzG,IAAM,uBAAqD,CAAC,UAAU,OAAO;AAC7E,IAAM,8BAAkE,CAAC,UAAU,UAAU,gBAAgB,MAAM;AACnH,IAAM,uBAAqD,CAAC,KAAK,GAAG;AAEpE,IAAM,uBAAuB;AAG7B,IAAM,sBAAsB;AAuBnC,IAAM,SAAuH;AAAA,EAC3H,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC9D,SAAS,EAAE,MAAM,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,EAAE;AAAA,EAC/D,UAAU,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC/D,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,GAAG;AAC/D;AAGA,IAAM,eAAe;AACrB,IAAM,UAAU,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC;AAEnC,SAAS,SAAS,CAAC,GAAG,GAAG,CAAC,GAAqC;AAC7D,QAAM,MAAM,IAAI;AAChB,QAAM,QAAQ,IAAI;AAClB,QAAM,IAAI,CAAC,OAAe,KAAO,IAAI,MAAO,OAAO,MAAO,MAAM;AAChE,QAAM,IAA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IAAI,GAAG,KAAK,KAAK,IAAI;AAC1E,QAAI,OAAQ,QAAO;AAAA,EACrB;AACA,SAAO,GAAG,oBAAoB,IAAI,CAAC,IAAI,OAAO,KAAK,IAAI,kBAAkB,OAAO,QAAQ,UAAU,YAAY,MAAM,GAAG,IAAI,CAAC;AAC9H;AAEA,IAAM,SAA+E;AAAA,EACnF,QAAQ,MAAM;AAAA,EACd,cAAc,CAAC,SACb,0FAA0F,CAAC,KAAK,KAAK,GAAG,EACrG,QAAQ,CAAC,MAAM,CAAC,KAAK,KAAK,GAAG,EAAE,IAAI,CAAC,MAAM,YAAY,CAAC,QAAQ,CAAC,yCAAyC,IAAI,KAAK,CAAC,EACnH,KAAK,EAAE,CAAC,6DAA6D,IAAI;AAAA,EAC9E,MAAM,CAAC,SACL,wQAAwQ,IAAI,gEAAgE,IAAI,gEAAgE,IAAI;AACxZ;AAGA,IAAM,cAAc,CAAC,SAA2D,SAAS,YAAY,SAAS,kBAAkB,SAAS;AAGlI,SAAS,qBAAqB,QAA+B;AAClE,SAAO,sBAAsB,mBAAmB,iBAAiB,MAAM,CAAC,CAAC;AAC3E;AAGO,SAAS,iBAAiB,QAA+B;AAC9D,QAAM,CAAC,MAAM,EAAE,IAAI,kBAAkB,OAAO,OAAO,YAAY,MAAM,CAAC;AACtE,QAAM,OAAO,OAAO,QAAQ;AAC5B,QAAM,SAAS,YAAY,IAAI,IAC3B,OAAO,IAAI,EAAE,IAAI,IACjB,SAAS,WACP,6JACA;AACN,SAAO,gLAAgL,IAAI,mCAAmC,EAAE,0SAA0S,MAAM;AAClhB;","names":[]}
1
+ {"version":3,"sources":["../../src/avatar/default-avatar.ts"],"sourcesContent":["// The default profile pictures of the Krizaka family: what a product shows when a person has no photo.\n// They are generated from this file (tools/export-brand.mjs renders them to SVG and WebP and uploads them to Bunny,\n// `people/defaults/v1/<brand>/…`), so the pictures and the URLs that name them cannot drift apart.\n\n/** A brand of the default avatars. */\nexport type DefaultAvatarBrand = \"krizaka\" | \"sovkora\" | \"verikora\" | \"folioviv\";\n/**\n * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.\n * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):\n * a glyph on the gradient, never a silhouette. The central sets of these kinds are in the Krizaka org JSON (`defaults`, `@krizaka/org`).\n */\nexport type DefaultAvatarKind = \"person\" | \"plain\" | \"folder\" | \"organisation\" | \"shop\";\n/** The kinds of entity that have a set of default pictures of their own (`plain` is a style of `person`). */\nexport type DefaultAvatarEntityKind = \"person\" | \"folder\" | \"organisation\" | \"shop\";\nexport type DefaultAvatarSize = 256 | 512;\n\nexport const DEFAULT_AVATAR_BRANDS: readonly DefaultAvatarBrand[] = [\"krizaka\", \"sovkora\", \"verikora\", \"folioviv\"];\n/** The two styles of the legacy brand sets (`people/defaults/v1/<brand>`); the kinds of the central sets are `DEFAULT_AVATAR_ENTITY_KINDS`. */\nexport const DEFAULT_AVATAR_KINDS: readonly DefaultAvatarKind[] = [\"person\", \"plain\"];\nexport const DEFAULT_AVATAR_ENTITY_KINDS: readonly DefaultAvatarEntityKind[] = [\"person\", \"folder\", \"organisation\", \"shop\"];\nexport const DEFAULT_AVATAR_SIZES: readonly DefaultAvatarSize[] = [256, 512];\n/** How many tones each brand has: a person always gets the same one from their seed, so a list is not one colour. */\n// @fixed: the number of tone files drawn per brand in the published set (`people/defaults/v1/<brand>/person-<1..6>`)\nexport const DEFAULT_AVATAR_TONES = 6;\n\n/** Where the set lives. `v1` is the set's version: a changed picture is a new version folder, never an overwrite. */\nexport const DEFAULT_AVATAR_BASE = \"https://krizaka-assets.b-cdn.net/people/defaults/v1\";\n\nexport interface DefaultAvatar {\n /** The brand of the product showing the avatar: its gradient, its hues. */\n brand: DefaultAvatarBrand;\n /** Any stable text or number of the person (their id): the same seed gives the same tone everywhere. */\n seed?: string | number;\n /** Force a tone, 1 to 6, instead of deriving it from `seed`. */\n tone?: number;\n /**\n * `person` (default): a silhouette. `plain`: the gradient alone. `folder`, `organisation`, `shop`: that thing's glyph, drawn here\n * (a data URL, no request) — a folder is never given a person.\n * @default \"person\"\n */\n kind?: DefaultAvatarKind;\n /**\n * The family's central set (`listDefaults(\"person\")` of `@krizaka/org`): when given with a `seed`, the avatar is the set's picture for that seed —\n * the same person has the same picture in every product — instead of the brand's silhouette. An empty set, or no seed, draws the silhouette.\n */\n set?: readonly DefaultAvatarPicture[];\n}\n\n/** The mark gradient of each brand (BRAND.md, `$extensions[\"com.krizaka\"].mark`) as [hue, saturation %, lightness %] and the hue spread of its tones. */\nconst BRANDS: Record<DefaultAvatarBrand, { from: [number, number, number]; to: [number, number, number]; spread: number }> = {\n krizaka: { from: [217, 92, 53], to: [217, 92, 68], spread: 14 },\n sovkora: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },\n verikora: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },\n folioviv: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 },\n};\n\n/** White on top of a stop must stay visible: a stop is darkened until the contrast reaches this (WCAG 1.4.11, non-text). */\nconst MIN_CONTRAST = 3.2;\nconst OFFSETS = [0, -1, 1, -2, 2, 3] as const;\n\nfunction hslToHex([h, s, l]: [number, number, number]): string {\n const sat = s / 100;\n const light = l / 100;\n const k = (n: number) => (n + (((h % 360) + 360) % 360) / 30) % 12;\n const a = sat * Math.min(light, 1 - light);\n const channel = (n: number) => Math.round(255 * (light - a * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1))));\n return `#${[0, 8, 4].map((n) => channel(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\nconst channelLuminance = (v: number) => (v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4);\nconst whiteContrast = (hex: string) => {\n const [r, g, b] = [1, 3, 5].map((i) => channelLuminance(Number.parseInt(hex.slice(i, i + 2), 16) / 255));\n return 1.05 / (0.2126 * r! + 0.7152 * g! + 0.0722 * b! + 0.05);\n};\n/** The stop, darkened one point of lightness at a time until white reads on it. */\nfunction readable([h, s, l]: [number, number, number]): string {\n let hex = hslToHex([h, s, l]);\n for (let light = l; whiteContrast(hex) < MIN_CONTRAST && light > 10; light -= 1) hex = hslToHex([h, s, light]);\n return hex;\n}\n\n/** The two stops (hex) of tone `tone` (1 to 6) of a brand. */\nexport function defaultAvatarTone(brand: DefaultAvatarBrand, tone: number): readonly [string, string] {\n const b = BRANDS[brand];\n const o = OFFSETS[(clampTone(tone) - 1) % OFFSETS.length] * b.spread;\n return [readable([b.from[0] + o, b.from[1], b.from[2]]), readable([b.to[0] + o, b.to[1], b.to[2]])];\n}\n\nconst clampTone = (tone: number) => Math.min(DEFAULT_AVATAR_TONES, Math.max(1, Math.round(tone)));\n\n/** 32-bit FNV-1a of a seed: the rule of the family's default pictures (`@krizaka/org`'s `seedHash` is the same function). */\nexport function defaultAvatarSeedHash(seed: string | number): number {\n let h = 0x811c9dc5;\n for (const ch of String(seed)) {\n h ^= ch.codePointAt(0)!;\n h = Math.imul(h, 0x01000193) >>> 0;\n }\n return h;\n}\n\n/** 1 to 6 from a seed (FNV-1a): stable across renders, devices and products. */\nexport function defaultAvatarToneOf(seed: string | number | undefined): number {\n if (seed === undefined) return 1;\n return (defaultAvatarSeedHash(seed) % DEFAULT_AVATAR_TONES) + 1;\n}\n\n/**\n * One picture of the family's central set, as `@krizaka/org` lists it (`listDefaults(\"person\")` items fit as they are): the sizes it is served in.\n * `disabled` pictures are never picked.\n */\nexport interface DefaultAvatarPicture {\n id: string;\n disabled?: boolean;\n urls: { webp: Readonly<Record<string, string>> };\n}\n\n/** The picture a seed gets from a set: `set[fnv1a(seed) mod n]` among the pictures not disabled, in the set's order — the same rule as `@krizaka/org`'s `defaultFor`. */\nexport function pickDefaultPicture<T extends DefaultAvatarPicture>(set: readonly T[], seed: string | number): T | undefined {\n const usable = set.filter((picture) => !picture.disabled);\n return usable[defaultAvatarSeedHash(seed) % usable.length];\n}\n\nconst resolveTone = (a: DefaultAvatar) => (a.tone === undefined ? defaultAvatarToneOf(a.seed) : clampTone(a.tone));\n\n/** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */\nexport function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | \"svg\"): string {\n return size === \"svg\" ? `${kind}-${tone}.svg` : `${kind}-${tone}-${size}.webp`;\n}\n\n/** Linear on purpose: a `/\\/+$/` regex backtracks quadratically on a long run of slashes. */\nfunction trimTrailingSlashes(value: string): string {\n let end = value.length;\n while (end > 0 && value[end - 1] === \"/\") end--;\n return value.slice(0, end);\n}\n\n/**\n * The URL of a default avatar: `defaultAvatarUrl({ brand: \"sovkora\", seed: user.id })`.\n * @param size 256 for lists, 512 for a profile; `\"svg\"` for the vector.\n * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.\n */\nexport function defaultAvatarUrl(avatar: DefaultAvatar, { size = 256, base = DEFAULT_AVATAR_BASE }: { size?: DefaultAvatarSize | \"svg\"; base?: string } = {}): string {\n if (isGlyphKind(avatar.kind)) return defaultAvatarDataUrl(avatar);\n if (avatar.set && avatar.seed !== undefined) {\n // The size asked, as the set serves it (256 and 512; the vector has none, so it stays the brand's silhouette).\n const picked = pickDefaultPicture(avatar.set, avatar.seed)?.urls.webp[size];\n if (picked) return picked;\n }\n return `${trimTrailingSlashes(base)}/${avatar.brand}/${defaultAvatarFile(avatar.kind ?? \"person\", resolveTone(avatar), size)}`;\n}\n\nconst GLYPHS: Record<\"folder\" | \"organisation\" | \"shop\", (from: string) => string> = {\n folder: () => `<path d=\"M96 176a28 28 0 0 1 28-28h92l40 44h132a28 28 0 0 1 28 28v152a28 28 0 0 1-28 28H124a28 28 0 0 1-28-28z\" fill=\"#fff\" fill-opacity=\".92\"/>`,\n organisation: (from) =>\n `<rect x=\"136\" y=\"104\" width=\"240\" height=\"304\" rx=\"16\" fill=\"#fff\" fill-opacity=\".92\"/>${[160, 226, 292]\n .flatMap((y) => [168, 236, 304].map((x) => `<rect x=\"${x}\" y=\"${y}\" width=\"40\" height=\"40\" rx=\"6\" fill=\"${from}\"/>`))\n .join(\"\")}<rect x=\"232\" y=\"352\" width=\"48\" height=\"56\" rx=\"6\" fill=\"${from}\"/>`,\n shop: (from) =>\n `<path d=\"M112 132h288l24 84a56 56 0 0 1-112 0 56 56 0 0 1-112 0 56 56 0 0 1-112 0z\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"136\" y=\"292\" width=\"240\" height=\"116\" rx=\"12\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"226\" y=\"326\" width=\"60\" height=\"82\" rx=\"8\" fill=\"${from}\"/><rect x=\"156\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/><rect x=\"308\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/>`,\n};\n\ntype GlyphKind = keyof typeof GLYPHS;\nconst isGlyphKind = (kind: DefaultAvatarKind | undefined): kind is GlyphKind => kind === \"folder\" || kind === \"organisation\" || kind === \"shop\";\n\n/** The picture as a `data:` URL: nothing to fetch, so a folder, an organisation or a shop always has its picture (offline, in a test, before the CDN answers). */\nexport function defaultAvatarDataUrl(avatar: DefaultAvatar): string {\n return `data:image/svg+xml,${encodeURIComponent(defaultAvatarSvg(avatar))}`;\n}\n\n/** The SVG source of a default avatar, 512 × 512 and square (the Avatar clips it round). */\nexport function defaultAvatarSvg(avatar: DefaultAvatar): string {\n const [from, to] = defaultAvatarTone(avatar.brand, resolveTone(avatar));\n const kind = avatar.kind ?? \"person\";\n const person = isGlyphKind(kind)\n ? GLYPHS[kind](from)\n : kind === \"person\"\n ? `<circle cx=\"256\" cy=\"200\" r=\"86\" fill=\"#fff\" fill-opacity=\".92\"/><path d=\"M84 512c0-108 78-182 172-182s172 74 172 182z\" fill=\"#fff\" fill-opacity=\".92\"/>`\n : \"\";\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width=\"512\" height=\"512\"><defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"${from}\"/><stop offset=\"1\" stop-color=\"${to}\"/></linearGradient><radialGradient id=\"l\" cx=\".28\" cy=\".18\" r=\".85\"><stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".24\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient></defs><rect width=\"512\" height=\"512\" fill=\"url(#g)\"/><rect width=\"512\" height=\"512\" fill=\"url(#l)\"/>${person}</svg>`;\n}\n"],"mappings":";AAgBO,IAAM,wBAAuD,CAAC,WAAW,WAAW,YAAY,UAAU;AAE1G,IAAM,uBAAqD,CAAC,UAAU,OAAO;AAC7E,IAAM,8BAAkE,CAAC,UAAU,UAAU,gBAAgB,MAAM;AACnH,IAAM,uBAAqD,CAAC,KAAK,GAAG;AAGpE,IAAM,uBAAuB;AAG7B,IAAM,sBAAsB;AAuBnC,IAAM,SAAuH;AAAA,EAC3H,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC9D,SAAS,EAAE,MAAM,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,EAAE;AAAA,EAC/D,UAAU,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC/D,UAAU,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,GAAG;AAChE;AAGA,IAAM,eAAe;AACrB,IAAM,UAAU,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC;AAEnC,SAAS,SAAS,CAAC,GAAG,GAAG,CAAC,GAAqC;AAC7D,QAAM,MAAM,IAAI;AAChB,QAAM,QAAQ,IAAI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,MAAI,OAAO,OAAO,OAAO,SAAS,QAAW;AAE3C,UAAM,SAAS,mBAAmB,OAAO,KAAK,OAAO,IAAI,GAAG,KAAK,KAAK,IAAI;AAC1E,QAAI,OAAQ,QAAO;AAAA,EACrB;AACA,SAAO,GAAG,oBAAoB,IAAI,CAAC,IAAI,OAAO,KAAK,IAAI,kBAAkB,OAAO,QAAQ,UAAU,YAAY,MAAM,GAAG,IAAI,CAAC;AAC9H;AAEA,IAAM,SAA+E;AAAA,EACnF,QAAQ,MAAM;AAAA,EACd,cAAc,CAAC,SACb,0FAA0F,CAAC,KAAK,KAAK,GAAG,EACrG,QAAQ,CAAC,MAAM,CAAC,KAAK,KAAK,GAAG,EAAE,IAAI,CAAC,MAAM,YAAY,CAAC,QAAQ,CAAC,yCAAyC,IAAI,KAAK,CAAC,EACnH,KAAK,EAAE,CAAC,6DAA6D,IAAI;AAAA,EAC9E,MAAM,CAAC,SACL,wQAAwQ,IAAI,gEAAgE,IAAI,gEAAgE,IAAI;AACxZ;AAGA,IAAM,cAAc,CAAC,SAA2D,SAAS,YAAY,SAAS,kBAAkB,SAAS;AAGlI,SAAS,qBAAqB,QAA+B;AAClE,SAAO,sBAAsB,mBAAmB,iBAAiB,MAAM,CAAC,CAAC;AAC3E;AAGO,SAAS,iBAAiB,QAA+B;AAC9D,QAAM,CAAC,MAAM,EAAE,IAAI,kBAAkB,OAAO,OAAO,YAAY,MAAM,CAAC;AACtE,QAAM,OAAO,OAAO,QAAQ;AAC5B,QAAM,SAAS,YAAY,IAAI,IAC3B,OAAO,IAAI,EAAE,IAAI,IACjB,SAAS,WACP,6JACA;AACN,SAAO,gLAAgL,IAAI,mCAAmC,EAAE,0SAA0S,MAAM;AAClhB;","names":[]}
@@ -3,7 +3,7 @@ import { VariantProps } from 'tailwind-variants';
3
3
  import * as React from 'react';
4
4
 
5
5
  /** A brand of the default avatars. */
6
- type DefaultAvatarBrand = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
6
+ type DefaultAvatarBrand = "krizaka" | "sovkora" | "verikora" | "folioviv";
7
7
  /**
8
8
  * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.
9
9
  * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):
@@ -125,7 +125,7 @@ type AvatarProps = Omit<React.ComponentProps<"span">, "children"> & {
125
125
  fallbackSrc?: string;
126
126
  /**
127
127
  * The Krizaka default picture when the person has no photo (or it fails): their brand's gradient and a silhouette,
128
- * one of six tones from `seed` — `defaultAvatar={{ brand: "orazaka", seed: user.id }}`. `fallbackSrc` wins over it.
128
+ * one of six tones from `seed` — `defaultAvatar={{ brand: "sovkora", seed: user.id }}`. `fallbackSrc` wins over it.
129
129
  */
130
130
  defaultAvatar?: DefaultAvatar;
131
131
  /**
package/dist/avatar.d.ts CHANGED
@@ -3,7 +3,7 @@ import { VariantProps } from 'tailwind-variants';
3
3
  import * as React from 'react';
4
4
 
5
5
  /** A brand of the default avatars. */
6
- type DefaultAvatarBrand = "krizaka" | "orazaka" | "yomizaka" | "akinaza";
6
+ type DefaultAvatarBrand = "krizaka" | "sovkora" | "verikora" | "folioviv";
7
7
  /**
8
8
  * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.
9
9
  * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):
@@ -63,7 +63,7 @@ declare function pickDefaultPicture<T extends DefaultAvatarPicture>(set: readonl
63
63
  /** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */
64
64
  declare function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | "svg"): string;
65
65
  /**
66
- * The URL of a default avatar: `defaultAvatarUrl({ brand: "orazaka", seed: user.id })`.
66
+ * The URL of a default avatar: `defaultAvatarUrl({ brand: "sovkora", seed: user.id })`.
67
67
  * @param size 256 for lists, 512 for a profile; `"svg"` for the vector.
68
68
  * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.
69
69
  */
@@ -158,7 +158,7 @@ type AvatarProps = Omit<React.ComponentProps<"span">, "children"> & {
158
158
  fallbackSrc?: string;
159
159
  /**
160
160
  * The Krizaka default picture when the person has no photo (or it fails): their brand's gradient and a silhouette,
161
- * one of six tones from `seed` — `defaultAvatar={{ brand: "orazaka", seed: user.id }}`. `fallbackSrc` wins over it.
161
+ * one of six tones from `seed` — `defaultAvatar={{ brand: "sovkora", seed: user.id }}`. `fallbackSrc` wins over it.
162
162
  */
163
163
  defaultAvatar?: DefaultAvatar;
164
164
  /**
package/dist/avatar.js CHANGED
@@ -6,7 +6,7 @@ import * as React from "react";
6
6
  import { tv } from "tailwind-variants";
7
7
 
8
8
  // src/avatar/default-avatar.ts
9
- var DEFAULT_AVATAR_BRANDS = ["krizaka", "orazaka", "yomizaka", "akinaza"];
9
+ var DEFAULT_AVATAR_BRANDS = ["krizaka", "sovkora", "verikora", "folioviv"];
10
10
  var DEFAULT_AVATAR_KINDS = ["person", "plain"];
11
11
  var DEFAULT_AVATAR_ENTITY_KINDS = ["person", "folder", "organisation", "shop"];
12
12
  var DEFAULT_AVATAR_SIZES = [256, 512];
@@ -14,9 +14,9 @@ var DEFAULT_AVATAR_TONES = 6;
14
14
  var DEFAULT_AVATAR_BASE = "https://krizaka-assets.b-cdn.net/people/defaults/v1";
15
15
  var BRANDS = {
16
16
  krizaka: { from: [217, 92, 53], to: [217, 92, 68], spread: 14 },
17
- orazaka: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },
18
- yomizaka: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },
19
- akinaza: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 }
17
+ sovkora: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },
18
+ verikora: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },
19
+ folioviv: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 }
20
20
  };
21
21
  var MIN_CONTRAST = 3.2;
22
22
  var OFFSETS = [0, -1, 1, -2, 2, 3];
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/avatar/avatar.tsx","../src/avatar/default-avatar.ts"],"sourcesContent":["// Client: Radix tracks the image's loading state and shows the fallback until it has loaded (or when it fails).\nimport { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { type DefaultAvatar, defaultAvatarUrl } from \"./default-avatar\";\n\nconst avatar = tv({\n slots: {\n root: \"relative inline-flex shrink-0 overflow-hidden rounded-full bg-surface-3 align-middle\",\n image: \"h-full w-full object-cover\",\n fallback: \"flex h-full w-full items-center justify-center font-semibold uppercase text-fg-secondary\",\n group: \"flex items-center -space-x-2 [&>*]:ring-2 [&>*]:ring-surface-0\",\n },\n variants: {\n size: {\n xs: { root: \"h-5 w-5 text-[9px]\" },\n sm: { root: \"h-8 w-8 text-xs\" },\n md: { root: \"h-10 w-10 text-sm\" },\n lg: { root: \"h-14 w-14 text-base\" },\n xl: { root: \"h-20 w-20 text-lg\" },\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport type AvatarSize = NonNullable<VariantProps<typeof avatar>[\"size\"]>;\n\nexport type AvatarProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n /** The image's URL; `null` or nothing shows the `fallback`. */\n src?: string | null;\n /** The image's text alternative (the person's name); empty when a visible name sits next to the avatar. */\n alt?: string;\n /** Shown while the image loads, when it fails or when there is none: initials, an icon. */\n fallback?: React.ReactNode;\n /** The picture to show instead when `src` is missing or fails to load (an image URL). The `fallback` still covers its own loading. */\n fallbackSrc?: string;\n /**\n * The Krizaka default picture when the person has no photo (or it fails): their brand's gradient and a silhouette,\n * one of six tones from `seed` — `defaultAvatar={{ brand: \"orazaka\", seed: user.id }}`. `fallbackSrc` wins over it.\n */\n defaultAvatar?: DefaultAvatar;\n /**\n * xs · sm · md · lg · xl.\n * @default \"md\"\n */\n size?: AvatarSize;\n};\n\nexport function AvatarRoot({ src, alt = \"\", fallback, fallbackSrc, defaultAvatar, size, className, ...props }: AvatarProps) {\n const s = avatar({ size });\n const [failed, setFailed] = React.useState<string | null>(null);\n // 512 px for the big sizes, 256 for the others: sharp on a 2x screen either way.\n const backup = fallbackSrc ?? (defaultAvatar ? defaultAvatarUrl(defaultAvatar, { size: size === \"xl\" || size === \"lg\" ? 512 : 256 }) : undefined);\n const shown = src && failed !== src ? src : backup;\n return (\n <AvatarPrimitive.Root data-size={size ?? \"md\"} className={s.root({ className })} {...props}>\n {shown && (\n <AvatarPrimitive.Image\n src={shown}\n alt={alt}\n className={s.image()}\n onLoadingStatusChange={(status) => {\n if (status === \"error\" && shown === src) setFailed(src);\n }}\n />\n )}\n <AvatarPrimitive.Fallback delayMs={shown ? 300 : 0} className={s.fallback()}>\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n );\n}\n\nexport type AvatarGroupProps = React.ComponentProps<\"div\"> & {\n /** How many avatars are shown; the rest becomes a `+n` avatar. */\n max?: number;\n /** The size of the `+n` avatar (match the avatars of the group). */\n size?: AvatarSize;\n};\n\n/** Overlapping avatars; past `max`, a `+n` avatar counts the rest. */\nexport function AvatarGroup({ max, size, className, children, ...props }: AvatarGroupProps) {\n const items = React.Children.toArray(children);\n const shown = max === undefined ? items : items.slice(0, max);\n const rest = items.length - shown.length;\n return (\n <div className={avatar().group({ className })} {...props}>\n {shown}\n {rest > 0 && <AvatarRoot size={size} fallback={`+${rest}`} />}\n </div>\n );\n}\n\n/** `Avatar` (an image with a fallback) and `Avatar.Group`. */\nexport const Avatar = Object.assign(AvatarRoot, { Group: AvatarGroup });\n","// The default profile pictures of the Krizaka family: what a product shows when a person has no photo.\n// They are generated from this file (tools/export-brand.mjs renders them to SVG and WebP and uploads them to Bunny,\n// `people/defaults/v1/<brand>/…`), so the pictures and the URLs that name them cannot drift apart.\n\n/** A brand of the default avatars. */\nexport type DefaultAvatarBrand = \"krizaka\" | \"orazaka\" | \"yomizaka\" | \"akinaza\";\n/**\n * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.\n * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):\n * a glyph on the gradient, never a silhouette. The central sets of these kinds are in the Krizaka org JSON (`defaults`, `@krizaka/org`).\n */\nexport type DefaultAvatarKind = \"person\" | \"plain\" | \"folder\" | \"organisation\" | \"shop\";\n/** The kinds of entity that have a set of default pictures of their own (`plain` is a style of `person`). */\nexport type DefaultAvatarEntityKind = \"person\" | \"folder\" | \"organisation\" | \"shop\";\nexport type DefaultAvatarSize = 256 | 512;\n\nexport const DEFAULT_AVATAR_BRANDS: readonly DefaultAvatarBrand[] = [\"krizaka\", \"orazaka\", \"yomizaka\", \"akinaza\"];\n/** The two styles of the legacy brand sets (`people/defaults/v1/<brand>`); the kinds of the central sets are `DEFAULT_AVATAR_ENTITY_KINDS`. */\nexport const DEFAULT_AVATAR_KINDS: readonly DefaultAvatarKind[] = [\"person\", \"plain\"];\nexport const DEFAULT_AVATAR_ENTITY_KINDS: readonly DefaultAvatarEntityKind[] = [\"person\", \"folder\", \"organisation\", \"shop\"];\nexport const DEFAULT_AVATAR_SIZES: readonly DefaultAvatarSize[] = [256, 512];\n/** How many tones each brand has: a person always gets the same one from their seed, so a list is not one colour. */\nexport const DEFAULT_AVATAR_TONES = 6;\n\n/** Where the set lives. `v1` is the set's version: a changed picture is a new version folder, never an overwrite. */\nexport const DEFAULT_AVATAR_BASE = \"https://krizaka-assets.b-cdn.net/people/defaults/v1\";\n\nexport interface DefaultAvatar {\n /** The brand of the product showing the avatar: its gradient, its hues. */\n brand: DefaultAvatarBrand;\n /** Any stable text or number of the person (their id): the same seed gives the same tone everywhere. */\n seed?: string | number;\n /** Force a tone, 1 to 6, instead of deriving it from `seed`. */\n tone?: number;\n /**\n * `person` (default): a silhouette. `plain`: the gradient alone. `folder`, `organisation`, `shop`: that thing's glyph, drawn here\n * (a data URL, no request) — a folder is never given a person.\n * @default \"person\"\n */\n kind?: DefaultAvatarKind;\n /**\n * The family's central set (`listDefaults(\"person\")` of `@krizaka/org`): when given with a `seed`, the avatar is the set's picture for that seed —\n * the same person has the same picture in every product — instead of the brand's silhouette. An empty set, or no seed, draws the silhouette.\n */\n set?: readonly DefaultAvatarPicture[];\n}\n\n/** The mark gradient of each brand (BRAND.md, `$extensions[\"com.krizaka\"].mark`) as [hue, saturation %, lightness %] and the hue spread of its tones. */\nconst BRANDS: Record<DefaultAvatarBrand, { from: [number, number, number]; to: [number, number, number]; spread: number }> = {\n krizaka: { from: [217, 92, 53], to: [217, 92, 68], spread: 14 },\n orazaka: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },\n yomizaka: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },\n akinaza: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 },\n};\n\n/** White on top of a stop must stay visible: a stop is darkened until the contrast reaches this (WCAG 1.4.11, non-text). */\nconst MIN_CONTRAST = 3.2;\nconst OFFSETS = [0, -1, 1, -2, 2, 3] as const;\n\nfunction hslToHex([h, s, l]: [number, number, number]): string {\n const sat = s / 100;\n const light = l / 100;\n const k = (n: number) => (n + (((h % 360) + 360) % 360) / 30) % 12;\n const a = sat * Math.min(light, 1 - light);\n const channel = (n: number) => Math.round(255 * (light - a * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1))));\n return `#${[0, 8, 4].map((n) => channel(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\nconst channelLuminance = (v: number) => (v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4);\nconst whiteContrast = (hex: string) => {\n const [r, g, b] = [1, 3, 5].map((i) => channelLuminance(Number.parseInt(hex.slice(i, i + 2), 16) / 255));\n return 1.05 / (0.2126 * r! + 0.7152 * g! + 0.0722 * b! + 0.05);\n};\n/** The stop, darkened one point of lightness at a time until white reads on it. */\nfunction readable([h, s, l]: [number, number, number]): string {\n let hex = hslToHex([h, s, l]);\n for (let light = l; whiteContrast(hex) < MIN_CONTRAST && light > 10; light -= 1) hex = hslToHex([h, s, light]);\n return hex;\n}\n\n/** The two stops (hex) of tone `tone` (1 to 6) of a brand. */\nexport function defaultAvatarTone(brand: DefaultAvatarBrand, tone: number): readonly [string, string] {\n const b = BRANDS[brand];\n const o = OFFSETS[(clampTone(tone) - 1) % OFFSETS.length] * b.spread;\n return [readable([b.from[0] + o, b.from[1], b.from[2]]), readable([b.to[0] + o, b.to[1], b.to[2]])];\n}\n\nconst clampTone = (tone: number) => Math.min(DEFAULT_AVATAR_TONES, Math.max(1, Math.round(tone)));\n\n/** 32-bit FNV-1a of a seed: the rule of the family's default pictures (`@krizaka/org`'s `seedHash` is the same function). */\nexport function defaultAvatarSeedHash(seed: string | number): number {\n let h = 0x811c9dc5;\n for (const ch of String(seed)) {\n h ^= ch.codePointAt(0)!;\n h = Math.imul(h, 0x01000193) >>> 0;\n }\n return h;\n}\n\n/** 1 to 6 from a seed (FNV-1a): stable across renders, devices and products. */\nexport function defaultAvatarToneOf(seed: string | number | undefined): number {\n if (seed === undefined) return 1;\n return (defaultAvatarSeedHash(seed) % DEFAULT_AVATAR_TONES) + 1;\n}\n\n/**\n * One picture of the family's central set, as `@krizaka/org` lists it (`listDefaults(\"person\")` items fit as they are): the sizes it is served in.\n * `disabled` pictures are never picked.\n */\nexport interface DefaultAvatarPicture {\n id: string;\n disabled?: boolean;\n urls: { webp: Readonly<Record<string, string>> };\n}\n\n/** The picture a seed gets from a set: `set[fnv1a(seed) mod n]` among the pictures not disabled, in the set's order — the same rule as `@krizaka/org`'s `defaultFor`. */\nexport function pickDefaultPicture<T extends DefaultAvatarPicture>(set: readonly T[], seed: string | number): T | undefined {\n const usable = set.filter((picture) => !picture.disabled);\n return usable[defaultAvatarSeedHash(seed) % usable.length];\n}\n\nconst resolveTone = (a: DefaultAvatar) => (a.tone === undefined ? defaultAvatarToneOf(a.seed) : clampTone(a.tone));\n\n/** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */\nexport function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | \"svg\"): string {\n return size === \"svg\" ? `${kind}-${tone}.svg` : `${kind}-${tone}-${size}.webp`;\n}\n\n/** Linear on purpose: a `/\\/+$/` regex backtracks quadratically on a long run of slashes. */\nfunction trimTrailingSlashes(value: string): string {\n let end = value.length;\n while (end > 0 && value[end - 1] === \"/\") end--;\n return value.slice(0, end);\n}\n\n/**\n * The URL of a default avatar: `defaultAvatarUrl({ brand: \"orazaka\", seed: user.id })`.\n * @param size 256 for lists, 512 for a profile; `\"svg\"` for the vector.\n * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.\n */\nexport function defaultAvatarUrl(avatar: DefaultAvatar, { size = 256, base = DEFAULT_AVATAR_BASE }: { size?: DefaultAvatarSize | \"svg\"; base?: string } = {}): string {\n if (isGlyphKind(avatar.kind)) return defaultAvatarDataUrl(avatar);\n if (avatar.set && avatar.seed !== undefined) {\n // The size asked, as the set serves it (256 and 512; the vector has none, so it stays the brand's silhouette).\n const picked = pickDefaultPicture(avatar.set, avatar.seed)?.urls.webp[size];\n if (picked) return picked;\n }\n return `${trimTrailingSlashes(base)}/${avatar.brand}/${defaultAvatarFile(avatar.kind ?? \"person\", resolveTone(avatar), size)}`;\n}\n\nconst GLYPHS: Record<\"folder\" | \"organisation\" | \"shop\", (from: string) => string> = {\n folder: () => `<path d=\"M96 176a28 28 0 0 1 28-28h92l40 44h132a28 28 0 0 1 28 28v152a28 28 0 0 1-28 28H124a28 28 0 0 1-28-28z\" fill=\"#fff\" fill-opacity=\".92\"/>`,\n organisation: (from) =>\n `<rect x=\"136\" y=\"104\" width=\"240\" height=\"304\" rx=\"16\" fill=\"#fff\" fill-opacity=\".92\"/>${[160, 226, 292]\n .flatMap((y) => [168, 236, 304].map((x) => `<rect x=\"${x}\" y=\"${y}\" width=\"40\" height=\"40\" rx=\"6\" fill=\"${from}\"/>`))\n .join(\"\")}<rect x=\"232\" y=\"352\" width=\"48\" height=\"56\" rx=\"6\" fill=\"${from}\"/>`,\n shop: (from) =>\n `<path d=\"M112 132h288l24 84a56 56 0 0 1-112 0 56 56 0 0 1-112 0 56 56 0 0 1-112 0z\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"136\" y=\"292\" width=\"240\" height=\"116\" rx=\"12\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"226\" y=\"326\" width=\"60\" height=\"82\" rx=\"8\" fill=\"${from}\"/><rect x=\"156\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/><rect x=\"308\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/>`,\n};\n\ntype GlyphKind = keyof typeof GLYPHS;\nconst isGlyphKind = (kind: DefaultAvatarKind | undefined): kind is GlyphKind => kind === \"folder\" || kind === \"organisation\" || kind === \"shop\";\n\n/** The picture as a `data:` URL: nothing to fetch, so a folder, an organisation or a shop always has its picture (offline, in a test, before the CDN answers). */\nexport function defaultAvatarDataUrl(avatar: DefaultAvatar): string {\n return `data:image/svg+xml,${encodeURIComponent(defaultAvatarSvg(avatar))}`;\n}\n\n/** The SVG source of a default avatar, 512 × 512 and square (the Avatar clips it round). */\nexport function defaultAvatarSvg(avatar: DefaultAvatar): string {\n const [from, to] = defaultAvatarTone(avatar.brand, resolveTone(avatar));\n const kind = avatar.kind ?? \"person\";\n const person = isGlyphKind(kind)\n ? GLYPHS[kind](from)\n : kind === \"person\"\n ? `<circle cx=\"256\" cy=\"200\" r=\"86\" fill=\"#fff\" fill-opacity=\".92\"/><path d=\"M84 512c0-108 78-182 172-182s172 74 172 182z\" fill=\"#fff\" fill-opacity=\".92\"/>`\n : \"\";\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width=\"512\" height=\"512\"><defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"${from}\"/><stop offset=\"1\" stop-color=\"${to}\"/></linearGradient><radialGradient id=\"l\" cx=\".28\" cy=\".18\" r=\".85\"><stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".24\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient></defs><rect width=\"512\" height=\"512\" fill=\"url(#g)\"/><rect width=\"512\" height=\"512\" fill=\"url(#l)\"/>${person}</svg>`;\n}\n"],"mappings":";;;AACA,SAAS,UAAU,uBAAuB;AAC1C,YAAY,WAAW;AACvB,SAAS,UAA6B;;;ACa/B,IAAM,wBAAuD,CAAC,WAAW,WAAW,YAAY,SAAS;AAEzG,IAAM,uBAAqD,CAAC,UAAU,OAAO;AAC7E,IAAM,8BAAkE,CAAC,UAAU,UAAU,gBAAgB,MAAM;AACnH,IAAM,uBAAqD,CAAC,KAAK,GAAG;AAEpE,IAAM,uBAAuB;AAG7B,IAAM,sBAAsB;AAuBnC,IAAM,SAAuH;AAAA,EAC3H,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC9D,SAAS,EAAE,MAAM,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,EAAE;AAAA,EAC/D,UAAU,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC/D,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,GAAG;AAC/D;AAGA,IAAM,eAAe;AACrB,IAAM,UAAU,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC;AAEnC,SAAS,SAAS,CAAC,GAAG,GAAG,CAAC,GAAqC;AAC7D,QAAM,MAAM,IAAI;AAChB,QAAM,QAAQ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,MAAM,MAAM,GAAG,GAAG;AAC5D,QAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SACE,qBAAC,SAAI,WAAW,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAChD;AAAA;AAAA,IACA,OAAO,KAAK,oBAAC,cAAW,MAAY,UAAU,IAAI,IAAI,IAAI;AAAA,KAC7D;AAEJ;AAGO,IAAM,SAAS,OAAO,OAAO,YAAY,EAAE,OAAO,YAAY,CAAC;","names":["avatar"]}
1
+ {"version":3,"sources":["../src/avatar/avatar.tsx","../src/avatar/default-avatar.ts"],"sourcesContent":["// Client: Radix tracks the image's loading state and shows the fallback until it has loaded (or when it fails).\nimport { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { type DefaultAvatar, defaultAvatarUrl } from \"./default-avatar\";\n\nconst avatar = tv({\n slots: {\n root: \"relative inline-flex shrink-0 overflow-hidden rounded-full bg-surface-3 align-middle\",\n image: \"h-full w-full object-cover\",\n fallback: \"flex h-full w-full items-center justify-center font-semibold uppercase text-fg-secondary\",\n group: \"flex items-center -space-x-2 [&>*]:ring-2 [&>*]:ring-surface-0\",\n },\n variants: {\n size: {\n xs: { root: \"h-5 w-5 text-[9px]\" },\n sm: { root: \"h-8 w-8 text-xs\" },\n md: { root: \"h-10 w-10 text-sm\" },\n lg: { root: \"h-14 w-14 text-base\" },\n xl: { root: \"h-20 w-20 text-lg\" },\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport type AvatarSize = NonNullable<VariantProps<typeof avatar>[\"size\"]>;\n\nexport type AvatarProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n /** The image's URL; `null` or nothing shows the `fallback`. */\n src?: string | null;\n /** The image's text alternative (the person's name); empty when a visible name sits next to the avatar. */\n alt?: string;\n /** Shown while the image loads, when it fails or when there is none: initials, an icon. */\n fallback?: React.ReactNode;\n /** The picture to show instead when `src` is missing or fails to load (an image URL). The `fallback` still covers its own loading. */\n fallbackSrc?: string;\n /**\n * The Krizaka default picture when the person has no photo (or it fails): their brand's gradient and a silhouette,\n * one of six tones from `seed` — `defaultAvatar={{ brand: \"sovkora\", seed: user.id }}`. `fallbackSrc` wins over it.\n */\n defaultAvatar?: DefaultAvatar;\n /**\n * xs · sm · md · lg · xl.\n * @default \"md\"\n */\n size?: AvatarSize;\n};\n\nexport function AvatarRoot({ src, alt = \"\", fallback, fallbackSrc, defaultAvatar, size, className, ...props }: AvatarProps) {\n const s = avatar({ size });\n const [failed, setFailed] = React.useState<string | null>(null);\n // 512 px for the big sizes, 256 for the others: sharp on a 2x screen either way.\n const backup = fallbackSrc ?? (defaultAvatar ? defaultAvatarUrl(defaultAvatar, { size: size === \"xl\" || size === \"lg\" ? 512 : 256 }) : undefined);\n const shown = src && failed !== src ? src : backup;\n return (\n <AvatarPrimitive.Root data-size={size ?? \"md\"} className={s.root({ className })} {...props}>\n {shown && (\n <AvatarPrimitive.Image\n src={shown}\n alt={alt}\n className={s.image()}\n onLoadingStatusChange={(status) => {\n if (status === \"error\" && shown === src) setFailed(src);\n }}\n />\n )}\n <AvatarPrimitive.Fallback delayMs={shown ? 300 : 0} className={s.fallback()}>\n {fallback}\n </AvatarPrimitive.Fallback>\n </AvatarPrimitive.Root>\n );\n}\n\nexport type AvatarGroupProps = React.ComponentProps<\"div\"> & {\n /** How many avatars are shown; the rest becomes a `+n` avatar. */\n max?: number;\n /** The size of the `+n` avatar (match the avatars of the group). */\n size?: AvatarSize;\n};\n\n/** Overlapping avatars; past `max`, a `+n` avatar counts the rest. */\nexport function AvatarGroup({ max, size, className, children, ...props }: AvatarGroupProps) {\n const items = React.Children.toArray(children);\n const shown = max === undefined ? items : items.slice(0, max);\n const rest = items.length - shown.length;\n return (\n <div className={avatar().group({ className })} {...props}>\n {shown}\n {rest > 0 && <AvatarRoot size={size} fallback={`+${rest}`} />}\n </div>\n );\n}\n\n/** `Avatar` (an image with a fallback) and `Avatar.Group`. */\nexport const Avatar = Object.assign(AvatarRoot, { Group: AvatarGroup });\n","// The default profile pictures of the Krizaka family: what a product shows when a person has no photo.\n// They are generated from this file (tools/export-brand.mjs renders them to SVG and WebP and uploads them to Bunny,\n// `people/defaults/v1/<brand>/…`), so the pictures and the URLs that name them cannot drift apart.\n\n/** A brand of the default avatars. */\nexport type DefaultAvatarBrand = \"krizaka\" | \"sovkora\" | \"verikora\" | \"folioviv\";\n/**\n * What the picture is of. `person`: a neutral silhouette. `plain`: the brand's gradient alone, ready for initials.\n * `folder`, `organisation` and `shop` are the pictures of a thing that is not a person (a folder or collection, a company, a shop):\n * a glyph on the gradient, never a silhouette. The central sets of these kinds are in the Krizaka org JSON (`defaults`, `@krizaka/org`).\n */\nexport type DefaultAvatarKind = \"person\" | \"plain\" | \"folder\" | \"organisation\" | \"shop\";\n/** The kinds of entity that have a set of default pictures of their own (`plain` is a style of `person`). */\nexport type DefaultAvatarEntityKind = \"person\" | \"folder\" | \"organisation\" | \"shop\";\nexport type DefaultAvatarSize = 256 | 512;\n\nexport const DEFAULT_AVATAR_BRANDS: readonly DefaultAvatarBrand[] = [\"krizaka\", \"sovkora\", \"verikora\", \"folioviv\"];\n/** The two styles of the legacy brand sets (`people/defaults/v1/<brand>`); the kinds of the central sets are `DEFAULT_AVATAR_ENTITY_KINDS`. */\nexport const DEFAULT_AVATAR_KINDS: readonly DefaultAvatarKind[] = [\"person\", \"plain\"];\nexport const DEFAULT_AVATAR_ENTITY_KINDS: readonly DefaultAvatarEntityKind[] = [\"person\", \"folder\", \"organisation\", \"shop\"];\nexport const DEFAULT_AVATAR_SIZES: readonly DefaultAvatarSize[] = [256, 512];\n/** How many tones each brand has: a person always gets the same one from their seed, so a list is not one colour. */\n// @fixed: the number of tone files drawn per brand in the published set (`people/defaults/v1/<brand>/person-<1..6>`)\nexport const DEFAULT_AVATAR_TONES = 6;\n\n/** Where the set lives. `v1` is the set's version: a changed picture is a new version folder, never an overwrite. */\nexport const DEFAULT_AVATAR_BASE = \"https://krizaka-assets.b-cdn.net/people/defaults/v1\";\n\nexport interface DefaultAvatar {\n /** The brand of the product showing the avatar: its gradient, its hues. */\n brand: DefaultAvatarBrand;\n /** Any stable text or number of the person (their id): the same seed gives the same tone everywhere. */\n seed?: string | number;\n /** Force a tone, 1 to 6, instead of deriving it from `seed`. */\n tone?: number;\n /**\n * `person` (default): a silhouette. `plain`: the gradient alone. `folder`, `organisation`, `shop`: that thing's glyph, drawn here\n * (a data URL, no request) — a folder is never given a person.\n * @default \"person\"\n */\n kind?: DefaultAvatarKind;\n /**\n * The family's central set (`listDefaults(\"person\")` of `@krizaka/org`): when given with a `seed`, the avatar is the set's picture for that seed —\n * the same person has the same picture in every product — instead of the brand's silhouette. An empty set, or no seed, draws the silhouette.\n */\n set?: readonly DefaultAvatarPicture[];\n}\n\n/** The mark gradient of each brand (BRAND.md, `$extensions[\"com.krizaka\"].mark`) as [hue, saturation %, lightness %] and the hue spread of its tones. */\nconst BRANDS: Record<DefaultAvatarBrand, { from: [number, number, number]; to: [number, number, number]; spread: number }> = {\n krizaka: { from: [217, 92, 53], to: [217, 92, 68], spread: 14 },\n sovkora: { from: [26, 90.5, 37.1], to: [26, 92, 45], spread: 7 },\n verikora: { from: [232, 50, 55], to: [248, 50, 58], spread: 10 },\n folioviv: { from: [140, 48, 34], to: [22, 60, 46], spread: 10 },\n};\n\n/** White on top of a stop must stay visible: a stop is darkened until the contrast reaches this (WCAG 1.4.11, non-text). */\nconst MIN_CONTRAST = 3.2;\nconst OFFSETS = [0, -1, 1, -2, 2, 3] as const;\n\nfunction hslToHex([h, s, l]: [number, number, number]): string {\n const sat = s / 100;\n const light = l / 100;\n const k = (n: number) => (n + (((h % 360) + 360) % 360) / 30) % 12;\n const a = sat * Math.min(light, 1 - light);\n const channel = (n: number) => Math.round(255 * (light - a * Math.max(-1, Math.min(k(n) - 3, 9 - k(n), 1))));\n return `#${[0, 8, 4].map((n) => channel(n).toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n\nconst channelLuminance = (v: number) => (v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4);\nconst whiteContrast = (hex: string) => {\n const [r, g, b] = [1, 3, 5].map((i) => channelLuminance(Number.parseInt(hex.slice(i, i + 2), 16) / 255));\n return 1.05 / (0.2126 * r! + 0.7152 * g! + 0.0722 * b! + 0.05);\n};\n/** The stop, darkened one point of lightness at a time until white reads on it. */\nfunction readable([h, s, l]: [number, number, number]): string {\n let hex = hslToHex([h, s, l]);\n for (let light = l; whiteContrast(hex) < MIN_CONTRAST && light > 10; light -= 1) hex = hslToHex([h, s, light]);\n return hex;\n}\n\n/** The two stops (hex) of tone `tone` (1 to 6) of a brand. */\nexport function defaultAvatarTone(brand: DefaultAvatarBrand, tone: number): readonly [string, string] {\n const b = BRANDS[brand];\n const o = OFFSETS[(clampTone(tone) - 1) % OFFSETS.length] * b.spread;\n return [readable([b.from[0] + o, b.from[1], b.from[2]]), readable([b.to[0] + o, b.to[1], b.to[2]])];\n}\n\nconst clampTone = (tone: number) => Math.min(DEFAULT_AVATAR_TONES, Math.max(1, Math.round(tone)));\n\n/** 32-bit FNV-1a of a seed: the rule of the family's default pictures (`@krizaka/org`'s `seedHash` is the same function). */\nexport function defaultAvatarSeedHash(seed: string | number): number {\n let h = 0x811c9dc5;\n for (const ch of String(seed)) {\n h ^= ch.codePointAt(0)!;\n h = Math.imul(h, 0x01000193) >>> 0;\n }\n return h;\n}\n\n/** 1 to 6 from a seed (FNV-1a): stable across renders, devices and products. */\nexport function defaultAvatarToneOf(seed: string | number | undefined): number {\n if (seed === undefined) return 1;\n return (defaultAvatarSeedHash(seed) % DEFAULT_AVATAR_TONES) + 1;\n}\n\n/**\n * One picture of the family's central set, as `@krizaka/org` lists it (`listDefaults(\"person\")` items fit as they are): the sizes it is served in.\n * `disabled` pictures are never picked.\n */\nexport interface DefaultAvatarPicture {\n id: string;\n disabled?: boolean;\n urls: { webp: Readonly<Record<string, string>> };\n}\n\n/** The picture a seed gets from a set: `set[fnv1a(seed) mod n]` among the pictures not disabled, in the set's order — the same rule as `@krizaka/org`'s `defaultFor`. */\nexport function pickDefaultPicture<T extends DefaultAvatarPicture>(set: readonly T[], seed: string | number): T | undefined {\n const usable = set.filter((picture) => !picture.disabled);\n return usable[defaultAvatarSeedHash(seed) % usable.length];\n}\n\nconst resolveTone = (a: DefaultAvatar) => (a.tone === undefined ? defaultAvatarToneOf(a.seed) : clampTone(a.tone));\n\n/** The file name of a picture in the set: `person-3` + 256 → `person-3-256.webp`; `svg` has no size. */\nexport function defaultAvatarFile(kind: DefaultAvatarKind, tone: number, size: DefaultAvatarSize | \"svg\"): string {\n return size === \"svg\" ? `${kind}-${tone}.svg` : `${kind}-${tone}-${size}.webp`;\n}\n\n/** Linear on purpose: a `/\\/+$/` regex backtracks quadratically on a long run of slashes. */\nfunction trimTrailingSlashes(value: string): string {\n let end = value.length;\n while (end > 0 && value[end - 1] === \"/\") end--;\n return value.slice(0, end);\n}\n\n/**\n * The URL of a default avatar: `defaultAvatarUrl({ brand: \"sovkora\", seed: user.id })`.\n * @param size 256 for lists, 512 for a profile; `\"svg\"` for the vector.\n * @param base Another host or version of the set (a self-hosted copy); the default is the Krizaka CDN.\n */\nexport function defaultAvatarUrl(avatar: DefaultAvatar, { size = 256, base = DEFAULT_AVATAR_BASE }: { size?: DefaultAvatarSize | \"svg\"; base?: string } = {}): string {\n if (isGlyphKind(avatar.kind)) return defaultAvatarDataUrl(avatar);\n if (avatar.set && avatar.seed !== undefined) {\n // The size asked, as the set serves it (256 and 512; the vector has none, so it stays the brand's silhouette).\n const picked = pickDefaultPicture(avatar.set, avatar.seed)?.urls.webp[size];\n if (picked) return picked;\n }\n return `${trimTrailingSlashes(base)}/${avatar.brand}/${defaultAvatarFile(avatar.kind ?? \"person\", resolveTone(avatar), size)}`;\n}\n\nconst GLYPHS: Record<\"folder\" | \"organisation\" | \"shop\", (from: string) => string> = {\n folder: () => `<path d=\"M96 176a28 28 0 0 1 28-28h92l40 44h132a28 28 0 0 1 28 28v152a28 28 0 0 1-28 28H124a28 28 0 0 1-28-28z\" fill=\"#fff\" fill-opacity=\".92\"/>`,\n organisation: (from) =>\n `<rect x=\"136\" y=\"104\" width=\"240\" height=\"304\" rx=\"16\" fill=\"#fff\" fill-opacity=\".92\"/>${[160, 226, 292]\n .flatMap((y) => [168, 236, 304].map((x) => `<rect x=\"${x}\" y=\"${y}\" width=\"40\" height=\"40\" rx=\"6\" fill=\"${from}\"/>`))\n .join(\"\")}<rect x=\"232\" y=\"352\" width=\"48\" height=\"56\" rx=\"6\" fill=\"${from}\"/>`,\n shop: (from) =>\n `<path d=\"M112 132h288l24 84a56 56 0 0 1-112 0 56 56 0 0 1-112 0 56 56 0 0 1-112 0z\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"136\" y=\"292\" width=\"240\" height=\"116\" rx=\"12\" fill=\"#fff\" fill-opacity=\".92\"/><rect x=\"226\" y=\"326\" width=\"60\" height=\"82\" rx=\"8\" fill=\"${from}\"/><rect x=\"156\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/><rect x=\"308\" y=\"318\" width=\"48\" height=\"44\" rx=\"6\" fill=\"${from}\"/>`,\n};\n\ntype GlyphKind = keyof typeof GLYPHS;\nconst isGlyphKind = (kind: DefaultAvatarKind | undefined): kind is GlyphKind => kind === \"folder\" || kind === \"organisation\" || kind === \"shop\";\n\n/** The picture as a `data:` URL: nothing to fetch, so a folder, an organisation or a shop always has its picture (offline, in a test, before the CDN answers). */\nexport function defaultAvatarDataUrl(avatar: DefaultAvatar): string {\n return `data:image/svg+xml,${encodeURIComponent(defaultAvatarSvg(avatar))}`;\n}\n\n/** The SVG source of a default avatar, 512 × 512 and square (the Avatar clips it round). */\nexport function defaultAvatarSvg(avatar: DefaultAvatar): string {\n const [from, to] = defaultAvatarTone(avatar.brand, resolveTone(avatar));\n const kind = avatar.kind ?? \"person\";\n const person = isGlyphKind(kind)\n ? GLYPHS[kind](from)\n : kind === \"person\"\n ? `<circle cx=\"256\" cy=\"200\" r=\"86\" fill=\"#fff\" fill-opacity=\".92\"/><path d=\"M84 512c0-108 78-182 172-182s172 74 172 182z\" fill=\"#fff\" fill-opacity=\".92\"/>`\n : \"\";\n return `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\" width=\"512\" height=\"512\"><defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"1\"><stop offset=\"0\" stop-color=\"${from}\"/><stop offset=\"1\" stop-color=\"${to}\"/></linearGradient><radialGradient id=\"l\" cx=\".28\" cy=\".18\" r=\".85\"><stop offset=\"0\" stop-color=\"#fff\" stop-opacity=\".24\"/><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\"0\"/></radialGradient></defs><rect width=\"512\" height=\"512\" fill=\"url(#g)\"/><rect width=\"512\" height=\"512\" fill=\"url(#l)\"/>${person}</svg>`;\n}\n"],"mappings":";;;AACA,SAAS,UAAU,uBAAuB;AAC1C,YAAY,WAAW;AACvB,SAAS,UAA6B;;;ACa/B,IAAM,wBAAuD,CAAC,WAAW,WAAW,YAAY,UAAU;AAE1G,IAAM,uBAAqD,CAAC,UAAU,OAAO;AAC7E,IAAM,8BAAkE,CAAC,UAAU,UAAU,gBAAgB,MAAM;AACnH,IAAM,uBAAqD,CAAC,KAAK,GAAG;AAGpE,IAAM,uBAAuB;AAG7B,IAAM,sBAAsB;AAuBnC,IAAM,SAAuH;AAAA,EAC3H,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,GAAG,QAAQ,GAAG;AAAA,EAC9D,SAAS,EAAE,MAAM,CAAC,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,GAAG,QAAQ,EAAE;AAAA,EAC/D,UAAU,EAAE,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAA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U,IAAK,WAAU,GAAG;AAAA,QACxD;AAAA;AAAA,IACF;AAAA,IAEF,oBAAC,gBAAgB,UAAhB,EAAyB,SAAS,QAAQ,MAAM,GAAG,WAAW,EAAE,SAAS,GACvE,oBACH;AAAA,KACF;AAEJ;AAUO,SAAS,YAAY,EAAE,KAAK,MAAM,WAAW,UAAU,GAAG,MAAM,GAAqB;AAC1F,QAAM,QAAc,eAAS,QAAQ,QAAQ;AAC7C,QAAM,QAAQ,QAAQ,SAAY,QAAQ,MAAM,MAAM,GAAG,GAAG;AAC5D,QAAM,OAAO,MAAM,SAAS,MAAM;AAClC,SACE,qBAAC,SAAI,WAAW,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAChD;AAAA;AAAA,IACA,OAAO,KAAK,oBAAC,cAAW,MAAY,UAAU,IAAI,IAAI,IAAI;AAAA,KAC7D;AAEJ;AAGO,IAAM,SAAS,OAAO,OAAO,YAAY,EAAE,OAAO,YAAY,CAAC;","names":["avatar"]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { b as MascotTone } from './geometry-DuUQyHZ1.js';
2
+ import { b as MascotTone } from './geometry-haB2EgO4.js';
3
3
  import { MascotBird, MascotMood } from './mascot-quote.js';
4
4
 
5
5
  interface PlateFigure {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  Mascot
4
- } from "./chunk-DRTIE44Z.js";
4
+ } from "./chunk-FM42KOAU.js";
5
5
  import {
6
6
  cn
7
7
  } from "./chunk-NSLXEDIS.js";