@krizaka/ui 3.62.0 → 3.63.1

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 (635) hide show
  1. package/README.md +13 -16
  2. package/dist/account-menu.d.ts +1 -1
  3. package/dist/account-menu.js +1 -1
  4. package/dist/account-settings.d.ts +1 -1
  5. package/dist/account-settings.js +2 -2
  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/action-bar.js +4 -4
  10. package/dist/activity-feed.d.ts +1 -1
  11. package/dist/activity-feed.js.map +1 -1
  12. package/dist/analysis-report.d.ts +274 -0
  13. package/dist/analysis-report.js +207 -0
  14. package/dist/analysis-report.js.map +1 -0
  15. package/dist/app-shell.js.map +1 -1
  16. package/dist/argument-card.d.ts +1 -1
  17. package/dist/argument-card.js +5 -5
  18. package/dist/auth-layout.d.ts +1 -1
  19. package/dist/auth-layout.js.map +1 -1
  20. package/dist/avatar/defaults.d.ts +2 -1
  21. package/dist/avatar/defaults.js.map +1 -1
  22. package/dist/{avatar-iajODANU.d.ts → avatar-BL2iG_Js.d.ts} +2 -1
  23. package/dist/avatar.d.ts +3 -2
  24. package/dist/avatar.js.map +1 -1
  25. package/dist/badge.js +4 -34
  26. package/dist/badge.js.map +1 -1
  27. package/dist/bird-plate.d.ts +1 -1
  28. package/dist/bird-plate.js +1 -1
  29. package/dist/blocks.css +99 -8
  30. package/dist/button.js +1 -1
  31. package/dist/captcha.js +1 -1
  32. package/dist/chat.js +1 -1
  33. package/dist/choice-grid.d.ts +1 -1
  34. package/dist/choice-grid.js +1 -1
  35. package/dist/choice-grid.js.map +1 -1
  36. package/dist/chunk-5PFCELGW.js +41 -0
  37. package/dist/chunk-5PFCELGW.js.map +1 -0
  38. package/dist/chunk-5RWHDX5J.js +37 -0
  39. package/dist/chunk-5RWHDX5J.js.map +1 -0
  40. package/dist/{chunk-KB7OLYIJ.js → chunk-7AZ23BUX.js} +1 -1
  41. package/dist/chunk-7AZ23BUX.js.map +1 -0
  42. package/dist/{chunk-4E5IUZHR.js → chunk-B2HS5EAH.js} +1 -1
  43. package/dist/chunk-B2HS5EAH.js.map +1 -0
  44. package/dist/{chunk-5LANVCK7.js → chunk-BG5APGX6.js} +2 -2
  45. package/dist/{chunk-WOZP3JLW.js → chunk-DJ5ZPPWL.js} +1 -1
  46. package/dist/chunk-DJ5ZPPWL.js.map +1 -0
  47. package/dist/{chunk-MHUUNC5W.js → chunk-DRTIE44Z.js} +1 -1
  48. package/dist/chunk-DRTIE44Z.js.map +1 -0
  49. package/dist/{chunk-UV4HBVH7.js → chunk-EB45EVPJ.js} +2 -2
  50. package/dist/{chunk-SJS6RJIT.js.map → chunk-EB45EVPJ.js.map} +1 -1
  51. package/dist/{chunk-555LWYIN.js → chunk-EHTXLZSM.js} +1 -1
  52. package/dist/{chunk-555LWYIN.js.map → chunk-EHTXLZSM.js.map} +1 -1
  53. package/dist/{chunk-6EAHUURY.js → chunk-GHAN7OOE.js} +2 -2
  54. package/dist/chunk-JT7ZKZT5.js +1 -0
  55. package/dist/chunk-JT7ZKZT5.js.map +1 -0
  56. package/dist/{chunk-3DHNN5V7.js → chunk-M3GEYLMR.js} +2 -2
  57. package/dist/{chunk-3DHNN5V7.js.map → chunk-M3GEYLMR.js.map} +1 -1
  58. package/dist/{chunk-7J2L4HOD.js → chunk-MTVX4RRF.js} +2 -2
  59. package/dist/{chunk-7J2L4HOD.js.map → chunk-MTVX4RRF.js.map} +1 -1
  60. package/dist/{chunk-YKEIOYJ5.js → chunk-NPMGYLJV.js} +1 -1
  61. package/dist/chunk-NPMGYLJV.js.map +1 -0
  62. package/dist/{chunk-3RVFD3UX.js → chunk-PW2FVPTV.js} +1 -1
  63. package/dist/chunk-PW2FVPTV.js.map +1 -0
  64. package/dist/{chunk-HEKDKM5Y.js → chunk-QVHSV6RA.js} +1 -1
  65. package/dist/{chunk-MIMOTE4W.js → chunk-RCHKIOVV.js} +1 -1
  66. package/dist/chunk-RCHKIOVV.js.map +1 -0
  67. package/dist/{chunk-7JG3VR4C.js → chunk-RCKXJEDQ.js} +5 -5
  68. package/dist/{chunk-XVFQZ3ZG.js → chunk-TPITVAUW.js} +1 -1
  69. package/dist/{chunk-XVFQZ3ZG.js.map → chunk-TPITVAUW.js.map} +1 -1
  70. package/dist/chunk-U4XTZMB7.js +103 -0
  71. package/dist/chunk-U4XTZMB7.js.map +1 -0
  72. package/dist/{chunk-SJS6RJIT.js → chunk-V7W4RLRW.js} +2 -2
  73. package/dist/{chunk-UV4HBVH7.js.map → chunk-V7W4RLRW.js.map} +1 -1
  74. package/dist/{chunk-RBETQO2P.js → chunk-Y5YBTHVD.js} +9 -15
  75. package/dist/chunk-Y5YBTHVD.js.map +1 -0
  76. package/dist/command.js +2 -2
  77. package/dist/confirm-button.js +1 -1
  78. package/dist/continue-prompt.js +2 -2
  79. package/dist/continue-prompt.js.map +1 -1
  80. package/dist/cover-hero.js +1 -1
  81. package/dist/dashboard-layout.js.map +1 -1
  82. package/dist/data-table.js +2 -2
  83. package/dist/detail-layout.js.map +1 -1
  84. package/dist/dialog.js +2 -2
  85. package/dist/elephant.js.map +1 -1
  86. package/dist/embed-facade.d.ts +37 -0
  87. package/dist/embed-facade.js +96 -0
  88. package/dist/embed-facade.js.map +1 -0
  89. package/dist/engine-flow.d.ts +4 -4
  90. package/dist/engine-flow.js.map +1 -1
  91. package/dist/environment-notice.d.ts +110 -0
  92. package/dist/environment-notice.js +47 -0
  93. package/dist/environment-notice.js.map +1 -0
  94. package/dist/file-upload.d.ts +2 -2
  95. package/dist/flock.js +1 -1
  96. package/dist/force-update-screen.js +1 -1
  97. package/dist/genui.js +2 -2
  98. package/dist/{geometry-DZ4Q3hDQ.d.ts → geometry-DDlFDtiQ.d.ts} +3 -4
  99. package/dist/{geometry-DncHaYP8.d.ts → geometry-DuUQyHZ1.d.ts} +3 -4
  100. package/dist/goal-gauge.d.ts +1 -1
  101. package/dist/goal-gauge.js +1 -1
  102. package/dist/goal-gauge.js.map +1 -1
  103. package/dist/index.d.ts +15 -1
  104. package/dist/index.js +1 -1
  105. package/dist/kind-config-editor.js +1 -1
  106. package/dist/landing-page.d.ts +1 -1
  107. package/dist/landing-page.js.map +1 -1
  108. package/dist/language-switch.d.ts +9 -9
  109. package/dist/link-card.js +2 -2
  110. package/dist/loader.d.ts +1 -1
  111. package/dist/loader.js.map +1 -1
  112. package/dist/maintenance-screen.js +1 -1
  113. package/dist/map.js +6 -0
  114. package/dist/map.js.map +1 -1
  115. package/dist/margin-layout.d.ts +71 -0
  116. package/dist/margin-layout.js +29 -0
  117. package/dist/margin-layout.js.map +1 -0
  118. package/dist/mascot-quote.d.ts +1 -1
  119. package/dist/mascot-quote.js +1 -1
  120. package/dist/mascot-state.js +1 -1
  121. package/dist/mascots.d.ts +2 -2
  122. package/dist/mascots.js +1 -1
  123. package/dist/match-dialog.js +2 -2
  124. package/dist/media-grid.d.ts +1 -0
  125. package/dist/media-grid.js +2 -2
  126. package/dist/meter.js +2 -1
  127. package/dist/native/map.js +6 -0
  128. package/dist/native/map.js.map +1 -1
  129. package/dist/native.d.ts +125 -10
  130. package/dist/native.js +1690 -1517
  131. package/dist/native.js.map +1 -1
  132. package/dist/nav-bar.d.ts +1 -1
  133. package/dist/nav-bar.js +3 -3
  134. package/dist/page-DPHDmDAQ.d.ts +131 -0
  135. package/dist/page-hero.js +4 -4
  136. package/dist/page.d.ts +7 -125
  137. package/dist/page.js +13 -1
  138. package/dist/page.js.map +1 -1
  139. package/dist/product-page.d.ts +1 -1
  140. package/dist/product-page.js.map +1 -1
  141. package/dist/profile-card.d.ts +1 -1
  142. package/dist/profile-card.js +1 -1
  143. package/dist/profile-card.js.map +1 -1
  144. package/dist/promise-card.js +1 -1
  145. package/dist/quota-meter.js +2 -1
  146. package/dist/quota-meter.js.map +1 -1
  147. package/dist/rail-nav.d.ts +4 -0
  148. package/dist/retro-tv.d.ts +6 -3
  149. package/dist/retro-tv.js +6 -5
  150. package/dist/retro-tv.js.map +1 -1
  151. package/dist/reviews.d.ts +49 -0
  152. package/dist/reviews.js +66 -0
  153. package/dist/reviews.js.map +1 -0
  154. package/dist/scroll-stage.d.ts +1 -1
  155. package/dist/scroll-stage.js +1 -1
  156. package/dist/scroll-stage.js.map +1 -1
  157. package/dist/separator.d.ts +26 -3
  158. package/dist/separator.js +19 -1
  159. package/dist/separator.js.map +1 -1
  160. package/dist/service-card.d.ts +56 -63
  161. package/dist/service-card.js +49 -10
  162. package/dist/service-card.js.map +1 -1
  163. package/dist/settings-layout.js +1 -1
  164. package/dist/site-cahier.d.ts +10 -2
  165. package/dist/site-cahier.js +9 -15
  166. package/dist/site-cahier.js.map +1 -1
  167. package/dist/site-footer.d.ts +1 -1
  168. package/dist/site-footer.js +2 -2
  169. package/dist/{sites-BKz1beUK.d.ts → sites-CEnywB89.d.ts} +10 -2
  170. package/dist/sites.d.ts +13 -5
  171. package/dist/sites.js +7 -13
  172. package/dist/sites.js.map +1 -1
  173. package/dist/specimen-tag.d.ts +15 -3
  174. package/dist/specimen-tag.js +4 -27
  175. package/dist/specimen-tag.js.map +1 -1
  176. package/dist/stage-banner.d.ts +1 -1
  177. package/dist/stage-banner.js +1 -1
  178. package/dist/stage-banner.js.map +1 -1
  179. package/dist/stat.d.ts +87 -5
  180. package/dist/stat.js +9 -53
  181. package/dist/stat.js.map +1 -1
  182. package/dist/status-page.d.ts +1 -1
  183. package/dist/status-page.js.map +1 -1
  184. package/dist/sticky-action.d.ts +7 -2
  185. package/dist/sticky-action.js +24 -3
  186. package/dist/sticky-action.js.map +1 -1
  187. package/dist/theme.js +1 -1
  188. package/dist/update-prompt.js +1 -1
  189. package/dist/usage.d.ts +229 -0
  190. package/dist/usage.js +189 -0
  191. package/dist/usage.js.map +1 -0
  192. package/dist/versus-card.js +1 -1
  193. package/dist/vertical-video.js +2 -2
  194. package/dist/wall.d.ts +24 -12
  195. package/dist/wall.js +106 -43
  196. package/dist/wall.js.map +1 -1
  197. package/package.json +108 -17
  198. package/registry/account-menu.json +1 -1
  199. package/registry/account-settings.json +1 -1
  200. package/registry/achievement.json +8 -8
  201. package/registry/action-bar.json +1 -1
  202. package/registry/activity-feed.json +8 -8
  203. package/registry/agenda.json +1 -1
  204. package/registry/alert.json +1 -1
  205. package/registry/analysis-report.json +445 -0
  206. package/registry/anatomy-plate.json +1 -1
  207. package/registry/app-header.json +3 -3
  208. package/registry/app-shell.json +10 -10
  209. package/registry/argument-card.json +3 -3
  210. package/registry/audio-player.json +6 -6
  211. package/registry/auth-layout.json +9 -9
  212. package/registry/avatar.json +8 -8
  213. package/registry/badge.json +1 -1
  214. package/registry/bird-plate.json +1 -1
  215. package/registry/button.json +2 -2
  216. package/registry/captcha.json +1 -1
  217. package/registry/card-grid.json +6 -6
  218. package/registry/card.json +1 -1
  219. package/registry/catalogue-page.json +1 -1
  220. package/registry/changelog-page.json +1 -1
  221. package/registry/chapter.json +1 -1
  222. package/registry/chat.json +3 -3
  223. package/registry/checkbox.json +1 -1
  224. package/registry/chip-link.json +1 -1
  225. package/registry/chip-row.json +1 -1
  226. package/registry/chip.json +1 -1
  227. package/registry/choice-grid.json +6 -6
  228. package/registry/code-block.json +1 -1
  229. package/registry/combobox.json +1 -1
  230. package/registry/command.json +1 -1
  231. package/registry/comparison-table.json +1 -1
  232. package/registry/component-page.json +1 -1
  233. package/registry/confirm-button.json +1 -1
  234. package/registry/contact-page.json +1 -1
  235. package/registry/continue-prompt.json +2 -2
  236. package/registry/countdown.json +1 -1
  237. package/registry/cover-hero.json +1 -1
  238. package/registry/cta-panel.json +1 -1
  239. package/registry/dashboard-layout.json +2 -2
  240. package/registry/data-table.json +1 -1
  241. package/registry/date-picker.json +2 -2
  242. package/registry/decision-list.json +1 -1
  243. package/registry/description-list.json +1 -1
  244. package/registry/detail-layout.json +6 -6
  245. package/registry/dialog.json +1 -1
  246. package/registry/docs-article-page.json +1 -1
  247. package/registry/docs-hub-page.json +3 -3
  248. package/registry/docs-layout.json +1 -1
  249. package/registry/docs-nav.json +1 -1
  250. package/registry/document-viewer.json +1 -1
  251. package/registry/doodle.json +1 -1
  252. package/registry/drop-overlay.json +1 -1
  253. package/registry/dropdown-menu.json +1 -1
  254. package/registry/elephant.json +7 -7
  255. package/registry/embed-facade.json +243 -0
  256. package/registry/empty-state.json +2 -2
  257. package/registry/engine-flow.json +6 -6
  258. package/registry/environment-notice.json +270 -0
  259. package/registry/error-page.json +1 -1
  260. package/registry/examples/achievement/arcade.js +1 -1
  261. package/registry/examples/achievement/arcade.tsx +1 -1
  262. package/registry/examples/activity-feed/job-activity.tsx +1 -1
  263. package/registry/examples/analysis-report/document-validation.js +47 -0
  264. package/registry/examples/analysis-report/document-validation.tsx +29 -0
  265. package/registry/examples/analysis-report/native/document-validation.dark.png +0 -0
  266. package/registry/examples/analysis-report/native/document-validation.js +48 -0
  267. package/registry/examples/analysis-report/native/document-validation.light.png +0 -0
  268. package/registry/examples/analysis-report/native/document-validation.tsx +32 -0
  269. package/registry/examples/analysis-report/streaming.d.ts +4 -0
  270. package/registry/examples/analysis-report/streaming.js +42 -0
  271. package/registry/examples/analysis-report/streaming.tsx +23 -0
  272. package/registry/examples/app-shell/admin-console.js +1 -1
  273. package/registry/examples/app-shell/admin-console.tsx +2 -2
  274. package/registry/examples/app-shell/basic.js +1 -1
  275. package/registry/examples/app-shell/basic.tsx +1 -1
  276. package/registry/examples/app-shell/creator-studio.d.ts +4 -0
  277. package/registry/examples/app-shell/{orochia-studio.js → creator-studio.js} +6 -6
  278. package/registry/examples/app-shell/{orochia-studio.tsx → creator-studio.tsx} +4 -4
  279. package/registry/examples/audio-player/podcast.js +1 -1
  280. package/registry/examples/audio-player/podcast.tsx +1 -1
  281. package/registry/examples/audio-player/voice-note.js +1 -1
  282. package/registry/examples/audio-player/voice-note.tsx +1 -1
  283. package/registry/examples/auth-layout/onboarding.js +3 -3
  284. package/registry/examples/auth-layout/onboarding.tsx +3 -3
  285. package/registry/examples/auth-layout/sign-in.js +3 -3
  286. package/registry/examples/auth-layout/sign-in.tsx +3 -3
  287. package/registry/examples/avatar/default.js +1 -1
  288. package/registry/examples/avatar/default.tsx +1 -1
  289. package/registry/examples/card-grid/aligned.js +2 -2
  290. package/registry/examples/card-grid/aligned.tsx +2 -2
  291. package/registry/examples/card-grid/foundation.js +1 -2
  292. package/registry/examples/card-grid/foundation.tsx +1 -2
  293. package/registry/examples/card-grid/hover-quiet.js +1 -1
  294. package/registry/examples/card-grid/hover-quiet.tsx +1 -1
  295. package/registry/examples/card-grid/products.js +1 -1
  296. package/registry/examples/card-grid/products.tsx +1 -1
  297. package/registry/examples/choice-grid/line-up.js +1 -1
  298. package/registry/examples/choice-grid/line-up.tsx +1 -1
  299. package/registry/examples/detail-layout/checkout.js +1 -1
  300. package/registry/examples/detail-layout/checkout.tsx +2 -2
  301. package/registry/examples/detail-layout/video.js +1 -1
  302. package/registry/examples/detail-layout/video.tsx +2 -2
  303. package/registry/examples/docs-hub-page/krizaka.js +1 -1
  304. package/registry/examples/docs-hub-page/krizaka.tsx +1 -1
  305. package/registry/examples/embed-facade/tiktok.d.ts +4 -0
  306. package/registry/examples/embed-facade/tiktok.js +20 -0
  307. package/registry/examples/embed-facade/tiktok.tsx +16 -0
  308. package/registry/examples/embed-facade/youtube.d.ts +4 -0
  309. package/registry/examples/embed-facade/youtube.js +22 -0
  310. package/registry/examples/embed-facade/youtube.tsx +20 -0
  311. package/registry/examples/empty-state/library.js +1 -1
  312. package/registry/examples/empty-state/library.tsx +1 -1
  313. package/registry/examples/engine-flow/calm.js +1 -1
  314. package/registry/examples/engine-flow/calm.tsx +1 -1
  315. package/registry/examples/engine-flow/compact.js +4 -4
  316. package/registry/examples/engine-flow/compact.tsx +4 -4
  317. package/registry/examples/engine-flow/radial.js +2 -6
  318. package/registry/examples/engine-flow/radial.tsx +1 -5
  319. package/registry/examples/environment-notice/development.d.ts +4 -0
  320. package/registry/examples/environment-notice/development.js +15 -0
  321. package/registry/examples/environment-notice/development.tsx +13 -0
  322. package/registry/examples/environment-notice/native/development.d.ts +4 -0
  323. package/registry/examples/environment-notice/native/development.dark.png +0 -0
  324. package/registry/examples/environment-notice/native/development.js +21 -0
  325. package/registry/examples/environment-notice/native/development.light.png +0 -0
  326. package/registry/examples/environment-notice/native/development.tsx +17 -0
  327. package/registry/examples/environment-notice/staging.d.ts +4 -0
  328. package/registry/examples/environment-notice/staging.js +11 -0
  329. package/registry/examples/environment-notice/staging.tsx +6 -0
  330. package/registry/examples/force-update-screen/default.js +1 -1
  331. package/registry/examples/force-update-screen/default.tsx +1 -1
  332. package/registry/examples/force-update-screen/native/default.dark.png +0 -0
  333. package/registry/examples/force-update-screen/native/default.js +1 -1
  334. package/registry/examples/force-update-screen/native/default.light.png +0 -0
  335. package/registry/examples/force-update-screen/native/default.tsx +1 -1
  336. package/registry/examples/form/native/sign-up.js +2 -2
  337. package/registry/examples/form/native/sign-up.tsx +2 -2
  338. package/registry/examples/form/sign-up.js +1 -1
  339. package/registry/examples/form/sign-up.tsx +3 -3
  340. package/registry/examples/goal-gauge/arcade.js +1 -1
  341. package/registry/examples/goal-gauge/arcade.tsx +1 -1
  342. package/registry/examples/image-cropper/avatar.js +1 -1
  343. package/registry/examples/image-cropper/avatar.tsx +1 -1
  344. package/registry/examples/image-cropper/banner.js +1 -1
  345. package/registry/examples/image-cropper/banner.tsx +1 -1
  346. package/registry/examples/image-cropper/vertical-video.js +1 -2
  347. package/registry/examples/image-cropper/vertical-video.tsx +1 -3
  348. package/registry/examples/iso/creator-hero.d.ts +4 -0
  349. package/registry/examples/iso/{orochia-hero.js → creator-hero.js} +3 -3
  350. package/registry/examples/iso/{orochia-hero.tsx → creator-hero.tsx} +1 -1
  351. package/registry/examples/landing-page/krizaka.js +2 -2
  352. package/registry/examples/landing-page/krizaka.tsx +2 -2
  353. package/registry/examples/link-card/docs-hub.js +1 -1
  354. package/registry/examples/link-card/docs-hub.tsx +1 -1
  355. package/registry/examples/link-card/hover-quiet.js +1 -1
  356. package/registry/examples/link-card/hover-quiet.tsx +1 -1
  357. package/registry/examples/loader/branded.js +2 -2
  358. package/registry/examples/loader/branded.tsx +3 -3
  359. package/registry/examples/loader/native/branded.dark.png +0 -0
  360. package/registry/examples/loader/native/branded.js +1 -1
  361. package/registry/examples/loader/native/branded.light.png +0 -0
  362. package/registry/examples/loader/native/branded.tsx +2 -2
  363. package/registry/examples/longform-page/story.js +3 -3
  364. package/registry/examples/longform-page/story.tsx +3 -3
  365. package/registry/examples/margin-layout/findings.d.ts +4 -0
  366. package/registry/examples/margin-layout/findings.js +15 -0
  367. package/registry/examples/margin-layout/findings.tsx +18 -0
  368. package/registry/examples/margin-layout/steps.d.ts +4 -0
  369. package/registry/examples/margin-layout/steps.js +15 -0
  370. package/registry/examples/margin-layout/steps.tsx +16 -0
  371. package/registry/examples/marketing-layout/docs-hub.js +1 -1
  372. package/registry/examples/marketing-layout/docs-hub.tsx +1 -1
  373. package/registry/examples/mascots/flock.tsx +2 -2
  374. package/registry/examples/nav-bar/family-admin.js +5 -5
  375. package/registry/examples/nav-bar/family-admin.tsx +4 -4
  376. package/registry/examples/nav-bar/site.js +1 -1
  377. package/registry/examples/nav-bar/site.tsx +1 -1
  378. package/registry/examples/page/kraft.d.ts +4 -0
  379. package/registry/examples/page/kraft.js +14 -0
  380. package/registry/examples/page/kraft.tsx +12 -0
  381. package/registry/examples/page/papers.d.ts +4 -0
  382. package/registry/examples/page/papers.js +14 -0
  383. package/registry/examples/page/papers.tsx +13 -0
  384. package/registry/examples/permission-prompt/native/blocked.dark.png +0 -0
  385. package/registry/examples/permission-prompt/native/blocked.js +1 -1
  386. package/registry/examples/permission-prompt/native/blocked.tsx +1 -1
  387. package/registry/examples/permission-prompt/native/camera.dark.png +0 -0
  388. package/registry/examples/permission-prompt/native/camera.js +1 -1
  389. package/registry/examples/permission-prompt/native/camera.light.png +0 -0
  390. package/registry/examples/permission-prompt/native/camera.tsx +1 -1
  391. package/registry/examples/profile-card/match.js +1 -1
  392. package/registry/examples/profile-card/match.tsx +1 -1
  393. package/registry/examples/promise-card/arcade.js +1 -1
  394. package/registry/examples/promise-card/arcade.tsx +1 -1
  395. package/registry/examples/pull-to-refresh/native/branded.dark.png +0 -0
  396. package/registry/examples/pull-to-refresh/native/branded.js +1 -1
  397. package/registry/examples/pull-to-refresh/native/branded.light.png +0 -0
  398. package/registry/examples/pull-to-refresh/native/branded.tsx +1 -1
  399. package/registry/examples/rail-nav/expandable.js +3 -3
  400. package/registry/examples/rail-nav/expandable.tsx +3 -3
  401. package/registry/examples/retro-tv/cabinet.js +1 -2
  402. package/registry/examples/retro-tv/cabinet.tsx +1 -3
  403. package/registry/examples/retro-tv/facade.d.ts +4 -0
  404. package/registry/examples/retro-tv/facade.js +12 -0
  405. package/registry/examples/retro-tv/facade.tsx +13 -0
  406. package/registry/examples/retro-tv/portable.js +1 -2
  407. package/registry/examples/retro-tv/portable.tsx +1 -3
  408. package/registry/examples/reviews/card.d.ts +4 -0
  409. package/registry/examples/reviews/card.js +23 -0
  410. package/registry/examples/reviews/card.tsx +19 -0
  411. package/registry/examples/reviews/summary.d.ts +4 -0
  412. package/registry/examples/reviews/summary.js +23 -0
  413. package/registry/examples/reviews/summary.tsx +17 -0
  414. package/registry/examples/scroll-stage/arcade.js +1 -1
  415. package/registry/examples/scroll-stage/arcade.tsx +1 -1
  416. package/registry/examples/search-field/global.js +1 -1
  417. package/registry/examples/search-field/global.tsx +1 -1
  418. package/registry/examples/separator/hand.d.ts +4 -0
  419. package/registry/examples/separator/hand.js +19 -0
  420. package/registry/examples/separator/hand.tsx +16 -0
  421. package/registry/examples/service-card/index-card.d.ts +4 -0
  422. package/registry/examples/service-card/index-card.js +15 -0
  423. package/registry/examples/service-card/index-card.tsx +12 -0
  424. package/registry/examples/service-card/index-list.d.ts +4 -0
  425. package/registry/examples/service-card/index-list.js +14 -0
  426. package/registry/examples/service-card/index-list.tsx +11 -0
  427. package/registry/examples/sites/french.js +1 -1
  428. package/registry/examples/sites/french.tsx +1 -1
  429. package/registry/examples/specimen-tag/facts.d.ts +4 -0
  430. package/registry/examples/specimen-tag/facts.js +23 -0
  431. package/registry/examples/specimen-tag/facts.tsx +18 -0
  432. package/registry/examples/specimen-tag/wire.js +2 -2
  433. package/registry/examples/specimen-tag/wire.tsx +2 -2
  434. package/registry/examples/splash-handoff/native/default.dark.png +0 -0
  435. package/registry/examples/splash-handoff/native/default.js +1 -1
  436. package/registry/examples/splash-handoff/native/default.light.png +0 -0
  437. package/registry/examples/splash-handoff/native/default.tsx +1 -1
  438. package/registry/examples/split-view/messages.tsx +1 -1
  439. package/registry/examples/split-view/notifications.js +1 -1
  440. package/registry/examples/split-view/notifications.tsx +1 -1
  441. package/registry/examples/stat/strip.d.ts +4 -0
  442. package/registry/examples/stat/strip.js +25 -0
  443. package/registry/examples/stat/strip.tsx +25 -0
  444. package/registry/examples/status-page/building.js +2 -2
  445. package/registry/examples/status-page/building.tsx +2 -2
  446. package/registry/examples/status-page/operational.js +1 -1
  447. package/registry/examples/status-page/operational.tsx +1 -1
  448. package/registry/examples/sticky-action/hide-while-visible.d.ts +4 -0
  449. package/registry/examples/sticky-action/hide-while-visible.js +16 -0
  450. package/registry/examples/sticky-action/hide-while-visible.tsx +17 -0
  451. package/registry/examples/tab-bar/native/main-sections.tsx +1 -1
  452. package/registry/examples/tree-view/docs.js +1 -1
  453. package/registry/examples/tree-view/docs.tsx +1 -1
  454. package/registry/examples/usage/credits-page.d.ts +4 -0
  455. package/registry/examples/usage/credits-page.js +45 -0
  456. package/registry/examples/usage/credits-page.tsx +40 -0
  457. package/registry/examples/usage/empty.d.ts +4 -0
  458. package/registry/examples/usage/empty.js +15 -0
  459. package/registry/examples/usage/empty.tsx +12 -0
  460. package/registry/examples/video-player/default.js +1 -2
  461. package/registry/examples/video-player/default.tsx +1 -3
  462. package/registry/examples/video-player/gated.js +2 -3
  463. package/registry/examples/video-player/gated.tsx +2 -4
  464. package/registry/examples/video-player/native/default.dark.png +0 -0
  465. package/registry/examples/video-player/native/default.js +3 -3
  466. package/registry/examples/video-player/native/default.light.png +0 -0
  467. package/registry/examples/video-player/native/default.tsx +3 -3
  468. package/registry/examples/video-player/signed-source.js +2 -3
  469. package/registry/examples/video-player/signed-source.tsx +2 -4
  470. package/registry/examples/video-player/vertical.js +1 -2
  471. package/registry/examples/video-player/vertical.tsx +1 -3
  472. package/registry/examples/video-trimmer/filmstrip.js +10 -2
  473. package/registry/examples/video-trimmer/filmstrip.tsx +11 -2
  474. package/registry/examples/video-trimmer/playhead.js +8 -1
  475. package/registry/examples/video-trimmer/playhead.tsx +9 -1
  476. package/registry/examples/wall/brick.js +1 -1
  477. package/registry/examples/wall/brick.tsx +1 -1
  478. package/registry/examples/wall/composition-fr.js +1 -1
  479. package/registry/examples/wall/composition-fr.tsx +1 -1
  480. package/registry/examples/wall/composition.js +1 -1
  481. package/registry/examples/wall/composition.tsx +1 -1
  482. package/registry/examples/wall/pinned-note.js +2 -2
  483. package/registry/examples/wall/pinned-note.tsx +3 -2
  484. package/registry/examples/wall/plaster.js +1 -1
  485. package/registry/examples/wall/plaster.tsx +1 -1
  486. package/registry/examples/wall/ridge.js +1 -1
  487. package/registry/examples/wall/ridge.tsx +1 -1
  488. package/registry/examples/wall/shop-sign.js +5 -4
  489. package/registry/examples/wall/shop-sign.tsx +7 -4
  490. package/registry/examples/wall/zellige.js +1 -1
  491. package/registry/examples/wall/zellige.tsx +1 -1
  492. package/registry/field.json +1 -1
  493. package/registry/file-upload.json +2 -2
  494. package/registry/filter-bar.json +1 -1
  495. package/registry/flock.json +1 -1
  496. package/registry/footnote.json +1 -1
  497. package/registry/force-update-screen.json +4 -4
  498. package/registry/form.json +7 -7
  499. package/registry/gallery-page.json +1 -1
  500. package/registry/genui.json +2 -2
  501. package/registry/glossary-term.json +1 -1
  502. package/registry/glossary.json +1 -1
  503. package/registry/glow-card.json +1 -1
  504. package/registry/goal-gauge.json +6 -6
  505. package/registry/grade-stamp.json +1 -1
  506. package/registry/how-it-works-page.json +1 -1
  507. package/registry/image-cropper.json +5 -5
  508. package/registry/index.json +231 -35
  509. package/registry/iso.json +7 -7
  510. package/registry/kanban.json +3 -3
  511. package/registry/kbd.json +1 -1
  512. package/registry/kind-config-editor.json +1 -1
  513. package/registry/kpi-explained.json +2 -2
  514. package/registry/landing-page.json +6 -6
  515. package/registry/landscape.json +1 -1
  516. package/registry/language-switch.json +1 -1
  517. package/registry/legal-page.json +1 -1
  518. package/registry/link-card.json +4 -4
  519. package/registry/list.json +3 -3
  520. package/registry/loader.json +11 -11
  521. package/registry/longform-page.json +3 -3
  522. package/registry/maintenance-screen.json +1 -1
  523. package/registry/map.json +2 -2
  524. package/registry/margin-layout.json +200 -0
  525. package/registry/markdown.json +1 -1
  526. package/registry/marketing-layout.json +2 -2
  527. package/registry/marquee.json +1 -1
  528. package/registry/mascot-quote.json +1 -1
  529. package/registry/mascot-state.json +1 -1
  530. package/registry/mascots.json +5 -5
  531. package/registry/match-dialog.json +1 -1
  532. package/registry/media-capture.json +1 -1
  533. package/registry/media-gallery.json +1 -1
  534. package/registry/media-grid.json +3 -3
  535. package/registry/meta-row.json +1 -1
  536. package/registry/meter.json +1 -1
  537. package/registry/nav-bar.json +9 -9
  538. package/registry/next-actions.json +1 -1
  539. package/registry/notification-preferences.json +3 -3
  540. package/registry/number-ticker.json +1 -1
  541. package/registry/onboarding.json +1 -1
  542. package/registry/opening-hours.json +1 -1
  543. package/registry/page-header.json +1 -1
  544. package/registry/page-hero.json +1 -1
  545. package/registry/page-index.json +1 -1
  546. package/registry/page.json +53 -11
  547. package/registry/pagination.json +1 -1
  548. package/registry/permission-prompt.json +3 -3
  549. package/registry/photo-grid.json +1 -1
  550. package/registry/pointer-light.json +1 -1
  551. package/registry/popover.json +1 -1
  552. package/registry/pricing-page.json +1 -1
  553. package/registry/product-page.json +6 -6
  554. package/registry/profile-card.json +7 -7
  555. package/registry/progress.json +1 -1
  556. package/registry/promise-card.json +3 -3
  557. package/registry/pull-to-refresh.json +2 -2
  558. package/registry/quota-meter.json +1 -1
  559. package/registry/radio-group.json +1 -1
  560. package/registry/rail-nav.json +10 -10
  561. package/registry/recipes.json +1 -1
  562. package/registry/retro-tv.json +48 -32
  563. package/registry/reviews.json +361 -0
  564. package/registry/router.json +1 -1
  565. package/registry/scroll-stage.json +6 -6
  566. package/registry/search-field.json +3 -3
  567. package/registry/section-backdrop.json +1 -1
  568. package/registry/separator.json +71 -6
  569. package/registry/service-card.json +55 -6
  570. package/registry/settings-layout.json +1 -1
  571. package/registry/showcase.json +1 -1
  572. package/registry/signature.json +1 -1
  573. package/registry/site-cahier.json +1 -1
  574. package/registry/site-footer.json +7 -7
  575. package/registry/sites.json +4 -4
  576. package/registry/skeleton.json +1 -1
  577. package/registry/skip-link.json +1 -1
  578. package/registry/slider.json +1 -1
  579. package/registry/slot-picker.json +1 -1
  580. package/registry/slot.json +1 -1
  581. package/registry/specimen-tag.json +58 -6
  582. package/registry/speed-lines.json +1 -1
  583. package/registry/spinner.json +1 -1
  584. package/registry/splash-handoff.json +4 -4
  585. package/registry/split-view.json +4 -4
  586. package/registry/stage-banner.json +10 -6
  587. package/registry/stat.json +62 -10
  588. package/registry/status-chip.json +1 -1
  589. package/registry/status-page.json +9 -9
  590. package/registry/step-progress.json +1 -1
  591. package/registry/step-showcase.json +1 -1
  592. package/registry/stepper.json +1 -1
  593. package/registry/sticky-action.json +27 -4
  594. package/registry/stuck.json +1 -1
  595. package/registry/swipe-deck.json +1 -1
  596. package/registry/switch.json +1 -1
  597. package/registry/tab-bar.json +2 -2
  598. package/registry/tabs.json +1 -1
  599. package/registry/tag-input.json +1 -1
  600. package/registry/tag-selector.json +1 -1
  601. package/registry/taped-photo.json +1 -1
  602. package/registry/terminal-replay.json +1 -1
  603. package/registry/text-style.json +1 -1
  604. package/registry/theme.json +1 -1
  605. package/registry/toast.json +1 -1
  606. package/registry/toc.json +1 -1
  607. package/registry/tooltip.json +1 -1
  608. package/registry/tree-view.json +3 -3
  609. package/registry/update-prompt.json +1 -1
  610. package/registry/upload-queue.json +1 -1
  611. package/registry/usage.json +542 -0
  612. package/registry/verified-badge.json +1 -1
  613. package/registry/versus-card.json +1 -1
  614. package/registry/vertical-video.json +4 -4
  615. package/registry/video-player.json +7 -7
  616. package/registry/video-trimmer.json +8 -8
  617. package/registry/virtual.json +1 -1
  618. package/registry/wall.json +128 -40
  619. package/registry/waveform.json +1 -1
  620. package/skills/form/SKILL.md +1 -1
  621. package/skills/map/SKILL.md +2 -2
  622. package/dist/chunk-3RVFD3UX.js.map +0 -1
  623. package/dist/chunk-4E5IUZHR.js.map +0 -1
  624. package/dist/chunk-KB7OLYIJ.js.map +0 -1
  625. package/dist/chunk-MHUUNC5W.js.map +0 -1
  626. package/dist/chunk-MIMOTE4W.js.map +0 -1
  627. package/dist/chunk-RBETQO2P.js.map +0 -1
  628. package/dist/chunk-WOZP3JLW.js.map +0 -1
  629. package/dist/chunk-YKEIOYJ5.js.map +0 -1
  630. /package/dist/{chunk-5LANVCK7.js.map → chunk-BG5APGX6.js.map} +0 -0
  631. /package/dist/{chunk-6EAHUURY.js.map → chunk-GHAN7OOE.js.map} +0 -0
  632. /package/dist/{chunk-HEKDKM5Y.js.map → chunk-QVHSV6RA.js.map} +0 -0
  633. /package/dist/{chunk-7JG3VR4C.js.map → chunk-RCKXJEDQ.js.map} +0 -0
  634. /package/registry/examples/{app-shell/orochia-studio.d.ts → analysis-report/document-validation.d.ts} +0 -0
  635. /package/registry/examples/{iso/orochia-hero.d.ts → analysis-report/native/document-validation.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dashboard-layout/dashboard-layout.tsx","../src/block-link.tsx"],"sourcesContent":["// Server-safe. A dashboard, read from the products' home screens (Orochia's creator studio, Orazaka's console for\n// Eric): the screen's heading with its actions and filters, then a responsive grid of widgets — one column on a phone,\n// two from `sm`, four from `xl`; a widget spans 1, 2, 3 columns or the full row, and keeps its order everywhere.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\n\nexport const dashboardLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\",\n text: \"flex min-w-0 flex-col gap-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg sm:text-[1.75rem]\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n side: \"flex min-w-0 flex-col gap-4\",\n right: \"flex shrink-0 flex-col gap-2 sm:items-end\",\n date: \"m-0 text-sm font-medium tabular-nums text-fg-secondary sm:text-right\",\n quick: \"m-0 grid list-none grid-cols-2 gap-2 p-0 lg:grid-cols-4\",\n tile:\n \"flex h-full min-h-14 min-w-0 items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-3 text-fg no-underline transition-colors \" +\n \"hover:border-accent/60 hover:bg-accent-soft focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n tileIcon: \"grid size-9 shrink-0 place-items-center rounded-lg bg-accent-soft text-fg-accent [&>svg]:size-5\",\n tileText: \"flex min-w-0 flex-col leading-tight\",\n tileLabel: \"text-sm font-semibold\",\n tileHint: \"text-xs text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n toolbar: \"flex flex-wrap items-center gap-2\",\n grid: \"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4\",\n widget: \"flex min-w-0 flex-col gap-3 rounded-xl border border-border-default bg-surface-1 p-4 sm:p-5\",\n widgetHead: \"flex items-start justify-between gap-3\",\n widgetTitle: \"text-sm font-semibold text-fg\",\n widgetDescription: \"mt-0.5 text-xs text-fg-secondary\",\n widgetBody: \"min-w-0 flex-1\",\n },\n variants: {\n span: {\n 1: { widget: \"\" },\n 2: { widget: \"sm:col-span-2\" },\n 3: { widget: \"sm:col-span-2 xl:col-span-3\" },\n full: { widget: \"sm:col-span-2 xl:col-span-4\" },\n },\n },\n defaultVariants: { span: 1 },\n});\nconst s = dashboardLayout();\n\nexport type DashboardLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title: `Good morning, Eric`. */\n title: React.ReactNode;\n /** A mono line above it (the workspace, the date). */\n eyebrow?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The screen's actions (a primary Button, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the heading: the period, the filters (Segmented tabs, a DateRangePicker, a FilterBar). */\n toolbar?: React.ReactNode;\n /**\n * The heading's level: `h1` when the dashboard is the screen, `h2` inside an AppShell whose header holds the h1.\n * @default \"h1\"\n */\n headingAs?: \"h1\" | \"h2\";\n /** Today's date, in words, formatted by the app with `@krizaka/intl`: on the right of the heading; under the title on a phone. */\n date?: React.ReactNode;\n /** Two to four tiles under the heading: where the person goes most (new invoice, new client…). */\n quickActions?: readonly QuickAction[];\n /** Names the quick actions' navigation (`Quick access`). Required with `quickActions`. */\n quickActionsLabel?: string;\n /** The app's link component for the quick actions. */\n linkAs?: LinkComponent;\n /** A side column (the period panel, `NextActions`, a notes list) beside the widgets from `lg`; under them on a phone. */\n side?: React.ReactNode;\n /** The widgets (`Widget`), in reading order. */\n children: React.ReactNode;\n};\n\n/** A tile of the quick-access row: an icon, a name, one line, a way in. */\nexport type QuickAction = {\n id: string;\n label: string;\n /** One line under the name. */\n hint?: string;\n icon?: React.ReactNode;\n href: string;\n};\n\n/** A dashboard screen: heading, actions, filters, then the grid of widgets. */\nexport function DashboardLayout({\n title,\n eyebrow,\n description,\n actions,\n toolbar,\n date,\n quickActions,\n quickActionsLabel,\n linkAs,\n side,\n headingAs: H = \"h1\",\n className,\n children,\n ...props\n}: DashboardLayoutProps) {\n const grid = <div className={s.grid()}>{children}</div>;\n return (\n <div className={s.root({ className })} {...props}>\n <div className={s.head()}>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <H className={s.title()}>{title}</H>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {(date || actions) && (\n <div className={s.right()}>\n {date && <p className={s.date()}>{date}</p>}\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n </div>\n {toolbar && <div className={s.toolbar()}>{toolbar}</div>}\n {quickActions && quickActions.length > 0 && (\n <nav aria-label={quickActionsLabel}>\n <ul className={s.quick()}>\n {quickActions.slice(0, 4).map((q) => (\n <li key={q.id}>\n <BlockLink href={q.href} linkAs={linkAs} className={s.tile()}>\n {q.icon && (\n <span className={s.tileIcon()} aria-hidden=\"true\">\n {q.icon}\n </span>\n )}\n <span className={s.tileText()}>\n <span className={s.tileLabel()}>{q.label}</span>\n {q.hint && <span className={s.tileHint()}>{q.hint}</span>}\n </span>\n </BlockLink>\n </li>\n ))}\n </ul>\n </nav>\n )}\n {side ? (\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]\">\n {grid}\n <aside className={s.side()}>{side}</aside>\n </div>\n ) : (\n grid\n )}\n </div>\n );\n}\n\nexport type WidgetProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The widget's title: it names the region. */\n title: React.ReactNode;\n /** One line under the title (the period, the source). */\n description?: React.ReactNode;\n /** An action on the right of the title (`See all`). */\n action?: React.ReactNode;\n /**\n * The columns it takes: 1, 2, 3 or the full row (from `sm`; one column on a phone).\n * @default 1\n */\n span?: 1 | 2 | 3 | \"full\";\n /**\n * The title's level: one under the dashboard's heading — `2` under an `h1`, `3` inside an AppShell (`headingAs=\"h2\"`).\n * @default 2\n */\n level?: 2 | 3;\n /** The content: a Stat, a chart of @krizaka/charts, a DataTable, a list. */\n children: React.ReactNode;\n};\n\n/** A widget of the dashboard: a titled region on a card. */\nexport function Widget({ title, description, action, span = 1, level = 2, className, children, id, ...props }: WidgetProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const sv = dashboardLayout({ span });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section className={sv.widget({ className })} aria-labelledby={titleId} id={id} {...props}>\n <div className={s.widgetHead()}>\n <div className=\"min-w-0\">\n <H id={titleId} className={s.widgetTitle()}>\n {title}\n </H>\n {description && <p className={s.widgetDescription()}>{description}</p>}\n </div>\n {action}\n </div>\n <div className={s.widgetBody()}>{children}</div>\n </section>\n );\n}\n","// The links of the page blocks (PageHero's back link, LinkCard, ArgumentCard, ActionBar): an internal path renders\n// through the app's router link (`linkAs`, e.g. Next's `Link`), anything else is an `<a>` that opens in a new tab.\n// Shared by the block entries; never exported on its own.\nimport type * as React from \"react\";\n\n/** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */\nexport type LinkComponent = React.ElementType<{ href: string; className?: string; children?: React.ReactNode; \"aria-label\"?: string; \"aria-describedby\"?: string }>;\n\n/** An address that leaves the app: an absolute URL or a protocol (`mailto:`). */\nexport const isExternal = (href: string) => /^[a-z][a-z0-9+.-]*:/i.test(href);\n\nexport function BlockLink({\n href,\n linkAs: Link = \"a\",\n external = isExternal(href),\n rel,\n ...props\n}: Omit<React.ComponentProps<\"a\">, \"href\"> & { href: string; linkAs?: LinkComponent; external?: boolean }) {\n if (external) return <a href={href} target=\"_blank\" rel={rel ?? \"noopener noreferrer\"} {...props} />;\n const Comp = Link as React.ElementType;\n return <Comp href={href} rel={rel} {...props} />;\n}\n"],"mappings":";AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACcI;AAThB,IAAM,aAAa,CAAC,SAAiB,uBAAuB,KAAK,IAAI;AAErE,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,QAAQ,OAAO;AAAA,EACf,WAAW,WAAW,IAAI;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA2G;AACzG,MAAI,SAAU,QAAO,oBAAC,OAAE,MAAY,QAAO,UAAS,KAAK,OAAO,uBAAwB,GAAG,OAAO;AAClG,QAAM,OAAO;AACb,SAAO,oBAAC,QAAK,MAAY,KAAW,GAAG,OAAO;AAChD;;;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AAO,EAAE,OAAO,aAAa,QAAQ,OAAO,GAAG,QAAQ,GAAG,WAAW,UAAU,IAAI,GAAG,MAAM,GAAgB;AAC1H,QAAM,IAAI,UAAU,IAAI,OAAO;AAC/B,QAAM,KAAK,gBAAgB,EAAE,KAAK,CAAC;AACnC,QAAM,OAAa,YAAM;AACzB,QAAM,UAAU,GAAG,MAAM,IAAI;AAC7B,SACE,qBAAC,aAAQ,WAAW,GAAG,OAAO,EAAE,UAAU,CAAC,GAAG,mBAAiB,SAAS,IAAS,GAAG,OAClF;AAAA,yBAAC,SAAI,WAAW,EAAE,WAAW,GAC3B;AAAA,2BAAC,SAAI,WAAU,WACb;AAAA,wBAAAA,KAAC,KAAE,IAAI,SAAS,WAAW,EAAE,YAAY,GACtC,iBACH;AAAA,QACC,eAAe,gBAAAA,KAAC,OAAE,WAAW,EAAE,kBAAkB,GAAI,uBAAY;AAAA,SACpE;AAAA,MACC;AAAA,OACH;AAAA,IACA,gBAAAA,KAAC,SAAI,WAAW,EAAE,WAAW,GAAI,UAAS;AAAA,KAC5C;AAEJ;","names":["jsx"]}
1
+ {"version":3,"sources":["../src/dashboard-layout/dashboard-layout.tsx","../src/block-link.tsx"],"sourcesContent":["// Server-safe. A dashboard, read from the products' home screens (a creator studio, Orazaka's console for\n// Eric): the screen's heading with its actions and filters, then a responsive grid of widgets — one column on a phone,\n// two from `sm`, four from `xl`; a widget spans 1, 2, 3 columns or the full row, and keeps its order everywhere.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { BlockLink, type LinkComponent } from \"../block-link\";\n\nexport const dashboardLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\",\n text: \"flex min-w-0 flex-col gap-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg sm:text-[1.75rem]\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n side: \"flex min-w-0 flex-col gap-4\",\n right: \"flex shrink-0 flex-col gap-2 sm:items-end\",\n date: \"m-0 text-sm font-medium tabular-nums text-fg-secondary sm:text-right\",\n quick: \"m-0 grid list-none grid-cols-2 gap-2 p-0 lg:grid-cols-4\",\n tile:\n \"flex h-full min-h-14 min-w-0 items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-3 text-fg no-underline transition-colors \" +\n \"hover:border-accent/60 hover:bg-accent-soft focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n tileIcon: \"grid size-9 shrink-0 place-items-center rounded-lg bg-accent-soft text-fg-accent [&>svg]:size-5\",\n tileText: \"flex min-w-0 flex-col leading-tight\",\n tileLabel: \"text-sm font-semibold\",\n tileHint: \"text-xs text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n toolbar: \"flex flex-wrap items-center gap-2\",\n grid: \"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4\",\n widget: \"flex min-w-0 flex-col gap-3 rounded-xl border border-border-default bg-surface-1 p-4 sm:p-5\",\n widgetHead: \"flex items-start justify-between gap-3\",\n widgetTitle: \"text-sm font-semibold text-fg\",\n widgetDescription: \"mt-0.5 text-xs text-fg-secondary\",\n widgetBody: \"min-w-0 flex-1\",\n },\n variants: {\n span: {\n 1: { widget: \"\" },\n 2: { widget: \"sm:col-span-2\" },\n 3: { widget: \"sm:col-span-2 xl:col-span-3\" },\n full: { widget: \"sm:col-span-2 xl:col-span-4\" },\n },\n },\n defaultVariants: { span: 1 },\n});\nconst s = dashboardLayout();\n\nexport type DashboardLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title: `Good morning, Eric`. */\n title: React.ReactNode;\n /** A mono line above it (the workspace, the date). */\n eyebrow?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The screen's actions (a primary Button, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the heading: the period, the filters (Segmented tabs, a DateRangePicker, a FilterBar). */\n toolbar?: React.ReactNode;\n /**\n * The heading's level: `h1` when the dashboard is the screen, `h2` inside an AppShell whose header holds the h1.\n * @default \"h1\"\n */\n headingAs?: \"h1\" | \"h2\";\n /** Today's date, in words, formatted by the app with `@krizaka/intl`: on the right of the heading; under the title on a phone. */\n date?: React.ReactNode;\n /** Two to four tiles under the heading: where the person goes most (new invoice, new client…). */\n quickActions?: readonly QuickAction[];\n /** Names the quick actions' navigation (`Quick access`). Required with `quickActions`. */\n quickActionsLabel?: string;\n /** The app's link component for the quick actions. */\n linkAs?: LinkComponent;\n /** A side column (the period panel, `NextActions`, a notes list) beside the widgets from `lg`; under them on a phone. */\n side?: React.ReactNode;\n /** The widgets (`Widget`), in reading order. */\n children: React.ReactNode;\n};\n\n/** A tile of the quick-access row: an icon, a name, one line, a way in. */\nexport type QuickAction = {\n id: string;\n label: string;\n /** One line under the name. */\n hint?: string;\n icon?: React.ReactNode;\n href: string;\n};\n\n/** A dashboard screen: heading, actions, filters, then the grid of widgets. */\nexport function DashboardLayout({\n title,\n eyebrow,\n description,\n actions,\n toolbar,\n date,\n quickActions,\n quickActionsLabel,\n linkAs,\n side,\n headingAs: H = \"h1\",\n className,\n children,\n ...props\n}: DashboardLayoutProps) {\n const grid = <div className={s.grid()}>{children}</div>;\n return (\n <div className={s.root({ className })} {...props}>\n <div className={s.head()}>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <H className={s.title()}>{title}</H>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {(date || actions) && (\n <div className={s.right()}>\n {date && <p className={s.date()}>{date}</p>}\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n </div>\n {toolbar && <div className={s.toolbar()}>{toolbar}</div>}\n {quickActions && quickActions.length > 0 && (\n <nav aria-label={quickActionsLabel}>\n <ul className={s.quick()}>\n {quickActions.slice(0, 4).map((q) => (\n <li key={q.id}>\n <BlockLink href={q.href} linkAs={linkAs} className={s.tile()}>\n {q.icon && (\n <span className={s.tileIcon()} aria-hidden=\"true\">\n {q.icon}\n </span>\n )}\n <span className={s.tileText()}>\n <span className={s.tileLabel()}>{q.label}</span>\n {q.hint && <span className={s.tileHint()}>{q.hint}</span>}\n </span>\n </BlockLink>\n </li>\n ))}\n </ul>\n </nav>\n )}\n {side ? (\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem]\">\n {grid}\n <aside className={s.side()}>{side}</aside>\n </div>\n ) : (\n grid\n )}\n </div>\n );\n}\n\nexport type WidgetProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The widget's title: it names the region. */\n title: React.ReactNode;\n /** One line under the title (the period, the source). */\n description?: React.ReactNode;\n /** An action on the right of the title (`See all`). */\n action?: React.ReactNode;\n /**\n * The columns it takes: 1, 2, 3 or the full row (from `sm`; one column on a phone).\n * @default 1\n */\n span?: 1 | 2 | 3 | \"full\";\n /**\n * The title's level: one under the dashboard's heading — `2` under an `h1`, `3` inside an AppShell (`headingAs=\"h2\"`).\n * @default 2\n */\n level?: 2 | 3;\n /** The content: a Stat, a chart of @krizaka/charts, a DataTable, a list. */\n children: React.ReactNode;\n};\n\n/** A widget of the dashboard: a titled region on a card. */\nexport function Widget({ title, description, action, span = 1, level = 2, className, children, id, ...props }: WidgetProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const sv = dashboardLayout({ span });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section className={sv.widget({ className })} aria-labelledby={titleId} id={id} {...props}>\n <div className={s.widgetHead()}>\n <div className=\"min-w-0\">\n <H id={titleId} className={s.widgetTitle()}>\n {title}\n </H>\n {description && <p className={s.widgetDescription()}>{description}</p>}\n </div>\n {action}\n </div>\n <div className={s.widgetBody()}>{children}</div>\n </section>\n );\n}\n","// The links of the page blocks (PageHero's back link, LinkCard, ArgumentCard, ActionBar): an internal path renders\n// through the app's router link (`linkAs`, e.g. Next's `Link`), anything else is an `<a>` that opens in a new tab.\n// Shared by the block entries; never exported on its own.\nimport type * as React from \"react\";\n\n/** The app's link component (Next's `Link`, React Router's `Link`…): receives `href`, `className` and the children. */\nexport type LinkComponent = React.ElementType<{ href: string; className?: string; children?: React.ReactNode; \"aria-label\"?: string; \"aria-describedby\"?: string }>;\n\n/** An address that leaves the app: an absolute URL or a protocol (`mailto:`). */\nexport const isExternal = (href: string) => /^[a-z][a-z0-9+.-]*:/i.test(href);\n\nexport function BlockLink({\n href,\n linkAs: Link = \"a\",\n external = isExternal(href),\n rel,\n ...props\n}: Omit<React.ComponentProps<\"a\">, \"href\"> & { href: string; linkAs?: LinkComponent; external?: boolean }) {\n if (external) return <a href={href} target=\"_blank\" rel={rel ?? \"noopener noreferrer\"} {...props} />;\n const Comp = Link as React.ElementType;\n return <Comp href={href} rel={rel} {...props} />;\n}\n"],"mappings":";AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACcI;AAThB,IAAM,aAAa,CAAC,SAAiB,uBAAuB,KAAK,IAAI;AAErE,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,QAAQ,OAAO;AAAA,EACf,WAAW,WAAW,IAAI;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAA2G;AACzG,MAAI,SAAU,QAAO,oBAAC,OAAE,MAAY,QAAO,UAAS,KAAK,OAAO,uBAAwB,GAAG,OAAO;AAClG,QAAM,OAAO;AACb,SAAO,oBAAC,QAAK,MAAY,KAAW,GAAG,OAAO;AAChD;;;ADoFe,gBAAAA,MAIP,YAJO;AAjGR,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MACE;AAAA,IAEF,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WA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mBAAiB,SAAS,IAAS,GAAG,OAClF;AAAA,yBAAC,SAAI,WAAW,EAAE,WAAW,GAC3B;AAAA,2BAAC,SAAI,WAAU,WACb;AAAA,wBAAAA,KAAC,KAAE,IAAI,SAAS,WAAW,EAAE,YAAY,GACtC,iBACH;AAAA,QACC,eAAe,gBAAAA,KAAC,OAAE,WAAW,EAAE,kBAAkB,GAAI,uBAAY;AAAA,SACpE;AAAA,MACC;AAAA,OACH;AAAA,IACA,gBAAAA,KAAC,SAAI,WAAW,EAAE,WAAW,GAAI,UAAS;AAAA,KAC5C;AAEJ;","names":["jsx"]}
@@ -17,10 +17,10 @@ import {
17
17
  selectionBarLabels,
18
18
  useDataTable,
19
19
  writeTable
20
- } from "./chunk-5LANVCK7.js";
20
+ } from "./chunk-BG5APGX6.js";
21
21
  import "./chunk-3X3OF4TI.js";
22
22
  import "./chunk-JXLDUDTD.js";
23
- import "./chunk-3DHNN5V7.js";
23
+ import "./chunk-M3GEYLMR.js";
24
24
  import "./chunk-KVDB4GXV.js";
25
25
  import "./chunk-F6JTHPHE.js";
26
26
  import "./chunk-UYGUSYIC.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/detail-layout/detail-layout.tsx","../src/profile-card/banner.tsx","../src/story-variant.ts"],"sourcesContent":["// Server-safe. The page of one object, read from the products' detail screens (a video, a job, an account, a pack):\n// its header — the way back, a media or an avatar, the name, its facts and status, the actions — then its tabs, the\n// content, and a side panel (details, related, activity) that goes under the content on a phone.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ProfileBanner } from \"../profile-card/banner\";\n\nexport const detailLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n back: \"inline-flex w-fit items-center gap-1.5 rounded-md text-sm font-medium text-fg-secondary no-underline hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n header: \"flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start\",\n banner: \"border-b border-border-subtle pb-5\",\n media: \"shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-2\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8\",\n main: \"flex min-w-0 flex-col gap-5\",\n aside: \"flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start\",\n section: \"flex min-w-0 flex-col gap-3 rounded-xl rounded-tl-none border border-border-default bg-surface-1 p-4 sm:p-5\",\n sectionTab: \"-mb-3 -mt-4 w-fit rounded-t-md border border-b-0 border-border-default bg-surface-2 px-3 py-1 text-xs font-bold text-fg-secondary sm:-mt-5\",\n sectionHead: \"flex items-center justify-between gap-3\",\n sectionTitle: \"m-0 text-sm font-semibold text-fg\",\n notes: \"m-0 flex list-none flex-col gap-3 p-0 [counter-reset:note]\",\n note: \"flex gap-3 text-sm text-fg [counter-increment:note]\",\n noteNum: \"mt-0.5 grid size-6 shrink-0 place-items-center rounded-full bg-surface-3 text-xs font-bold tabular-nums text-fg-secondary\",\n noteBody: \"flex min-w-0 flex-col gap-0.5\",\n noteMeta: \"text-xs text-fg-secondary\",\n steps: \"m-0 flex list-none flex-col gap-8 p-0\",\n step: \"flex min-w-0 flex-col gap-3\",\n stepHead: \"flex items-center gap-3\",\n stepNum: \"grid size-8 shrink-0 place-items-center rounded-full bg-accent text-sm font-extrabold tabular-nums text-on-accent\",\n stepTitle: \"m-0 text-base font-semibold text-fg\",\n totals: \"flex flex-col gap-4 rounded-xl border border-border-default bg-surface-1 p-4\",\n },\n});\nconst s = detailLayout();\n\nexport type DetailLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The way back to the list: your router's link (`<Link href=\"/videos\">Videos</Link>`), drawn with its arrow. */\n back?: React.ReactNode;\n /** A thumbnail, a cover or an avatar beside the name; with `cover`, the avatar overlapping the cover. */\n media?: React.ReactNode;\n /**\n * A person's or a place's page (a client, a shop, a creator): the header becomes a `ProfileBanner` — this cover (an\n * `<img alt=\"\">`, or `true` for a tint of the brand's accent), `media` as the avatar overlapping it, then the name and the actions.\n */\n cover?: React.ReactNode;\n /** A mono line above the name (the object's kind, its id). */\n eyebrow?: React.ReactNode;\n /** The object's name: the `h1`. */\n title: React.ReactNode;\n /** Beside the name: its status (a Badge). */\n status?: React.ReactNode;\n /** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */\n meta?: React.ReactNode;\n /** The object's actions (edit, publish, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */\n tabs?: React.ReactNode;\n /** The side panel: details, related objects, activity (under the content on a phone). */\n aside?: React.ReactNode;\n /** A notes column (`DetailNotes`) at the top of the side panel, before `aside`. */\n notes?: React.ReactNode;\n /** The content (the current tab). */\n children: React.ReactNode;\n};\n\n/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */\nexport function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, notes, className, children, ...props }: DetailLayoutProps) {\n const side = notes || aside;\n return (\n <div className={s.root({ className })} {...props}>\n {back && <div className={s.back()}>{back}</div>}\n {cover ? (\n <ProfileBanner className={s.banner()} banner={cover === true ? undefined : cover} avatar={media} eyebrow={eyebrow} title={title} status={status} meta={meta} actions={actions} />\n ) : (\n <div className={s.header()}>\n {media && <div className={s.media()}>{media}</div>}\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <h1 className={s.title()}>{title}</h1>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n {tabs}\n <div className={side ? s.columns() : undefined}>\n <div className={s.main()}>{children}</div>\n {side && (\n <aside className={s.aside()}>\n {notes}\n {aside}\n </aside>\n )}\n </div>\n </div>\n );\n}\n\nexport type DetailSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The binder tab: names the section (`Invoices`). */\n title: React.ReactNode;\n /** On the right of the title: one action (`See all`). */\n action?: React.ReactNode;\n /** The title's level. @default 2 */\n level?: 2 | 3;\n};\n\n/** A binder section of the main column: a titled region on a card, its name on a tab at the top-left corner. */\nexport function DetailSection({ title, action, level = 2, className, children, id, ...props }: DetailSectionProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <H id={titleId} className={s.sectionTitle()}>\n {title}\n </H>\n {action}\n </div>\n {children}\n </section>\n );\n}\n\nexport type DetailNote = { id: string; body: React.ReactNode; /** Who and when (`Eric · Oct 19`). */ meta?: React.ReactNode };\n\nexport type DetailNotesProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The column's name (`Notes`). */\n title: React.ReactNode;\n /** The notes, oldest first. */\n notes: readonly DetailNote[];\n /** Said when there is none. */\n emptyLabel: string;\n /** Under the list: the add field (a `Field` and a `Button`, a small form). */\n add?: React.ReactNode;\n};\n\n/** The notes column of a person's or an object's page: numbered notes and an add field. */\nexport function DetailNotes({ title, notes, emptyLabel, add, className, ...props }: DetailNotesProps) {\n const id = React.useId();\n return (\n <section aria-labelledby={id} className={s.section({ className })} {...props}>\n <h2 id={id} className={s.sectionTitle()}>\n {title}\n </h2>\n {notes.length === 0 ? (\n <p className={s.noteMeta()}>{emptyLabel}</p>\n ) : (\n <ol className={s.notes()}>\n {notes.map((n, i) => (\n <li key={n.id} className={s.note()}>\n <span className={s.noteNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <span className={s.noteBody()}>\n <span>{n.body}</span>\n {n.meta && <span className={s.noteMeta()}>{n.meta}</span>}\n </span>\n </li>\n ))}\n </ol>\n )}\n {add}\n </section>\n );\n}\n\nexport type FormStepData = { id: string; title: React.ReactNode; children: React.ReactNode };\n\nexport type FormStepsProps = Omit<React.ComponentProps<\"ol\">, \"children\"> & {\n /** The steps in order: an id, a title and their fields. */\n steps: readonly FormStepData[];\n};\n\n/** The numbered steps of a long form (a new invoice: client, lines, terms): an ordered list, each step a named region. */\nexport function FormSteps({ steps, className, ...props }: FormStepsProps) {\n const base = React.useId();\n return (\n <ol className={s.steps({ className })} {...props}>\n {steps.map((st, i) => (\n <li key={st.id} className={s.step()}>\n <div className={s.stepHead()}>\n <span className={s.stepNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <h2 id={`${base}-${st.id}`} className={s.stepTitle()}>\n <span className=\"sr-only\">{i + 1}. </span>\n {st.title}\n </h2>\n </div>\n <div role=\"group\" aria-labelledby={`${base}-${st.id}`} className=\"flex min-w-0 flex-col gap-4\">\n {st.children}\n </div>\n </li>\n ))}\n </ol>\n );\n}\n\n/** The totals card of a form's side panel (`aside`): sticky with the panel on a desktop, under the steps on a phone. Plain primary at `lg` inside. */\nexport function FormTotals({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.totals({ className })} {...props} />;\n}\n","// Server-safe: no hook. The top of a page about one person or place — a client, a shop, a creator, a building\n// (extracted from Orochia's ProfileHero, #650, #515): a slim cover, the avatar overlapping its lower edge, then the\n// eyebrow, the name (the page's h1), its facts and the actions. No text ever sits on the cover: the words are under it,\n// so a photo never costs their contrast (a scrim fades the photo's foot into the page all the same).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { brandClass } from \"../story-variant\";\n\nexport const profileBanner = tv({\n slots: {\n root: \"relative flex w-full min-w-0 flex-col\",\n // The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).\n cover:\n \"relative h-28 w-full overflow-hidden rounded-xl bg-accent-soft bg-linear-to-br from-accent/30 via-accent-soft to-surface-2 sm:h-44 \" +\n \"[&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n scrim: \"pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent\",\n body: \"relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2\",\n identity: \"flex min-w-0 items-end gap-4\",\n // The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.\n avatar:\n \"relative -mt-10 h-20 w-20 shrink-0 overflow-hidden rounded-2xl bg-surface-3 ring-4 ring-surface-0 sm:-mt-14 sm:h-28 sm:w-28 \" +\n \"[&>*]:h-full! [&>*]:w-full! [&_img]:h-full [&_img]:w-full [&_img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-1 pb-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex min-w-0 flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1\",\n },\n});\nconst s = profileBanner();\n\nexport type ProfileBannerProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The cover: an `<img alt=\"\">` (decorative) or your framework's image. Absent: a tint of the brand's accent. */\n banner?: React.ReactNode;\n /** The avatar overlapping the cover: `Avatar` with the family's default (`defaultAvatar: { brand, seed }`, #598) when there is no photo. */\n avatar: React.ReactNode;\n /** A mono line above the name: what it is (« Client », « Shop »), an id. */\n eyebrow?: React.ReactNode;\n /** The name: the page's heading. */\n title: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h1\"\n */\n titleAs?: \"h1\" | \"h2\";\n /** Beside the name: a status (`Badge`), a verified mark. */\n status?: React.ReactNode;\n /** Under the name: its facts (a handle, a city, « client since 2024 »). */\n meta?: React.ReactNode;\n /** The actions (message, book, edit): at the right from `sm`, under the name on a phone. */\n actions?: React.ReactNode;\n /** A brand scope (`akinaza` → `.brand-akinaza`): the default cover takes that brand's accent. */\n brand?: string;\n};\n\n/** A person's or a place's banner: cover, overlapping avatar, eyebrow, name (h1), facts and actions — the words never on the cover. */\nexport function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = \"h1\", status, meta, actions, brand, className, ...props }: ProfileBannerProps) {\n return (\n <section className={s.root({ className: cn(brandClass(brand), className) })} {...props}>\n <div data-cover=\"\" className={s.cover()}>\n {banner}\n {banner ? <span aria-hidden className={s.scrim()} /> : null}\n </div>\n <div className={s.body()}>\n <div className={s.identity()}>\n <div data-avatar=\"\" className={s.avatar()}>\n {avatar}\n </div>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <Title className={s.title()}>{title}</Title>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n </section>\n );\n}\n","// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-orochia`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";;;;;AAGA,YAAY,WAAW;AACvB,SAAS,MAAAA,WAAU;;;ACCnB,SAAS,UAAU;;;ACIZ,IAAM,aAAa,CAAC,UAA+B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AAA,wBAAAF,MAAC,UAAK,WAAU,WAAW;AAAA,cAAI;AAAA,UAAE;AAAA,WAAE;AAAA,QAClC,GAAG;AAAA,SACN;AAAA,OACF;AAAA,IACA,gBAAAD,KAAC,SAAI,MAAK,SAAQ,mBAAiB,GAAG,IAAI,IAAI,GAAG,EAAE,IAAI,WAAU,+BAC9D,aAAG,UACN;AAAA,OAZO,GAAG,EAaZ,CACD,GACH;AAEJ;AAGO,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC/E,SAAO,gBAAAA,KAAC,SAAI,WAAWG,GAAE,OAAO,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC7D;","names":["tv","jsx","jsxs","tv","s"]}
1
+ {"version":3,"sources":["../src/detail-layout/detail-layout.tsx","../src/profile-card/banner.tsx","../src/story-variant.ts"],"sourcesContent":["// Server-safe. The page of one object, read from the products' detail screens (a video, a job, an account, a pack):\n// its header — the way back, a media or an avatar, the name, its facts and status, the actions — then its tabs, the\n// content, and a side panel (details, related, activity) that goes under the content on a phone.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ProfileBanner } from \"../profile-card/banner\";\n\nexport const detailLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n back: \"inline-flex w-fit items-center gap-1.5 rounded-md text-sm font-medium text-fg-secondary no-underline hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n header: \"flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start\",\n banner: \"border-b border-border-subtle pb-5\",\n media: \"shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-2\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8\",\n main: \"flex min-w-0 flex-col gap-5\",\n aside: \"flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start\",\n section: \"flex min-w-0 flex-col gap-3 rounded-xl rounded-tl-none border border-border-default bg-surface-1 p-4 sm:p-5\",\n sectionTab: \"-mb-3 -mt-4 w-fit rounded-t-md border border-b-0 border-border-default bg-surface-2 px-3 py-1 text-xs font-bold text-fg-secondary sm:-mt-5\",\n sectionHead: \"flex items-center justify-between gap-3\",\n sectionTitle: \"m-0 text-sm font-semibold text-fg\",\n notes: \"m-0 flex list-none flex-col gap-3 p-0 [counter-reset:note]\",\n note: \"flex gap-3 text-sm text-fg [counter-increment:note]\",\n noteNum: \"mt-0.5 grid size-6 shrink-0 place-items-center rounded-full bg-surface-3 text-xs font-bold tabular-nums text-fg-secondary\",\n noteBody: \"flex min-w-0 flex-col gap-0.5\",\n noteMeta: \"text-xs text-fg-secondary\",\n steps: \"m-0 flex list-none flex-col gap-8 p-0\",\n step: \"flex min-w-0 flex-col gap-3\",\n stepHead: \"flex items-center gap-3\",\n stepNum: \"grid size-8 shrink-0 place-items-center rounded-full bg-accent text-sm font-extrabold tabular-nums text-on-accent\",\n stepTitle: \"m-0 text-base font-semibold text-fg\",\n totals: \"flex flex-col gap-4 rounded-xl border border-border-default bg-surface-1 p-4\",\n },\n});\nconst s = detailLayout();\n\nexport type DetailLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The way back to the list: your router's link (`<Link href=\"/videos\">Videos</Link>`), drawn with its arrow. */\n back?: React.ReactNode;\n /** A thumbnail, a cover or an avatar beside the name; with `cover`, the avatar overlapping the cover. */\n media?: React.ReactNode;\n /**\n * A person's or a place's page (a client, a shop, a creator): the header becomes a `ProfileBanner` — this cover (an\n * `<img alt=\"\">`, or `true` for a tint of the brand's accent), `media` as the avatar overlapping it, then the name and the actions.\n */\n cover?: React.ReactNode;\n /** A mono line above the name (the object's kind, its id). */\n eyebrow?: React.ReactNode;\n /** The object's name: the `h1`. */\n title: React.ReactNode;\n /** Beside the name: its status (a Badge). */\n status?: React.ReactNode;\n /** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */\n meta?: React.ReactNode;\n /** The object's actions (edit, publish, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */\n tabs?: React.ReactNode;\n /** The side panel: details, related objects, activity (under the content on a phone). */\n aside?: React.ReactNode;\n /** A notes column (`DetailNotes`) at the top of the side panel, before `aside`. */\n notes?: React.ReactNode;\n /** The content (the current tab). */\n children: React.ReactNode;\n};\n\n/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */\nexport function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, notes, className, children, ...props }: DetailLayoutProps) {\n const side = notes || aside;\n return (\n <div className={s.root({ className })} {...props}>\n {back && <div className={s.back()}>{back}</div>}\n {cover ? (\n <ProfileBanner className={s.banner()} banner={cover === true ? undefined : cover} avatar={media} eyebrow={eyebrow} title={title} status={status} meta={meta} actions={actions} />\n ) : (\n <div className={s.header()}>\n {media && <div className={s.media()}>{media}</div>}\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <h1 className={s.title()}>{title}</h1>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n {tabs}\n <div className={side ? s.columns() : undefined}>\n <div className={s.main()}>{children}</div>\n {side && (\n <aside className={s.aside()}>\n {notes}\n {aside}\n </aside>\n )}\n </div>\n </div>\n );\n}\n\nexport type DetailSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The binder tab: names the section (`Invoices`). */\n title: React.ReactNode;\n /** On the right of the title: one action (`See all`). */\n action?: React.ReactNode;\n /** The title's level. @default 2 */\n level?: 2 | 3;\n};\n\n/** A binder section of the main column: a titled region on a card, its name on a tab at the top-left corner. */\nexport function DetailSection({ title, action, level = 2, className, children, id, ...props }: DetailSectionProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <H id={titleId} className={s.sectionTitle()}>\n {title}\n </H>\n {action}\n </div>\n {children}\n </section>\n );\n}\n\nexport type DetailNote = { id: string; body: React.ReactNode; /** Who and when (`Eric · Oct 19`). */ meta?: React.ReactNode };\n\nexport type DetailNotesProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The column's name (`Notes`). */\n title: React.ReactNode;\n /** The notes, oldest first. */\n notes: readonly DetailNote[];\n /** Said when there is none. */\n emptyLabel: string;\n /** Under the list: the add field (a `Field` and a `Button`, a small form). */\n add?: React.ReactNode;\n};\n\n/** The notes column of a person's or an object's page: numbered notes and an add field. */\nexport function DetailNotes({ title, notes, emptyLabel, add, className, ...props }: DetailNotesProps) {\n const id = React.useId();\n return (\n <section aria-labelledby={id} className={s.section({ className })} {...props}>\n <h2 id={id} className={s.sectionTitle()}>\n {title}\n </h2>\n {notes.length === 0 ? (\n <p className={s.noteMeta()}>{emptyLabel}</p>\n ) : (\n <ol className={s.notes()}>\n {notes.map((n, i) => (\n <li key={n.id} className={s.note()}>\n <span className={s.noteNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <span className={s.noteBody()}>\n <span>{n.body}</span>\n {n.meta && <span className={s.noteMeta()}>{n.meta}</span>}\n </span>\n </li>\n ))}\n </ol>\n )}\n {add}\n </section>\n );\n}\n\nexport type FormStepData = { id: string; title: React.ReactNode; children: React.ReactNode };\n\nexport type FormStepsProps = Omit<React.ComponentProps<\"ol\">, \"children\"> & {\n /** The steps in order: an id, a title and their fields. */\n steps: readonly FormStepData[];\n};\n\n/** The numbered steps of a long form (a new invoice: client, lines, terms): an ordered list, each step a named region. */\nexport function FormSteps({ steps, className, ...props }: FormStepsProps) {\n const base = React.useId();\n return (\n <ol className={s.steps({ className })} {...props}>\n {steps.map((st, i) => (\n <li key={st.id} className={s.step()}>\n <div className={s.stepHead()}>\n <span className={s.stepNum()} aria-hidden=\"true\">\n {i + 1}\n </span>\n <h2 id={`${base}-${st.id}`} className={s.stepTitle()}>\n <span className=\"sr-only\">{i + 1}. </span>\n {st.title}\n </h2>\n </div>\n <div role=\"group\" aria-labelledby={`${base}-${st.id}`} className=\"flex min-w-0 flex-col gap-4\">\n {st.children}\n </div>\n </li>\n ))}\n </ol>\n );\n}\n\n/** The totals card of a form's side panel (`aside`): sticky with the panel on a desktop, under the steps on a phone. Plain primary at `lg` inside. */\nexport function FormTotals({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={s.totals({ className })} {...props} />;\n}\n","// Server-safe: no hook. The top of a page about one person or place — a client, a shop, a creator, a building\n// (extracted from a product's ProfileHero, #650, #515): a slim cover, the avatar overlapping its lower edge, then the\n// eyebrow, the name (the page's h1), its facts and the actions. No text ever sits on the cover: the words are under it,\n// so a photo never costs their contrast (a scrim fades the photo's foot into the page all the same).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { brandClass } from \"../story-variant\";\n\nexport const profileBanner = tv({\n slots: {\n root: \"relative flex w-full min-w-0 flex-col\",\n // The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).\n cover:\n \"relative h-28 w-full overflow-hidden rounded-xl bg-accent-soft bg-linear-to-br from-accent/30 via-accent-soft to-surface-2 sm:h-44 \" +\n \"[&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n scrim: \"pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent\",\n body: \"relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2\",\n identity: \"flex min-w-0 items-end gap-4\",\n // The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.\n avatar:\n \"relative -mt-10 h-20 w-20 shrink-0 overflow-hidden rounded-2xl bg-surface-3 ring-4 ring-surface-0 sm:-mt-14 sm:h-28 sm:w-28 \" +\n \"[&>*]:h-full! [&>*]:w-full! [&_img]:h-full [&_img]:w-full [&_img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-1 pb-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex min-w-0 flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1\",\n },\n});\nconst s = profileBanner();\n\nexport type ProfileBannerProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The cover: an `<img alt=\"\">` (decorative) or your framework's image. Absent: a tint of the brand's accent. */\n banner?: React.ReactNode;\n /** The avatar overlapping the cover: `Avatar` with the family's default (`defaultAvatar: { brand, seed }`, #598) when there is no photo. */\n avatar: React.ReactNode;\n /** A mono line above the name: what it is (« Client », « Shop »), an id. */\n eyebrow?: React.ReactNode;\n /** The name: the page's heading. */\n title: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h1\"\n */\n titleAs?: \"h1\" | \"h2\";\n /** Beside the name: a status (`Badge`), a verified mark. */\n status?: React.ReactNode;\n /** Under the name: its facts (a handle, a city, « client since 2024 »). */\n meta?: React.ReactNode;\n /** The actions (message, book, edit): at the right from `sm`, under the name on a phone. */\n actions?: React.ReactNode;\n /** A brand scope (`akinaza` → `.brand-akinaza`): the default cover takes that brand's accent. */\n brand?: string;\n};\n\n/** A person's or a place's banner: cover, overlapping avatar, eyebrow, name (h1), facts and actions — the words never on the cover. */\nexport function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = \"h1\", status, meta, actions, brand, className, ...props }: ProfileBannerProps) {\n return (\n <section className={s.root({ className: cn(brandClass(brand), className) })} {...props}>\n <div data-cover=\"\" className={s.cover()}>\n {banner}\n {banner ? <span aria-hidden className={s.scrim()} /> : null}\n </div>\n <div className={s.body()}>\n <div className={s.identity()}>\n <div data-avatar=\"\" className={s.avatar()}>\n {avatar}\n </div>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <Title className={s.title()}>{title}</Title>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n </section>\n );\n}\n","// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-yomizaka`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";;;;;AAGA,YAAY,WAAW;AACvB,SAAS,MAAAA,WAAU;;;ACCnB,SAAS,UAAU;;;ACIZ,IAAM,aAAa,CAAC,UAA+B,QAAQ,SAAS,KAAK,KAAK;;;ADqD/E,SAEY,KAFZ;AApDC,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,OACE;AAAA,IAEF,OAAO;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,IAEV,QACE;AAAA,IAEF,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AA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EJ;AAGO,SAAS,WAAW,EAAE,WAAW,GAAG,MAAM,GAAgC;AAC/E,SAAO,gBAAAA,KAAC,SAAI,WAAWG,GAAE,OAAO,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC7D;","names":["tv","jsx","jsxs","tv","s"]}
package/dist/dialog.js CHANGED
@@ -10,10 +10,10 @@ import {
10
10
  Sheet,
11
11
  dialog,
12
12
  useReturnFocus
13
- } from "./chunk-6EAHUURY.js";
13
+ } from "./chunk-GHAN7OOE.js";
14
14
  import {
15
15
  Button
16
- } from "./chunk-SJS6RJIT.js";
16
+ } from "./chunk-V7W4RLRW.js";
17
17
  import "./chunk-D3T54RSL.js";
18
18
  import "./chunk-WEVYKZIF.js";
19
19
  import "./chunk-NSLXEDIS.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/elephant/geometry.ts","../src/elephant/elephant.tsx"],"sourcesContent":["import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The elephant's geometry (200 × 200 view box, a pen line of 8, square caps, mitred joins — the Cahier grammar of the\n * marks and of @krizaka/icons: straight runs and 45° cuts, no rounded outline). It faces right. Two poses of one\n * animal: `standing`, the ear folded down beside the head, and `flying`, the ear spread up like a wing (the darija\n * joke: « l'éléphant avec ses oreilles, il peut voler »), the legs tucked, three lines of wind behind.\n *\n * The body and the trunk are sage, the ear and the wing sand: the two stops of Yororis' mark gradient (`marks.yororis`\n * of @krizaka/tokens), each ≥ 3:1 on the page surfaces of both themes. Flat colours: no glow, no gradient.\n */\nexport const SAND = marks.yororis[0]![1];\nexport const SAGE = marks.yororis[marks.yororis.length - 1]![1];\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const ELEPHANT = {\n viewBox: \"0 0 200 200\",\n stroke: 8,\n sand: SAND,\n sage: SAGE,\n /** The eye: one node, a filled dot. */\n eye: { cx: 154, cy: 66, r: 5 },\n standing: {\n /** Body, head and the two legs, one closed outline: straight runs and 45° cuts. */\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V168 H108 V138 H62 V168 H38 V138 H30 Z\",\n /** The trunk: down from the head's front, curling up at its tip. */\n trunk: \"M164 108 V146 L172 158 H184 V144\",\n /** The ear, folded down over the shoulder. */\n ear: \"M116 52 L92 56 L84 100 L104 124 L128 112 Z\",\n tail: \"M30 90 L20 108 V118\",\n },\n flying: {\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V140 H108 V128 H62 V140 H38 V128 H30 Z\",\n trunk: \"M164 108 V142 L172 154 H184 V140\",\n /** The ear, spread up and back: the wing. */\n ear: \"M116 78 L120 30 L90 10 L78 34 L52 24 L56 52 L30 60 L66 84 Z\",\n tail: \"M30 90 L18 102 V112\",\n wind: \"M22 150 H50 M12 166 H44 M32 180 H58\",\n },\n /** The flap: a few degrees around the shoulder, 1.6 s. */\n motion: { flap: 1.6, origin: \"114px 80px\", angle: 7 },\n} as const;\n","import type { SVGProps } from \"react\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { ELEPHANT as G } from \"./geometry\";\n\nexport interface ElephantProps extends Omit<SVGProps<SVGSVGElement>, \"width\" | \"height\" | \"title\"> {\n /** `standing` with the ear folded down, or `flying` with the ear spread like a wing. */\n pose?: \"standing\" | \"flying\";\n /** Width and height in pixels. */\n size?: number;\n /** The wing flaps gently (a flying elephant only). Off with `false`; always off under prefers-reduced-motion. */\n animated?: boolean;\n /** An accessible name (the mark becomes an image); without it the mark is decorative. */\n title?: string;\n}\n\nconst CSS = `\n.kz-elephant-flap { transform-box: view-box; transform-origin: ${G.motion.origin}; animation: kz-elephant-flap ${G.motion.flap}s ease-in-out infinite; }\n@keyframes kz-elephant-flap { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-${G.motion.angle}deg); } }\n@media (prefers-reduced-motion: reduce) { .kz-elephant-flap { animation: none; } }\n`;\n\nconst line = { strokeWidth: G.stroke, strokeLinecap: \"square\", strokeLinejoin: \"miter\", fill: \"none\" } as const;\n\n/**\n * The elephant: a small, playful mark from the neighbour joke — « the elephant with those ears can fly ». Not a product\n * logo: a quiet figure for the hero of a page or the closing of a chat. Sage body, sand ear, flat colours that read on\n * both themes; decorative by default.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function Elephant({ pose = \"standing\", size = 64, animated = true, title, className, ...rest }: ElephantProps) {\n warnDeprecated(\"elephant\");\n const flying = pose === \"flying\";\n const p = flying ? G.flying : G.standing;\n const a11y = title ? { role: \"img\" as const, \"aria-label\": title } : { \"aria-hidden\": true as const };\n return (\n <svg width={size} height={size} viewBox={G.viewBox} xmlns=\"http://www.w3.org/2000/svg\" className={className} data-pose={pose} {...a11y} {...rest}>\n {flying && animated ? <style>{CSS}</style> : null}\n {flying ? <path d={G.flying.wind} stroke={G.sage} opacity=\".45\" {...line} /> : null}\n <path d={p.body} stroke={G.sage} {...line} />\n <path d={p.trunk} stroke={G.sage} {...line} />\n <path d={p.tail} stroke={G.sage} {...line} />\n <g className={flying && animated ? \"kz-elephant-flap\" : undefined}>\n <path d={p.ear} stroke={G.sand} {...line} />\n </g>\n <circle cx={G.eye.cx} cy={G.eye.cy} r={G.eye.r} fill={G.sage} />\n </svg>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAS,aAAa;AAWf,IAAM,OAAO,MAAM,QAAQ,CAAC,EAAG,CAAC;AAChC,IAAM,OAAO,MAAM,QAAQ,MAAM,QAAQ,SAAS,CAAC,EAAG,CAAC;AAGvD,IAAM,WAAW;AAAA,EACtB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA;AAAA,EAEN,KAAK,EAAE,IAAI,KAAK,IAAI,IAAI,GAAG,EAAE;AAAA,EAC7B,UAAU;AAAA;AAAA,IAER,MAAM;AAAA;AAAA,IAEN,OAAO;AAAA;AAAA,IAEP,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,E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8BAAC,UAAK,GAAG,EAAE,KAAK,QAAQ,SAAE,MAAO,GAAG,MAAM,GAC5C;AAAA,IACA,oBAAC,YAAO,IAAI,SAAE,IAAI,IAAI,IAAI,SAAE,IAAI,IAAI,GAAG,SAAE,IAAI,GAAG,MAAM,SAAE,MAAM;AAAA,KAChE;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/elephant/geometry.ts","../src/elephant/elephant.tsx"],"sourcesContent":["import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The elephant's geometry (200 × 200 view box, a pen line of 8, square caps, mitred joins — the Cahier grammar of the\n * marks and of @krizaka/icons: straight runs and 45° cuts, no rounded outline). It faces right. Two poses of one\n * animal: `standing`, the ear folded down beside the head, and `flying`, the ear spread up like a wing (the darija\n * joke: « l'éléphant avec ses oreilles, il peut voler »), the legs tucked, three lines of wind behind.\n *\n * The body and the trunk are sage, the ear and the wing sand: the two stops of the sand → sage mark gradient (`marks.yororis`\n * of @krizaka/tokens), each ≥ 3:1 on the page surfaces of both themes. Flat colours: no glow, no gradient.\n */\nexport const SAND = marks.yororis[0]![1];\nexport const SAGE = marks.yororis[marks.yororis.length - 1]![1];\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const ELEPHANT = {\n viewBox: \"0 0 200 200\",\n stroke: 8,\n sand: SAND,\n sage: SAGE,\n /** The eye: one node, a filled dot. */\n eye: { cx: 154, cy: 66, r: 5 },\n standing: {\n /** Body, head and the two legs, one closed outline: straight runs and 45° cuts. */\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V168 H108 V138 H62 V168 H38 V138 H30 Z\",\n /** The trunk: down from the head's front, curling up at its tip. */\n trunk: \"M164 108 V146 L172 158 H184 V144\",\n /** The ear, folded down over the shoulder. */\n ear: \"M116 52 L92 56 L84 100 L104 124 L128 112 Z\",\n tail: \"M30 90 L20 108 V118\",\n },\n flying: {\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V140 H108 V128 H62 V140 H38 V128 H30 Z\",\n trunk: \"M164 108 V142 L172 154 H184 V140\",\n /** The ear, spread up and back: the wing. */\n ear: \"M116 78 L120 30 L90 10 L78 34 L52 24 L56 52 L30 60 L66 84 Z\",\n tail: \"M30 90 L18 102 V112\",\n wind: \"M22 150 H50 M12 166 H44 M32 180 H58\",\n },\n /** The flap: a few degrees around the shoulder, 1.6 s. */\n motion: { flap: 1.6, origin: \"114px 80px\", angle: 7 },\n} as const;\n","import type { SVGProps } from \"react\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { ELEPHANT as G } from \"./geometry\";\n\nexport interface ElephantProps extends Omit<SVGProps<SVGSVGElement>, \"width\" | \"height\" | \"title\"> {\n /** `standing` with the ear folded down, or `flying` with the ear spread like a wing. */\n pose?: \"standing\" | \"flying\";\n /** Width and height in pixels. */\n size?: number;\n /** The wing flaps gently (a flying elephant only). Off with `false`; always off under prefers-reduced-motion. */\n animated?: boolean;\n /** An accessible name (the mark becomes an image); without it the mark is decorative. */\n title?: string;\n}\n\nconst CSS = `\n.kz-elephant-flap { transform-box: view-box; transform-origin: ${G.motion.origin}; animation: kz-elephant-flap ${G.motion.flap}s ease-in-out infinite; }\n@keyframes kz-elephant-flap { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-${G.motion.angle}deg); } }\n@media (prefers-reduced-motion: reduce) { .kz-elephant-flap { animation: none; } }\n`;\n\nconst line = { strokeWidth: G.stroke, strokeLinecap: \"square\", strokeLinejoin: \"miter\", fill: \"none\" } as const;\n\n/**\n * The elephant: a small, playful mark from the neighbour joke — « the elephant with those ears can fly ». Not a product\n * logo: a quiet figure for the hero of a page or the closing of a chat. Sage body, sand ear, flat colours that read on\n * both themes; decorative by default.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function Elephant({ pose = \"standing\", size = 64, animated = true, title, className, ...rest }: ElephantProps) {\n warnDeprecated(\"elephant\");\n const flying = pose === \"flying\";\n const p = flying ? G.flying : G.standing;\n const a11y = title ? { role: \"img\" as const, \"aria-label\": title } : { \"aria-hidden\": true as const };\n return (\n <svg width={size} height={size} viewBox={G.viewBox} xmlns=\"http://www.w3.org/2000/svg\" className={className} data-pose={pose} {...a11y} {...rest}>\n {flying && animated ? <style>{CSS}</style> : null}\n {flying ? <path d={G.flying.wind} stroke={G.sage} opacity=\".45\" {...line} /> : null}\n <path d={p.body} stroke={G.sage} {...line} />\n <path d={p.trunk} stroke={G.sage} {...line} />\n <path d={p.tail} stroke={G.sage} {...line} />\n <g className={flying && animated ? \"kz-elephant-flap\" : undefined}>\n <path d={p.ear} stroke={G.sand} {...line} />\n </g>\n <circle cx={G.eye.cx} cy={G.eye.cy} r={G.eye.r} fill={G.sage} />\n </svg>\n );\n}\n"],"mappings":";;;;;;AAAA,SAAS,aAAa;AAWf,IAAM,OAAO,MAAM,QAAQ,CAAC,EAAG,CAAC;AAChC,IAAM,OAAO,MAAM,QAAQ,MAAM,QAAQ,SAAS,CAAC,EAAG,CAAC;AAGvD,IAAM,WAAW;AAAA,EACtB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA;AAAA,EAEN,KAAK,EAAE,IAAI,KAAK,IAAI,IAAI,GAAG,EAAE;AAAA,EAC7B,UAAU;AAAA;AAAA,IAER,MAAM;AAAA;AAAA,IAEN,OAAO;AAAA;AAAA,IAEP,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA;AAAA,IAEP,KAAK;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAAA;AAAA,EAEA,QAAQ,EAAE,MAAM,KAAK,QAAQ,cAAc,OAAO,EAAE;AACtD;;;ACLI,SACwB,KADxB;AApBJ,IAAM,MAAM;AAAA,iEACqD,SAAE,OAAO,MAAM,iCAAiC,SAAE,OAAO,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
+ type EmbedPlatform = "tiktok" | "youtube-shorts" | "instagram";
5
+ /** The platforms' names, as proper nouns (they are not translated). */
6
+ declare const EMBED_PLATFORMS: Readonly<Record<EmbedPlatform, string>>;
7
+ /**
8
+ * The address of the platform's frame for a public post, or `null` for anything else: another host, `http:`, a short
9
+ * link we cannot resolve without asking the platform, a profile page. Exact hosts, exact paths.
10
+ */
11
+ declare function embedUrl(platform: EmbedPlatform, url: string): string | null;
12
+ /** Whether a poster may be drawn before the click: a path of the host's own origin, or an https picture that is not on a platform's domain (the host copies it to its own storage). */
13
+ declare function isOwnPoster(poster: string): boolean;
14
+
15
+ interface EmbedFacadeProps extends Omit<React.ComponentProps<"div">, "title" | "children" | "onLoad"> {
16
+ /** Which platform's frame to load. */
17
+ platform: EmbedPlatform;
18
+ /** The public address of the post (`embedUrl` validates it; anything else renders nothing). */
19
+ url: string;
20
+ /** The accessible name of the video ("Latest reel"), passed translated: it names the frame once loaded. */
21
+ title: string;
22
+ /** The button: what it does and which platform it loads ("Load TikTok and play"), passed translated. */
23
+ playLabel: string;
24
+ /** The host's own copy of the picture (never an address on the platform: those are refused, they would be a request). */
25
+ poster?: string;
26
+ /** A line under the button, for what the platform will receive on the click (translated). */
27
+ notice?: React.ReactNode;
28
+ /** The ratio of the box when it stands alone; inside a television's screen it fills its parent. @default "9 / 16" */
29
+ aspectRatio?: string;
30
+ /** Called once, when the visitor has asked and the frame is added. */
31
+ onLoad?: () => void;
32
+ }
33
+ /** A short video from a platform, behind a button: the frame exists only after the click. */
34
+ declare function EmbedFacade({ platform, url, title, playLabel, poster, notice, aspectRatio, onLoad, className, style, ...props }: EmbedFacadeProps): React.JSX.Element | null;
35
+
36
+ export { EMBED_PLATFORMS, EmbedFacade, embedUrl, isOwnPoster };
37
+ export type { EmbedFacadeProps, EmbedPlatform };
@@ -0,0 +1,96 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-NSLXEDIS.js";
5
+
6
+ // src/embed-facade/embed-facade.tsx
7
+ import * as React from "react";
8
+
9
+ // src/embed-facade/embed-url.ts
10
+ var EMBED_PLATFORMS = Object.freeze({ tiktok: "TikTok", "youtube-shorts": "YouTube Shorts", instagram: "Instagram" });
11
+ var TIKTOK_HOSTS = /* @__PURE__ */ new Set(["tiktok.com", "www.tiktok.com"]);
12
+ var YOUTUBE_HOSTS = /* @__PURE__ */ new Set(["youtube.com", "www.youtube.com", "m.youtube.com"]);
13
+ var INSTAGRAM_HOSTS = /* @__PURE__ */ new Set(["instagram.com", "www.instagram.com"]);
14
+ var PLATFORM_DOMAINS = ["tiktok.com", "tiktokcdn.com", "tiktokcdn-us.com", "youtube.com", "youtu.be", "youtube-nocookie.com", "ytimg.com", "googlevideo.com", "instagram.com", "cdninstagram.com", "fbcdn.net", "facebook.com"];
15
+ function parse(url) {
16
+ try {
17
+ const u = new URL(url);
18
+ if (u.protocol !== "https:" || u.username || u.password || u.port) return null;
19
+ return u;
20
+ } catch {
21
+ return null;
22
+ }
23
+ }
24
+ var tiktok = (host, path) => {
25
+ const id = TIKTOK_HOSTS.has(host) ? /^\/@[\w.-]{1,64}\/video\/(\d{8,25})\/?$/.exec(path)?.[1] : void 0;
26
+ return id ? `https://www.tiktok.com/embed/v2/${id}` : null;
27
+ };
28
+ var youtube = (host, path) => {
29
+ let id;
30
+ if (YOUTUBE_HOSTS.has(host)) id = /^\/shorts\/([\w-]{11})\/?$/.exec(path)?.[1];
31
+ else if (host === "youtu.be") id = /^\/([\w-]{11})\/?$/.exec(path)?.[1];
32
+ return id ? `https://www.youtube-nocookie.com/embed/${id}` : null;
33
+ };
34
+ var instagram = (host, path) => {
35
+ const match = INSTAGRAM_HOSTS.has(host) ? /^\/(?:[\w.]{1,30}\/)?(p|reel|reels|tv)\/([\w-]{5,40})\/?$/.exec(path) : null;
36
+ return match ? `https://www.instagram.com/${match[1] === "reels" ? "reel" : match[1]}/${match[2]}/embed` : null;
37
+ };
38
+ var PARSERS = { tiktok, "youtube-shorts": youtube, instagram };
39
+ function embedUrl(platform, url) {
40
+ const u = parse(url);
41
+ return u ? PARSERS[platform](u.hostname.toLowerCase(), u.pathname) : null;
42
+ }
43
+ function isOwnPoster(poster) {
44
+ if (poster.startsWith("/") && !poster.startsWith("//")) return true;
45
+ if (/^data:image\/(?:png|jpeg|webp|gif|svg\+xml)[;,]/i.test(poster)) return true;
46
+ const u = parse(poster);
47
+ if (!u) return false;
48
+ const host = u.hostname.toLowerCase();
49
+ return !PLATFORM_DOMAINS.some((domain) => host === domain || host.endsWith(`.${domain}`));
50
+ }
51
+
52
+ // src/embed-facade/embed-facade.tsx
53
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
54
+ var SANDBOX = "allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox";
55
+ function EmbedFacade({ platform, url, title, playLabel, poster, notice, aspectRatio = "9 / 16", onLoad, className, style, ...props }) {
56
+ const frame = embedUrl(platform, url);
57
+ const [loaded, setLoaded] = React.useState(false);
58
+ const ref = React.useRef(null);
59
+ React.useEffect(() => {
60
+ if (loaded) ref.current?.focus();
61
+ }, [loaded]);
62
+ if (!frame) return null;
63
+ const load = () => {
64
+ setLoaded(true);
65
+ onLoad?.();
66
+ };
67
+ return /* @__PURE__ */ jsx(
68
+ "div",
69
+ {
70
+ role: "group",
71
+ "aria-label": title,
72
+ className: cn("kz-embed", className),
73
+ "data-platform": platform,
74
+ "data-loaded": loaded ? "" : void 0,
75
+ style: { ...style, ["--kz-embed-ratio"]: aspectRatio },
76
+ ...props,
77
+ children: loaded ? /* @__PURE__ */ jsx("iframe", { ref, src: frame, title, sandbox: SANDBOX, allow: "fullscreen; encrypted-media", allowFullScreen: true, referrerPolicy: "strict-origin-when-cross-origin", className: "kz-embed-frame" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
78
+ poster && isOwnPoster(poster) && /* @__PURE__ */ jsx("img", { src: poster, alt: "", loading: "lazy", decoding: "async", referrerPolicy: "no-referrer", className: "kz-embed-poster" }),
79
+ /* @__PURE__ */ jsxs("div", { className: "kz-embed-gate", children: [
80
+ /* @__PURE__ */ jsxs("button", { type: "button", onClick: load, className: "kz-embed-play", "data-platform-name": EMBED_PLATFORMS[platform], children: [
81
+ /* @__PURE__ */ jsx("svg", { "aria-hidden": "true", focusable: "false", viewBox: "0 0 16 16", width: "16", height: "16", children: /* @__PURE__ */ jsx("path", { d: "M4 2.5v11l9-5.5Z", fill: "currentColor" }) }),
82
+ /* @__PURE__ */ jsx("span", { children: playLabel })
83
+ ] }),
84
+ notice && /* @__PURE__ */ jsx("p", { className: "kz-embed-notice", children: notice })
85
+ ] })
86
+ ] })
87
+ }
88
+ );
89
+ }
90
+ export {
91
+ EMBED_PLATFORMS,
92
+ EmbedFacade,
93
+ embedUrl,
94
+ isOwnPoster
95
+ };
96
+ //# sourceMappingURL=embed-facade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/embed-facade/embed-facade.tsx","../src/embed-facade/embed-url.ts"],"sourcesContent":["\"use client\";\n\n// A click-to-load facade for a platform's short video (krizaka-ui#605, the lite-youtube-embed pattern). Until the visitor\n// asks, nothing is requested from TikTok, YouTube or Instagram: no frame, no script, no platform picture. The poster is the\n// host's own copy. After the click: one frame, a minimal sandbox and permissions. Loi 25: no third-party tracker without consent.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { EMBED_PLATFORMS, type EmbedPlatform, embedUrl, isOwnPoster } from \"./embed-url\";\n\nexport interface EmbedFacadeProps extends Omit<React.ComponentProps<\"div\">, \"title\" | \"children\" | \"onLoad\"> {\n /** Which platform's frame to load. */\n platform: EmbedPlatform;\n /** The public address of the post (`embedUrl` validates it; anything else renders nothing). */\n url: string;\n /** The accessible name of the video (\"Latest reel\"), passed translated: it names the frame once loaded. */\n title: string;\n /** The button: what it does and which platform it loads (\"Load TikTok and play\"), passed translated. */\n playLabel: string;\n /** The host's own copy of the picture (never an address on the platform: those are refused, they would be a request). */\n poster?: string;\n /** A line under the button, for what the platform will receive on the click (translated). */\n notice?: React.ReactNode;\n /** The ratio of the box when it stands alone; inside a television's screen it fills its parent. @default \"9 / 16\" */\n aspectRatio?: string;\n /** Called once, when the visitor has asked and the frame is added. */\n onLoad?: () => void;\n}\n\nconst SANDBOX = \"allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox\";\n\n/** A short video from a platform, behind a button: the frame exists only after the click. */\nexport function EmbedFacade({ platform, url, title, playLabel, poster, notice, aspectRatio = \"9 / 16\", onLoad, className, style, ...props }: EmbedFacadeProps) {\n const frame = embedUrl(platform, url);\n const [loaded, setLoaded] = React.useState(false);\n const ref = React.useRef<HTMLIFrameElement>(null);\n React.useEffect(() => {\n if (loaded) ref.current?.focus();\n }, [loaded]);\n if (!frame) return null;\n const load = () => {\n setLoaded(true);\n onLoad?.();\n };\n return (\n <div\n role=\"group\"\n aria-label={title}\n className={cn(\"kz-embed\", className)}\n data-platform={platform}\n data-loaded={loaded ? \"\" : undefined}\n style={{ ...style, [\"--kz-embed-ratio\" as string]: aspectRatio }}\n {...props}\n >\n {loaded ? (\n <iframe ref={ref} src={frame} title={title} sandbox={SANDBOX} allow=\"fullscreen; encrypted-media\" allowFullScreen referrerPolicy=\"strict-origin-when-cross-origin\" className=\"kz-embed-frame\" />\n ) : (\n <>\n {poster && isOwnPoster(poster) && <img src={poster} alt=\"\" loading=\"lazy\" decoding=\"async\" referrerPolicy=\"no-referrer\" className=\"kz-embed-poster\" />}\n <div className=\"kz-embed-gate\">\n <button type=\"button\" onClick={load} className=\"kz-embed-play\" data-platform-name={EMBED_PLATFORMS[platform]}>\n <svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M4 2.5v11l9-5.5Z\" fill=\"currentColor\" /></svg>\n <span>{playLabel}</span>\n </button>\n {notice && <p className=\"kz-embed-notice\">{notice}</p>}\n </div>\n </>\n )}\n </div>\n );\n}\n","// The pure part of the facade (krizaka-ui#605): which addresses may ever be embedded, and what the frame's address is.\n// Nothing here touches the network or the DOM, so a server (the shop's editor) can validate with the same function the page uses.\n\n/** The platforms a facade can load after a click. */\nexport type EmbedPlatform = \"tiktok\" | \"youtube-shorts\" | \"instagram\";\n\n/** The platforms' names, as proper nouns (they are not translated). */\nexport const EMBED_PLATFORMS: Readonly<Record<EmbedPlatform, string>> = Object.freeze({ tiktok: \"TikTok\", \"youtube-shorts\": \"YouTube Shorts\", instagram: \"Instagram\" });\n\nconst TIKTOK_HOSTS = new Set([\"tiktok.com\", \"www.tiktok.com\"]);\nconst YOUTUBE_HOSTS = new Set([\"youtube.com\", \"www.youtube.com\", \"m.youtube.com\"]);\nconst INSTAGRAM_HOSTS = new Set([\"instagram.com\", \"www.instagram.com\"]);\n\n/** Every host a platform's frame or picture lives on: a poster served from one of them would be a request before the click. */\nconst PLATFORM_DOMAINS = [\"tiktok.com\", \"tiktokcdn.com\", \"tiktokcdn-us.com\", \"youtube.com\", \"youtu.be\", \"youtube-nocookie.com\", \"ytimg.com\", \"googlevideo.com\", \"instagram.com\", \"cdninstagram.com\", \"fbcdn.net\", \"facebook.com\"];\n\nfunction parse(url: string): URL | null {\n try {\n const u = new URL(url);\n // https only, no credentials, no port: the address is a public post, nothing else.\n if (u.protocol !== \"https:\" || u.username || u.password || u.port) return null;\n return u;\n } catch {\n return null;\n }\n}\n\nconst tiktok = (host: string, path: string): string | null => {\n const id = TIKTOK_HOSTS.has(host) ? /^\\/@[\\w.-]{1,64}\\/video\\/(\\d{8,25})\\/?$/.exec(path)?.[1] : undefined;\n return id ? `https://www.tiktok.com/embed/v2/${id}` : null;\n};\n\nconst youtube = (host: string, path: string): string | null => {\n let id: string | undefined;\n if (YOUTUBE_HOSTS.has(host)) id = /^\\/shorts\\/([\\w-]{11})\\/?$/.exec(path)?.[1];\n else if (host === \"youtu.be\") id = /^\\/([\\w-]{11})\\/?$/.exec(path)?.[1];\n return id ? `https://www.youtube-nocookie.com/embed/${id}` : null;\n};\n\nconst instagram = (host: string, path: string): string | null => {\n const match = INSTAGRAM_HOSTS.has(host) ? /^\\/(?:[\\w.]{1,30}\\/)?(p|reel|reels|tv)\\/([\\w-]{5,40})\\/?$/.exec(path) : null;\n return match ? `https://www.instagram.com/${match[1] === \"reels\" ? \"reel\" : match[1]}/${match[2]}/embed` : null;\n};\n\nconst PARSERS: Readonly<Record<EmbedPlatform, (host: string, path: string) => string | null>> = { tiktok, \"youtube-shorts\": youtube, instagram };\n\n/**\n * The address of the platform's frame for a public post, or `null` for anything else: another host, `http:`, a short\n * link we cannot resolve without asking the platform, a profile page. Exact hosts, exact paths.\n */\nexport function embedUrl(platform: EmbedPlatform, url: string): string | null {\n const u = parse(url);\n return u ? PARSERS[platform](u.hostname.toLowerCase(), u.pathname) : null;\n}\n\n/** Whether a poster may be drawn before the click: a path of the host's own origin, or an https picture that is not on a platform's domain (the host copies it to its own storage). */\nexport function isOwnPoster(poster: string): boolean {\n if (poster.startsWith(\"/\") && !poster.startsWith(\"//\")) return true;\n // An inline picture is no request at all.\n if (/^data:image\\/(?:png|jpeg|webp|gif|svg\\+xml)[;,]/i.test(poster)) return true;\n const u = parse(poster);\n if (!u) return false;\n const host = u.hostname.toLowerCase();\n return !PLATFORM_DOMAINS.some((domain) => host === domain || host.endsWith(`.${domain}`));\n}\n"],"mappings":";;;;;;AAKA,YAAY,WAAW;;;ACEhB,IAAM,kBAA2D,OAAO,OAAO,EAAE,QAAQ,UAAU,kBAAkB,kBAAkB,WAAW,YAAY,CAAC;AAEtK,IAAM,eAAe,oBAAI,IAAI,CAAC,cAAc,gBAAgB,CAAC;AAC7D,IAAM,gBAAgB,oBAAI,IAAI,CAAC,eAAe,mBAAmB,eAAe,CAAC;AACjF,IAAM,kBAAkB,oBAAI,IAAI,CAAC,iBAAiB,mBAAmB,CAAC;AAGtE,IAAM,mBAAmB,CAAC,cAAc,iBAAiB,oBAAoB,eAAe,YAAY,wBAAwB,aAAa,mBAAmB,iBAAiB,oBAAoB,aAAa,cAAc;AAEhO,SAAS,M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AI,eAAY,QAAO,WAAU,SAAQ,SAAQ,aAAY,OAAM,MAAK,QAAO,MAAK,8BAAC,UAAK,GAAE,oBAAmB,MAAK,gBAAe,GAAE;AAAA,YACtI,oBAAC,UAAM,qBAAU;AAAA,aACnB;AAAA,UACC,UAAU,oBAAC,OAAE,WAAU,mBAAmB,kBAAO;AAAA,WACpD;AAAA,SACF;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -32,9 +32,9 @@ declare function flowPositions(layout: FlowLayout, count: number): {
32
32
  declare function flowGeometry(layout: FlowLayout, count: number, conduit?: FlowConduit): FlowGeometry;
33
33
 
34
34
  interface EngineFlowNode {
35
- /** A stable id (`orochia`). */
35
+ /** A stable id (`yomizaka`). */
36
36
  id: string;
37
- /** Its name, the button's accessible name ("Orochia"). */
37
+ /** Its name, the button's accessible name ("Yomizaka"). */
38
38
  label: string;
39
39
  /** Its mark (a `ProductLogo`), decorative. */
40
40
  mark?: React.ReactNode;
@@ -42,7 +42,7 @@ interface EngineFlowNode {
42
42
  description?: React.ReactNode;
43
43
  /** Where it lives (its site). */
44
44
  href?: string;
45
- /** The link's words ("Visit dev.orochia.com"); defaults to the label. */
45
+ /** The link's words ("Visit dev.yomizaka.com"); defaults to the label. */
46
46
  linkLabel?: React.ReactNode;
47
47
  /** Opens the link in a new tab. */
48
48
  external?: boolean;
@@ -53,7 +53,7 @@ interface EngineFlowNode {
53
53
  planned?: boolean;
54
54
  /** A word beside the name in the detail line ("planned"), passed translated. */
55
55
  status?: React.ReactNode;
56
- /** Its brand scope (`brand-orochia`): its conduit, photons and ring take its `--kz-accent`. */
56
+ /** Its brand scope (`brand-yomizaka`): its conduit, photons and ring take its `--kz-accent`. */
57
57
  className?: string;
58
58
  }
59
59
  interface EngineFlowHub {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/engine-flow/engine-flow.tsx","../src/engine-flow/geometry.ts"],"sourcesContent":["// Client (the node a visitor points at or focuses). An engine at the hub and the apps it serves around it: one conduit\n// per app, and photons that travel it — towards the hub (`in`: requests), back (`out`: results) or both — in the app's\n// brand colour going in and the hub's coming back. A planned app is drawn dim, its conduit dashed and still.\n//\n// Motion is the Krizaka signature's (motion.css): CSS animations of `stroke-dashoffset`, no animation frame, no canvas;\n// paused off screen (`data-motion-scope` → MotionObserver's `data-offscreen`), held while the page settles (`kz-loop`),\n// a still frame under reduced motion and Save-Data (the photons rest along their conduit). The stage keeps its aspect ratio and the\n// detail line its height: no layout shift.\n//\n// Anchoring: a conduit runs between the centres of the node's circle and of the hub's ring (the label and the caption hang\n// below them, out of the box), and both circles are opaque and drawn over it — so every conduit meets the circle at the point\n// facing the other end, whatever the layout and the number of nodes.\n//\n// Accessible: the drawing is hidden from assistive technology; every node is a real button named by its label, and the\n// detail line (polite live region) says the chosen node's description with its link. Pair it with a text version (a\n// list) in the page: the figure is a picture of it.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type FlowConduit, flowGeometry, type FlowLayout } from \"./geometry\";\n\nexport interface EngineFlowNode {\n /** A stable id (`orochia`). */\n id: string;\n /** Its name, the button's accessible name (\"Orochia\"). */\n label: string;\n /** Its mark (a `ProductLogo`), decorative. */\n mark?: React.ReactNode;\n /** One line: what it uses the engine for — shown when the node is pointed at or focused. */\n description?: React.ReactNode;\n /** Where it lives (its site). */\n href?: string;\n /** The link's words (\"Visit dev.orochia.com\"); defaults to the label. */\n linkLabel?: React.ReactNode;\n /** Opens the link in a new tab. */\n external?: boolean;\n /** What travels: `in` towards the hub, `out` back from it, `both`.\n * @default \"in\" */\n flow?: \"in\" | \"out\" | \"both\";\n /** Not wired yet: drawn dim, its conduit dashed and still, no photon. */\n planned?: boolean;\n /** A word beside the name in the detail line (\"planned\"), passed translated. */\n status?: React.ReactNode;\n /** Its brand scope (`brand-orochia`): its conduit, photons and ring take its `--kz-accent`. */\n className?: string;\n}\n\nexport interface EngineFlowHub {\n /** The engine's name (\"Orazaka\"). */\n label: string;\n /** Its mark, decorative. */\n mark?: React.ReactNode;\n /** A line under the name (\"the engine\"). */\n caption?: React.ReactNode;\n /** Its brand scope; the photons coming back take its accent. */\n className?: string;\n}\n\nexport type EngineFlowProps = Omit<React.ComponentProps<\"figure\">, \"children\"> & {\n /** What the figure shows (\"Orazaka and the products it powers\"), passed translated. */\n label: string;\n /** The engine, at the hub. */\n hub: EngineFlowHub;\n /** The apps around it. */\n nodes: readonly EngineFlowNode[];\n /** How the nodes sit around the hub.\n * @default \"radial\" */\n layout?: FlowLayout;\n /** The layout under a 560 px wide container (a phone); `false` keeps `layout` everywhere.\n * @default \"top-to-bottom\" */\n compactLayout?: FlowLayout | false;\n /** `photons` travel the conduits; `none` draws them still.\n * @default \"photons\" */\n particles?: \"photons\" | \"none\";\n /** The conduits' shape.\n * @default \"bezier\" */\n conduit?: FlowConduit;\n /** The detail line before a node is chosen (\"Point at a product\"). */\n hint?: React.ReactNode;\n /** The node shown in the detail line at first. */\n defaultActive?: string;\n /** Photon speed, in units per second (the stage is 100 units wide).\n * @default 16 */\n speed?: number;\n /** How many photons share a conduit: `sparse` one or two, `normal` two to four, `dense` four to eight.\n * @default \"normal\" */\n density?: FlowDensity;\n /** When the photons travel: `always`; `hover` only while the pointer or focus is on the figure (they rest along the\n * conduits otherwise); `active` only on the conduit of the chosen node (the others show nothing). Off screen they\n * are always paused, and still under reduced motion.\n * @default \"always\" */\n trigger?: FlowTrigger;\n /** The photons' timing function: `linear` (a steady stream), `ease-in-out` (a pulse that swells and settles), or any\n * CSS `<easing-function>` (`cubic-bezier(.2,0,0,1)`, `steps(6)`).\n * @default \"linear\" */\n easing?: FlowEasing;\n /** Milliseconds between one conduit's photons and the next's: 0 sends them all together.\n * @default 300 */\n stagger?: number;\n /** The engine's mark swells slowly (a loop, still under reduced motion).\n * @default true */\n breathe?: boolean;\n /** The calm level, for a small frame (a tile of a home page): sparse photons at a low rate, a slow breath, no hint and\n * no detail line, nothing to tune. It plays only on screen and once the page has settled, and stays still under\n * reduced motion and Save-Data. Overrides `speed`, `density`, `stagger` and `trigger`.\n * @default false */\n calm?: boolean;\n};\n\n/** The calm level's pace: units per second, photons per conduit, milliseconds between conduits. */\nexport const CALM_FLOW = { speed: 4, density: \"sparse\", stagger: 1200 } as const satisfies { speed: number; density: FlowDensity; stagger: number };\n\nconst subscribeSaveData = (onChange: () => void) => {\n const c = (navigator as Navigator & { connection?: EventTarget }).connection;\n c?.addEventListener?.(\"change\", onChange);\n return () => c?.removeEventListener?.(\"change\", onChange);\n};\nconst readSaveData = () => (navigator as Navigator & { connection?: { saveData?: boolean } }).connection?.saveData === true;\n\n\nexport type FlowDensity = \"sparse\" | \"normal\" | \"dense\";\nexport type FlowTrigger = \"always\" | \"hover\" | \"active\";\nexport type FlowEasing = \"linear\" | \"ease-in-out\" | (string & {});\n\n/** How many photons a conduit of this length carries (evenly spaced, so the gap is `length / count`). */\nexport function photonCount(length: number, density: FlowDensity = \"normal\"): number {\n const base = Math.round(length / 16);\n if (density === \"sparse\") return Math.min(2, Math.max(1, Math.round(base / 2)));\n if (density === \"dense\") return Math.min(8, Math.max(4, base * 2));\n return Math.min(4, Math.max(2, base));\n}\n\nfunction Stage({\n layout,\n variant,\n nodes,\n hub,\n conduit,\n particles,\n speed,\n density,\n easing,\n stagger,\n breathe,\n active,\n onActive,\n detailId,\n}: {\n layout: FlowLayout;\n variant: \"wide\" | \"compact\";\n nodes: readonly EngineFlowNode[];\n hub: EngineFlowHub;\n conduit: FlowConduit;\n particles: \"photons\" | \"none\";\n speed: number;\n density: FlowDensity;\n easing: FlowEasing;\n stagger: number;\n breathe: boolean;\n active: string | undefined;\n onActive: (id: string) => void;\n detailId: string | undefined;\n}) {\n const g = flowGeometry(layout, nodes.length, conduit);\n const pct = (v: number, of: number) => `${((v / of) * 100).toFixed(3)}%`;\n return (\n <div className=\"kz-flow-stage\" data-variant={variant} data-layout={layout} style={{ aspectRatio: `${g.width} / ${g.height}` }}>\n <svg viewBox={`0 0 ${g.width} ${g.height}`} aria-hidden=\"true\" focusable=\"false\">\n {nodes.map((node, i) => {\n const flow = node.flow ?? \"in\";\n const length = g.lengths[i] ?? 0;\n // Photons per conduit (`density`), evenly spaced; the same speed on every conduit.\n const gap = length / photonCount(length, density);\n const period = gap / speed;\n const timing = (dir: \"in\" | \"out\") =>\n ({\n \"--kz-flow-gap\": gap.toFixed(3),\n animationDuration: `${period.toFixed(2)}s`,\n // Each conduit starts `stagger` ms after the previous (a negative delay: already under way); the way back is half a period behind.\n animationDelay: `${(-(((i * stagger) / 1000 + (dir === \"out\" ? period / 2 : 0)) % period)).toFixed(2)}s`,\n ...(easing !== \"linear\" ? { animationTimingFunction: easing } : {}),\n }) as React.CSSProperties;\n const lanes = node.planned || particles === \"none\" ? [] : flow === \"both\" ? ([\"in\", \"out\"] as const) : [flow];\n return (\n <g\n key={node.id}\n className={cn(\"kz-flow-link\", node.className)}\n data-flow={flow}\n data-planned={node.planned ? \"\" : undefined}\n data-active={active === node.id ? \"\" : undefined}\n >\n <path className=\"kz-flow-wire\" d={g.paths[i]} />\n {lanes.map((dir) => (\n <React.Fragment key={dir}>\n <path className=\"kz-flow-photon kz-loop\" data-dir={dir} data-halo=\"\" d={g.paths[i]} style={timing(dir)} />\n <path className=\"kz-flow-photon kz-loop\" data-dir={dir} d={g.paths[i]} style={timing(dir)} />\n </React.Fragment>\n ))}\n </g>\n );\n })}\n </svg>\n <div className={cn(\"kz-flow-hub\", hub.className)} style={{ left: pct(g.hub.x, g.width), top: pct(g.hub.y, g.height) }}>\n {hub.mark ? <span className={cn(\"kz-flow-hub-mark\", breathe && \"kz-loop\")}>{hub.mark}</span> : null}\n <span className=\"kz-flow-hub-text\">\n <span className=\"kz-flow-hub-label\">{hub.label}</span>\n {hub.caption ? <span className=\"kz-flow-hub-caption\">{hub.caption}</span> : null}\n </span>\n </div>\n <ul className=\"kz-flow-nodes\">\n {nodes.map((node, i) => {\n const p = g.nodes[i]!;\n const on = active === node.id;\n return (\n <li key={node.id} style={{ left: pct(p.x, g.width), top: pct(p.y, g.height) }}>\n <button\n type=\"button\"\n className={cn(\"kz-flow-node\", node.className)}\n data-active={on ? \"\" : undefined}\n data-planned={node.planned ? \"\" : undefined}\n aria-pressed={on}\n aria-controls={detailId}\n onPointerEnter={() => onActive(node.id)}\n onFocus={() => onActive(node.id)}\n onClick={() => onActive(node.id)}\n >\n {node.mark ? (\n <span className=\"kz-flow-node-mark\" aria-hidden=\"true\">\n {node.mark}\n </span>\n ) : null}\n <span className=\"kz-flow-node-label\">{node.label}</span>\n </button>\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n\n/** An engine at the hub and the apps it serves, with what travels between them. */\nexport function EngineFlow({\n label,\n hub,\n nodes,\n layout = \"radial\",\n compactLayout = \"top-to-bottom\",\n particles = \"photons\",\n conduit = \"bezier\",\n hint,\n defaultActive,\n speed = 16,\n density = \"normal\",\n trigger = \"always\",\n easing = \"linear\",\n stagger = 300,\n breathe = true,\n calm = false,\n className,\n ...props\n}: EngineFlowProps) {\n const [active, setActive] = React.useState<string | undefined>(defaultActive);\n const detailId = `${React.useId()}-detail`;\n const chosen = nodes.find((n) => n.id === active);\n const compact = compactLayout && compactLayout !== layout ? compactLayout : undefined;\n // Save-Data: the calm and the full levels both rest (a still frame, like reduced motion).\n const saveData = React.useSyncExternalStore(subscribeSaveData, readSaveData, () => false);\n const pace = calm ? CALM_FLOW : { speed: Math.max(1, speed), density, stagger: Math.max(0, stagger) };\n const stage = { nodes, hub, conduit, particles, ...pace, easing, breathe, active, onActive: setActive, detailId: calm ? undefined : detailId };\n return (\n <figure\n aria-label={label}\n className={cn(\"kz-flow\", className)}\n data-motion-scope=\"\"\n data-active={chosen ? \"\" : undefined}\n data-calm={calm ? \"\" : undefined}\n data-still={saveData ? \"\" : undefined}\n data-trigger={calm || trigger === \"always\" ? undefined : trigger}\n data-density={calm ? \"sparse\" : density === \"normal\" ? undefined : density}\n data-compact={compact ? \"\" : undefined}\n {...props}\n >\n <Stage layout={layout} variant=\"wide\" {...stage} />\n {compact ? <Stage layout={compact} variant=\"compact\" {...stage} /> : null}\n {calm ? null : (\n <figcaption id={detailId} className={cn(\"kz-flow-detail\", chosen?.className)} aria-live=\"polite\">\n {chosen ? (\n <>\n <strong>{chosen.label}</strong>\n {chosen.status ? <span className=\"kz-flow-status\">{chosen.status}</span> : null}\n {chosen.description ? <span> {chosen.description}</span> : null}\n {chosen.href ? (\n <>\n {\" \"}\n <a href={chosen.href} {...(chosen.external ? { target: \"_blank\", rel: \"noopener\" } : {})}>\n {chosen.linkLabel ?? chosen.label}\n <span aria-hidden=\"true\"> →</span>\n </a>\n </>\n ) : null}\n </>\n ) : (\n hint\n )}\n </figcaption>\n )}\n </figure>\n );\n}\n","// Server-safe, pure. The geometry of EngineFlow: where the hub and the nodes sit in a box 100 units wide, and the\n// conduit from each node to the hub (an SVG path drawn node → hub, and its length, so photons travel at one speed on\n// every conduit). No DOM: the same numbers on the server and in the browser.\n\n/** How the nodes are placed around the hub. */\nexport type FlowLayout = \"radial\" | \"top-to-bottom\" | \"left-to-right\";\n/** The shape of a conduit: an S-shaped cubic Bézier, or a straight line. */\nexport type FlowConduit = \"bezier\" | \"straight\";\n\nexport interface FlowPoint {\n x: number;\n y: number;\n}\n\nexport interface FlowGeometry {\n /** The box: 100 units wide, `height` units high (the stage keeps this aspect ratio, so nothing is distorted). */\n width: number;\n height: number;\n hub: FlowPoint;\n nodes: FlowPoint[];\n /** One path per node, from the node to the hub. */\n paths: string[];\n /** The length of each path, in units. */\n lengths: number[];\n}\n\n/** The box height per layout (the width is always 100). */\nexport const FLOW_HEIGHT: Record<FlowLayout, number> = { radial: 60, \"top-to-bottom\": 92, \"left-to-right\": 56 };\n\n/** How far a conduit lands from the hub's centre along the row, as a share of its node's offset: a small fan, kept inside the ring. */\nexport const FLOW_FAN = 0.1;\n\nconst r2 = (n: number) => Math.round(n * 100) / 100;\nconst pt = (p: FlowPoint) => `${r2(p.x)} ${r2(p.y)}`;\n\nfunction cubicLength(a: FlowPoint, b: FlowPoint, c: FlowPoint, d: FlowPoint): number {\n let length = 0;\n let prev = a;\n for (let i = 1; i <= 32; i++) {\n const t = i / 32;\n const u = 1 - t;\n const p = {\n x: u * u * u * a.x + 3 * u * u * t * b.x + 3 * u * t * t * c.x + t * t * t * d.x,\n y: u * u * u * a.y + 3 * u * u * t * b.y + 3 * u * t * t * c.y + t * t * t * d.y,\n };\n length += Math.hypot(p.x - prev.x, p.y - prev.y);\n prev = p;\n }\n return length;\n}\n\n/** The positions of `count` nodes around the hub. */\nexport function flowPositions(layout: FlowLayout, count: number): { hub: FlowPoint; nodes: FlowPoint[] } {\n const height = FLOW_HEIGHT[layout];\n const n = Math.max(0, count);\n if (layout === \"top-to-bottom\") {\n return { hub: { x: 50, y: 72 }, nodes: Array.from({ length: n }, (_, i) => ({ x: ((i + 0.5) * 100) / n, y: 13 })) };\n }\n if (layout === \"left-to-right\") {\n return { hub: { x: 80, y: height / 2 }, nodes: Array.from({ length: n }, (_, i) => ({ x: 12, y: ((i + 0.5) * height) / n })) };\n }\n // Radial: on an ellipse around the centre; an even count puts two nodes level with the hub (more room for labels).\n const hub = { x: 50, y: height / 2 };\n const start = n % 2 === 0 ? -90 + 180 / Math.max(n, 1) : -90;\n return {\n hub,\n nodes: Array.from({ length: n }, (_, i) => {\n const a = ((start + (360 / n) * i) * Math.PI) / 180;\n return { x: hub.x + 37 * Math.cos(a), y: hub.y + 20 * Math.sin(a) };\n }),\n };\n}\n\n/** The whole geometry of a flow: positions, conduits (node → hub) and their lengths. */\nexport function flowGeometry(layout: FlowLayout, count: number, conduit: FlowConduit = \"bezier\"): FlowGeometry {\n const { hub, nodes } = flowPositions(layout, count);\n const paths: string[] = [];\n const lengths: number[] = [];\n for (const p of nodes) {\n // Each conduit lands on its own point of the hub (a fan), so the lines stay apart where they meet.\n const end =\n layout === \"top-to-bottom\"\n ? { x: hub.x + (p.x - hub.x) * FLOW_FAN, y: hub.y }\n : layout === \"left-to-right\"\n ? { x: hub.x, y: hub.y + (p.y - hub.y) * FLOW_FAN }\n : hub;\n if (conduit === \"straight\") {\n paths.push(`M${pt(p)} L${pt(end)}`);\n lengths.push(Math.hypot(end.x - p.x, end.y - p.y));\n continue;\n }\n let c1: FlowPoint;\n let c2: FlowPoint;\n if (layout === \"top-to-bottom\") {\n const mid = (p.y + end.y) / 2;\n c1 = { x: p.x, y: mid };\n c2 = { x: end.x, y: mid };\n } else if (layout === \"left-to-right\") {\n const mid = (p.x + end.x) / 2;\n c1 = { x: mid, y: p.y };\n c2 = { x: mid, y: end.y };\n } else {\n // An S: leave the node bending one way, reach the hub bending the other.\n const dx = end.x - p.x;\n const dy = end.y - p.y;\n const len = Math.hypot(dx, dy) || 1;\n const k = 0.14 * len;\n const nx = -dy / len;\n const ny = dx / len;\n c1 = { x: p.x + dx * 0.35 + nx * k, y: p.y + dy * 0.35 + ny * k };\n c2 = { x: p.x + dx * 0.65 - nx * k, y: p.y + dy * 0.65 - ny * k };\n }\n paths.push(`M${pt(p)} C${pt(c1)} ${pt(c2)} ${pt(end)}`);\n lengths.push(cubicLength(p, c1, c2, end));\n }\n return { width: 100, height: FLOW_HEIGHT[layout], hub, nodes, paths, lengths };\n}\n"],"mappings":";;;;;;AAgBA,YAAY,WAAW;;;ACWhB,IAAM,cAA0C,EAAE,QAAQ,IAAI,iBAAiB,IAAI,iBAAiB,GAAG;AAGvG,IAAM,WAAW;AAExB,IAAM,KAAK,CAAC,MAAc,KAAK,MAAM,IAAI,GAAG,IAAI;AAChD,IAAM,KAAK,CAAC,MAAiB,GAAG,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;AAElD,SAAS,YAAY,GAAc,GAAc,GAAc,GAAsB;AACnF,MAAI,SAAS;AACb,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,KAAK,IAAI,KAAK;AAC5B,UAAM,IAAI,IAAI;AACd,UAAM,IAAI,IAAI;AACd,UAAM,IAAI;AAAA,MACR,GAAG,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,IA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;AAC7I,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,WAAW,GAAG,WAAW,SAAS;AAAA,MAClC,qBAAkB;AAAA,MAClB,eAAa,SAAS,KAAK;AAAA,MAC3B,aAAW,OAAO,KAAK;AAAA,MACvB,cAAY,WAAW,KAAK;AAAA,MAC5B,gBAAc,QAAQ,YAAY,WAAW,SAAY;AAAA,MACzD,gBAAc,OAAO,WAAW,YAAY,WAAW,SAAY;AAAA,MACnE,gBAAc,UAAU,KAAK;AAAA,MAC5B,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAM,QAAgB,SAAQ,QAAQ,GAAG,OAAO;AAAA,QAChD,UAAU,oBAAC,SAAM,QAAQ,SAAS,SAAQ,WAAW,GAAG,OAAO,IAAK;AAAA,QACpE,OAAO,OACR,oBAAC,gBAAW,IAAI,UAAU,WAAW,GAAG,kBAAkB,QAAQ,SAAS,GAAG,aAAU,UACrF,mBACC,qBAAAA,WAAA,EACE;AAAA,8BAAC,YAAQ,iBAAO,OAAM;AAAA,UACrB,OAAO,SAAS,oBAAC,UAAK,WAAU,kBAAkB,iBAAO,QAAO,IAAU;AAAA,UAC1E,OAAO,cAAc,qBAAC,UAAK;AAAA;AAAA,YAAE,OAAO;AAAA,aAAY,IAAU;AAAA,UAC1D,OAAO,OACN,qBAAAA,WAAA,EACG;AAAA;AAAA,YACD,qBAAC,OAAE,MAAM,OAAO,MAAO,GAAI,OAAO,WAAW,EAAE,QAAQ,UAAU,KAAK,WAAW,IAAI,CAAC,GACnF;AAAA,qBAAO,aAAa,OAAO;AAAA,cAC5B,oBAAC,UAAK,eAAY,QAAO,qBAAE;AAAA,eAC7B;AAAA,aACF,IACE;AAAA,WACN,IAEA,MAEJ;AAAA;AAAA;AAAA,EAEF;AAEJ;","names":["Fragment"]}
1
+ {"version":3,"sources":["../src/engine-flow/engine-flow.tsx","../src/engine-flow/geometry.ts"],"sourcesContent":["// Client (the node a visitor points at or focuses). An engine at the hub and the apps it serves around it: one conduit\n// per app, and photons that travel it — towards the hub (`in`: requests), back (`out`: results) or both — in the app's\n// brand colour going in and the hub's coming back. A planned app is drawn dim, its conduit dashed and still.\n//\n// Motion is the Krizaka signature's (motion.css): CSS animations of `stroke-dashoffset`, no animation frame, no canvas;\n// paused off screen (`data-motion-scope` → MotionObserver's `data-offscreen`), held while the page settles (`kz-loop`),\n// a still frame under reduced motion and Save-Data (the photons rest along their conduit). The stage keeps its aspect ratio and the\n// detail line its height: no layout shift.\n//\n// Anchoring: a conduit runs between the centres of the node's circle and of the hub's ring (the label and the caption hang\n// below them, out of the box), and both circles are opaque and drawn over it — so every conduit meets the circle at the point\n// facing the other end, whatever the layout and the number of nodes.\n//\n// Accessible: the drawing is hidden from assistive technology; every node is a real button named by its label, and the\n// detail line (polite live region) says the chosen node's description with its link. Pair it with a text version (a\n// list) in the page: the figure is a picture of it.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type FlowConduit, flowGeometry, type FlowLayout } from \"./geometry\";\n\nexport interface EngineFlowNode {\n /** A stable id (`yomizaka`). */\n id: string;\n /** Its name, the button's accessible name (\"Yomizaka\"). */\n label: string;\n /** Its mark (a `ProductLogo`), decorative. */\n mark?: React.ReactNode;\n /** One line: what it uses the engine for — shown when the node is pointed at or focused. */\n description?: React.ReactNode;\n /** Where it lives (its site). */\n href?: string;\n /** The link's words (\"Visit dev.yomizaka.com\"); defaults to the label. */\n linkLabel?: React.ReactNode;\n /** Opens the link in a new tab. */\n external?: boolean;\n /** What travels: `in` towards the hub, `out` back from it, `both`.\n * @default \"in\" */\n flow?: \"in\" | \"out\" | \"both\";\n /** Not wired yet: drawn dim, its conduit dashed and still, no photon. */\n planned?: boolean;\n /** A word beside the name in the detail line (\"planned\"), passed translated. */\n status?: React.ReactNode;\n /** Its brand scope (`brand-yomizaka`): its conduit, photons and ring take its `--kz-accent`. */\n className?: string;\n}\n\nexport interface EngineFlowHub {\n /** The engine's name (\"Orazaka\"). */\n label: string;\n /** Its mark, decorative. */\n mark?: React.ReactNode;\n /** A line under the name (\"the engine\"). */\n caption?: React.ReactNode;\n /** Its brand scope; the photons coming back take its accent. */\n className?: string;\n}\n\nexport type EngineFlowProps = Omit<React.ComponentProps<\"figure\">, \"children\"> & {\n /** What the figure shows (\"Orazaka and the products it powers\"), passed translated. */\n label: string;\n /** The engine, at the hub. */\n hub: EngineFlowHub;\n /** The apps around it. */\n nodes: readonly EngineFlowNode[];\n /** How the nodes sit around the hub.\n * @default \"radial\" */\n layout?: FlowLayout;\n /** The layout under a 560 px wide container (a phone); `false` keeps `layout` everywhere.\n * @default \"top-to-bottom\" */\n compactLayout?: FlowLayout | false;\n /** `photons` travel the conduits; `none` draws them still.\n * @default \"photons\" */\n particles?: \"photons\" | \"none\";\n /** The conduits' shape.\n * @default \"bezier\" */\n conduit?: FlowConduit;\n /** The detail line before a node is chosen (\"Point at a product\"). */\n hint?: React.ReactNode;\n /** The node shown in the detail line at first. */\n defaultActive?: string;\n /** Photon speed, in units per second (the stage is 100 units wide).\n * @default 16 */\n speed?: number;\n /** How many photons share a conduit: `sparse` one or two, `normal` two to four, `dense` four to eight.\n * @default \"normal\" */\n density?: FlowDensity;\n /** When the photons travel: `always`; `hover` only while the pointer or focus is on the figure (they rest along the\n * conduits otherwise); `active` only on the conduit of the chosen node (the others show nothing). Off screen they\n * are always paused, and still under reduced motion.\n * @default \"always\" */\n trigger?: FlowTrigger;\n /** The photons' timing function: `linear` (a steady stream), `ease-in-out` (a pulse that swells and settles), or any\n * CSS `<easing-function>` (`cubic-bezier(.2,0,0,1)`, `steps(6)`).\n * @default \"linear\" */\n easing?: FlowEasing;\n /** Milliseconds between one conduit's photons and the next's: 0 sends them all together.\n * @default 300 */\n stagger?: number;\n /** The engine's mark swells slowly (a loop, still under reduced motion).\n * @default true */\n breathe?: boolean;\n /** The calm level, for a small frame (a tile of a home page): sparse photons at a low rate, a slow breath, no hint and\n * no detail line, nothing to tune. It plays only on screen and once the page has settled, and stays still under\n * reduced motion and Save-Data. Overrides `speed`, `density`, `stagger` and `trigger`.\n * @default false */\n calm?: boolean;\n};\n\n/** The calm level's pace: units per second, photons per conduit, milliseconds between conduits. */\nexport const CALM_FLOW = { speed: 4, density: \"sparse\", stagger: 1200 } as const satisfies { speed: number; density: FlowDensity; stagger: number };\n\nconst subscribeSaveData = (onChange: () => void) => {\n const c = (navigator as Navigator & { connection?: EventTarget }).connection;\n c?.addEventListener?.(\"change\", onChange);\n return () => c?.removeEventListener?.(\"change\", onChange);\n};\nconst readSaveData = () => (navigator as Navigator & { connection?: { saveData?: boolean } }).connection?.saveData === true;\n\n\nexport type FlowDensity = \"sparse\" | \"normal\" | \"dense\";\nexport type FlowTrigger = \"always\" | \"hover\" | \"active\";\nexport type FlowEasing = \"linear\" | \"ease-in-out\" | (string & {});\n\n/** How many photons a conduit of this length carries (evenly spaced, so the gap is `length / count`). */\nexport function photonCount(length: number, density: FlowDensity = \"normal\"): number {\n const base = Math.round(length / 16);\n if (density === \"sparse\") return Math.min(2, Math.max(1, Math.round(base / 2)));\n if (density === \"dense\") return Math.min(8, Math.max(4, base * 2));\n return Math.min(4, Math.max(2, base));\n}\n\nfunction Stage({\n layout,\n variant,\n nodes,\n hub,\n conduit,\n particles,\n speed,\n density,\n easing,\n stagger,\n breathe,\n active,\n onActive,\n detailId,\n}: {\n layout: FlowLayout;\n variant: \"wide\" | \"compact\";\n nodes: readonly EngineFlowNode[];\n hub: EngineFlowHub;\n conduit: FlowConduit;\n particles: \"photons\" | \"none\";\n speed: number;\n density: FlowDensity;\n easing: FlowEasing;\n stagger: number;\n breathe: boolean;\n active: string | undefined;\n onActive: (id: string) => void;\n detailId: string | undefined;\n}) {\n const g = flowGeometry(layout, nodes.length, conduit);\n const pct = (v: number, of: number) => `${((v / of) * 100).toFixed(3)}%`;\n return (\n <div className=\"kz-flow-stage\" data-variant={variant} data-layout={layout} style={{ aspectRatio: `${g.width} / ${g.height}` }}>\n <svg viewBox={`0 0 ${g.width} ${g.height}`} aria-hidden=\"true\" focusable=\"false\">\n {nodes.map((node, i) => {\n const flow = node.flow ?? \"in\";\n const length = g.lengths[i] ?? 0;\n // Photons per conduit (`density`), evenly spaced; the same speed on every conduit.\n const gap = length / photonCount(length, density);\n const period = gap / speed;\n const timing = (dir: \"in\" | \"out\") =>\n ({\n \"--kz-flow-gap\": gap.toFixed(3),\n animationDuration: `${period.toFixed(2)}s`,\n // Each conduit starts `stagger` ms after the previous (a negative delay: already under way); the way back is half a period behind.\n animationDelay: `${(-(((i * stagger) / 1000 + (dir === \"out\" ? period / 2 : 0)) % period)).toFixed(2)}s`,\n ...(easing !== \"linear\" ? { animationTimingFunction: easing } : {}),\n }) as React.CSSProperties;\n const lanes = node.planned || particles === \"none\" ? [] : flow === \"both\" ? ([\"in\", \"out\"] as const) : [flow];\n return (\n <g\n key={node.id}\n className={cn(\"kz-flow-link\", node.className)}\n data-flow={flow}\n data-planned={node.planned ? \"\" : undefined}\n data-active={active === node.id ? \"\" : undefined}\n >\n <path className=\"kz-flow-wire\" d={g.paths[i]} />\n {lanes.map((dir) => (\n <React.Fragment key={dir}>\n <path className=\"kz-flow-photon kz-loop\" data-dir={dir} data-halo=\"\" d={g.paths[i]} style={timing(dir)} />\n <path className=\"kz-flow-photon kz-loop\" data-dir={dir} d={g.paths[i]} style={timing(dir)} />\n </React.Fragment>\n ))}\n </g>\n );\n })}\n </svg>\n <div className={cn(\"kz-flow-hub\", hub.className)} style={{ left: pct(g.hub.x, g.width), top: pct(g.hub.y, g.height) }}>\n {hub.mark ? <span className={cn(\"kz-flow-hub-mark\", breathe && \"kz-loop\")}>{hub.mark}</span> : null}\n <span className=\"kz-flow-hub-text\">\n <span className=\"kz-flow-hub-label\">{hub.label}</span>\n {hub.caption ? <span className=\"kz-flow-hub-caption\">{hub.caption}</span> : null}\n </span>\n </div>\n <ul className=\"kz-flow-nodes\">\n {nodes.map((node, i) => {\n const p = g.nodes[i]!;\n const on = active === node.id;\n return (\n <li key={node.id} style={{ left: pct(p.x, g.width), top: pct(p.y, g.height) }}>\n <button\n type=\"button\"\n className={cn(\"kz-flow-node\", node.className)}\n data-active={on ? \"\" : undefined}\n data-planned={node.planned ? \"\" : undefined}\n aria-pressed={on}\n aria-controls={detailId}\n onPointerEnter={() => onActive(node.id)}\n onFocus={() => onActive(node.id)}\n onClick={() => onActive(node.id)}\n >\n {node.mark ? (\n <span className=\"kz-flow-node-mark\" aria-hidden=\"true\">\n {node.mark}\n </span>\n ) : null}\n <span className=\"kz-flow-node-label\">{node.label}</span>\n </button>\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n\n/** An engine at the hub and the apps it serves, with what travels between them. */\nexport function EngineFlow({\n label,\n hub,\n nodes,\n layout = \"radial\",\n compactLayout = \"top-to-bottom\",\n particles = \"photons\",\n conduit = \"bezier\",\n hint,\n defaultActive,\n speed = 16,\n density = \"normal\",\n trigger = \"always\",\n easing = \"linear\",\n stagger = 300,\n breathe = true,\n calm = false,\n className,\n ...props\n}: EngineFlowProps) {\n const [active, setActive] = React.useState<string | undefined>(defaultActive);\n const detailId = `${React.useId()}-detail`;\n const chosen = nodes.find((n) => n.id === active);\n const compact = compactLayout && compactLayout !== layout ? compactLayout : undefined;\n // Save-Data: the calm and the full levels both rest (a still frame, like reduced motion).\n const saveData = React.useSyncExternalStore(subscribeSaveData, readSaveData, () => false);\n const pace = calm ? CALM_FLOW : { speed: Math.max(1, speed), density, stagger: Math.max(0, stagger) };\n const stage = { nodes, hub, conduit, particles, ...pace, easing, breathe, active, onActive: setActive, detailId: calm ? undefined : detailId };\n return (\n <figure\n aria-label={label}\n className={cn(\"kz-flow\", className)}\n data-motion-scope=\"\"\n data-active={chosen ? \"\" : undefined}\n data-calm={calm ? \"\" : undefined}\n data-still={saveData ? \"\" : undefined}\n data-trigger={calm || trigger === \"always\" ? undefined : trigger}\n data-density={calm ? \"sparse\" : density === \"normal\" ? undefined : density}\n data-compact={compact ? \"\" : undefined}\n {...props}\n >\n <Stage layout={layout} variant=\"wide\" {...stage} />\n {compact ? <Stage layout={compact} variant=\"compact\" {...stage} /> : null}\n {calm ? null : (\n <figcaption id={detailId} className={cn(\"kz-flow-detail\", chosen?.className)} aria-live=\"polite\">\n {chosen ? (\n <>\n <strong>{chosen.label}</strong>\n {chosen.status ? <span className=\"kz-flow-status\">{chosen.status}</span> : null}\n {chosen.description ? <span> {chosen.description}</span> : null}\n {chosen.href ? (\n <>\n {\" \"}\n <a href={chosen.href} {...(chosen.external ? { target: \"_blank\", rel: \"noopener\" } : {})}>\n {chosen.linkLabel ?? chosen.label}\n <span aria-hidden=\"true\"> →</span>\n </a>\n </>\n ) : null}\n </>\n ) : (\n hint\n )}\n </figcaption>\n )}\n </figure>\n );\n}\n","// Server-safe, pure. The geometry of EngineFlow: where the hub and the nodes sit in a box 100 units wide, and the\n// conduit from each node to the hub (an SVG path drawn node → hub, and its length, so photons travel at one speed on\n// every conduit). No DOM: the same numbers on the server and in the browser.\n\n/** How the nodes are placed around the hub. */\nexport type FlowLayout = \"radial\" | \"top-to-bottom\" | \"left-to-right\";\n/** The shape of a conduit: an S-shaped cubic Bézier, or a straight line. */\nexport type FlowConduit = \"bezier\" | \"straight\";\n\nexport interface FlowPoint {\n x: number;\n y: number;\n}\n\nexport interface FlowGeometry {\n /** The box: 100 units wide, `height` units high (the stage keeps this aspect ratio, so nothing is distorted). */\n width: number;\n height: number;\n hub: FlowPoint;\n nodes: FlowPoint[];\n /** One path per node, from the node to the hub. */\n paths: string[];\n /** The length of each path, in units. */\n lengths: number[];\n}\n\n/** The box height per layout (the width is always 100). */\nexport const FLOW_HEIGHT: Record<FlowLayout, number> = { radial: 60, \"top-to-bottom\": 92, \"left-to-right\": 56 };\n\n/** How far a conduit lands from the hub's centre along the row, as a share of its node's offset: a small fan, kept inside the ring. */\nexport const FLOW_FAN = 0.1;\n\nconst r2 = (n: number) => Math.round(n * 100) / 100;\nconst pt = (p: FlowPoint) => `${r2(p.x)} ${r2(p.y)}`;\n\nfunction cubicLength(a: FlowPoint, b: FlowPoint, c: FlowPoint, d: FlowPoint): number {\n let length = 0;\n let prev = a;\n for (let i = 1; i <= 32; i++) {\n const t = i / 32;\n const u = 1 - t;\n const p = {\n x: u * u * u * a.x + 3 * u * u * t * b.x + 3 * u * t * t * c.x + t * t * t * d.x,\n y: u * u * u * a.y + 3 * u * u * t * b.y + 3 * u * t * t * c.y + t * t * t * d.y,\n };\n length += Math.hypot(p.x - prev.x, p.y - prev.y);\n prev = p;\n }\n return length;\n}\n\n/** The positions of `count` nodes around the hub. */\nexport function flowPositions(layout: FlowLayout, count: number): { hub: FlowPoint; nodes: FlowPoint[] } {\n const height = FLOW_HEIGHT[layout];\n const n = Math.max(0, count);\n if (layout === \"top-to-bottom\") {\n return { hub: { x: 50, y: 72 }, nodes: Array.from({ length: n }, (_, i) => ({ x: ((i + 0.5) * 100) / n, y: 13 })) };\n }\n if (layout === \"left-to-right\") {\n return { hub: { x: 80, y: height / 2 }, nodes: Array.from({ length: n }, (_, i) => ({ x: 12, y: ((i + 0.5) * height) / n })) };\n }\n // Radial: on an ellipse around the centre; an even count puts two nodes level with the hub (more room for labels).\n const hub = { x: 50, y: height / 2 };\n const start = n % 2 === 0 ? -90 + 180 / Math.max(n, 1) : -90;\n return {\n hub,\n nodes: Array.from({ length: n }, (_, i) => {\n const a = ((start + (360 / n) * i) * Math.PI) / 180;\n return { x: hub.x + 37 * Math.cos(a), y: hub.y + 20 * Math.sin(a) };\n }),\n };\n}\n\n/** The whole geometry of a flow: positions, conduits (node → hub) and their lengths. */\nexport function flowGeometry(layout: FlowLayout, count: number, conduit: FlowConduit = \"bezier\"): FlowGeometry {\n const { hub, nodes } = flowPositions(layout, count);\n const paths: string[] = [];\n const lengths: number[] = [];\n for (const p of nodes) {\n // Each conduit lands on its own point of the hub (a fan), so the lines stay apart where they meet.\n const end =\n layout === \"top-to-bottom\"\n ? { x: hub.x + (p.x - hub.x) * FLOW_FAN, y: hub.y }\n : layout === \"left-to-right\"\n ? { x: hub.x, y: hub.y + (p.y - hub.y) * FLOW_FAN }\n : hub;\n if (conduit === \"straight\") {\n paths.push(`M${pt(p)} L${pt(end)}`);\n lengths.push(Math.hypot(end.x - p.x, end.y - p.y));\n continue;\n }\n let c1: FlowPoint;\n let c2: FlowPoint;\n if (layout === \"top-to-bottom\") {\n const mid = (p.y + end.y) / 2;\n c1 = { x: p.x, y: mid };\n c2 = { x: end.x, y: mid };\n } else if (layout === \"left-to-right\") {\n const mid = (p.x + end.x) / 2;\n c1 = { x: mid, y: p.y };\n c2 = { x: mid, y: end.y };\n } else {\n // An S: leave the node bending one way, reach the hub bending the other.\n const dx = end.x - p.x;\n const dy = end.y - p.y;\n const len = Math.hypot(dx, dy) || 1;\n const k = 0.14 * len;\n const nx = -dy / len;\n const ny = dx / len;\n c1 = { x: p.x + dx * 0.35 + nx * k, y: p.y + dy * 0.35 + ny * k };\n c2 = { x: p.x + dx * 0.65 - nx * k, y: p.y + dy * 0.65 - ny * k };\n }\n paths.push(`M${pt(p)} C${pt(c1)} ${pt(c2)} ${pt(end)}`);\n lengths.push(cubicLength(p, c1, c2, end));\n }\n return { width: 100, height: FLOW_HEIGHT[layout], hub, nodes, paths, lengths };\n}\n"],"mappings":";;;;;;AAgBA,YAAY,WAAW;;;ACWhB,IAAM,cAA0C,EAAE,QAAQ,IAAI,iBAAiB,IAAI,iBAAiB,GAAG;AAGvG,IAAM,WAAW;AAExB,IAAM,KAAK,CAAC,MAAc,KAAK,MAAM,IAAI,GAAG,IAAI;AAChD,IAAM,KAAK,CAAC,MAAiB,GAAG,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;AAElD,SAAS,YAAY,GAAc,GAAc,GAAc,GAAsB;AACnF,MAAI,SAAS;AACb,MAAI,OAAO;AACX,WAAS,IAAI,GAAG,KAAK,IAAI,KAAK;AAC5B,UAAM,IAAI,IAAI;AACd,UAAM,IAAI,IAAI;AACd,UAAM,IAAI;AAAA,MACR,GAAG,IAAI,IAAI,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