@krizaka/ui 4.7.0 → 4.7.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 (933) hide show
  1. package/dist/{RotatingWord-D3tpDLE4.d.ts → RotatingWord-CkDcPH9x.d.ts} +2 -2
  2. package/dist/account-menu.js +2 -2
  3. package/dist/account-menu.js.map +1 -1
  4. package/dist/account-settings.d.ts +9 -9
  5. package/dist/account-settings.js +4 -4
  6. package/dist/account-settings.js.map +1 -1
  7. package/dist/achievement.d.ts +3 -3
  8. package/dist/achievement.js +1 -1
  9. package/dist/achievement.js.map +1 -1
  10. package/dist/action-bar.d.ts +1 -1
  11. package/dist/action-bar.js +5 -5
  12. package/dist/action-bar.js.map +1 -1
  13. package/dist/activity-feed.d.ts +2 -2
  14. package/dist/activity-feed.js +1 -1
  15. package/dist/activity-feed.js.map +1 -1
  16. package/dist/alert.d.ts +1 -1
  17. package/dist/alert.js.map +1 -1
  18. package/dist/analysis-report.d.ts +1 -1
  19. package/dist/analysis-report.js +4 -4
  20. package/dist/analysis-report.js.map +1 -1
  21. package/dist/anatomy-plate.d.ts +1 -1
  22. package/dist/anatomy-plate.js +1 -1
  23. package/dist/anatomy-plate.js.map +1 -1
  24. package/dist/app-header/search.d.ts +1 -1
  25. package/dist/app-header/search.js +2 -2
  26. package/dist/app-header/search.js.map +1 -1
  27. package/dist/app-header.d.ts +2 -2
  28. package/dist/app-header.js.map +1 -1
  29. package/dist/app-shell.d.ts +8 -8
  30. package/dist/app-shell.js +4 -4
  31. package/dist/app-shell.js.map +1 -1
  32. package/dist/architecture-diagram.d.ts +1 -1
  33. package/dist/architecture-diagram.js.map +1 -1
  34. package/dist/argument-card.d.ts +2 -2
  35. package/dist/argument-card.js +6 -6
  36. package/dist/argument-card.js.map +1 -1
  37. package/dist/auth-layout.d.ts +1 -1
  38. package/dist/auth-layout.js.map +1 -1
  39. package/dist/avatar.d.ts +2 -2
  40. package/dist/avatar.js.map +1 -1
  41. package/dist/badge.d.ts +1 -1
  42. package/dist/badge.js +1 -1
  43. package/dist/bird-plate.d.ts +1 -1
  44. package/dist/bird-plate.js +2 -2
  45. package/dist/bird-plate.js.map +1 -1
  46. package/dist/button.d.ts +2 -2
  47. package/dist/button.js +3 -3
  48. package/dist/captcha.d.ts +2 -2
  49. package/dist/captcha.js +3 -3
  50. package/dist/captcha.js.map +1 -1
  51. package/dist/card-grid.d.ts +1 -1
  52. package/dist/card-grid.js +1 -1
  53. package/dist/card-grid.js.map +1 -1
  54. package/dist/card.d.ts +9 -9
  55. package/dist/card.js +1 -1
  56. package/dist/card.js.map +1 -1
  57. package/dist/catalogue-page.d.ts +2 -2
  58. package/dist/catalogue-page.js.map +1 -1
  59. package/dist/changelog-page.d.ts +1 -1
  60. package/dist/changelog-page.js +2 -2
  61. package/dist/changelog-page.js.map +1 -1
  62. package/dist/chapter.d.ts +3 -3
  63. package/dist/chapter.js +2 -2
  64. package/dist/chapter.js.map +1 -1
  65. package/dist/chat.d.ts +3 -3
  66. package/dist/chat.js +1 -1
  67. package/dist/chat.js.map +1 -1
  68. package/dist/checkbox.d.ts +1 -1
  69. package/dist/checkbox.js.map +1 -1
  70. package/dist/chip-link.d.ts +1 -1
  71. package/dist/chip-link.js +1 -1
  72. package/dist/chip-row.d.ts +2 -2
  73. package/dist/chip-row.js +1 -1
  74. package/dist/chip-row.js.map +1 -1
  75. package/dist/chip.d.ts +4 -5
  76. package/dist/chip.js +2 -2
  77. package/dist/choice-grid.d.ts +1 -1
  78. package/dist/choice-grid.js +2 -2
  79. package/dist/choice-grid.js.map +1 -1
  80. package/dist/{chunk-S6NYGOJT.js → chunk-22IORLB5.js} +1 -1
  81. package/dist/chunk-22IORLB5.js.map +1 -0
  82. package/dist/{chunk-QA3WETWT.js → chunk-2P7Y3LNN.js} +1 -1
  83. package/dist/chunk-2P7Y3LNN.js.map +1 -0
  84. package/dist/{chunk-OGWB76BR.js → chunk-3CEMOJBL.js} +2 -2
  85. package/dist/chunk-3CEMOJBL.js.map +1 -0
  86. package/dist/{chunk-WC3SO4CE.js → chunk-3SWWUJJL.js} +2 -2
  87. package/dist/chunk-3SWWUJJL.js.map +1 -0
  88. package/dist/{chunk-S2O4NSN5.js → chunk-3TCHVNNB.js} +1 -1
  89. package/dist/chunk-3TCHVNNB.js.map +1 -0
  90. package/dist/{chunk-7P7I5OQV.js → chunk-5KBYZLU4.js} +2 -2
  91. package/dist/chunk-5KBYZLU4.js.map +1 -0
  92. package/dist/{chunk-WKQ5CB3I.js → chunk-6ARAO3TR.js} +1 -1
  93. package/dist/{chunk-WKQ5CB3I.js.map → chunk-6ARAO3TR.js.map} +1 -1
  94. package/dist/{chunk-QHVV2JGF.js → chunk-6LF6IZZM.js} +2 -2
  95. package/dist/chunk-6LF6IZZM.js.map +1 -0
  96. package/dist/{chunk-HP7BDMVK.js → chunk-7B5Q76JR.js} +2 -2
  97. package/dist/chunk-7B5Q76JR.js.map +1 -0
  98. package/dist/{chunk-F2UZ2WWL.js → chunk-7KIIAOQH.js} +1 -1
  99. package/dist/{chunk-F2UZ2WWL.js.map → chunk-7KIIAOQH.js.map} +1 -1
  100. package/dist/{chunk-ADRUEPYC.js → chunk-7MA3UODW.js} +2 -2
  101. package/dist/{chunk-ADRUEPYC.js.map → chunk-7MA3UODW.js.map} +1 -1
  102. package/dist/{chunk-KH3JOEPY.js → chunk-7PVLEALV.js} +1 -1
  103. package/dist/chunk-7PVLEALV.js.map +1 -0
  104. package/dist/{chunk-QVHSV6RA.js → chunk-7UBLUGNW.js} +1 -1
  105. package/dist/chunk-7UBLUGNW.js.map +1 -0
  106. package/dist/{chunk-YTYNKMNS.js → chunk-BKMHN4UA.js} +5 -5
  107. package/dist/chunk-BKMHN4UA.js.map +1 -0
  108. package/dist/{chunk-4QH6CP2Y.js → chunk-BRYRZWLV.js} +1 -1
  109. package/dist/{chunk-4QH6CP2Y.js.map → chunk-BRYRZWLV.js.map} +1 -1
  110. package/dist/{chunk-43PTCDTL.js → chunk-BVN7JFOP.js} +1 -1
  111. package/dist/chunk-BVN7JFOP.js.map +1 -0
  112. package/dist/{chunk-5RWHDX5J.js → chunk-BYKA3FHX.js} +2 -2
  113. package/dist/chunk-BYKA3FHX.js.map +1 -0
  114. package/dist/{chunk-5PFCELGW.js → chunk-DIOAQOR5.js} +1 -1
  115. package/dist/chunk-DIOAQOR5.js.map +1 -0
  116. package/dist/{chunk-HJFRHYCI.js → chunk-DTGRZXYO.js} +2 -2
  117. package/dist/{chunk-P7AFIKWG.js → chunk-DVC4YQI2.js} +2 -2
  118. package/dist/chunk-DVC4YQI2.js.map +1 -0
  119. package/dist/{chunk-V5RO6JYI.js → chunk-E3LFHTUV.js} +2 -2
  120. package/dist/chunk-E3LFHTUV.js.map +1 -0
  121. package/dist/{chunk-WEVYKZIF.js → chunk-EAXIDRMB.js} +1 -1
  122. package/dist/chunk-EAXIDRMB.js.map +1 -0
  123. package/dist/{chunk-WU4VLSEA.js → chunk-EYMS6VRF.js} +1 -1
  124. package/dist/chunk-EYMS6VRF.js.map +1 -0
  125. package/dist/{chunk-LH5J3VLZ.js → chunk-F7EJZV53.js} +1 -1
  126. package/dist/chunk-F7EJZV53.js.map +1 -0
  127. package/dist/{chunk-VPO27AFS.js → chunk-G3L7AKZJ.js} +1 -1
  128. package/dist/chunk-G3L7AKZJ.js.map +1 -0
  129. package/dist/{chunk-EB45EVPJ.js → chunk-G5NROYGK.js} +3 -3
  130. package/dist/chunk-G5NROYGK.js.map +1 -0
  131. package/dist/{chunk-HKEAYSFS.js → chunk-GQMINKT3.js} +1 -1
  132. package/dist/{chunk-ENOS6ETI.js.map → chunk-GQMINKT3.js.map} +1 -1
  133. package/dist/{chunk-3X3OF4TI.js → chunk-H4NXYAL7.js} +1 -1
  134. package/dist/{chunk-3X3OF4TI.js.map → chunk-H4NXYAL7.js.map} +1 -1
  135. package/dist/{chunk-KR2W4ONJ.js → chunk-H7I6YLI6.js} +1 -1
  136. package/dist/chunk-H7I6YLI6.js.map +1 -0
  137. package/dist/{chunk-PJNR4NTS.js → chunk-HC2TY45B.js} +4 -4
  138. package/dist/{chunk-NSLXEDIS.js → chunk-HHBTM4AU.js} +1 -1
  139. package/dist/chunk-HHBTM4AU.js.map +1 -0
  140. package/dist/{chunk-XVRKKYWU.js → chunk-HVUR3UNK.js} +2 -2
  141. package/dist/{chunk-XVRKKYWU.js.map → chunk-HVUR3UNK.js.map} +1 -1
  142. package/dist/{chunk-V7W4RLRW.js → chunk-HWIDTLLO.js} +3 -3
  143. package/dist/chunk-HWIDTLLO.js.map +1 -0
  144. package/dist/{chunk-W675RFOA.js → chunk-ISC2QBXJ.js} +1 -1
  145. package/dist/chunk-ISC2QBXJ.js.map +1 -0
  146. package/dist/{chunk-7DYZTEE3.js → chunk-IWPB6SSW.js} +1 -1
  147. package/dist/chunk-IWPB6SSW.js.map +1 -0
  148. package/dist/{chunk-TVLRE7S3.js → chunk-JDVWUF5W.js} +2 -2
  149. package/dist/{chunk-TVLRE7S3.js.map → chunk-JDVWUF5W.js.map} +1 -1
  150. package/dist/{chunk-757ZTGU5.js → chunk-JE2NY4XE.js} +4 -4
  151. package/dist/chunk-JE2NY4XE.js.map +1 -0
  152. package/dist/{chunk-HLEBSAGC.js → chunk-KBSZ6JRF.js} +2 -2
  153. package/dist/chunk-KBSZ6JRF.js.map +1 -0
  154. package/dist/{chunk-Y3P5B4XS.js → chunk-KCU45KQ3.js} +3 -3
  155. package/dist/chunk-KCU45KQ3.js.map +1 -0
  156. package/dist/{chunk-ST5P5HNI.js → chunk-L4YBG5US.js} +4 -4
  157. package/dist/{chunk-ST5P5HNI.js.map → chunk-L4YBG5US.js.map} +1 -1
  158. package/dist/{chunk-NG6G6V5E.js → chunk-LFH3LEWR.js} +1 -1
  159. package/dist/chunk-LFH3LEWR.js.map +1 -0
  160. package/dist/{chunk-YATTFMDV.js → chunk-LSQQSJ6J.js} +2 -2
  161. package/dist/{chunk-YATTFMDV.js.map → chunk-LSQQSJ6J.js.map} +1 -1
  162. package/dist/{chunk-LNAAWT4Y.js → chunk-MJWOZ3JI.js} +1 -1
  163. package/dist/chunk-MJWOZ3JI.js.map +1 -0
  164. package/dist/{chunk-KID32IRJ.js → chunk-MXHJMTZ5.js} +1 -1
  165. package/dist/{chunk-KID32IRJ.js.map → chunk-MXHJMTZ5.js.map} +1 -1
  166. package/dist/{chunk-GHAN7OOE.js → chunk-N6LAWI4F.js} +2 -2
  167. package/dist/chunk-N6LAWI4F.js.map +1 -0
  168. package/dist/{chunk-5VZ37TY3.js → chunk-NFJWD5BT.js} +2 -2
  169. package/dist/chunk-NFJWD5BT.js.map +1 -0
  170. package/dist/{chunk-ZPOVOEO3.js → chunk-NJLIHGU4.js} +2 -2
  171. package/dist/chunk-NJLIHGU4.js.map +1 -0
  172. package/dist/{chunk-PRD7JRQX.js → chunk-ONCQWOTH.js} +4 -4
  173. package/dist/{chunk-PRD7JRQX.js.map → chunk-ONCQWOTH.js.map} +1 -1
  174. package/dist/{chunk-ENOS6ETI.js → chunk-OZC6CDZF.js} +1 -1
  175. package/dist/{chunk-HKEAYSFS.js.map → chunk-OZC6CDZF.js.map} +1 -1
  176. package/dist/{chunk-TXFX4PMN.js → chunk-OZY4C4W5.js} +1 -1
  177. package/dist/{chunk-TXFX4PMN.js.map → chunk-OZY4C4W5.js.map} +1 -1
  178. package/dist/{chunk-NPMGYLJV.js → chunk-PIRYDEX2.js} +3 -3
  179. package/dist/chunk-PIRYDEX2.js.map +1 -0
  180. package/dist/{chunk-C57KK5VB.js → chunk-PM23USOC.js} +1 -1
  181. package/dist/chunk-PM23USOC.js.map +1 -0
  182. package/dist/{chunk-PGBF3UBX.js → chunk-QKL5TECH.js} +1 -1
  183. package/dist/chunk-QKL5TECH.js.map +1 -0
  184. package/dist/{chunk-Z47KIPCT.js → chunk-QY5JEUJT.js} +1 -1
  185. package/dist/chunk-QY5JEUJT.js.map +1 -0
  186. package/dist/{chunk-FVGFPB73.js → chunk-RPVKF4RR.js} +1 -1
  187. package/dist/{chunk-FVGFPB73.js.map → chunk-RPVKF4RR.js.map} +1 -1
  188. package/dist/{chunk-NM2DEHFZ.js → chunk-RXYKJIC4.js} +1 -1
  189. package/dist/chunk-RXYKJIC4.js.map +1 -0
  190. package/dist/{chunk-W64RAX4N.js → chunk-TKYNYIJS.js} +5 -5
  191. package/dist/chunk-TKYNYIJS.js.map +1 -0
  192. package/dist/{chunk-S4TLZRGZ.js → chunk-UMXWOA3I.js} +1 -1
  193. package/dist/chunk-UMXWOA3I.js.map +1 -0
  194. package/dist/{chunk-VA4NPCUQ.js → chunk-VD7QFUAP.js} +3 -3
  195. package/dist/chunk-VD7QFUAP.js.map +1 -0
  196. package/dist/{chunk-MDSP7DJR.js → chunk-VQELCPQJ.js} +5 -5
  197. package/dist/chunk-VQELCPQJ.js.map +1 -0
  198. package/dist/{chunk-2FCQCWIK.js → chunk-VXNBXW3P.js} +5 -5
  199. package/dist/chunk-VXNBXW3P.js.map +1 -0
  200. package/dist/{chunk-B47WSPMP.js → chunk-WPUDPH2Q.js} +1 -1
  201. package/dist/chunk-WPUDPH2Q.js.map +1 -0
  202. package/dist/{chunk-SG2RKUVJ.js → chunk-WTZUMVJI.js} +5 -5
  203. package/dist/chunk-WTZUMVJI.js.map +1 -0
  204. package/dist/{chunk-EDQLPCM4.js → chunk-WVZF6WK3.js} +2 -2
  205. package/dist/chunk-WVZF6WK3.js.map +1 -0
  206. package/dist/{chunk-5D7NMUF6.js → chunk-XDAETKWM.js} +2 -2
  207. package/dist/chunk-XDAETKWM.js.map +1 -0
  208. package/dist/{chunk-QD6SNXF5.js → chunk-XDWSGNL4.js} +3 -3
  209. package/dist/chunk-XDWSGNL4.js.map +1 -0
  210. package/dist/{chunk-SB5WSVPI.js → chunk-ZFH2BYXW.js} +2 -2
  211. package/dist/chunk-ZFH2BYXW.js.map +1 -0
  212. package/dist/{chunk-XVLWVTQA.js → chunk-ZI7K742O.js} +1 -1
  213. package/dist/{chunk-XVLWVTQA.js.map → chunk-ZI7K742O.js.map} +1 -1
  214. package/dist/{chunk-NQENOT6L.js → chunk-ZRRWSKV3.js} +8 -8
  215. package/dist/chunk-ZRRWSKV3.js.map +1 -0
  216. package/dist/cn.js +1 -1
  217. package/dist/code-block.d.ts +2 -2
  218. package/dist/code-block.js +2 -2
  219. package/dist/code-block.js.map +1 -1
  220. package/dist/collection-switcher.d.ts +1 -1
  221. package/dist/collection-switcher.js +1 -1
  222. package/dist/collection-switcher.js.map +1 -1
  223. package/dist/columns.d.ts +2 -2
  224. package/dist/columns.js.map +1 -1
  225. package/dist/combobox.js +4 -4
  226. package/dist/command.d.ts +10 -10
  227. package/dist/command.js +4 -4
  228. package/dist/command.js.map +1 -1
  229. package/dist/comparison-table.d.ts +1 -1
  230. package/dist/comparison-table.js +1 -1
  231. package/dist/comparison-table.js.map +1 -1
  232. package/dist/component-page.d.ts +1 -1
  233. package/dist/component-page.js.map +1 -1
  234. package/dist/confirm-button.d.ts +1 -1
  235. package/dist/confirm-button.js +4 -4
  236. package/dist/contact-page.d.ts +1 -1
  237. package/dist/contact-page.js.map +1 -1
  238. package/dist/continue-prompt.d.ts +1 -1
  239. package/dist/continue-prompt.js +1 -1
  240. package/dist/continue-prompt.js.map +1 -1
  241. package/dist/copy-button.d.ts +1 -1
  242. package/dist/copy-button.js +4 -4
  243. package/dist/copy-button.js.map +1 -1
  244. package/dist/countdown.d.ts +1 -1
  245. package/dist/countdown.js.map +1 -1
  246. package/dist/cover-hero.d.ts +1 -1
  247. package/dist/cover-hero.js +5 -5
  248. package/dist/cover-hero.js.map +1 -1
  249. package/dist/cta-panel.d.ts +1 -1
  250. package/dist/cta-panel.js +1 -1
  251. package/dist/cta-panel.js.map +1 -1
  252. package/dist/dashboard-layout.d.ts +2 -2
  253. package/dist/dashboard-layout.js.map +1 -1
  254. package/dist/data-table.d.ts +5 -5
  255. package/dist/data-table.js +9 -9
  256. package/dist/date-picker.d.ts +11 -11
  257. package/dist/date-picker.js +5 -5
  258. package/dist/date-picker.js.map +1 -1
  259. package/dist/decision-list.d.ts +1 -1
  260. package/dist/decision-list.js +2 -2
  261. package/dist/decision-list.js.map +1 -1
  262. package/dist/description-list.d.ts +2 -2
  263. package/dist/description-list.js.map +1 -1
  264. package/dist/detail-layout.d.ts +5 -5
  265. package/dist/detail-layout.js +1 -1
  266. package/dist/detail-layout.js.map +1 -1
  267. package/dist/{dialog-DpUwec2g.d.ts → dialog-CFnxFGyn.d.ts} +7 -7
  268. package/dist/dialog.d.ts +2 -2
  269. package/dist/dialog.js +4 -4
  270. package/dist/dialog.js.map +1 -1
  271. package/dist/docs-article-page.d.ts +1 -1
  272. package/dist/docs-article-page.js.map +1 -1
  273. package/dist/docs-hub-page.d.ts +1 -1
  274. package/dist/docs-hub-page.js.map +1 -1
  275. package/dist/docs-layout.d.ts +1 -1
  276. package/dist/docs-layout.js +1 -1
  277. package/dist/docs-layout.js.map +1 -1
  278. package/dist/docs-nav.d.ts +1 -1
  279. package/dist/docs-nav.js +1 -1
  280. package/dist/docs-nav.js.map +1 -1
  281. package/dist/document-viewer.d.ts +2 -2
  282. package/dist/document-viewer.js +3 -3
  283. package/dist/document-viewer.js.map +1 -1
  284. package/dist/doodle.d.ts +1 -1
  285. package/dist/doodle.js +1 -1
  286. package/dist/doodle.js.map +1 -1
  287. package/dist/drop-overlay.d.ts +1 -1
  288. package/dist/drop-overlay.js +1 -1
  289. package/dist/drop-overlay.js.map +1 -1
  290. package/dist/dropdown-menu.d.ts +8 -8
  291. package/dist/dropdown-menu.js +2 -2
  292. package/dist/embed-facade.js +1 -1
  293. package/dist/empty-state.d.ts +1 -1
  294. package/dist/empty-state.js.map +1 -1
  295. package/dist/engine-flow.d.ts +1 -1
  296. package/dist/engine-flow.js +1 -1
  297. package/dist/engine-flow.js.map +1 -1
  298. package/dist/entity-header.d.ts +1 -1
  299. package/dist/entity-header.js +1 -1
  300. package/dist/entity-header.js.map +1 -1
  301. package/dist/environment-notice.d.ts +1 -1
  302. package/dist/environment-notice.js.map +1 -1
  303. package/dist/error-page.d.ts +1 -1
  304. package/dist/error-page.js +1 -1
  305. package/dist/error-page.js.map +1 -1
  306. package/dist/field.d.ts +3 -3
  307. package/dist/field.js +1 -1
  308. package/dist/field.js.map +1 -1
  309. package/dist/file-upload.d.ts +1 -1
  310. package/dist/file-upload.js +1 -1
  311. package/dist/file-upload.js.map +1 -1
  312. package/dist/filter-bar.d.ts +2 -2
  313. package/dist/filter-bar.js +4 -4
  314. package/dist/flock.d.ts +1 -1
  315. package/dist/flock.js +2 -2
  316. package/dist/flock.js.map +1 -1
  317. package/dist/footnote.d.ts +3 -3
  318. package/dist/footnote.js +1 -1
  319. package/dist/footnote.js.map +1 -1
  320. package/dist/force-update-screen.d.ts +1 -1
  321. package/dist/force-update-screen.js +3 -3
  322. package/dist/force-update-screen.js.map +1 -1
  323. package/dist/form/server.js.map +1 -1
  324. package/dist/form.d.ts +12 -12
  325. package/dist/form.js +4 -4
  326. package/dist/form.js.map +1 -1
  327. package/dist/{frame-CmDztC_y.d.ts → frame-D5HU_cG8.d.ts} +2 -2
  328. package/dist/gallery-page.d.ts +1 -1
  329. package/dist/gallery-page.js +1 -1
  330. package/dist/gallery-page.js.map +1 -1
  331. package/dist/genui.d.ts +2 -2
  332. package/dist/genui.js +9 -9
  333. package/dist/genui.js.map +1 -1
  334. package/dist/glossary-term.js +2 -2
  335. package/dist/glow-card.d.ts +1 -1
  336. package/dist/glow-card.js +1 -1
  337. package/dist/glow-card.js.map +1 -1
  338. package/dist/goal-gauge.d.ts +1 -1
  339. package/dist/goal-gauge.js +1 -1
  340. package/dist/goal-gauge.js.map +1 -1
  341. package/dist/grade-stamp.d.ts +1 -1
  342. package/dist/grade-stamp.js +2 -2
  343. package/dist/grade-stamp.js.map +1 -1
  344. package/dist/identity-card.d.ts +1 -1
  345. package/dist/identity-card.js +5 -5
  346. package/dist/identity-card.js.map +1 -1
  347. package/dist/image-cropper.d.ts +1 -1
  348. package/dist/image-cropper.js +3 -3
  349. package/dist/image-cropper.js.map +1 -1
  350. package/dist/index.d.ts +5 -5
  351. package/dist/index.js +2 -2
  352. package/dist/index.js.map +1 -1
  353. package/dist/kanban.d.ts +1 -1
  354. package/dist/kanban.js.map +1 -1
  355. package/dist/kbd.d.ts +1 -1
  356. package/dist/kbd.js.map +1 -1
  357. package/dist/kind-config-editor.js +8 -8
  358. package/dist/kind-config-editor.js.map +1 -1
  359. package/dist/kpi-explained.js +1 -1
  360. package/dist/kpi-explained.js.map +1 -1
  361. package/dist/landing-page.d.ts +1 -1
  362. package/dist/landing-page.js.map +1 -1
  363. package/dist/landscape.d.ts +1 -1
  364. package/dist/landscape.js +2 -2
  365. package/dist/landscape.js.map +1 -1
  366. package/dist/language-switch.d.ts +10 -10
  367. package/dist/language-switch.js +1 -1
  368. package/dist/legal-page.d.ts +1 -1
  369. package/dist/legal-page.js.map +1 -1
  370. package/dist/{lightbox-MRB2YZEP.js → lightbox-JLWASIJC.js} +4 -4
  371. package/dist/link-card.d.ts +1 -1
  372. package/dist/link-card.js +4 -4
  373. package/dist/list.d.ts +1 -1
  374. package/dist/list.js +2 -2
  375. package/dist/list.js.map +1 -1
  376. package/dist/loader.d.ts +2 -2
  377. package/dist/loader.js +1 -1
  378. package/dist/loader.js.map +1 -1
  379. package/dist/longform-page.d.ts +1 -1
  380. package/dist/longform-page.js +1 -1
  381. package/dist/longform-page.js.map +1 -1
  382. package/dist/maintenance-screen.d.ts +1 -1
  383. package/dist/maintenance-screen.js +3 -3
  384. package/dist/maintenance-screen.js.map +1 -1
  385. package/dist/map/cards.d.ts +2 -2
  386. package/dist/map/cards.js +1 -1
  387. package/dist/map/cards.js.map +1 -1
  388. package/dist/map/pin.js +1 -1
  389. package/dist/map/sheet.d.ts +1 -1
  390. package/dist/map/sheet.js +1 -1
  391. package/dist/map/sheet.js.map +1 -1
  392. package/dist/map.d.ts +11 -11
  393. package/dist/map.js +4 -4
  394. package/dist/map.js.map +1 -1
  395. package/dist/margin-layout.d.ts +2 -2
  396. package/dist/margin-layout.js.map +1 -1
  397. package/dist/markdown.d.ts +1 -1
  398. package/dist/markdown.js.map +1 -1
  399. package/dist/marketing-layout.d.ts +1 -1
  400. package/dist/marketing-layout.js.map +1 -1
  401. package/dist/mascot-quote.d.ts +1 -1
  402. package/dist/mascot-quote.js +2 -2
  403. package/dist/mascot-quote.js.map +1 -1
  404. package/dist/mascot-state.d.ts +5 -5
  405. package/dist/mascot-state.js +1 -1
  406. package/dist/mascot-state.js.map +1 -1
  407. package/dist/mascots.d.ts +2 -2
  408. package/dist/mascots.js +2 -2
  409. package/dist/mascots.js.map +1 -1
  410. package/dist/match-dialog.d.ts +1 -1
  411. package/dist/match-dialog.js +4 -4
  412. package/dist/match-dialog.js.map +1 -1
  413. package/dist/media-capture.d.ts +1 -1
  414. package/dist/media-capture.js +1 -1
  415. package/dist/media-capture.js.map +1 -1
  416. package/dist/media-carousel.js +5 -5
  417. package/dist/media-carousel.js.map +1 -1
  418. package/dist/media-gallery.d.ts +1 -1
  419. package/dist/media-gallery.js +1 -1
  420. package/dist/media-gallery.js.map +1 -1
  421. package/dist/media-player.d.ts +1 -1
  422. package/dist/media-player.js +4 -4
  423. package/dist/meter.d.ts +2 -2
  424. package/dist/meter.js +1 -1
  425. package/dist/money-input.d.ts +1 -1
  426. package/dist/money-input.js +3 -3
  427. package/dist/motion.d.ts +1 -1
  428. package/dist/motion.js +1 -1
  429. package/dist/native/form.d.ts +12 -12
  430. package/dist/native/form.js +4 -4
  431. package/dist/native/form.js.map +1 -1
  432. package/dist/native/list.d.ts +1 -1
  433. package/dist/native/list.js.map +1 -1
  434. package/dist/native/map.d.ts +4 -4
  435. package/dist/native/map.js +2 -2
  436. package/dist/native/map.js.map +1 -1
  437. package/dist/native/markdown.js.map +1 -1
  438. package/dist/native/media-capture.d.ts +1 -1
  439. package/dist/native/media-capture.js.map +1 -1
  440. package/dist/native/media-picker.d.ts +1 -1
  441. package/dist/native/media-picker.js.map +1 -1
  442. package/dist/native/vertical-video.d.ts +2 -2
  443. package/dist/native/vertical-video.js.map +1 -1
  444. package/dist/native/video-player.d.ts +1 -1
  445. package/dist/native/video-player.js.map +1 -1
  446. package/dist/native.d.ts +95 -95
  447. package/dist/native.js +13 -13
  448. package/dist/native.js.map +1 -1
  449. package/dist/nav-bar.d.ts +13 -13
  450. package/dist/nav-bar.js +5 -5
  451. package/dist/nav-bar.js.map +1 -1
  452. package/dist/notification-preferences.js +3 -3
  453. package/dist/number-ticker.d.ts +1 -1
  454. package/dist/number-ticker.js +1 -1
  455. package/dist/number-ticker.js.map +1 -1
  456. package/dist/opening-hours.d.ts +1 -1
  457. package/dist/opening-hours.js +1 -1
  458. package/dist/opening-hours.js.map +1 -1
  459. package/dist/{page-DPHDmDAQ.d.ts → page-Ufnb5TrQ.d.ts} +5 -5
  460. package/dist/page-header.d.ts +1 -1
  461. package/dist/page-header.js.map +1 -1
  462. package/dist/page-hero.d.ts +1 -1
  463. package/dist/page-hero.js +5 -5
  464. package/dist/page-hero.js.map +1 -1
  465. package/dist/page-index.d.ts +1 -1
  466. package/dist/page-index.js +2 -2
  467. package/dist/page-index.js.map +1 -1
  468. package/dist/page.d.ts +1 -1
  469. package/dist/page.js +3 -3
  470. package/dist/pagination.d.ts +1 -1
  471. package/dist/pagination.js +1 -1
  472. package/dist/pagination.js.map +1 -1
  473. package/dist/pausable-loop.js +2 -2
  474. package/dist/{player-lightbox-BYQ57OXT.js → player-lightbox-SJR3GB7U.js} +5 -5
  475. package/dist/player-lightbox-SJR3GB7U.js.map +1 -0
  476. package/dist/pointer-light.d.ts +1 -1
  477. package/dist/pointer-light.js.map +1 -1
  478. package/dist/popover.d.ts +1 -1
  479. package/dist/popover.js +1 -1
  480. package/dist/popover.js.map +1 -1
  481. package/dist/price-catalogue-editor.js +8 -8
  482. package/dist/price-catalogue-editor.js.map +1 -1
  483. package/dist/pricing-page.d.ts +1 -1
  484. package/dist/pricing-page.js +1 -1
  485. package/dist/pricing-page.js.map +1 -1
  486. package/dist/product-page.d.ts +1 -1
  487. package/dist/product-page.js +1 -1
  488. package/dist/product-page.js.map +1 -1
  489. package/dist/profile-card.d.ts +3 -3
  490. package/dist/profile-card.js +1 -1
  491. package/dist/profile-card.js.map +1 -1
  492. package/dist/progress.d.ts +1 -1
  493. package/dist/progress.js.map +1 -1
  494. package/dist/promise-card.d.ts +1 -1
  495. package/dist/promise-card.js +1 -1
  496. package/dist/promise-card.js.map +1 -1
  497. package/dist/promo-code-field.js +4 -4
  498. package/dist/proposal.js +5 -5
  499. package/dist/qr-code.js +6 -6
  500. package/dist/qr-code.js.map +1 -1
  501. package/dist/quota-meter.d.ts +1 -1
  502. package/dist/quota-meter.js +1 -1
  503. package/dist/quota-meter.js.map +1 -1
  504. package/dist/radio-group.d.ts +5 -5
  505. package/dist/radio-group.js +3 -3
  506. package/dist/radio-group.js.map +1 -1
  507. package/dist/rail-nav.d.ts +4 -4
  508. package/dist/rail-nav.js +3 -3
  509. package/dist/rail-nav.js.map +1 -1
  510. package/dist/recipes.js +1 -1
  511. package/dist/recipes.js.map +1 -1
  512. package/dist/retro-tv-playlist.d.ts +1 -1
  513. package/dist/retro-tv-playlist.js.map +1 -1
  514. package/dist/retro-tv.js +6 -6
  515. package/dist/retro-tv.js.map +1 -1
  516. package/dist/reviews.js +3 -3
  517. package/dist/{schema-Dkn0uX72.d.ts → schema-Dd05m48Q.d.ts} +1 -1
  518. package/dist/schema-form.js +7 -7
  519. package/dist/schema-form.js.map +1 -1
  520. package/dist/scroll-stage.d.ts +2 -2
  521. package/dist/scroll-stage.js +2 -2
  522. package/dist/scroll-stage.js.map +1 -1
  523. package/dist/search-field.d.ts +1 -1
  524. package/dist/search-field.js +2 -2
  525. package/dist/section-backdrop.d.ts +1 -1
  526. package/dist/section-backdrop.js +1 -1
  527. package/dist/separator.d.ts +1 -1
  528. package/dist/separator.js.map +1 -1
  529. package/dist/service-card.d.ts +1 -1
  530. package/dist/service-card.js +6 -6
  531. package/dist/service-card.js.map +1 -1
  532. package/dist/settings-layout.d.ts +3 -3
  533. package/dist/settings-layout.js +2 -2
  534. package/dist/shop/booking.d.ts +1 -1
  535. package/dist/shop/booking.js +4 -4
  536. package/dist/shop/booking.js.map +1 -1
  537. package/dist/shop/bulletin.d.ts +1 -1
  538. package/dist/shop/bulletin.js +2 -2
  539. package/dist/shop/bulletin.js.map +1 -1
  540. package/dist/shop/faq.d.ts +1 -1
  541. package/dist/shop/faq.js +3 -3
  542. package/dist/shop/faq.js.map +1 -1
  543. package/dist/shop/gallery.d.ts +1 -1
  544. package/dist/shop/gallery.js +3 -3
  545. package/dist/shop/gallery.js.map +1 -1
  546. package/dist/shop/hero.d.ts +1 -1
  547. package/dist/shop/hero.js +2 -2
  548. package/dist/shop/hero.js.map +1 -1
  549. package/dist/shop/policies.d.ts +1 -1
  550. package/dist/shop/policies.js +2 -2
  551. package/dist/shop/policies.js.map +1 -1
  552. package/dist/shop/reviews.d.ts +1 -1
  553. package/dist/shop/reviews.js +2 -2
  554. package/dist/shop/reviews.js.map +1 -1
  555. package/dist/shop/services.d.ts +1 -1
  556. package/dist/shop/services.js +4 -4
  557. package/dist/shop/services.js.map +1 -1
  558. package/dist/shop/social.d.ts +1 -1
  559. package/dist/shop/social.js +2 -2
  560. package/dist/shop/social.js.map +1 -1
  561. package/dist/shop/story.d.ts +1 -1
  562. package/dist/shop/story.js +2 -2
  563. package/dist/shop/story.js.map +1 -1
  564. package/dist/shop/team.d.ts +1 -1
  565. package/dist/shop/team.js +2 -2
  566. package/dist/shop/team.js.map +1 -1
  567. package/dist/shop/video.d.ts +1 -1
  568. package/dist/shop/video.js +2 -2
  569. package/dist/shop/video.js.map +1 -1
  570. package/dist/shop/visit.d.ts +1 -1
  571. package/dist/shop/visit.js +2 -2
  572. package/dist/shop/visit.js.map +1 -1
  573. package/dist/shop-composer.js +2 -2
  574. package/dist/shop-composer.js.map +1 -1
  575. package/dist/shop-gallery.d.ts +1 -1
  576. package/dist/shop-gallery.js +2 -2
  577. package/dist/shop-gallery.js.map +1 -1
  578. package/dist/shop.d.ts +3 -3
  579. package/dist/shop.js +2 -2
  580. package/dist/showcase.d.ts +1 -1
  581. package/dist/showcase.js +6 -6
  582. package/dist/showcase.js.map +1 -1
  583. package/dist/signature.d.ts +1 -1
  584. package/dist/signature.js +2 -2
  585. package/dist/signature.js.map +1 -1
  586. package/dist/site-cahier.d.ts +3 -3
  587. package/dist/site-cahier.js +10 -10
  588. package/dist/site-cahier.js.map +1 -1
  589. package/dist/site-footer.d.ts +4 -4
  590. package/dist/site-footer.js +1 -1
  591. package/dist/site-footer.js.map +1 -1
  592. package/dist/skeleton.d.ts +3 -3
  593. package/dist/skeleton.js.map +1 -1
  594. package/dist/skip-link.d.ts +1 -1
  595. package/dist/skip-link.js +1 -1
  596. package/dist/slider.d.ts +1 -1
  597. package/dist/slider.js +2 -2
  598. package/dist/slider.js.map +1 -1
  599. package/dist/slot-picker.d.ts +1 -1
  600. package/dist/slot-picker.js +1 -1
  601. package/dist/slot-picker.js.map +1 -1
  602. package/dist/specimen-tag.d.ts +2 -2
  603. package/dist/specimen-tag.js +2 -2
  604. package/dist/speed-lines.d.ts +1 -1
  605. package/dist/speed-lines.js +1 -1
  606. package/dist/speed-lines.js.map +1 -1
  607. package/dist/spinner.d.ts +2 -2
  608. package/dist/spinner.js +1 -1
  609. package/dist/spinner.js.map +1 -1
  610. package/dist/split-view.d.ts +1 -1
  611. package/dist/split-view.js.map +1 -1
  612. package/dist/stage-banner.d.ts +1 -1
  613. package/dist/stage-banner.js +1 -1
  614. package/dist/stage-banner.js.map +1 -1
  615. package/dist/stat.d.ts +2 -2
  616. package/dist/stat.js +1 -1
  617. package/dist/status-chip.js +4 -4
  618. package/dist/status-chip.js.map +1 -1
  619. package/dist/status-page.d.ts +1 -1
  620. package/dist/status-page.js.map +1 -1
  621. package/dist/step-progress.d.ts +1 -1
  622. package/dist/step-progress.js.map +1 -1
  623. package/dist/step-showcase.d.ts +2 -2
  624. package/dist/step-showcase.js +3 -3
  625. package/dist/step-showcase.js.map +1 -1
  626. package/dist/stepper.d.ts +1 -1
  627. package/dist/stepper.js +1 -1
  628. package/dist/stepper.js.map +1 -1
  629. package/dist/sticky-action.d.ts +1 -1
  630. package/dist/sticky-action.js.map +1 -1
  631. package/dist/stuck.d.ts +1 -1
  632. package/dist/stuck.js +1 -1
  633. package/dist/stuck.js.map +1 -1
  634. package/dist/swipe-deck.d.ts +2 -2
  635. package/dist/swipe-deck.js.map +1 -1
  636. package/dist/switch.d.ts +1 -1
  637. package/dist/switch.js +1 -1
  638. package/dist/tabs.d.ts +6 -6
  639. package/dist/tabs.js +1 -1
  640. package/dist/tabs.js.map +1 -1
  641. package/dist/tag-input.d.ts +1 -1
  642. package/dist/tag-input.js +4 -4
  643. package/dist/tag-input.js.map +1 -1
  644. package/dist/tag-selector.d.ts +1 -1
  645. package/dist/tag-selector.js +3 -3
  646. package/dist/tag-selector.js.map +1 -1
  647. package/dist/taped-photo.d.ts +1 -1
  648. package/dist/taped-photo.js +2 -2
  649. package/dist/terminal-replay.d.ts +1 -1
  650. package/dist/terminal-replay.js +3 -3
  651. package/dist/terminal-replay.js.map +1 -1
  652. package/dist/text-style/server.d.ts +1 -1
  653. package/dist/text-style/server.js.map +1 -1
  654. package/dist/text-style.d.ts +2 -2
  655. package/dist/text-style.js.map +1 -1
  656. package/dist/theme.d.ts +3 -3
  657. package/dist/theme.js +3 -3
  658. package/dist/theme.js.map +1 -1
  659. package/dist/toast.d.ts +1 -1
  660. package/dist/toast.js +2 -2
  661. package/dist/toast.js.map +1 -1
  662. package/dist/toc.d.ts +2 -2
  663. package/dist/toc.js +1 -1
  664. package/dist/toc.js.map +1 -1
  665. package/dist/tooltip.d.ts +1 -1
  666. package/dist/tooltip.js +2 -2
  667. package/dist/tree-view.d.ts +1 -1
  668. package/dist/tree-view.js +2 -2
  669. package/dist/tree-view.js.map +1 -1
  670. package/dist/update-prompt.d.ts +1 -1
  671. package/dist/update-prompt.js +3 -3
  672. package/dist/update-prompt.js.map +1 -1
  673. package/dist/upload-queue.d.ts +2 -2
  674. package/dist/upload-queue.js +1 -1
  675. package/dist/upload-queue.js.map +1 -1
  676. package/dist/usage.d.ts +4 -4
  677. package/dist/usage.js +3 -3
  678. package/dist/usage.js.map +1 -1
  679. package/dist/verified-badge.d.ts +1 -1
  680. package/dist/verified-badge.js.map +1 -1
  681. package/dist/versus-card.d.ts +1 -1
  682. package/dist/versus-card.js +2 -2
  683. package/dist/versus-card.js.map +1 -1
  684. package/dist/vertical-video.d.ts +2 -2
  685. package/dist/vertical-video.js +6 -6
  686. package/dist/vertical-video.js.map +1 -1
  687. package/dist/video-player.d.ts +1 -1
  688. package/dist/video-player.js +5 -5
  689. package/dist/video-trimmer.d.ts +1 -1
  690. package/dist/video-trimmer.js.map +1 -1
  691. package/dist/virtual.d.ts +2 -2
  692. package/dist/virtual.js +1 -1
  693. package/dist/wall.js +2 -2
  694. package/dist/wall.js.map +1 -1
  695. package/dist/waveform.d.ts +1 -1
  696. package/dist/waveform.js.map +1 -1
  697. package/package.json +7 -7
  698. package/registry/account-settings.json +17 -17
  699. package/registry/achievement.json +1 -1
  700. package/registry/action-bar.json +3 -3
  701. package/registry/activity-feed.json +2 -2
  702. package/registry/alert.json +1 -1
  703. package/registry/analysis-report.json +1 -1
  704. package/registry/anatomy-plate.json +1 -1
  705. package/registry/app-frame.json +6 -6
  706. package/registry/app-header.json +4 -4
  707. package/registry/app-shell.json +2 -2
  708. package/registry/architecture-diagram.json +1 -1
  709. package/registry/argument-card.json +3 -3
  710. package/registry/auth-layout.json +1 -1
  711. package/registry/avatar.json +3 -3
  712. package/registry/badge.json +1 -1
  713. package/registry/bird-plate.json +1 -1
  714. package/registry/button.json +1 -1
  715. package/registry/captcha.json +1 -1
  716. package/registry/card-grid.json +1 -1
  717. package/registry/card.json +1 -1
  718. package/registry/catalogue-page.json +1 -1
  719. package/registry/changelog-page.json +2 -2
  720. package/registry/chapter.json +2 -2
  721. package/registry/chat.json +1 -1
  722. package/registry/checkbox.json +1 -1
  723. package/registry/chip-link.json +1 -1
  724. package/registry/chip-row.json +1 -1
  725. package/registry/chip.json +2 -2
  726. package/registry/choice-grid.json +2 -2
  727. package/registry/cn.json +1 -1
  728. package/registry/code-block.json +2 -2
  729. package/registry/collection-switcher.json +2 -2
  730. package/registry/columns.json +1 -1
  731. package/registry/combobox.json +2 -2
  732. package/registry/command.json +1 -1
  733. package/registry/comparison-table.json +1 -1
  734. package/registry/component-page.json +1 -1
  735. package/registry/confirm-button.json +1 -1
  736. package/registry/contact-page.json +1 -1
  737. package/registry/continue-prompt.json +1 -1
  738. package/registry/copy-button.json +2 -2
  739. package/registry/countdown.json +1 -1
  740. package/registry/cover-hero.json +3 -3
  741. package/registry/cta-panel.json +1 -1
  742. package/registry/dashboard-layout.json +2 -2
  743. package/registry/data-table.json +4 -4
  744. package/registry/date-picker.json +8 -8
  745. package/registry/decision-list.json +2 -2
  746. package/registry/description-list.json +1 -1
  747. package/registry/detail-layout.json +1 -1
  748. package/registry/dialog.json +2 -2
  749. package/registry/docs-article-page.json +1 -1
  750. package/registry/docs-hub-page.json +1 -1
  751. package/registry/docs-layout.json +2 -2
  752. package/registry/docs-nav.json +1 -1
  753. package/registry/document-viewer.json +2 -2
  754. package/registry/doodle.json +1 -1
  755. package/registry/drop-overlay.json +1 -1
  756. package/registry/dropdown-menu.json +1 -1
  757. package/registry/empty-state.json +1 -1
  758. package/registry/engine-flow.json +1 -1
  759. package/registry/entity-header.json +2 -2
  760. package/registry/environment-notice.json +1 -1
  761. package/registry/error-page.json +1 -1
  762. package/registry/field.json +1 -1
  763. package/registry/file-upload.json +2 -2
  764. package/registry/filter-bar.json +4 -4
  765. package/registry/flock.json +1 -1
  766. package/registry/footnote.json +1 -1
  767. package/registry/force-update-screen.json +1 -1
  768. package/registry/form.json +64 -64
  769. package/registry/gallery-page.json +1 -1
  770. package/registry/genui.json +2 -2
  771. package/registry/glow-card.json +1 -1
  772. package/registry/goal-gauge.json +1 -1
  773. package/registry/grade-stamp.json +1 -1
  774. package/registry/identity-card.json +1 -1
  775. package/registry/image-cropper.json +1 -1
  776. package/registry/index.json +8 -8
  777. package/registry/kanban.json +1 -1
  778. package/registry/kbd.json +1 -1
  779. package/registry/kind-config-editor.json +2 -2
  780. package/registry/kpi-explained.json +1 -1
  781. package/registry/landing-page.json +1 -1
  782. package/registry/landscape.json +1 -1
  783. package/registry/language-switch.json +1 -1
  784. package/registry/legal-page.json +1 -1
  785. package/registry/link-card.json +3 -3
  786. package/registry/list.json +2 -2
  787. package/registry/loader.json +1 -1
  788. package/registry/longform-page.json +1 -1
  789. package/registry/maintenance-screen.json +1 -1
  790. package/registry/map.json +7 -7
  791. package/registry/margin-layout.json +1 -1
  792. package/registry/markdown.json +1 -1
  793. package/registry/marketing-layout.json +1 -1
  794. package/registry/mascot-quote.json +1 -1
  795. package/registry/mascot-state.json +2 -2
  796. package/registry/mascots.json +3 -3
  797. package/registry/match-dialog.json +1 -1
  798. package/registry/media-capture.json +2 -2
  799. package/registry/media-gallery.json +4 -4
  800. package/registry/meter.json +1 -1
  801. package/registry/money-input.json +1 -1
  802. package/registry/nav-bar.json +8 -8
  803. package/registry/number-ticker.json +1 -1
  804. package/registry/opening-hours.json +2 -2
  805. package/registry/page-header.json +1 -1
  806. package/registry/page-hero.json +3 -3
  807. package/registry/page-index.json +2 -2
  808. package/registry/page.json +1 -1
  809. package/registry/pagination.json +2 -2
  810. package/registry/pointer-light.json +1 -1
  811. package/registry/popover.json +1 -1
  812. package/registry/price-catalogue-editor.json +1 -1
  813. package/registry/pricing-page.json +2 -2
  814. package/registry/product-page.json +1 -1
  815. package/registry/profile-card.json +3 -3
  816. package/registry/progress.json +1 -1
  817. package/registry/promise-card.json +1 -1
  818. package/registry/qr-code.json +2 -2
  819. package/registry/quota-meter.json +1 -1
  820. package/registry/radio-group.json +14 -14
  821. package/registry/rail-nav.json +8 -8
  822. package/registry/recipes.json +1 -1
  823. package/registry/retro-tv.json +3 -3
  824. package/registry/schema-form.json +1 -1
  825. package/registry/scroll-stage.json +1 -1
  826. package/registry/search-field.json +2 -2
  827. package/registry/section-backdrop.json +1 -1
  828. package/registry/separator.json +1 -1
  829. package/registry/service-card.json +3 -3
  830. package/registry/settings-layout.json +1 -1
  831. package/registry/shop-composer.json +3 -3
  832. package/registry/shop-gallery.json +1 -1
  833. package/registry/shop.json +17 -17
  834. package/registry/showcase.json +1 -1
  835. package/registry/signature.json +1 -1
  836. package/registry/site-cahier.json +2 -2
  837. package/registry/site-footer.json +10 -10
  838. package/registry/skeleton.json +1 -1
  839. package/registry/skip-link.json +1 -1
  840. package/registry/slider.json +1 -1
  841. package/registry/slot-picker.json +2 -2
  842. package/registry/specimen-tag.json +1 -1
  843. package/registry/speed-lines.json +1 -1
  844. package/registry/spinner.json +2 -2
  845. package/registry/split-view.json +1 -1
  846. package/registry/stage-banner.json +1 -1
  847. package/registry/stat.json +1 -1
  848. package/registry/status-chip.json +2 -2
  849. package/registry/status-page.json +1 -1
  850. package/registry/step-progress.json +1 -1
  851. package/registry/step-showcase.json +2 -2
  852. package/registry/stepper.json +1 -1
  853. package/registry/sticky-action.json +1 -1
  854. package/registry/stuck.json +1 -1
  855. package/registry/swipe-deck.json +1 -1
  856. package/registry/switch.json +1 -1
  857. package/registry/tabs.json +1 -1
  858. package/registry/tag-input.json +1 -1
  859. package/registry/tag-selector.json +1 -1
  860. package/registry/taped-photo.json +1 -1
  861. package/registry/terminal-replay.json +2 -2
  862. package/registry/text-style.json +8 -8
  863. package/registry/theme.json +1 -1
  864. package/registry/toast.json +1 -1
  865. package/registry/toc.json +1 -1
  866. package/registry/tooltip.json +1 -1
  867. package/registry/tree-view.json +2 -2
  868. package/registry/update-prompt.json +1 -1
  869. package/registry/upload-queue.json +1 -1
  870. package/registry/usage.json +2 -2
  871. package/registry/verified-badge.json +1 -1
  872. package/registry/versus-card.json +1 -1
  873. package/registry/vertical-video.json +2 -2
  874. package/registry/video-player.json +2 -2
  875. package/registry/video-trimmer.json +1 -1
  876. package/registry/virtual.json +3 -3
  877. package/registry/wall.json +1 -1
  878. package/registry/waveform.json +1 -1
  879. package/dist/chunk-2FCQCWIK.js.map +0 -1
  880. package/dist/chunk-43PTCDTL.js.map +0 -1
  881. package/dist/chunk-5D7NMUF6.js.map +0 -1
  882. package/dist/chunk-5PFCELGW.js.map +0 -1
  883. package/dist/chunk-5RWHDX5J.js.map +0 -1
  884. package/dist/chunk-5VZ37TY3.js.map +0 -1
  885. package/dist/chunk-757ZTGU5.js.map +0 -1
  886. package/dist/chunk-7DYZTEE3.js.map +0 -1
  887. package/dist/chunk-7P7I5OQV.js.map +0 -1
  888. package/dist/chunk-B47WSPMP.js.map +0 -1
  889. package/dist/chunk-C57KK5VB.js.map +0 -1
  890. package/dist/chunk-EB45EVPJ.js.map +0 -1
  891. package/dist/chunk-EDQLPCM4.js.map +0 -1
  892. package/dist/chunk-GHAN7OOE.js.map +0 -1
  893. package/dist/chunk-HLEBSAGC.js.map +0 -1
  894. package/dist/chunk-HP7BDMVK.js.map +0 -1
  895. package/dist/chunk-KH3JOEPY.js.map +0 -1
  896. package/dist/chunk-KR2W4ONJ.js.map +0 -1
  897. package/dist/chunk-LH5J3VLZ.js.map +0 -1
  898. package/dist/chunk-LNAAWT4Y.js.map +0 -1
  899. package/dist/chunk-MDSP7DJR.js.map +0 -1
  900. package/dist/chunk-NG6G6V5E.js.map +0 -1
  901. package/dist/chunk-NM2DEHFZ.js.map +0 -1
  902. package/dist/chunk-NPMGYLJV.js.map +0 -1
  903. package/dist/chunk-NQENOT6L.js.map +0 -1
  904. package/dist/chunk-NSLXEDIS.js.map +0 -1
  905. package/dist/chunk-OGWB76BR.js.map +0 -1
  906. package/dist/chunk-P7AFIKWG.js.map +0 -1
  907. package/dist/chunk-PGBF3UBX.js.map +0 -1
  908. package/dist/chunk-QA3WETWT.js.map +0 -1
  909. package/dist/chunk-QD6SNXF5.js.map +0 -1
  910. package/dist/chunk-QHVV2JGF.js.map +0 -1
  911. package/dist/chunk-QVHSV6RA.js.map +0 -1
  912. package/dist/chunk-S2O4NSN5.js.map +0 -1
  913. package/dist/chunk-S4TLZRGZ.js.map +0 -1
  914. package/dist/chunk-S6NYGOJT.js.map +0 -1
  915. package/dist/chunk-SB5WSVPI.js.map +0 -1
  916. package/dist/chunk-SG2RKUVJ.js.map +0 -1
  917. package/dist/chunk-V5RO6JYI.js.map +0 -1
  918. package/dist/chunk-V7W4RLRW.js.map +0 -1
  919. package/dist/chunk-VA4NPCUQ.js.map +0 -1
  920. package/dist/chunk-VPO27AFS.js.map +0 -1
  921. package/dist/chunk-W64RAX4N.js.map +0 -1
  922. package/dist/chunk-W675RFOA.js.map +0 -1
  923. package/dist/chunk-WC3SO4CE.js.map +0 -1
  924. package/dist/chunk-WEVYKZIF.js.map +0 -1
  925. package/dist/chunk-WU4VLSEA.js.map +0 -1
  926. package/dist/chunk-Y3P5B4XS.js.map +0 -1
  927. package/dist/chunk-YTYNKMNS.js.map +0 -1
  928. package/dist/chunk-Z47KIPCT.js.map +0 -1
  929. package/dist/chunk-ZPOVOEO3.js.map +0 -1
  930. package/dist/player-lightbox-BYQ57OXT.js.map +0 -1
  931. /package/dist/{chunk-HJFRHYCI.js.map → chunk-DTGRZXYO.js.map} +0 -0
  932. /package/dist/{chunk-PJNR4NTS.js.map → chunk-HC2TY45B.js.map} +0 -0
  933. /package/dist/{lightbox-MRB2YZEP.js.map → lightbox-JLWASIJC.js.map} +0 -0
@@ -122,7 +122,7 @@
122
122
  "files": [
123
123
  {
124
124
  "path": "glow-card/glow-card.tsx",
125
- "content": "// Client (the pointer). A card that answers light: a soft bloom of the brand accent follows the pointer across it, and\n// its border is a ring of the brand gradient that turns slowly and brightens under the pointer or the focus. Composited\n// properties only (CSS variables, opacity); no animation frame — the pointer writes two variables. Under reduced motion\n// the ring rests at a fixed angle and the light stays where it is: a designed still frame, not a switched-off one.\nimport { Slot } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type GlowCardProps = React.ComponentProps<\"div\"> & {\n /**\n * `border` (a still hairline ring of the brand gradient) or `both`. `spotlight` (the bloom under the pointer) is\n * deprecated since 3.31 (krizaka-ui#393) and draws nothing.\n * @default \"both\"\n */\n glow?: \"border\" | \"spotlight\" | \"both\";\n /** Renders your element (a link, an article) with the card's look and behaviour. */\n asChild?: boolean;\n /**\n * A featured card: the ring is fuller at rest. It never turns.\n * @default false\n */\n alive?: boolean;\n};\n\n/** A card ringed by the brand: a still hairline of its gradient, a step brighter under the pointer. Content is yours. */\nexport function GlowCard({ glow = \"both\", asChild, alive, className, ...props }: GlowCardProps) {\n const Comp = asChild ? Slot.Root : \"div\";\n return (\n <Comp\n data-glow={glow}\n data-alive={alive ? \"\" : undefined}\n className={cn(\"kz-glow relative isolate rounded-2xl border border-border-default bg-surface-1 p-6\", className)}\n {...props}\n />\n );\n}\n"
125
+ "content": "// Client (the pointer). A card that answers light: a soft bloom of the brand accent follows the pointer across it, and\n// its border is a ring of the brand gradient that turns slowly and brightens under the pointer or the focus. Composited\n// properties only (CSS variables, opacity); no animation frame — the pointer writes two variables. Under reduced motion\n// the ring rests at a fixed angle and the light stays where it is: a designed still frame, not a switched-off one.\nimport { Slot } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type GlowCardProps = React.ComponentProps<\"div\"> & {\n /**\n * `border` (a still hairline ring of the brand gradient) or `both`. `spotlight` (the bloom under the pointer) is\n * deprecated since 3.31 (krizaka-ui#393) and draws nothing.\n * @default \"both\"\n */\n glow?: \"border\" | \"spotlight\" | \"both\";\n /** Renders your element (a link, an article) with the card's look and behaviour. */\n asChild?: boolean;\n /**\n * A featured card: the ring is fuller at rest. It never turns.\n * @default false\n */\n alive?: boolean;\n};\n\n/** A card ringed by the brand: a still hairline of its gradient, a step brighter under the pointer. Content is yours. */\nexport function GlowCard({ glow = \"both\", asChild, alive, className, ...props }: Readonly<GlowCardProps>) {\n const Comp = asChild ? Slot.Root : \"div\";\n return (\n <Comp\n data-glow={glow}\n data-alive={alive ? \"\" : undefined}\n className={cn(\"kz-glow relative isolate rounded-2xl border border-border-default bg-surface-1 p-6\", className)}\n {...props}\n />\n );\n}\n"
126
126
  },
127
127
  {
128
128
  "path": "glow-card/index.ts",
@@ -243,7 +243,7 @@
243
243
  "files": [
244
244
  {
245
245
  "path": "goal-gauge/goal-gauge.tsx",
246
- "content": "// Server-safe. A goal counted in steps (story.css): 6 of 10 backers, 3 of 5 dares done, 8 problems out of the way. A\n// `meter` with its value in words; in a `Scene` of a `ScrollStage` the segments light (or drain) one by one, once.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type GoalGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** What the gauge counts (“Backers”, “Dares completed”) — passed translated; the meter's accessible name. */\n label: string;\n /** The number of steps of the goal (2–24). */\n segments: number;\n /**\n * The steps reached (lit), from 0 to `segments`.\n * @default segments\n */\n value?: number;\n /** The value in words (“6 of 10”, “€420 raised”); default `value / segments`. */\n valueText?: string;\n /**\n * How the scene plays it: `fill` lights the reached steps one by one; `drain` empties the spent ones (a countdown of\n * what is left: tickets, lives, problems still standing).\n * @default \"fill\"\n */\n mode?: \"fill\" | \"drain\";\n /**\n * Shows the label and the value above the segments.\n * @default true\n */\n showLabel?: boolean;\n /**\n * `default`: rounded segments. `arcade`: the boss gauge — a skewed frame, gradient cells, a centred mono label.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`sovkora` → `.brand-sovkora`). */\n brand?: string;\n};\n\n/** A goal in steps: `role=\"meter\"`, the reached steps lit, the value in words beside the label. */\nexport function GoalGauge({ label, segments, value, valueText, mode = \"fill\", showLabel = true, variant, brand, className, style, ...props }: GoalGaugeProps) {\n const total = Math.max(1, Math.round(segments));\n const lit = Math.min(total, Math.max(0, Math.round(value ?? total)));\n const words = valueText ?? `${lit} / ${total}`;\n return (\n <div\n role=\"meter\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-valuenow={lit}\n aria-valuetext={words}\n data-mode={mode}\n className={cn(\"kzs-gauge\", storyVariantClass(variant), brandClass(brand), className)}\n style={{ \"--kzs-segments\": total, ...style } as React.CSSProperties}\n {...props}\n >\n {showLabel && (\n <div className=\"kzs-gauge-head\" aria-hidden>\n <span className=\"kzs-gauge-label\">{label}</span>\n <span className=\"kzs-gauge-value\">{words}</span>\n </div>\n )}\n <div className=\"kzs-gauge-cells\" aria-hidden>\n {Array.from({ length: total }, (_, i) => {\n const on = i < lit;\n const animate = mode === \"fill\" ? on : !on;\n const order = mode === \"fill\" ? i : i - lit;\n return (\n <span\n key={i}\n className=\"kzs-gauge-cell\"\n data-lit={on ? \"\" : undefined}\n data-animate={animate ? \"\" : undefined}\n style={animate ? ({ \"--i\": order } as React.CSSProperties) : undefined}\n />\n );\n })}\n </div>\n </div>\n );\n}\n"
246
+ "content": "// Server-safe. A goal counted in steps (story.css): 6 of 10 backers, 3 of 5 dares done, 8 problems out of the way. A\n// `meter` with its value in words; in a `Scene` of a `ScrollStage` the segments light (or drain) one by one, once.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type GoalGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** What the gauge counts (“Backers”, “Dares completed”) — passed translated; the meter's accessible name. */\n label: string;\n /** The number of steps of the goal (2–24). */\n segments: number;\n /**\n * The steps reached (lit), from 0 to `segments`.\n * @default segments\n */\n value?: number;\n /** The value in words (“6 of 10”, “€420 raised”); default `value / segments`. */\n valueText?: string;\n /**\n * How the scene plays it: `fill` lights the reached steps one by one; `drain` empties the spent ones (a countdown of\n * what is left: tickets, lives, problems still standing).\n * @default \"fill\"\n */\n mode?: \"fill\" | \"drain\";\n /**\n * Shows the label and the value above the segments.\n * @default true\n */\n showLabel?: boolean;\n /**\n * `default`: rounded segments. `arcade`: the boss gauge — a skewed frame, gradient cells, a centred mono label.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`sovkora` → `.brand-sovkora`). */\n brand?: string;\n};\n\n/** A goal in steps: `role=\"meter\"`, the reached steps lit, the value in words beside the label. */\nexport function GoalGauge({ label, segments, value, valueText, mode = \"fill\", showLabel = true, variant, brand, className, style, ...props }: Readonly<GoalGaugeProps>) {\n const total = Math.max(1, Math.round(segments));\n const lit = Math.min(total, Math.max(0, Math.round(value ?? total)));\n const words = valueText ?? `${lit} / ${total}`;\n return (\n <div\n role=\"meter\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-valuenow={lit}\n aria-valuetext={words}\n data-mode={mode}\n className={cn(\"kzs-gauge\", storyVariantClass(variant), brandClass(brand), className)}\n style={{ \"--kzs-segments\": total, ...style } as React.CSSProperties}\n {...props}\n >\n {showLabel && (\n <div className=\"kzs-gauge-head\" aria-hidden>\n <span className=\"kzs-gauge-label\">{label}</span>\n <span className=\"kzs-gauge-value\">{words}</span>\n </div>\n )}\n <div className=\"kzs-gauge-cells\" aria-hidden>\n {Array.from({ length: total }, (_, i) => {\n const on = i < lit;\n const animate = mode === \"fill\" ? on : !on;\n const order = mode === \"fill\" ? i : i - lit;\n return (\n <span\n key={i}\n className=\"kzs-gauge-cell\"\n data-lit={on ? \"\" : undefined}\n data-animate={animate ? \"\" : undefined}\n style={animate ? ({ \"--i\": order } as React.CSSProperties) : undefined}\n />\n );\n })}\n </div>\n </div>\n );\n}\n"
247
247
  },
248
248
  {
249
249
  "path": "goal-gauge/index.ts",
@@ -145,7 +145,7 @@
145
145
  "files": [
146
146
  {
147
147
  "path": "grade-stamp/grade-stamp.tsx",
148
- "content": "// Client (a tooltip). The teacher's red-ink grade of the Cahier (blocks.css): « 18/20 » and a short remark, stamped slightly\n// askew. A grade is a fact, never a decoration: `value` and `source` are required, the host passes a measured value (test\n// coverage, Lighthouse, a bundle size) and says where it comes from, which the tooltip and the screen reader both read. A value\n// that is not a finite number within 0 and `outOf`, or a missing source, renders nothing — never a made-up score.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Tooltip } from \"../tooltip/tooltip\";\n\nexport type GradeStampProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> & {\n /** The measured grade, from `0` to `outOf`. Never invented: it comes from the host's data. */\n value: number;\n /** The scale. @default 20 */\n outOf?: number;\n /** The remark in the margin, written like a teacher (`Très bien, continue`). */\n remark?: React.ReactNode;\n /** Where the number comes from (`Vitest coverage, 2026-10-23`): shown in the tooltip and read by assistive technology. */\n source: string;\n /** The word before the source for assistive technology. @default \"Source\" */\n sourceLabel?: string;\n /** The locale of the number (`17,5` in French). @default \"en\" */\n locale?: string;\n /** The tilt in degrees. @default -4 */\n tilt?: number;\n};\n\n/** A teacher's red-ink grade, `18/20` with a remark, only from real data: its source is in a tooltip. */\nexport function GradeStamp({ value, outOf = 20, remark, source, sourceLabel = \"Source\", locale = \"en\", tilt = -4, className, style, ...props }: GradeStampProps) {\n if (!Number.isFinite(value) || !Number.isFinite(outOf) || outOf <= 0 || value < 0 || value > outOf || !source.trim()) return null;\n const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 1 });\n return (\n <Tooltip content={source}>\n <span\n className={cn(\"kz-grade\", className)}\n tabIndex={0}\n style={{ ...style, [\"--kz-grade-tilt\" as string]: `${tilt}deg` }}\n {...props}\n >\n <span className=\"kz-grade-score\">\n {format.format(value)}\n <span className=\"kz-grade-out\">/{format.format(outOf)}</span>\n </span>\n {remark ? <span className=\"kz-grade-remark\">{remark}</span> : null}\n <span className=\"kz-sr-only\">\n {sourceLabel}: {source}\n </span>\n </span>\n </Tooltip>\n );\n}\n"
148
+ "content": "// Client (a tooltip). The teacher's red-ink grade of the Cahier (blocks.css): « 18/20 » and a short remark, stamped slightly\n// askew. A grade is a fact, never a decoration: `value` and `source` are required, the host passes a measured value (test\n// coverage, Lighthouse, a bundle size) and says where it comes from, which the tooltip and the screen reader both read. A value\n// that is not a finite number within 0 and `outOf`, or a missing source, renders nothing — never a made-up score.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Tooltip } from \"../tooltip/tooltip\";\n\nexport type GradeStampProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> & {\n /** The measured grade, from `0` to `outOf`. Never invented: it comes from the host's data. */\n value: number;\n /** The scale. @default 20 */\n outOf?: number;\n /** The remark in the margin, written like a teacher (`Très bien, continue`). */\n remark?: React.ReactNode;\n /** Where the number comes from (`Vitest coverage, 2026-10-23`): shown in the tooltip and read by assistive technology. */\n source: string;\n /** The word before the source for assistive technology. @default \"Source\" */\n sourceLabel?: string;\n /** The locale of the number (`17,5` in French). @default \"en\" */\n locale?: string;\n /** The tilt in degrees. @default -4 */\n tilt?: number;\n};\n\n/** A teacher's red-ink grade, `18/20` with a remark, only from real data: its source is in a tooltip. */\nexport function GradeStamp({ value, outOf = 20, remark, source, sourceLabel = \"Source\", locale = \"en\", tilt = -4, className, style, ...props }: Readonly<GradeStampProps>) {\n if (!Number.isFinite(value) || !Number.isFinite(outOf) || outOf <= 0 || value < 0 || value > outOf || !source.trim()) return null;\n const format = new Intl.NumberFormat(locale, { maximumFractionDigits: 1 });\n return (\n <Tooltip content={source}>\n <span\n className={cn(\"kz-grade\", className)}\n tabIndex={0}\n style={{ ...style, [\"--kz-grade-tilt\" as string]: `${tilt}deg` }}\n {...props}\n >\n <span className=\"kz-grade-score\">\n {format.format(value)}\n <span className=\"kz-grade-out\">/{format.format(outOf)}</span>\n </span>\n {remark ? <span className=\"kz-grade-remark\">{remark}</span> : null}\n <span className=\"kz-sr-only\">\n {sourceLabel}: {source}\n </span>\n </span>\n </Tooltip>\n );\n}\n"
149
149
  },
150
150
  {
151
151
  "path": "grade-stamp/index.ts",
@@ -134,7 +134,7 @@
134
134
  "files": [
135
135
  {
136
136
  "path": "identity-card/identity-card.tsx",
137
- "content": "// Client (its QR code copies). The identity of a business, a person or an organisation at the top of a sheet: the mark, the name\n// and what it is called, chips for its status and its registration number, and a QR code that hands the contact to a phone.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { QrCode } from \"../qr-code/qr-code\";\n\nexport interface IdentityCardQr {\n /** The text to encode: a vCard (`vCard(fields)` of `@krizaka/ui/qr-code`), an address. */\n value: string;\n /** What the code is, for a screen reader (“Contact card: scan to add the business to your phone”), passed translated. */\n label: string;\n /** One line under the code (“Scan to add the contact”), passed translated. */\n lead?: React.ReactNode;\n /** The words of the copy action (“Copy the vCard”); without them the code has no copy button. */\n copyLabel?: string;\n copiedLabel?: string;\n /** The side of the tile, in px. @default 132 */\n size?: number;\n}\n\nexport type IdentityCardProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The mark: a logo, an avatar. Decorative — the name carries the meaning. */\n mark: React.ReactNode;\n /** A small line above the name (“Business card”), passed translated. */\n eyebrow?: React.ReactNode;\n /** The name: the legal name of the business, the person's name. It is the card's heading. */\n name: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h2\"\n */\n nameAs?: \"h1\" | \"h2\" | \"h3\" | \"p\";\n /** What it is called day to day, its legal form: “Salon Cèdre & Ciseaux · Incorporated”. */\n subtitle?: React.ReactNode;\n /** Under the subtitle, in a row that wraps: a status chip, the registration number as a mono chip, the city. */\n chips?: React.ReactNode;\n /** A QR code at the end (under the text on a phone): the contact as a phone can read it. */\n qr?: IdentityCardQr;\n};\n\n/** The identity of a business or a person: mark, name, subtitle, chips and a contact QR code. Wraps to one column on a phone. */\nexport function IdentityCard({ mark, eyebrow, name, nameAs: Name = \"h2\", subtitle, chips, qr, className, ...props }: IdentityCardProps) {\n return (\n <section data-slot=\"identity-card\" className={cn(\"flex flex-wrap items-center justify-between gap-6 rounded-lg border border-border-default bg-surface-1 p-5 text-fg sm:p-6\", className)} {...props}>\n <div className=\"flex min-w-0 flex-1 items-center gap-4 sm:gap-5\">\n <div aria-hidden=\"true\" className=\"shrink-0\">{mark}</div>\n <div className=\"min-w-0\">\n {eyebrow ? <p className=\"font-mono text-xs text-fg-secondary\">{eyebrow}</p> : null}\n <Name className=\"font-display text-2xl font-bold text-fg sm:text-3xl [overflow-wrap:anywhere]\">{name}</Name>\n {subtitle ? <p className=\"mt-1 text-sm text-fg-secondary\">{subtitle}</p> : null}\n {chips ? <div className=\"mt-4 flex flex-wrap items-center gap-2\">{chips}</div> : null}\n </div>\n </div>\n {qr ? (\n <div className=\"flex flex-col items-center gap-2\">\n <QrCode value={qr.value} label={qr.label} size={qr.size ?? 132} copyLabel={qr.copyLabel} copiedLabel={qr.copiedLabel} />\n {qr.lead ? <p className=\"max-w-[11rem] text-center text-xs text-fg-secondary\">{qr.lead}</p> : null}\n </div>\n ) : null}\n </section>\n );\n}\n"
137
+ "content": "// Client (its QR code copies). The identity of a business, a person or an organisation at the top of a sheet: the mark, the name\n// and what it is called, chips for its status and its registration number, and a QR code that hands the contact to a phone.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { QrCode } from \"../qr-code/qr-code\";\n\nexport interface IdentityCardQr {\n /** The text to encode: a vCard (`vCard(fields)` of `@krizaka/ui/qr-code`), an address. */\n value: string;\n /** What the code is, for a screen reader (“Contact card: scan to add the business to your phone”), passed translated. */\n label: string;\n /** One line under the code (“Scan to add the contact”), passed translated. */\n lead?: React.ReactNode;\n /** The words of the copy action (“Copy the vCard”); without them the code has no copy button. */\n copyLabel?: string;\n copiedLabel?: string;\n /** The side of the tile, in px. @default 132 */\n size?: number;\n}\n\nexport type IdentityCardProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The mark: a logo, an avatar. Decorative — the name carries the meaning. */\n mark: React.ReactNode;\n /** A small line above the name (“Business card”), passed translated. */\n eyebrow?: React.ReactNode;\n /** The name: the legal name of the business, the person's name. It is the card's heading. */\n name: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h2\"\n */\n nameAs?: \"h1\" | \"h2\" | \"h3\" | \"p\";\n /** What it is called day to day, its legal form: “Salon Cèdre & Ciseaux · Incorporated”. */\n subtitle?: React.ReactNode;\n /** Under the subtitle, in a row that wraps: a status chip, the registration number as a mono chip, the city. */\n chips?: React.ReactNode;\n /** A QR code at the end (under the text on a phone): the contact as a phone can read it. */\n qr?: IdentityCardQr;\n};\n\n/** The identity of a business or a person: mark, name, subtitle, chips and a contact QR code. Wraps to one column on a phone. */\nexport function IdentityCard({ mark, eyebrow, name, nameAs: Name = \"h2\", subtitle, chips, qr, className, ...props }: Readonly<IdentityCardProps>) {\n return (\n <section data-slot=\"identity-card\" className={cn(\"flex flex-wrap items-center justify-between gap-6 rounded-lg border border-border-default bg-surface-1 p-5 text-fg sm:p-6\", className)} {...props}>\n <div className=\"flex min-w-0 flex-1 items-center gap-4 sm:gap-5\">\n <div aria-hidden=\"true\" className=\"shrink-0\">{mark}</div>\n <div className=\"min-w-0\">\n {eyebrow ? <p className=\"font-mono text-xs text-fg-secondary\">{eyebrow}</p> : null}\n <Name className=\"font-display text-2xl font-bold text-fg sm:text-3xl [overflow-wrap:anywhere]\">{name}</Name>\n {subtitle ? <p className=\"mt-1 text-sm text-fg-secondary\">{subtitle}</p> : null}\n {chips ? <div className=\"mt-4 flex flex-wrap items-center gap-2\">{chips}</div> : null}\n </div>\n </div>\n {qr ? (\n <div className=\"flex flex-col items-center gap-2\">\n <QrCode value={qr.value} label={qr.label} size={qr.size ?? 132} copyLabel={qr.copyLabel} copiedLabel={qr.copiedLabel} />\n {qr.lead ? <p className=\"max-w-[11rem] text-center text-xs text-fg-secondary\">{qr.lead}</p> : null}\n </div>\n ) : null}\n </section>\n );\n}\n"
138
138
  },
139
139
  {
140
140
  "path": "identity-card/index.ts",
@@ -206,7 +206,7 @@
206
206
  },
207
207
  {
208
208
  "path": "image-cropper/image-cropper.tsx",
209
- "content": "// Client. A fixed frame (a profile picture's square, a vertical 9:16, a banner) over a picture or a video the person\n// drags and zooms to choose what stays in. The value is a focus point (0–1 on each axis) and a zoom — independent of\n// the screen, the same on the server — and `cropRect` turns it into pixels of the source. Keyboard: the frame takes the\n// focus, the arrows move (Shift: faster), + / − zoom; the zoom is also a slider. No motion but the person's own.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { clamp } from \"../media\";\nimport { Slider } from \"../slider\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const imageCropper = tv({\n slots: {\n root: \"flex w-full flex-col gap-3\",\n frame:\n \"relative w-full cursor-grab touch-none overflow-hidden rounded-xl bg-media active:cursor-grabbing \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0\",\n media: \"pointer-events-none absolute max-w-none select-none\",\n grid:\n \"pointer-events-none absolute inset-0 rounded-xl border-2 border-fg-on-media/80 \" +\n \"bg-[linear-gradient(to_right,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%),linear-gradient(to_bottom,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%)] opacity-40\",\n round: \"pointer-events-none absolute inset-0 rounded-full shadow-[0_0_0_9999px_var(--kz-scrim-strong)]\",\n },\n});\n\n/** Where the frame looks: the focus point (0–1 from the left and the top of the source) and the zoom (1 = covers). */\nexport type CropValue = { x: number; y: number; zoom: number };\n\n/**\n * The crop in pixels of the source: what to cut from an image of `width` × `height` for a frame of `aspect`.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function cropRect(value: CropValue, source: { width: number; height: number }, aspect: number) {\n const mediaAspect = source.width / source.height;\n const width = (mediaAspect > aspect ? source.height * aspect : source.width) / value.zoom;\n const height = width / aspect;\n const x = clamp(value.x * source.width - width / 2, 0, source.width - width);\n const y = clamp(value.y * source.height - height / 2, 0, source.height - height);\n return { x: Math.round(x), y: Math.round(y), width: Math.round(width), height: Math.round(height) };\n}\n\nexport type ImageCropperLabels = {\n /** The frame's accessible name (\"Crop area\"). */\n frame: string;\n /** How to use it with the keyboard, read with the frame (\"Use the arrow keys to move the picture, + and − to zoom.\"). */\n instructions: string;\n /** The zoom slider (\"Zoom\"). */\n zoom: string;\n};\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const imageCropperLabels: ImageCropperLabels = {\n frame: \"Crop area\",\n instructions: \"Drag or use the arrow keys to move the picture, + and − to zoom.\",\n zoom: \"Zoom\",\n};\n\nexport type ImageCropperProps = {\n /** The picture to crop. Or `children`: a `<video>` (with the class it is given through `mediaClassName`). */\n src?: string;\n /** The picture's alternative text, passed translated (empty when the frame's name says enough). */\n alt?: string;\n /** A media element instead of `src` — a `<video>` to choose the frame of a clip. Its natural size is in `naturalSize`. */\n children?: React.ReactElement<{ className?: string; style?: React.CSSProperties }>;\n /** The source's size when `children` is a video: `{ width: video.videoWidth, height: video.videoHeight }`. */\n naturalSize?: { width: number; height: number };\n /** The frame's width / height: 1 (a square), 9 / 16 (vertical), 3 (a banner). */\n aspect: number;\n /** A round mask over the square frame (a profile picture). */\n round?: boolean;\n /** The crop (controlled). */\n value?: CropValue;\n /** The crop at first, uncontrolled. Default: centred, no zoom. */\n defaultValue?: CropValue;\n /** Called on every move. */\n onValueChange?: (value: CropValue) => void;\n /** The largest zoom. Default 4. */\n maxZoom?: number;\n /** Shows the zoom slider under the frame. Default `true`. */\n showZoom?: boolean;\n /** The words, passed translated; English by default. */\n labels?: Partial<ImageCropperLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/**\n * Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function ImageCropper({\n src,\n alt = \"\",\n children,\n naturalSize,\n aspect,\n round,\n value: valueProp,\n defaultValue = { x: 0.5, y: 0.5, zoom: 1 },\n onValueChange,\n maxZoom = 4,\n showZoom = true,\n labels: given,\n className,\n}: ImageCropperProps) {\n warnDeprecated(\"image-cropper\");\n const labels = { ...imageCropperLabels, ...given };\n const s = imageCropper();\n const frame = React.useRef<HTMLDivElement>(null);\n const drag = React.useRef<{ x: number; y: number; from: CropValue } | null>(null);\n const [inner, setInner] = React.useState(defaultValue);\n const [loaded, setLoaded] = React.useState<{ width: number; height: number } | null>(null);\n const value = valueProp ?? inner;\n const id = React.useId();\n const size = naturalSize ?? loaded;\n const mediaAspect = size ? size.width / size.height : aspect;\n\n // The media's box, in % of the frame: it covers the frame at zoom 1.\n const widthPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * value.zoom;\n const heightPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * value.zoom;\n // The focus point's limits: the media never leaves a gap in the frame.\n const halfX = 50 / widthPct;\n const halfY = 50 / heightPct;\n\n const set = (next: CropValue) => {\n const zoom = clamp(next.zoom, 1, maxZoom);\n const wPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * zoom;\n const hPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * zoom;\n const fixed = { x: clamp(next.x, 50 / wPct, 1 - 50 / wPct), y: clamp(next.y, 50 / hPct, 1 - 50 / hPct), zoom };\n if (!valueProp) setInner(fixed);\n onValueChange?.(fixed);\n };\n\n const x = clamp(value.x, halfX, 1 - halfX);\n const y = clamp(value.y, halfY, 1 - halfY);\n // Rounded: float noise (5e-15) is not a length every parser takes, and a dropped `top` is a gap.\n const pct = (n: number) => `${Math.round(n * 1e4) / 1e4}%`;\n const style: React.CSSProperties = {\n width: pct(widthPct),\n height: pct(heightPct),\n left: pct(50 - x * widthPct),\n top: pct(50 - y * heightPct),\n };\n\n return (\n <div className={s.root({ className })}>\n <div\n ref={frame}\n role=\"group\"\n tabIndex={0}\n aria-label={labels.frame}\n aria-describedby={`${id}-help`}\n className={s.frame()}\n style={{ aspectRatio: String(aspect) }}\n onPointerDown={(event) => {\n frame.current?.setPointerCapture?.(event.pointerId);\n drag.current = { x: event.clientX, y: event.clientY, from: { x, y, zoom: value.zoom } };\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n const box = frame.current?.getBoundingClientRect();\n if (!start || !box?.width) return;\n set({\n x: start.from.x - (event.clientX - start.x) / ((box.width * widthPct) / 100),\n y: start.from.y - (event.clientY - start.y) / ((box.height * heightPct) / 100),\n zoom: value.zoom,\n });\n }}\n onPointerUp={() => {\n drag.current = null;\n }}\n onWheel={(event) => {\n if (!event.ctrlKey && !event.metaKey) return;\n event.preventDefault();\n set({ x, y, zoom: value.zoom - event.deltaY * 0.01 });\n }}\n onKeyDown={(event) => {\n const nudge = event.shiftKey ? 0.1 : 0.02;\n const moves: Record<string, CropValue> = {\n ArrowLeft: { x: x - nudge, y, zoom: value.zoom },\n ArrowRight: { x: x + nudge, y, zoom: value.zoom },\n ArrowUp: { x, y: y - nudge, zoom: value.zoom },\n ArrowDown: { x, y: y + nudge, zoom: value.zoom },\n \"+\": { x, y, zoom: value.zoom + 0.1 },\n \"=\": { x, y, zoom: value.zoom + 0.1 },\n \"-\": { x, y, zoom: value.zoom - 0.1 },\n };\n const next = moves[event.key];\n if (!next) return;\n event.preventDefault();\n set(next);\n }}\n >\n {children ? (\n React.cloneElement(children, { className: s.media({ className: children.props.className }), style: { ...children.props.style, ...style } })\n ) : src ? (\n <img\n src={src}\n alt={alt}\n draggable={false}\n className={s.media()}\n style={style}\n // A picture already in the cache (or rendered on the server) is complete before React attaches: no load event.\n ref={(img) => {\n if (img?.complete && img.naturalWidth > 0) setLoaded((was) => (was?.width === img.naturalWidth && was.height === img.naturalHeight ? was : { width: img.naturalWidth, height: img.naturalHeight }));\n }}\n onLoad={(event) => setLoaded({ width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight })}\n />\n ) : null}\n <span className={round ? s.round() : s.grid()} aria-hidden />\n <span id={`${id}-help`} className=\"sr-only\">\n {labels.instructions}\n </span>\n </div>\n {showZoom && (\n <Slider\n label={labels.zoom}\n min={1}\n max={maxZoom}\n step={0.05}\n value={value.zoom}\n onValueChange={(zoom) => set({ x, y, zoom })}\n formatValue={(v) => `${Math.round(v * 100)} %`}\n />\n )}\n </div>\n );\n}\n"
209
+ "content": "// Client. A fixed frame (a profile picture's square, a vertical 9:16, a banner) over a picture or a video the person\n// drags and zooms to choose what stays in. The value is a focus point (0–1 on each axis) and a zoom — independent of\n// the screen, the same on the server — and `cropRect` turns it into pixels of the source. Keyboard: the frame takes the\n// focus, the arrows move (Shift: faster), + / − zoom; the zoom is also a slider. No motion but the person's own.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { clamp } from \"../media\";\nimport { Slider } from \"../slider\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const imageCropper = tv({\n slots: {\n root: \"flex w-full flex-col gap-3\",\n frame:\n \"relative w-full cursor-grab touch-none overflow-hidden rounded-xl bg-media active:cursor-grabbing \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0\",\n media: \"pointer-events-none absolute max-w-none select-none\",\n grid:\n \"pointer-events-none absolute inset-0 rounded-xl border-2 border-fg-on-media/80 \" +\n \"bg-[linear-gradient(to_right,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%),linear-gradient(to_bottom,transparent_33.2%,var(--kz-text-on-media)_33.3%,transparent_33.5%,transparent_66.5%,var(--kz-text-on-media)_66.6%,transparent_66.8%)] opacity-40\",\n round: \"pointer-events-none absolute inset-0 rounded-full shadow-[0_0_0_9999px_var(--kz-scrim-strong)]\",\n },\n});\n\n/** Where the frame looks: the focus point (0–1 from the left and the top of the source) and the zoom (1 = covers). */\nexport type CropValue = { x: number; y: number; zoom: number };\n\n/**\n * The crop in pixels of the source: what to cut from an image of `width` × `height` for a frame of `aspect`.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function cropRect(value: CropValue, source: { width: number; height: number }, aspect: number) {\n const mediaAspect = source.width / source.height;\n const width = (mediaAspect > aspect ? source.height * aspect : source.width) / value.zoom;\n const height = width / aspect;\n const x = clamp(value.x * source.width - width / 2, 0, source.width - width);\n const y = clamp(value.y * source.height - height / 2, 0, source.height - height);\n return { x: Math.round(x), y: Math.round(y), width: Math.round(width), height: Math.round(height) };\n}\n\nexport type ImageCropperLabels = {\n /** The frame's accessible name (\"Crop area\"). */\n frame: string;\n /** How to use it with the keyboard, read with the frame (\"Use the arrow keys to move the picture, + and − to zoom.\"). */\n instructions: string;\n /** The zoom slider (\"Zoom\"). */\n zoom: string;\n};\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const imageCropperLabels: ImageCropperLabels = {\n frame: \"Crop area\",\n instructions: \"Drag or use the arrow keys to move the picture, + and − to zoom.\",\n zoom: \"Zoom\",\n};\n\nexport type ImageCropperProps = {\n /** The picture to crop. Or `children`: a `<video>` (with the class it is given through `mediaClassName`). */\n src?: string;\n /** The picture's alternative text, passed translated (empty when the frame's name says enough). */\n alt?: string;\n /** A media element instead of `src` — a `<video>` to choose the frame of a clip. Its natural size is in `naturalSize`. */\n children?: React.ReactElement<{ className?: string; style?: React.CSSProperties }>;\n /** The source's size when `children` is a video: `{ width: video.videoWidth, height: video.videoHeight }`. */\n naturalSize?: { width: number; height: number };\n /** The frame's width / height: 1 (a square), 9 / 16 (vertical), 3 (a banner). */\n aspect: number;\n /** A round mask over the square frame (a profile picture). */\n round?: boolean;\n /** The crop (controlled). */\n value?: CropValue;\n /** The crop at first, uncontrolled. Default: centred, no zoom. */\n defaultValue?: CropValue;\n /** Called on every move. */\n onValueChange?: (value: CropValue) => void;\n /** The largest zoom. Default 4. */\n maxZoom?: number;\n /** Shows the zoom slider under the frame. Default `true`. */\n showZoom?: boolean;\n /** The words, passed translated; English by default. */\n labels?: Partial<ImageCropperLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/**\n * Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function ImageCropper({\n src,\n alt = \"\",\n children,\n naturalSize,\n aspect,\n round,\n value: valueProp,\n defaultValue = { x: 0.5, y: 0.5, zoom: 1 },\n onValueChange,\n maxZoom = 4,\n showZoom = true,\n labels: given,\n className,\n}: Readonly<ImageCropperProps>) {\n warnDeprecated(\"image-cropper\");\n const labels = { ...imageCropperLabels, ...given };\n const s = imageCropper();\n const frame = React.useRef<HTMLDivElement>(null);\n const drag = React.useRef<{ x: number; y: number; from: CropValue } | null>(null);\n const [inner, setInner] = React.useState(defaultValue);\n const [loaded, setLoaded] = React.useState<{ width: number; height: number } | null>(null);\n const value = valueProp ?? inner;\n const id = React.useId();\n const size = naturalSize ?? loaded;\n const mediaAspect = size ? size.width / size.height : aspect;\n\n // The media's box, in % of the frame: it covers the frame at zoom 1.\n const widthPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * value.zoom;\n const heightPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * value.zoom;\n // The focus point's limits: the media never leaves a gap in the frame.\n const halfX = 50 / widthPct;\n const halfY = 50 / heightPct;\n\n const set = (next: CropValue) => {\n const zoom = clamp(next.zoom, 1, maxZoom);\n const wPct = (mediaAspect > aspect ? (mediaAspect / aspect) * 100 : 100) * zoom;\n const hPct = (mediaAspect > aspect ? 100 : (aspect / mediaAspect) * 100) * zoom;\n const fixed = { x: clamp(next.x, 50 / wPct, 1 - 50 / wPct), y: clamp(next.y, 50 / hPct, 1 - 50 / hPct), zoom };\n if (!valueProp) setInner(fixed);\n onValueChange?.(fixed);\n };\n\n const x = clamp(value.x, halfX, 1 - halfX);\n const y = clamp(value.y, halfY, 1 - halfY);\n // Rounded: float noise (5e-15) is not a length every parser takes, and a dropped `top` is a gap.\n const pct = (n: number) => `${Math.round(n * 1e4) / 1e4}%`;\n const style: React.CSSProperties = {\n width: pct(widthPct),\n height: pct(heightPct),\n left: pct(50 - x * widthPct),\n top: pct(50 - y * heightPct),\n };\n\n return (\n <div className={s.root({ className })}>\n <div\n ref={frame}\n role=\"group\"\n tabIndex={0}\n aria-label={labels.frame}\n aria-describedby={`${id}-help`}\n className={s.frame()}\n style={{ aspectRatio: String(aspect) }}\n onPointerDown={(event) => {\n frame.current?.setPointerCapture?.(event.pointerId);\n drag.current = { x: event.clientX, y: event.clientY, from: { x, y, zoom: value.zoom } };\n }}\n onPointerMove={(event) => {\n const start = drag.current;\n const box = frame.current?.getBoundingClientRect();\n if (!start || !box?.width) return;\n set({\n x: start.from.x - (event.clientX - start.x) / ((box.width * widthPct) / 100),\n y: start.from.y - (event.clientY - start.y) / ((box.height * heightPct) / 100),\n zoom: value.zoom,\n });\n }}\n onPointerUp={() => {\n drag.current = null;\n }}\n onWheel={(event) => {\n if (!event.ctrlKey && !event.metaKey) return;\n event.preventDefault();\n set({ x, y, zoom: value.zoom - event.deltaY * 0.01 });\n }}\n onKeyDown={(event) => {\n const nudge = event.shiftKey ? 0.1 : 0.02;\n const moves: Record<string, CropValue> = {\n ArrowLeft: { x: x - nudge, y, zoom: value.zoom },\n ArrowRight: { x: x + nudge, y, zoom: value.zoom },\n ArrowUp: { x, y: y - nudge, zoom: value.zoom },\n ArrowDown: { x, y: y + nudge, zoom: value.zoom },\n \"+\": { x, y, zoom: value.zoom + 0.1 },\n \"=\": { x, y, zoom: value.zoom + 0.1 },\n \"-\": { x, y, zoom: value.zoom - 0.1 },\n };\n const next = moves[event.key];\n if (!next) return;\n event.preventDefault();\n set(next);\n }}\n >\n {children ? (\n React.cloneElement(children, { className: s.media({ className: children.props.className }), style: { ...children.props.style, ...style } })\n ) : src ? (\n <img\n src={src}\n alt={alt}\n draggable={false}\n className={s.media()}\n style={style}\n // A picture already in the cache (or rendered on the server) is complete before React attaches: no load event.\n ref={(img) => {\n if (img?.complete && img.naturalWidth > 0) setLoaded((was) => (was?.width === img.naturalWidth && was.height === img.naturalHeight ? was : { width: img.naturalWidth, height: img.naturalHeight }));\n }}\n onLoad={(event) => setLoaded({ width: event.currentTarget.naturalWidth, height: event.currentTarget.naturalHeight })}\n />\n ) : null}\n <span className={round ? s.round() : s.grid()} aria-hidden />\n <span id={`${id}-help`} className=\"sr-only\">\n {labels.instructions}\n </span>\n </div>\n {showZoom && (\n <Slider\n label={labels.zoom}\n min={1}\n max={maxZoom}\n step={0.05}\n value={value.zoom}\n onValueChange={(zoom) => set({ x, y, zoom })}\n formatValue={(v) => `${Math.round(v * 100)} %`}\n />\n )}\n </div>\n );\n}\n"
210
210
  },
211
211
  {
212
212
  "path": "image-cropper/index.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krizaka/ui",
3
- "version": "4.7.0",
3
+ "version": "4.7.1",
4
4
  "templatePurposes": {
5
5
  "convince": {
6
6
  "title": "Convince",
@@ -1013,7 +1013,7 @@
1013
1013
  "native": 0
1014
1014
  },
1015
1015
  "dependencies": [
1016
- "@krizaka/tokens@^4.7.0"
1016
+ "@krizaka/tokens@^4.7.1"
1017
1017
  ],
1018
1018
  "registryDependencies": [
1019
1019
  "account-menu",
@@ -4077,7 +4077,7 @@
4077
4077
  "native": 2
4078
4078
  },
4079
4079
  "dependencies": [
4080
- "@krizaka/tokens@^4.7.0",
4080
+ "@krizaka/tokens@^4.7.1",
4081
4081
  "@protomaps/basemaps@5.7.2",
4082
4082
  "tailwind-variants@^3.3.1"
4083
4083
  ],
@@ -4490,7 +4490,7 @@
4490
4490
  "native": 0
4491
4491
  },
4492
4492
  "dependencies": [
4493
- "@krizaka/tokens@^4.7.0",
4493
+ "@krizaka/tokens@^4.7.1",
4494
4494
  "radix-ui@^1.8.1",
4495
4495
  "tailwind-variants@^3.3.1"
4496
4496
  ],
@@ -5358,7 +5358,7 @@
5358
5358
  "native": 0
5359
5359
  },
5360
5360
  "dependencies": [
5361
- "@krizaka/tokens@^4.7.0",
5361
+ "@krizaka/tokens@^4.7.1",
5362
5362
  "radix-ui@^1.8.1",
5363
5363
  "tailwind-variants@^3.3.1"
5364
5364
  ],
@@ -5805,7 +5805,7 @@
5805
5805
  "native": 0
5806
5806
  },
5807
5807
  "dependencies": [
5808
- "@krizaka/tokens@^4.7.0",
5808
+ "@krizaka/tokens@^4.7.1",
5809
5809
  "zod@^4.6.7"
5810
5810
  ],
5811
5811
  "registryDependencies": [
@@ -6025,8 +6025,8 @@
6025
6025
  "native": 0
6026
6026
  },
6027
6027
  "dependencies": [
6028
- "@krizaka/icons@^0.10.0",
6029
- "@krizaka/tokens@^4.7.0",
6028
+ "@krizaka/icons@^0.10.1",
6029
+ "@krizaka/tokens@^4.7.1",
6030
6030
  "radix-ui@^1.8.1",
6031
6031
  "tailwind-variants@^3.3.1"
6032
6032
  ],
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "path": "kanban/kanban.tsx",
180
- "content": "// Client (the drag, the keyboard move, the announcements). Cards in columns that move by drag and drop — and by the\n// keyboard: Space picks a card up, the arrows carry it (← → between columns, ↑ ↓ within one), Space drops it, Esc puts it\n// back. Every move is announced in words. The app owns the data: `onMove` says where a card went.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const kanban = tv({\n slots: {\n root: \"flex w-full gap-3 overflow-x-auto pb-2\",\n column: \"flex w-72 shrink-0 flex-col rounded-xl border border-border-default bg-surface-1 data-[over]:border-accent data-[over]:bg-accent-soft/40\",\n header: \"flex items-center gap-2 px-3 pb-2 pt-3\",\n title: \"min-w-0 flex-1 truncate text-sm font-semibold text-fg\",\n count: \"rounded-sm bg-surface-3 px-2 text-xs font-semibold tabular-nums text-fg-secondary data-[over-limit]:bg-danger data-[over-limit]:text-on-accent\",\n list: \"m-0 flex min-h-16 list-none flex-col gap-2 p-2 pt-0\",\n card:\n \"cursor-grab rounded-lg border border-border-default bg-surface-0 p-3 text-sm text-fg shadow-xs outline-hidden transition-shadow \" +\n \"focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing data-[grabbed]:ring-2 data-[grabbed]:ring-accent data-[grabbed]:shadow-lg data-[dragging]:opacity-40\",\n empty: \"rounded-lg border border-dashed border-border-default px-3 py-4 text-center text-xs text-fg-secondary\",\n },\n});\n\nexport type KanbanColumn = {\n /** A stable id. */\n id: string;\n /** Its name — passed translated (“To review”). */\n title: string;\n /** The most cards it should hold: the count turns to danger past it. */\n limit?: number;\n};\n\nexport type KanbanMove = {\n /** The card moved. */\n cardId: string;\n /** Where it came from. */\n from: string;\n /** The column it went to. */\n to: string;\n /** Its position in that column (0 = top). */\n index: number;\n};\n\nexport type KanbanLabels = {\n /** The hint read on a card: how to move it with the keyboard. */\n instructions: string;\n /** Announced when a card is picked up: `(card, column) => …`. */\n grabbed: (card: string, column: string) => string;\n /** Announced as it moves: `(card, column, position, total) => …`. */\n moved: (card: string, column: string, position: number, total: number) => string;\n /** Announced when it is dropped. */\n dropped: (card: string, column: string, position: number) => string;\n /** Announced when the move is cancelled. */\n cancelled: (card: string) => string;\n /** A column without card (“No card”). */\n empty: string;\n};\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const kanbanLabels: KanbanLabels = {\n instructions: \"Press Space to pick it up, the arrow keys to move it, Space to drop it, Escape to cancel.\",\n grabbed: (card, column) => `${card} picked up, in ${column}.`,\n moved: (card, column, position, total) => `${card}: ${column}, position ${position} of ${total}.`,\n dropped: (card, column, position) => `${card} dropped in ${column}, position ${position}.`,\n cancelled: (card) => `Move of ${card} cancelled.`,\n empty: \"No card\",\n};\n\nexport type KanbanProps<T> = {\n /** The columns, in order. */\n columns: readonly KanbanColumn[];\n /** The cards, in their order within each column. */\n cards: readonly T[];\n /** A card's id. */\n getId: (card: T) => string;\n /** A card's column. */\n getColumn: (card: T) => string;\n /** A card's name, for the announcements. */\n getTitle: (card: T) => string;\n /** What a card shows. */\n renderCard: (card: T) => React.ReactNode;\n /** Called when a card is dropped somewhere new: update the data here. */\n onMove: (move: KanbanMove) => void;\n /** The board's accessible name (“Moderation queue”). */\n \"aria-label\": string;\n /** The words, passed translated; English by default. */\n labels?: Partial<KanbanLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\ntype Placement = { column: string; index: number };\n\n/**\n * A board of cards in columns — a moderation queue, a release plan: drag and drop with the pointer, or Space and the\n * arrow keys, every step announced. Column limits show in the counts.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function Kanban<T>({ columns, cards, getId, getColumn, getTitle, renderCard, onMove, \"aria-label\": label, labels: words, className }: KanbanProps<T>) {\n warnDeprecated(\"kanban\");\n const labels = { ...kanbanLabels, ...words };\n const s = kanban();\n const instructionsId = React.useId();\n const [grab, setGrab] = React.useState<{ id: string; origin: Placement; at: Placement } | null>(null);\n const [dragging, setDragging] = React.useState<string | null>(null);\n const [over, setOver] = React.useState<Placement | null>(null);\n const [message, setMessage] = React.useState(\"\");\n const refs = React.useRef(new Map<string, HTMLLIElement>());\n const byColumn = (column: string, without?: string) => cards.filter((c) => getColumn(c) === column && getId(c) !== without);\n const titleOf = (id: string) => {\n const card = cards.find((c) => getId(c) === id);\n return card ? getTitle(card) : id;\n };\n const columnTitle = (id: string) => columns.find((c) => c.id === id)?.title ?? id;\n const placementOf = (id: string): Placement => {\n const card = cards.find((c) => getId(c) === id)!;\n const column = getColumn(card);\n return { column, index: byColumn(column).findIndex((c) => getId(c) === id) };\n };\n const commit = (id: string, from: Placement, to: Placement) => {\n if (from.column !== to.column || from.index !== to.index) onMove({ cardId: id, from: from.column, to: to.column, index: to.index });\n };\n // The cards of a column as shown, with the grabbed card at its keyboard position.\n const shown = (column: string) => {\n const list = byColumn(column, grab?.id);\n if (grab && grab.at.column === column) {\n const card = cards.find((c) => getId(c) === grab.id);\n if (card) list.splice(grab.at.index, 0, card);\n }\n return list;\n };\n React.useEffect(() => {\n if (grab) refs.current.get(grab.id)?.focus();\n }, [grab]);\n\n const onKeyDown = (event: React.KeyboardEvent, id: string) => {\n const title = titleOf(id);\n if (!grab) {\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n const origin = placementOf(id);\n setGrab({ id, origin, at: origin });\n setMessage(labels.grabbed(title, columnTitle(origin.column)));\n }\n return;\n }\n const { at, origin } = grab;\n const columnIndex = columns.findIndex((c) => c.id === at.column);\n let next: Placement | null = null;\n if (event.key === \"ArrowLeft\" && columnIndex > 0) next = { column: columns[columnIndex - 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex - 1]!.id, id).length) };\n if (event.key === \"ArrowRight\" && columnIndex < columns.length - 1) next = { column: columns[columnIndex + 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex + 1]!.id, id).length) };\n if (event.key === \"ArrowUp\" && at.index > 0) next = { ...at, index: at.index - 1 };\n if (event.key === \"ArrowDown\" && at.index < byColumn(at.column, id).length) next = { ...at, index: at.index + 1 };\n if (next) {\n event.preventDefault();\n setGrab({ ...grab, at: next });\n setMessage(labels.moved(title, columnTitle(next.column), next.index + 1, byColumn(next.column, id).length + 1));\n return;\n }\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setGrab(null);\n commit(id, origin, at);\n setMessage(labels.dropped(title, columnTitle(at.column), at.index + 1));\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n setGrab(null);\n setMessage(labels.cancelled(title));\n }\n };\n\n const indexAt = (column: string, y: number) => {\n const list = byColumn(column, dragging ?? undefined);\n const i = list.findIndex((c) => {\n const box = refs.current.get(getId(c))?.getBoundingClientRect();\n return box ? y < box.top + box.height / 2 : false;\n });\n return i === -1 ? list.length : i;\n };\n\n return (\n <div role=\"group\" aria-label={label} className={s.root({ className })}>\n <p id={instructionsId} className=\"sr-only\">\n {labels.instructions}\n </p>\n <p className=\"sr-only\" aria-live=\"assertive\">\n {message}\n </p>\n {columns.map((column) => {\n const list = shown(column.id);\n const overLimit = column.limit !== undefined && list.length > column.limit;\n return (\n <section\n key={column.id}\n aria-label={column.title}\n data-over={over?.column === column.id || undefined}\n className={s.column()}\n onDragOver={(e) => {\n if (!dragging) return;\n e.preventDefault();\n setOver({ column: column.id, index: indexAt(column.id, e.clientY) });\n }}\n onDragLeave={(e) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOver(null);\n }}\n onDrop={(e) => {\n e.preventDefault();\n if (dragging) commit(dragging, placementOf(dragging), { column: column.id, index: indexAt(column.id, e.clientY) });\n setDragging(null);\n setOver(null);\n }}\n >\n <header className={s.header()}>\n <h3 className={s.title()}>{column.title}</h3>\n <span className={s.count()} data-over-limit={overLimit || undefined}>\n {column.limit !== undefined ? `${list.length}/${column.limit}` : list.length}\n </span>\n </header>\n <ul className={s.list()}>\n {list.length === 0 ? <li className={s.empty()}>{labels.empty}</li> : null}\n {list.map((card) => {\n const id = getId(card);\n return (\n <li\n key={id}\n ref={(el) => {\n if (el) refs.current.set(id, el);\n else refs.current.delete(id);\n }}\n tabIndex={0}\n draggable\n aria-describedby={instructionsId}\n aria-roledescription=\"card\"\n data-grabbed={grab?.id === id || undefined}\n data-dragging={dragging === id || undefined}\n className={s.card()}\n onKeyDown={(e) => onKeyDown(e, id)}\n onFocus={() => {\n // Tab to another card while one is carried: the carried one goes back.\n if (grab && grab.id !== id) {\n setMessage(labels.cancelled(titleOf(grab.id)));\n setGrab(null);\n }\n }}\n onDragStart={(e) => {\n e.dataTransfer.effectAllowed = \"move\";\n e.dataTransfer.setData(\"text/plain\", id);\n setDragging(id);\n }}\n onDragEnd={() => {\n setDragging(null);\n setOver(null);\n }}\n >\n {renderCard(card)}\n </li>\n );\n })}\n </ul>\n </section>\n );\n })}\n </div>\n );\n}\n"
180
+ "content": "// Client (the drag, the keyboard move, the announcements). Cards in columns that move by drag and drop — and by the\n// keyboard: Space picks a card up, the arrows carry it (← → between columns, ↑ ↓ within one), Space drops it, Esc puts it\n// back. Every move is announced in words. The app owns the data: `onMove` says where a card went.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { warnDeprecated } from \"../deprecated\";\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const kanban = tv({\n slots: {\n root: \"flex w-full gap-3 overflow-x-auto pb-2\",\n column: \"flex w-72 shrink-0 flex-col rounded-xl border border-border-default bg-surface-1 data-[over]:border-accent data-[over]:bg-accent-soft/40\",\n header: \"flex items-center gap-2 px-3 pb-2 pt-3\",\n title: \"min-w-0 flex-1 truncate text-sm font-semibold text-fg\",\n count: \"rounded-sm bg-surface-3 px-2 text-xs font-semibold tabular-nums text-fg-secondary data-[over-limit]:bg-danger data-[over-limit]:text-on-accent\",\n list: \"m-0 flex min-h-16 list-none flex-col gap-2 p-2 pt-0\",\n card:\n \"cursor-grab rounded-lg border border-border-default bg-surface-0 p-3 text-sm text-fg shadow-xs outline-hidden transition-shadow \" +\n \"focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing data-[grabbed]:ring-2 data-[grabbed]:ring-accent data-[grabbed]:shadow-lg data-[dragging]:opacity-40\",\n empty: \"rounded-lg border border-dashed border-border-default px-3 py-4 text-center text-xs text-fg-secondary\",\n },\n});\n\nexport type KanbanColumn = {\n /** A stable id. */\n id: string;\n /** Its name — passed translated (“To review”). */\n title: string;\n /** The most cards it should hold: the count turns to danger past it. */\n limit?: number;\n};\n\nexport type KanbanMove = {\n /** The card moved. */\n cardId: string;\n /** Where it came from. */\n from: string;\n /** The column it went to. */\n to: string;\n /** Its position in that column (0 = top). */\n index: number;\n};\n\nexport type KanbanLabels = {\n /** The hint read on a card: how to move it with the keyboard. */\n instructions: string;\n /** Announced when a card is picked up: `(card, column) => …`. */\n grabbed: (card: string, column: string) => string;\n /** Announced as it moves: `(card, column, position, total) => …`. */\n moved: (card: string, column: string, position: number, total: number) => string;\n /** Announced when it is dropped. */\n dropped: (card: string, column: string, position: number) => string;\n /** Announced when the move is cancelled. */\n cancelled: (card: string) => string;\n /** A column without card (“No card”). */\n empty: string;\n};\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const kanbanLabels: KanbanLabels = {\n instructions: \"Press Space to pick it up, the arrow keys to move it, Space to drop it, Escape to cancel.\",\n grabbed: (card, column) => `${card} picked up, in ${column}.`,\n moved: (card, column, position, total) => `${card}: ${column}, position ${position} of ${total}.`,\n dropped: (card, column, position) => `${card} dropped in ${column}, position ${position}.`,\n cancelled: (card) => `Move of ${card} cancelled.`,\n empty: \"No card\",\n};\n\nexport type KanbanProps<T> = {\n /** The columns, in order. */\n columns: readonly KanbanColumn[];\n /** The cards, in their order within each column. */\n cards: readonly T[];\n /** A card's id. */\n getId: (card: T) => string;\n /** A card's column. */\n getColumn: (card: T) => string;\n /** A card's name, for the announcements. */\n getTitle: (card: T) => string;\n /** What a card shows. */\n renderCard: (card: T) => React.ReactNode;\n /** Called when a card is dropped somewhere new: update the data here. */\n onMove: (move: KanbanMove) => void;\n /** The board's accessible name (“Moderation queue”). */\n \"aria-label\": string;\n /** The words, passed translated; English by default. */\n labels?: Partial<KanbanLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\ntype Placement = { column: string; index: number };\n\n/**\n * A board of cards in columns — a moderation queue, a release plan: drag and drop with the pointer, or Space and the\n * arrow keys, every step announced. Column limits show in the counts.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function Kanban<T>({ columns, cards, getId, getColumn, getTitle, renderCard, onMove, \"aria-label\": label, labels: words, className }: Readonly<KanbanProps<T>>) {\n warnDeprecated(\"kanban\");\n const labels = { ...kanbanLabels, ...words };\n const s = kanban();\n const instructionsId = React.useId();\n const [grab, setGrab] = React.useState<{ id: string; origin: Placement; at: Placement } | null>(null);\n const [dragging, setDragging] = React.useState<string | null>(null);\n const [over, setOver] = React.useState<Placement | null>(null);\n const [message, setMessage] = React.useState(\"\");\n const refs = React.useRef(new Map<string, HTMLLIElement>());\n const byColumn = (column: string, without?: string) => cards.filter((c) => getColumn(c) === column && getId(c) !== without);\n const titleOf = (id: string) => {\n const card = cards.find((c) => getId(c) === id);\n return card ? getTitle(card) : id;\n };\n const columnTitle = (id: string) => columns.find((c) => c.id === id)?.title ?? id;\n const placementOf = (id: string): Placement => {\n const card = cards.find((c) => getId(c) === id)!;\n const column = getColumn(card);\n return { column, index: byColumn(column).findIndex((c) => getId(c) === id) };\n };\n const commit = (id: string, from: Placement, to: Placement) => {\n if (from.column !== to.column || from.index !== to.index) onMove({ cardId: id, from: from.column, to: to.column, index: to.index });\n };\n // The cards of a column as shown, with the grabbed card at its keyboard position.\n const shown = (column: string) => {\n const list = byColumn(column, grab?.id);\n if (grab && grab.at.column === column) {\n const card = cards.find((c) => getId(c) === grab.id);\n if (card) list.splice(grab.at.index, 0, card);\n }\n return list;\n };\n React.useEffect(() => {\n if (grab) refs.current.get(grab.id)?.focus();\n }, [grab]);\n\n const onKeyDown = (event: React.KeyboardEvent, id: string) => {\n const title = titleOf(id);\n if (!grab) {\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n const origin = placementOf(id);\n setGrab({ id, origin, at: origin });\n setMessage(labels.grabbed(title, columnTitle(origin.column)));\n }\n return;\n }\n const { at, origin } = grab;\n const columnIndex = columns.findIndex((c) => c.id === at.column);\n let next: Placement | null = null;\n if (event.key === \"ArrowLeft\" && columnIndex > 0) next = { column: columns[columnIndex - 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex - 1]!.id, id).length) };\n if (event.key === \"ArrowRight\" && columnIndex < columns.length - 1) next = { column: columns[columnIndex + 1]!.id, index: Math.min(at.index, byColumn(columns[columnIndex + 1]!.id, id).length) };\n if (event.key === \"ArrowUp\" && at.index > 0) next = { ...at, index: at.index - 1 };\n if (event.key === \"ArrowDown\" && at.index < byColumn(at.column, id).length) next = { ...at, index: at.index + 1 };\n if (next) {\n event.preventDefault();\n setGrab({ ...grab, at: next });\n setMessage(labels.moved(title, columnTitle(next.column), next.index + 1, byColumn(next.column, id).length + 1));\n return;\n }\n if (event.key === \" \" || event.key === \"Enter\") {\n event.preventDefault();\n setGrab(null);\n commit(id, origin, at);\n setMessage(labels.dropped(title, columnTitle(at.column), at.index + 1));\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n setGrab(null);\n setMessage(labels.cancelled(title));\n }\n };\n\n const indexAt = (column: string, y: number) => {\n const list = byColumn(column, dragging ?? undefined);\n const i = list.findIndex((c) => {\n const box = refs.current.get(getId(c))?.getBoundingClientRect();\n return box ? y < box.top + box.height / 2 : false;\n });\n return i === -1 ? list.length : i;\n };\n\n return (\n <div role=\"group\" aria-label={label} className={s.root({ className })}>\n <p id={instructionsId} className=\"sr-only\">\n {labels.instructions}\n </p>\n <p className=\"sr-only\" aria-live=\"assertive\">\n {message}\n </p>\n {columns.map((column) => {\n const list = shown(column.id);\n const overLimit = column.limit !== undefined && list.length > column.limit;\n return (\n <section\n key={column.id}\n aria-label={column.title}\n data-over={over?.column === column.id || undefined}\n className={s.column()}\n onDragOver={(e) => {\n if (!dragging) return;\n e.preventDefault();\n setOver({ column: column.id, index: indexAt(column.id, e.clientY) });\n }}\n onDragLeave={(e) => {\n if (!e.currentTarget.contains(e.relatedTarget as Node | null)) setOver(null);\n }}\n onDrop={(e) => {\n e.preventDefault();\n if (dragging) commit(dragging, placementOf(dragging), { column: column.id, index: indexAt(column.id, e.clientY) });\n setDragging(null);\n setOver(null);\n }}\n >\n <header className={s.header()}>\n <h3 className={s.title()}>{column.title}</h3>\n <span className={s.count()} data-over-limit={overLimit || undefined}>\n {column.limit !== undefined ? `${list.length}/${column.limit}` : list.length}\n </span>\n </header>\n <ul className={s.list()}>\n {list.length === 0 ? <li className={s.empty()}>{labels.empty}</li> : null}\n {list.map((card) => {\n const id = getId(card);\n return (\n <li\n key={id}\n ref={(el) => {\n if (el) refs.current.set(id, el);\n else refs.current.delete(id);\n }}\n tabIndex={0}\n draggable\n aria-describedby={instructionsId}\n aria-roledescription=\"card\"\n data-grabbed={grab?.id === id || undefined}\n data-dragging={dragging === id || undefined}\n className={s.card()}\n onKeyDown={(e) => onKeyDown(e, id)}\n onFocus={() => {\n // Tab to another card while one is carried: the carried one goes back.\n if (grab && grab.id !== id) {\n setMessage(labels.cancelled(titleOf(grab.id)));\n setGrab(null);\n }\n }}\n onDragStart={(e) => {\n e.dataTransfer.effectAllowed = \"move\";\n e.dataTransfer.setData(\"text/plain\", id);\n setDragging(id);\n }}\n onDragEnd={() => {\n setDragging(null);\n setOver(null);\n }}\n >\n {renderCard(card)}\n </li>\n );\n })}\n </ul>\n </section>\n );\n })}\n </div>\n );\n}\n"
181
181
  },
182
182
  {
183
183
  "path": "kanban/meta.ts",
package/registry/kbd.json CHANGED
@@ -103,7 +103,7 @@
103
103
  },
104
104
  {
105
105
  "path": "kbd/kbd.tsx",
106
- "content": "// Server-safe. A key, or a shortcut of several (`<Kbd>⌘</Kbd><Kbd>K</Kbd>`).\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const kbdVariants = tv({\n base:\n \"inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 \" +\n \"font-mono font-semibold text-fg-secondary\",\n variants: { size: { sm: \"h-5 min-w-5 px-1 text-[10px]\", md: \"h-6 min-w-6 px-1.5 text-xs\" } },\n defaultVariants: { size: \"md\" },\n});\n\nexport type KbdProps = React.ComponentProps<\"kbd\"> & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: VariantProps<typeof kbdVariants>[\"size\"];\n};\n\nexport function Kbd({ size, className, ...props }: KbdProps) {\n return <kbd className={kbdVariants({ size, className })} {...props} />;\n}\n"
106
+ "content": "// Server-safe. A key, or a shortcut of several (`<Kbd>⌘</Kbd><Kbd>K</Kbd>`).\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const kbdVariants = tv({\n base:\n \"inline-flex shrink-0 items-center justify-center rounded-md border border-border-default border-b-2 bg-surface-2 \" +\n \"font-mono font-semibold text-fg-secondary\",\n variants: { size: { sm: \"h-5 min-w-5 px-1 text-[10px]\", md: \"h-6 min-w-6 px-1.5 text-xs\" } },\n defaultVariants: { size: \"md\" },\n});\n\nexport type KbdProps = React.ComponentProps<\"kbd\"> & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: VariantProps<typeof kbdVariants>[\"size\"];\n};\n\nexport function Kbd({ size, className, ...props }: Readonly<KbdProps>) {\n return <kbd className={kbdVariants({ size, className })} {...props} />;\n}\n"
107
107
  },
108
108
  {
109
109
  "path": "kbd/meta.ts",
@@ -404,7 +404,7 @@
404
404
  },
405
405
  {
406
406
  "path": "kind-config-editor/kind-config-editor.tsx",
407
- "content": "// Client (state, drag). The admin's editors of a kind's vocabulary (krizaka-ts#89, ADR-003 of krizaka-ts: « admin configures\n// everything »): the tag set (the presets of a variant, who writes, may people add their own, the most) and the status set\n// (the states in their order, each in French and English, its tone, final; the initial state; the moves from × to with the\n// roles, a confirmation and the reasons). Each takes the descriptor and gives it back (`value` / `onChange`) and never holds the\n// save logic: the product posts it, with the `version` it read. `problems` (from `kindConfigProblems`, the server's own rules)\n// are shown in place. What the contract forbids is kept by construction (model.ts): a final state has no way out, the initial\n// state is never final, a move goes to another state. Reorder: drag the handle, or the buttons, or Alt + ↑ ↓ in a name.\nimport type { Marker, StatusSet, StatusTone } from \"@krizaka/organize/contract\";\nimport * as React from \"react\";\n\nimport { Button } from \"../button\";\nimport { Chip, MarkerPicker, TagMarker } from \"../chip\";\nimport { cn } from \"../cn\";\nimport { Input, Select } from \"../field\";\nimport { SettingsRow } from \"../settings-layout\";\nimport { Switch } from \"../switch\";\nimport { type EditorRole, STATUS_TONES, type StatusSetEditorLabels, statusSetEditorLabels, type TagSetEditorLabels, tagSetEditorLabels } from \"./labels\";\nimport {\n addPreset,\n addReason,\n addState,\n clampMax,\n duplicatePresetNames,\n type Lang,\n movePreset,\n moveState,\n recolorPreset,\n removePreset,\n removeState,\n renamePreset,\n setFinal,\n setInitial,\n setStateLabel,\n setStateTone,\n setTransitionConfirm,\n setTransitionReasons,\n setTransitionRoles,\n type TagSetValue,\n transitionOf,\n} from \"./model\";\n\nexport type { EditorRole, Lang, StatusSetEditorLabels, TagSetEditorLabels, TagSetValue };\nexport { statusSetEditorLabels, tagSetEditorLabels };\n\n\n// --- shared ----------------------------------------------------------------------------------------------------------------\n\n/** The problems the server's rules found, shown where the admin is working: a polite alert above the list. */\nfunction Problems({ title, problems }: Readonly<{ title: string; problems: readonly string[] | undefined }>) {\n if (!problems || problems.length === 0) return null;\n return (\n <div role=\"alert\" className=\"flex flex-col gap-1 rounded-lg border border-danger/40 bg-danger/10 px-3 py-2.5\">\n <p className=\"m-0 text-xs font-semibold text-fg-danger\">{title}</p>\n <ul className=\"m-0 flex list-disc flex-col gap-0.5 pl-5 text-xs text-fg\">\n {problems.map((problem) => (\n <li key={problem}>{problem}</li>\n ))}\n </ul>\n </div>\n );\n}\n\n/** Drag a row by its handle, or move it with Alt + ↑ ↓ from a field: one pair of helpers for both lists. */\nfunction useReorder(onMove: (from: number, to: number) => void) {\n const dragging = React.useRef<number | null>(null);\n return {\n row: (index: number) => ({\n onDragOver: (event: React.DragEvent) => {\n if (dragging.current !== null) event.preventDefault();\n },\n onDrop: (event: React.DragEvent) => {\n event.preventDefault();\n if (dragging.current !== null) onMove(dragging.current, index);\n dragging.current = null;\n },\n }),\n handle: (index: number) => ({\n draggable: true,\n onDragStart: (event: React.DragEvent) => {\n dragging.current = index;\n event.dataTransfer.effectAllowed = \"move\";\n event.dataTransfer.setData(\"text/plain\", String(index));\n },\n onDragEnd: () => {\n dragging.current = null;\n },\n }),\n keys: (index: number, last: number) => (event: React.KeyboardEvent) => {\n if (!event.altKey || (event.key !== \"ArrowUp\" && event.key !== \"ArrowDown\")) return;\n event.preventDefault();\n const to = event.key === \"ArrowUp\" ? index - 1 : index + 1;\n if (to < 0 || to > last) return;\n onMove(index, to);\n // The row has moved: its field is a new element, keep the focus on it for the next press.\n const field = event.currentTarget as HTMLElement;\n requestAnimationFrame(() => field.closest(\"ol\")?.querySelectorAll<HTMLElement>(`[data-reorder-field=\"${field.dataset.reorderField}\"]`)[to]?.focus());\n },\n };\n}\n\nconst grip = (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"currentColor\" aria-hidden>\n {[7, 12, 17].flatMap((y) => [9, 15].map((x) => <circle key={`${x}-${y}`} cx={x} cy={y} r=\"1.4\" />))}\n </svg>\n);\nconst arrow = (up: boolean) => (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d={up ? \"m6 15 6-6 6 6\" : \"m6 9 6 6 6-6\"} />\n </svg>\n);\nconst IconButton = ({ label, className, ...props }: React.ComponentProps<\"button\"> & { label: string }) => (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n className={cn(\n \"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg\",\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30\",\n className,\n )}\n {...props}\n />\n);\nconst Cross = () => (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n);\n\n// --- the tag set -----------------------------------------------------------------------------------------------------------\n\nexport type TagSetEditorProps = {\n /** The `tags` of the kind's configuration (`KindConfig.tags`). */\n value: TagSetValue;\n /** Called with the whole set after every change. */\n onChange: (value: TagSetValue) => void;\n /** The variant whose presets are edited (a trade, or `default`). */\n variant: string;\n /** The roles of the product that can write tags. */\n roles: readonly EditorRole[];\n /** What `kindConfigProblems` found (the server's own rules), shown above the list. */\n problems?: readonly string[];\n /** The words, passed translated (English by default). */\n labels?: Partial<TagSetEditorLabels>;\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The admin's tag set: the presets of a variant (name, colour, order), who writes, whether people add their own, the most. */\nexport function TagSetEditor({ value, onChange, variant, roles, problems, labels: given, disabled, className }: Readonly<TagSetEditorProps>) {\n const labels: TagSetEditorLabels = { ...tagSetEditorLabels, ...given, markerNames: { ...tagSetEditorLabels.markerNames, ...given?.markerNames } };\n const presets = value.presets[variant] ?? [];\n const twins = duplicatePresetNames(presets);\n const [draft, setDraft] = React.useState(\"\");\n const [draftMarker, setDraftMarker] = React.useState<Marker>(\"blue\");\n const reorder = useReorder((from, to) => onChange(movePreset(value, variant, from, to)));\n const id = React.useId();\n const add = () => {\n const next = addPreset(value, variant, draft, draftMarker);\n if (next === value) return;\n onChange(next);\n setDraft(\"\");\n };\n return (\n <div className={cn(\"flex flex-col gap-4\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <section aria-labelledby={`${id}-presets`} className=\"flex flex-col gap-2\">\n <h3 id={`${id}-presets`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.presets}\n </h3>\n {presets.length === 0 ? (\n <p className=\"m-0 text-sm text-fg-secondary\">{labels.empty}</p>\n ) : (\n <ol className=\"m-0 flex list-none flex-col gap-2 p-0\">\n {presets.map((preset, index) => {\n const shown = preset.name || String(index + 1);\n const twin = twins.has(index);\n return (\n <li key={index} {...reorder.row(index)} className=\"flex flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-border-default bg-surface-1 px-2 py-1.5\">\n <span {...reorder.handle(index)} aria-hidden title={labels.drag(shown)} className=\"inline-flex h-9 w-6 cursor-grab items-center justify-center text-fg-muted active:cursor-grabbing max-md:hidden\">\n {grip}\n </span>\n <TagMarker marker={preset.marker} />\n <div className=\"flex min-w-40 flex-1 flex-col gap-1\">\n <Input\n aria-label={labels.name(index + 1)}\n data-reorder-field=\"name\"\n value={preset.name}\n disabled={disabled}\n invalid={twin || !preset.name.trim()}\n aria-describedby={twin ? `${id}-dup-${index}` : undefined}\n onChange={(event) => onChange(renamePreset(value, variant, index, event.target.value))}\n onBlur={(event) => event.target.value !== event.target.value.replace(/\\s+/g, \" \").trim() && onChange(renamePreset(value, variant, index, event.target.value.replace(/\\s+/g, \" \").trim()))}\n onKeyDown={reorder.keys(index, presets.length - 1)}\n className=\"h-9\"\n />\n {twin ? (\n <span id={`${id}-dup-${index}`} className=\"text-xs text-fg-danger\">\n {labels.duplicate}\n </span>\n ) : null}\n </div>\n <MarkerPicker label={labels.marker(shown)} names={labels.markerNames} value={preset.marker} disabled={disabled} onValueChange={(marker) => onChange(recolorPreset(value, variant, index, marker))} />\n <IconButton label={labels.moveUp(shown)} disabled={disabled || index === 0} onClick={() => onChange(movePreset(value, variant, index, index - 1))}>\n {arrow(true)}\n </IconButton>\n <IconButton label={labels.moveDown(shown)} disabled={disabled || index === presets.length - 1} onClick={() => onChange(movePreset(value, variant, index, index + 1))}>\n {arrow(false)}\n </IconButton>\n <IconButton label={labels.remove(shown)} disabled={disabled} onClick={() => onChange(removePreset(value, variant, index))}>\n <Cross />\n </IconButton>\n </li>\n );\n })}\n </ol>\n )}\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input\n aria-label={labels.add}\n value={draft}\n maxLength={80}\n disabled={disabled}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n add();\n }\n }}\n placeholder={labels.add}\n className=\"h-9 min-w-40 flex-1\"\n />\n <MarkerPicker label={labels.marker(draft.trim() || labels.add)} names={labels.markerNames} value={draftMarker} disabled={disabled} onValueChange={setDraftMarker} />\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || !draft.trim()} onClick={add}>\n {labels.addButton}\n </Button>\n </div>\n </section>\n <div className=\"flex flex-col\">\n <SettingsRow label={labels.writers} description={labels.writersHint}>\n <Chip.Group type=\"multiple\" size=\"sm\" label={labels.writers} value={value.writers} disabled={disabled} onValueChange={(writers) => onChange({ ...value, writers })}>\n {roles.map((role) => (\n <Chip key={role.key} value={role.key}>\n {role.label}\n </Chip>\n ))}\n </Chip.Group>\n </SettingsRow>\n <SettingsRow label={labels.userTags} description={labels.userTagsHint}>\n <Switch label={labels.userTags} checked={value.userTags} disabled={disabled} onCheckedChange={(userTags) => onChange({ ...value, userTags })} />\n </SettingsRow>\n <SettingsRow label={labels.max} description={labels.maxHint} htmlFor={`${id}-max`}>\n <Input\n id={`${id}-max`}\n type=\"number\"\n inputMode=\"numeric\"\n min={1}\n max={200}\n value={value.max}\n disabled={disabled}\n invalid={!Number.isInteger(value.max) || value.max < 1 || value.max > 200}\n onChange={(event) => onChange({ ...value, max: event.target.value === \"\" ? 0 : Number(event.target.value) })}\n onBlur={() => onChange({ ...value, max: clampMax(value.max) })}\n className=\"h-9 w-24\"\n />\n </SettingsRow>\n </div>\n </div>\n );\n}\n\n// --- the status set --------------------------------------------------------------------------------------------------------\n\nexport type StatusSetEditorProps = {\n /** The kind's status set (`KindConfig.status`). */\n value: StatusSet;\n /** Called with the whole set after every change. */\n onChange: (value: StatusSet) => void;\n /** The roles of the product that can make a move. */\n roles: readonly EditorRole[];\n /** The language the states are named in elsewhere in the editor (the moves' names). */\n locale?: Lang;\n /** What `kindConfigProblems` found (the server's own rules), shown above the list. */\n problems?: readonly string[];\n /** The words, passed translated (English by default). */\n labels?: Partial<StatusSetEditorLabels>;\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The admin's status set: the states in their order (FR and EN, tone, final), the initial state, and the moves from × to. */\nexport function StatusSetEditor({ value, onChange, roles, locale = \"en\", problems, labels: given, disabled, className }: Readonly<StatusSetEditorProps>) {\n const labels: StatusSetEditorLabels = { ...statusSetEditorLabels, ...given };\n const [chosen, setChosen] = React.useState<{ from: string; to: string } | null>(null);\n const reorder = useReorder((from, to) => onChange(moveState(value, from, to)));\n const id = React.useId();\n const nameOf = (key: string) => value.states.find((s) => s.key === key)?.label[locale] || key;\n const roleLabel = (key: string) => roles.find((r) => r.key === key)?.label ?? key;\n const open = chosen && value.states.some((x) => x.key === chosen.from) && value.states.some((x) => x.key === chosen.to) ? chosen : null;\n const detail = open ? transitionOf(value, open.from, open.to) : undefined;\n\n if (value.mode === \"derived\") {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <p className=\"m-0 text-sm text-fg-secondary\">{labels.derived}</p>\n <ol aria-label={labels.states} className=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {value.states.map((state) => (\n <li key={state.key} className=\"inline-flex items-center gap-1.5 rounded-sm bg-surface-3 px-2 py-0.5 text-[11px] font-semibold text-fg-secondary\" data-tone={state.tone}>\n <span aria-hidden className=\"h-1.5 w-1.5 rounded-full bg-current\" />\n {state.label[locale]}\n </li>\n ))}\n </ol>\n </div>\n );\n }\n\n return (\n <div className={cn(\"flex flex-col gap-5\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <section aria-labelledby={`${id}-states`} className=\"flex flex-col gap-2\">\n <h3 id={`${id}-states`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.states}\n </h3>\n <ol className=\"m-0 flex list-none flex-col gap-2 p-0\">\n {value.states.map((state, index) => {\n const n = index + 1;\n const isInitial = value.initial === state.key;\n const name = state.label[locale] || String(n);\n return (\n <li key={state.key} {...reorder.row(index)} data-state-key={state.key} className=\"flex flex-wrap items-start gap-x-3 gap-y-2 rounded-lg border border-border-default bg-surface-1 p-2.5\">\n <span {...reorder.handle(index)} aria-hidden title={labels.drag(name)} className=\"mt-1.5 inline-flex h-9 w-6 cursor-grab items-center justify-center text-fg-muted active:cursor-grabbing max-md:hidden\">\n {grip}\n </span>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <Input\n key={lang}\n aria-label={labels.stateLabel(labels.languages[lang], n)}\n data-reorder-field={lang}\n lang={lang}\n value={state.label[lang]}\n maxLength={40}\n disabled={disabled}\n invalid={!state.label[lang].trim()}\n onChange={(event) => onChange(setStateLabel(value, state.key, lang, event.target.value))}\n onKeyDown={reorder.keys(index, value.states.length - 1)}\n className=\"h-9 min-w-36 flex-1\"\n />\n ))}\n <Select aria-label={labels.tone(n)} value={state.tone} disabled={disabled} onChange={(event) => onChange(setStateTone(value, state.key, event.target.value as StatusTone))} className=\"h-9 w-36\">\n {STATUS_TONES.map((tone) => (\n <option key={tone} value={tone}>\n {labels.tones[tone]}\n </option>\n ))}\n </Select>\n <div className=\"flex items-center gap-1.5 text-xs text-fg-secondary\">\n <Switch size=\"sm\" label={labels.final(n)} checked={Boolean(state.final)} disabled={disabled || isInitial} onCheckedChange={(final) => onChange(setFinal(value, state.key, final))} />\n <span aria-hidden>{isInitial ? labels.initialNotFinal : labels.finalHint}</span>\n </div>\n <label className=\"flex items-center gap-1.5 text-xs text-fg-secondary\">\n <input type=\"radio\" name={`${id}-initial`} aria-label={labels.initial(n)} checked={isInitial} disabled={disabled || Boolean(state.final)} onChange={() => onChange(setInitial(value, state.key))} className=\"h-4 w-4 accent-(--kz-accent)\" />\n <span aria-hidden>{labels.initial(n)}</span>\n </label>\n <code className=\"text-[11px] text-fg-muted\">{state.key}</code>\n <div className=\"ml-auto flex\">\n <IconButton label={labels.moveUp(name)} disabled={disabled || index === 0} onClick={() => onChange(moveState(value, index, index - 1))}>\n {arrow(true)}\n </IconButton>\n <IconButton label={labels.moveDown(name)} disabled={disabled || index === value.states.length - 1} onClick={() => onChange(moveState(value, index, index + 1))}>\n {arrow(false)}\n </IconButton>\n <IconButton label={labels.remove(name)} disabled={disabled || value.states.length <= 2} onClick={() => onChange(removeState(value, state.key))}>\n <Cross />\n </IconButton>\n </div>\n </li>\n );\n })}\n </ol>\n <div>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || value.states.length >= 12} onClick={() => onChange(addState(value, labels.newState))}>\n {labels.addState}\n </Button>\n </div>\n </section>\n\n <section aria-labelledby={`${id}-moves`} className=\"flex flex-col gap-3\">\n <div className=\"flex flex-col gap-0.5\">\n <h3 id={`${id}-moves`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.moves}\n </h3>\n <p className=\"m-0 text-xs text-fg-secondary\">{labels.movesHint}</p>\n </div>\n {value.states.map((from) => (\n <div key={from.key} role=\"group\" aria-label={labels.from(nameOf(from.key))} className=\"flex flex-wrap items-center gap-2\">\n <span className=\"min-w-28 text-xs font-semibold text-fg\">{nameOf(from.key)}</span>\n {from.final ? (\n <span className=\"text-xs text-fg-secondary\">{labels.noWayOut}</span>\n ) : (\n value.states\n .filter((to) => to.key !== from.key)\n .map((to) => {\n const move = transitionOf(value, from.key, to.key);\n const summary = move ? move.roles.map(roleLabel).join(\", \") : labels.none;\n const on = open?.from === from.key && open.to === to.key;\n return (\n <button\n key={to.key}\n type=\"button\"\n aria-pressed={on}\n data-on={move ? \"\" : undefined}\n disabled={disabled}\n onClick={() => setChosen(on ? null : { from: from.key, to: to.key })}\n className={cn(\n \"inline-flex min-h-9 items-center gap-1.5 rounded-sm border px-2.5 py-1 text-xs transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\",\n move ? \"border-accent bg-accent-soft text-fg\" : \"border-dashed border-border-control text-fg-secondary hover:border-border-strong\",\n on && \"ring-2 ring-ring\",\n )}\n >\n {/* The name is the sentence for a screen reader; the arrow and the short words are what the eye reads. */}\n <span className=\"sr-only\">{labels.move(nameOf(from.key), nameOf(to.key), summary)}</span>\n <span aria-hidden>→ {nameOf(to.key)}</span>\n <span aria-hidden className=\"text-fg\">\n {summary}\n </span>\n </button>\n );\n })\n )}\n </div>\n ))}\n\n {open && chosen ? (\n <div role=\"region\" aria-label={labels.moveDetail(nameOf(open.from), nameOf(open.to))} className=\"flex flex-col gap-3 rounded-lg border border-border-default bg-surface-1 p-3\">\n <h4 className=\"m-0 text-sm font-semibold text-fg\">{labels.moveDetail(nameOf(open.from), nameOf(open.to))}</h4>\n <div className=\"flex flex-col gap-1.5\">\n <span className=\"text-xs font-semibold text-fg-secondary\">{labels.roles}</span>\n <Chip.Group\n type=\"multiple\"\n size=\"sm\"\n label={labels.roles}\n value={detail?.roles ? [...detail.roles] : []}\n disabled={disabled}\n onValueChange={(next) => {\n onChange(setTransitionRoles(value, open.from, open.to, next));\n }}\n >\n {roles.map((role) => (\n <Chip key={role.key} value={role.key}>\n {role.label}\n </Chip>\n ))}\n </Chip.Group>\n </div>\n {detail ? (\n <>\n <div className=\"flex items-center gap-2 text-xs text-fg-secondary\">\n <Switch size=\"sm\" label={labels.confirm} checked={Boolean(detail?.confirm)} disabled={disabled} onCheckedChange={(on) => onChange(setTransitionConfirm(value, open.from, open.to, on))} />\n <span aria-hidden>{labels.confirm}</span>\n </div>\n <div className=\"flex flex-col gap-2\">\n <span className=\"text-xs font-semibold text-fg-secondary\">{labels.reasons}</span>\n {(detail?.reasons ?? []).map((reason, at) => (\n <div key={reason.key} className=\"flex flex-wrap items-center gap-2\">\n {([\"fr\", \"en\"] as const).map((lang) => (\n <Input\n key={lang}\n lang={lang}\n aria-label={labels.reasonLabel(labels.languages[lang], at + 1)}\n value={reason.label[lang]}\n maxLength={40}\n disabled={disabled}\n invalid={!reason.label[lang].trim()}\n onChange={(event) =>\n onChange(setTransitionReasons(value, open.from, open.to, (detail?.reasons ?? []).map((r) => (r.key === reason.key ? { ...r, label: { ...r.label, [lang]: event.target.value } } : r))))\n }\n className=\"h-9 min-w-36 flex-1\"\n />\n ))}\n <IconButton label={labels.removeReason(at + 1)} disabled={disabled} onClick={() => onChange(setTransitionReasons(value, open.from, open.to, (detail?.reasons ?? []).filter((r) => r.key !== reason.key)))}>\n <Cross />\n </IconButton>\n </div>\n ))}\n <div>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || (detail?.reasons?.length ?? 0) >= 12} onClick={() => onChange(addReason(value, open.from, open.to, { fr: \"\", en: \"\" }))}>\n {labels.addReason}\n </Button>\n </div>\n </div>\n </>\n ) : null}\n </div>\n ) : null}\n </section>\n </div>\n );\n}\n"
407
+ "content": "// Client (state, drag). The admin's editors of a kind's vocabulary (krizaka-ts#89, ADR-003 of krizaka-ts: « admin configures\n// everything »): the tag set (the presets of a variant, who writes, may people add their own, the most) and the status set\n// (the states in their order, each in French and English, its tone, final; the initial state; the moves from × to with the\n// roles, a confirmation and the reasons). Each takes the descriptor and gives it back (`value` / `onChange`) and never holds the\n// save logic: the product posts it, with the `version` it read. `problems` (from `kindConfigProblems`, the server's own rules)\n// are shown in place. What the contract forbids is kept by construction (model.ts): a final state has no way out, the initial\n// state is never final, a move goes to another state. Reorder: drag the handle, or the buttons, or Alt + ↑ ↓ in a name.\nimport type { Marker, StatusSet, StatusTone } from \"@krizaka/organize/contract\";\nimport * as React from \"react\";\n\nimport { Button } from \"../button\";\nimport { Chip, MarkerPicker, TagMarker } from \"../chip\";\nimport { cn } from \"../cn\";\nimport { Input, Select } from \"../field\";\nimport { SettingsRow } from \"../settings-layout\";\nimport { Switch } from \"../switch\";\nimport { type EditorRole, STATUS_TONES, type StatusSetEditorLabels, statusSetEditorLabels, type TagSetEditorLabels, tagSetEditorLabels } from \"./labels\";\nimport {\n addPreset,\n addReason,\n addState,\n clampMax,\n duplicatePresetNames,\n type Lang,\n movePreset,\n moveState,\n recolorPreset,\n removePreset,\n removeState,\n renamePreset,\n setFinal,\n setInitial,\n setStateLabel,\n setStateTone,\n setTransitionConfirm,\n setTransitionReasons,\n setTransitionRoles,\n type TagSetValue,\n transitionOf,\n} from \"./model\";\n\n// --- shared ----------------------------------------------------------------------------------------------------------------\n\n/** The problems the server's rules found, shown where the admin is working: a polite alert above the list. */\nfunction Problems({ title, problems }: Readonly<{ title: string; problems: readonly string[] | undefined }>) {\n if (!problems || problems.length === 0) return null;\n return (\n <div role=\"alert\" className=\"flex flex-col gap-1 rounded-lg border border-danger/40 bg-danger/10 px-3 py-2.5\">\n <p className=\"m-0 text-xs font-semibold text-fg-danger\">{title}</p>\n <ul className=\"m-0 flex list-disc flex-col gap-0.5 pl-5 text-xs text-fg\">\n {problems.map((problem) => (\n <li key={problem}>{problem}</li>\n ))}\n </ul>\n </div>\n );\n}\n\n/** Drag a row by its handle, or move it with Alt + ↑ ↓ from a field: one pair of helpers for both lists. */\nfunction useReorder(onMove: (from: number, to: number) => void) {\n const dragging = React.useRef<number | null>(null);\n return {\n row: (index: number) => ({\n onDragOver: (event: React.DragEvent) => {\n if (dragging.current !== null) event.preventDefault();\n },\n onDrop: (event: React.DragEvent) => {\n event.preventDefault();\n if (dragging.current !== null) onMove(dragging.current, index);\n dragging.current = null;\n },\n }),\n handle: (index: number) => ({\n draggable: true,\n onDragStart: (event: React.DragEvent) => {\n dragging.current = index;\n event.dataTransfer.effectAllowed = \"move\";\n event.dataTransfer.setData(\"text/plain\", String(index));\n },\n onDragEnd: () => {\n dragging.current = null;\n },\n }),\n keys: (index: number, last: number) => (event: React.KeyboardEvent) => {\n if (!event.altKey || (event.key !== \"ArrowUp\" && event.key !== \"ArrowDown\")) return;\n event.preventDefault();\n const to = event.key === \"ArrowUp\" ? index - 1 : index + 1;\n if (to < 0 || to > last) return;\n onMove(index, to);\n // The row has moved: its field is a new element, keep the focus on it for the next press.\n const field = event.currentTarget as HTMLElement;\n requestAnimationFrame(() => field.closest(\"ol\")?.querySelectorAll<HTMLElement>(`[data-reorder-field=\"${field.dataset.reorderField}\"]`)[to]?.focus());\n },\n };\n}\n\nconst grip = (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"currentColor\" aria-hidden>\n {[7, 12, 17].flatMap((y) => [9, 15].map((x) => <circle key={`${x}-${y}`} cx={x} cy={y} r=\"1.4\" />))}\n </svg>\n);\nconst arrow = (up: boolean) => (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d={up ? \"m6 15 6-6 6 6\" : \"m6 9 6 6 6-6\"} />\n </svg>\n);\nconst IconButton = ({ label, className, ...props }: Readonly<React.ComponentProps<\"button\"> & { label: string }>) => (\n <button\n type=\"button\"\n aria-label={label}\n title={label}\n className={cn(\n \"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-md text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg\",\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30\",\n className,\n )}\n {...props}\n />\n);\nconst Cross = () => (\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n);\n\n// --- the tag set -----------------------------------------------------------------------------------------------------------\n\nexport type TagSetEditorProps = {\n /** The `tags` of the kind's configuration (`KindConfig.tags`). */\n value: TagSetValue;\n /** Called with the whole set after every change. */\n onChange: (value: TagSetValue) => void;\n /** The variant whose presets are edited (a trade, or `default`). */\n variant: string;\n /** The roles of the product that can write tags. */\n roles: readonly EditorRole[];\n /** What `kindConfigProblems` found (the server's own rules), shown above the list. */\n problems?: readonly string[];\n /** The words, passed translated (English by default). */\n labels?: Partial<TagSetEditorLabels>;\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The admin's tag set: the presets of a variant (name, colour, order), who writes, whether people add their own, the most. */\nexport function TagSetEditor({ value, onChange, variant, roles, problems, labels: given, disabled, className }: Readonly<TagSetEditorProps>) {\n const labels: TagSetEditorLabels = { ...tagSetEditorLabels, ...given, markerNames: { ...tagSetEditorLabels.markerNames, ...given?.markerNames } };\n const presets = value.presets[variant] ?? [];\n const twins = duplicatePresetNames(presets);\n const [draft, setDraft] = React.useState(\"\");\n const [draftMarker, setDraftMarker] = React.useState<Marker>(\"blue\");\n const reorder = useReorder((from, to) => onChange(movePreset(value, variant, from, to)));\n const id = React.useId();\n const add = () => {\n const next = addPreset(value, variant, draft, draftMarker);\n if (next === value) return;\n onChange(next);\n setDraft(\"\");\n };\n return (\n <div className={cn(\"flex flex-col gap-4\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <section aria-labelledby={`${id}-presets`} className=\"flex flex-col gap-2\">\n <h3 id={`${id}-presets`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.presets}\n </h3>\n {presets.length === 0 ? (\n <p className=\"m-0 text-sm text-fg-secondary\">{labels.empty}</p>\n ) : (\n <ol className=\"m-0 flex list-none flex-col gap-2 p-0\">\n {presets.map((preset, index) => {\n const shown = preset.name || String(index + 1);\n const twin = twins.has(index);\n return (\n <li key={index} {...reorder.row(index)} className=\"flex flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-border-default bg-surface-1 px-2 py-1.5\">\n <span {...reorder.handle(index)} aria-hidden title={labels.drag(shown)} className=\"inline-flex h-9 w-6 cursor-grab items-center justify-center text-fg-muted active:cursor-grabbing max-md:hidden\">\n {grip}\n </span>\n <TagMarker marker={preset.marker} />\n <div className=\"flex min-w-40 flex-1 flex-col gap-1\">\n <Input\n aria-label={labels.name(index + 1)}\n data-reorder-field=\"name\"\n value={preset.name}\n disabled={disabled}\n invalid={twin || !preset.name.trim()}\n aria-describedby={twin ? `${id}-dup-${index}` : undefined}\n onChange={(event) => onChange(renamePreset(value, variant, index, event.target.value))}\n onBlur={(event) => event.target.value !== event.target.value.replaceAll(/\\s+/g, \" \").trim() && onChange(renamePreset(value, variant, index, event.target.value.replaceAll(/\\s+/g, \" \").trim()))}\n onKeyDown={reorder.keys(index, presets.length - 1)}\n className=\"h-9\"\n />\n {twin ? (\n <span id={`${id}-dup-${index}`} className=\"text-xs text-fg-danger\">\n {labels.duplicate}\n </span>\n ) : null}\n </div>\n <MarkerPicker label={labels.marker(shown)} names={labels.markerNames} value={preset.marker} disabled={disabled} onValueChange={(marker) => onChange(recolorPreset(value, variant, index, marker))} />\n <IconButton label={labels.moveUp(shown)} disabled={disabled || index === 0} onClick={() => onChange(movePreset(value, variant, index, index - 1))}>\n {arrow(true)}\n </IconButton>\n <IconButton label={labels.moveDown(shown)} disabled={disabled || index === presets.length - 1} onClick={() => onChange(movePreset(value, variant, index, index + 1))}>\n {arrow(false)}\n </IconButton>\n <IconButton label={labels.remove(shown)} disabled={disabled} onClick={() => onChange(removePreset(value, variant, index))}>\n <Cross />\n </IconButton>\n </li>\n );\n })}\n </ol>\n )}\n <div className=\"flex flex-wrap items-center gap-2\">\n <Input\n aria-label={labels.add}\n value={draft}\n maxLength={80}\n disabled={disabled}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") {\n event.preventDefault();\n add();\n }\n }}\n placeholder={labels.add}\n className=\"h-9 min-w-40 flex-1\"\n />\n <MarkerPicker label={labels.marker(draft.trim() || labels.add)} names={labels.markerNames} value={draftMarker} disabled={disabled} onValueChange={setDraftMarker} />\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || !draft.trim()} onClick={add}>\n {labels.addButton}\n </Button>\n </div>\n </section>\n <div className=\"flex flex-col\">\n <SettingsRow label={labels.writers} description={labels.writersHint}>\n <Chip.Group type=\"multiple\" size=\"sm\" label={labels.writers} value={value.writers} disabled={disabled} onValueChange={(writers) => onChange({ ...value, writers })}>\n {roles.map((role) => (\n <Chip key={role.key} value={role.key}>\n {role.label}\n </Chip>\n ))}\n </Chip.Group>\n </SettingsRow>\n <SettingsRow label={labels.userTags} description={labels.userTagsHint}>\n <Switch label={labels.userTags} checked={value.userTags} disabled={disabled} onCheckedChange={(userTags) => onChange({ ...value, userTags })} />\n </SettingsRow>\n <SettingsRow label={labels.max} description={labels.maxHint} htmlFor={`${id}-max`}>\n <Input\n id={`${id}-max`}\n type=\"number\"\n inputMode=\"numeric\"\n min={1}\n max={200}\n value={value.max}\n disabled={disabled}\n invalid={!Number.isInteger(value.max) || value.max < 1 || value.max > 200}\n onChange={(event) => onChange({ ...value, max: event.target.value === \"\" ? 0 : Number(event.target.value) })}\n onBlur={() => onChange({ ...value, max: clampMax(value.max) })}\n className=\"h-9 w-24\"\n />\n </SettingsRow>\n </div>\n </div>\n );\n}\n\n// --- the status set --------------------------------------------------------------------------------------------------------\n\nexport type StatusSetEditorProps = {\n /** The kind's status set (`KindConfig.status`). */\n value: StatusSet;\n /** Called with the whole set after every change. */\n onChange: (value: StatusSet) => void;\n /** The roles of the product that can make a move. */\n roles: readonly EditorRole[];\n /** The language the states are named in elsewhere in the editor (the moves' names). */\n locale?: Lang;\n /** What `kindConfigProblems` found (the server's own rules), shown above the list. */\n problems?: readonly string[];\n /** The words, passed translated (English by default). */\n labels?: Partial<StatusSetEditorLabels>;\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** The admin's status set: the states in their order (FR and EN, tone, final), the initial state, and the moves from × to. */\nexport function StatusSetEditor({ value, onChange, roles, locale = \"en\", problems, labels: given, disabled, className }: Readonly<StatusSetEditorProps>) {\n const labels: StatusSetEditorLabels = { ...statusSetEditorLabels, ...given };\n const [chosen, setChosen] = React.useState<{ from: string; to: string } | null>(null);\n const reorder = useReorder((from, to) => onChange(moveState(value, from, to)));\n const id = React.useId();\n const nameOf = (key: string) => value.states.find((s) => s.key === key)?.label[locale] || key;\n const roleLabel = (key: string) => roles.find((r) => r.key === key)?.label ?? key;\n const open = chosen && value.states.some((x) => x.key === chosen.from) && value.states.some((x) => x.key === chosen.to) ? chosen : null;\n const detail = open ? transitionOf(value, open.from, open.to) : undefined;\n\n if (value.mode === \"derived\") {\n return (\n <div className={cn(\"flex flex-col gap-3\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <p className=\"m-0 text-sm text-fg-secondary\">{labels.derived}</p>\n <ol aria-label={labels.states} className=\"m-0 flex list-none flex-wrap gap-2 p-0\">\n {value.states.map((state) => (\n <li key={state.key} className=\"inline-flex items-center gap-1.5 rounded-sm bg-surface-3 px-2 py-0.5 text-[11px] font-semibold text-fg-secondary\" data-tone={state.tone}>\n <span aria-hidden className=\"h-1.5 w-1.5 rounded-full bg-current\" />\n {state.label[locale]}\n </li>\n ))}\n </ol>\n </div>\n );\n }\n\n return (\n <div className={cn(\"flex flex-col gap-5\", className)}>\n <Problems title={labels.problems} problems={problems} />\n <section aria-labelledby={`${id}-states`} className=\"flex flex-col gap-2\">\n <h3 id={`${id}-states`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.states}\n </h3>\n <ol className=\"m-0 flex list-none flex-col gap-2 p-0\">\n {value.states.map((state, index) => {\n const n = index + 1;\n const isInitial = value.initial === state.key;\n const name = state.label[locale] || String(n);\n return (\n <li key={state.key} {...reorder.row(index)} data-state-key={state.key} className=\"flex flex-wrap items-start gap-x-3 gap-y-2 rounded-lg border border-border-default bg-surface-1 p-2.5\">\n <span {...reorder.handle(index)} aria-hidden title={labels.drag(name)} className=\"mt-1.5 inline-flex h-9 w-6 cursor-grab items-center justify-center text-fg-muted active:cursor-grabbing max-md:hidden\">\n {grip}\n </span>\n {([\"fr\", \"en\"] as const).map((lang) => (\n <Input\n key={lang}\n aria-label={labels.stateLabel(labels.languages[lang], n)}\n data-reorder-field={lang}\n lang={lang}\n value={state.label[lang]}\n maxLength={40}\n disabled={disabled}\n invalid={!state.label[lang].trim()}\n onChange={(event) => onChange(setStateLabel(value, state.key, lang, event.target.value))}\n onKeyDown={reorder.keys(index, value.states.length - 1)}\n className=\"h-9 min-w-36 flex-1\"\n />\n ))}\n <Select aria-label={labels.tone(n)} value={state.tone} disabled={disabled} onChange={(event) => onChange(setStateTone(value, state.key, event.target.value as StatusTone))} className=\"h-9 w-36\">\n {STATUS_TONES.map((tone) => (\n <option key={tone} value={tone}>\n {labels.tones[tone]}\n </option>\n ))}\n </Select>\n <div className=\"flex items-center gap-1.5 text-xs text-fg-secondary\">\n <Switch size=\"sm\" label={labels.final(n)} checked={Boolean(state.final)} disabled={disabled || isInitial} onCheckedChange={(final) => onChange(setFinal(value, state.key, final))} />\n <span aria-hidden>{isInitial ? labels.initialNotFinal : labels.finalHint}</span>\n </div>\n <label className=\"flex items-center gap-1.5 text-xs text-fg-secondary\">\n <input type=\"radio\" name={`${id}-initial`} aria-label={labels.initial(n)} checked={isInitial} disabled={disabled || Boolean(state.final)} onChange={() => onChange(setInitial(value, state.key))} className=\"h-4 w-4 accent-(--kz-accent)\" />\n <span aria-hidden>{labels.initial(n)}</span>\n </label>\n <code className=\"text-[11px] text-fg-muted\">{state.key}</code>\n <div className=\"ml-auto flex\">\n <IconButton label={labels.moveUp(name)} disabled={disabled || index === 0} onClick={() => onChange(moveState(value, index, index - 1))}>\n {arrow(true)}\n </IconButton>\n <IconButton label={labels.moveDown(name)} disabled={disabled || index === value.states.length - 1} onClick={() => onChange(moveState(value, index, index + 1))}>\n {arrow(false)}\n </IconButton>\n <IconButton label={labels.remove(name)} disabled={disabled || value.states.length <= 2} onClick={() => onChange(removeState(value, state.key))}>\n <Cross />\n </IconButton>\n </div>\n </li>\n );\n })}\n </ol>\n <div>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || value.states.length >= 12} onClick={() => onChange(addState(value, labels.newState))}>\n {labels.addState}\n </Button>\n </div>\n </section>\n\n <section aria-labelledby={`${id}-moves`} className=\"flex flex-col gap-3\">\n <div className=\"flex flex-col gap-0.5\">\n <h3 id={`${id}-moves`} className=\"m-0 text-sm font-semibold text-fg\">\n {labels.moves}\n </h3>\n <p className=\"m-0 text-xs text-fg-secondary\">{labels.movesHint}</p>\n </div>\n {value.states.map((from) => (\n <div key={from.key} role=\"group\" aria-label={labels.from(nameOf(from.key))} className=\"flex flex-wrap items-center gap-2\">\n <span className=\"min-w-28 text-xs font-semibold text-fg\">{nameOf(from.key)}</span>\n {from.final ? (\n <span className=\"text-xs text-fg-secondary\">{labels.noWayOut}</span>\n ) : (\n value.states\n .filter((to) => to.key !== from.key)\n .map((to) => {\n const move = transitionOf(value, from.key, to.key);\n const summary = move ? move.roles.map(roleLabel).join(\", \") : labels.none;\n const on = open?.from === from.key && open.to === to.key;\n return (\n <button\n key={to.key}\n type=\"button\"\n aria-pressed={on}\n data-on={move ? \"\" : undefined}\n disabled={disabled}\n onClick={() => setChosen(on ? null : { from: from.key, to: to.key })}\n className={cn(\n \"inline-flex min-h-9 items-center gap-1.5 rounded-sm border px-2.5 py-1 text-xs transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\",\n move ? \"border-accent bg-accent-soft text-fg\" : \"border-dashed border-border-control text-fg-secondary hover:border-border-strong\",\n on && \"ring-2 ring-ring\",\n )}\n >\n {/* The name is the sentence for a screen reader; the arrow and the short words are what the eye reads. */}\n <span className=\"sr-only\">{labels.move(nameOf(from.key), nameOf(to.key), summary)}</span>\n <span aria-hidden>→ {nameOf(to.key)}</span>\n <span aria-hidden className=\"text-fg\">\n {summary}\n </span>\n </button>\n );\n })\n )}\n </div>\n ))}\n\n {open && chosen ? (\n <div role=\"region\" aria-label={labels.moveDetail(nameOf(open.from), nameOf(open.to))} className=\"flex flex-col gap-3 rounded-lg border border-border-default bg-surface-1 p-3\">\n <h4 className=\"m-0 text-sm font-semibold text-fg\">{labels.moveDetail(nameOf(open.from), nameOf(open.to))}</h4>\n <div className=\"flex flex-col gap-1.5\">\n <span className=\"text-xs font-semibold text-fg-secondary\">{labels.roles}</span>\n <Chip.Group\n type=\"multiple\"\n size=\"sm\"\n label={labels.roles}\n value={detail?.roles ? [...detail.roles] : []}\n disabled={disabled}\n onValueChange={(next) => {\n onChange(setTransitionRoles(value, open.from, open.to, next));\n }}\n >\n {roles.map((role) => (\n <Chip key={role.key} value={role.key}>\n {role.label}\n </Chip>\n ))}\n </Chip.Group>\n </div>\n {detail ? (\n <>\n <div className=\"flex items-center gap-2 text-xs text-fg-secondary\">\n <Switch size=\"sm\" label={labels.confirm} checked={Boolean(detail?.confirm)} disabled={disabled} onCheckedChange={(on) => onChange(setTransitionConfirm(value, open.from, open.to, on))} />\n <span aria-hidden>{labels.confirm}</span>\n </div>\n <div className=\"flex flex-col gap-2\">\n <span className=\"text-xs font-semibold text-fg-secondary\">{labels.reasons}</span>\n {(detail?.reasons ?? []).map((reason, at) => (\n <div key={reason.key} className=\"flex flex-wrap items-center gap-2\">\n {([\"fr\", \"en\"] as const).map((lang) => (\n <Input\n key={lang}\n lang={lang}\n aria-label={labels.reasonLabel(labels.languages[lang], at + 1)}\n value={reason.label[lang]}\n maxLength={40}\n disabled={disabled}\n invalid={!reason.label[lang].trim()}\n onChange={(event) =>\n onChange(setTransitionReasons(value, open.from, open.to, (detail?.reasons ?? []).map((r) => (r.key === reason.key ? { ...r, label: { ...r.label, [lang]: event.target.value } } : r))))\n }\n className=\"h-9 min-w-36 flex-1\"\n />\n ))}\n <IconButton label={labels.removeReason(at + 1)} disabled={disabled} onClick={() => onChange(setTransitionReasons(value, open.from, open.to, (detail?.reasons ?? []).filter((r) => r.key !== reason.key)))}>\n <Cross />\n </IconButton>\n </div>\n ))}\n <div>\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" disabled={disabled || (detail?.reasons?.length ?? 0) >= 12} onClick={() => onChange(addReason(value, open.from, open.to, { fr: \"\", en: \"\" }))}>\n {labels.addReason}\n </Button>\n </div>\n </div>\n </>\n ) : null}\n </div>\n ) : null}\n </section>\n </div>\n );\n}\n\nexport { type EditorRole, type StatusSetEditorLabels, statusSetEditorLabels, type TagSetEditorLabels, tagSetEditorLabels } from \"./labels\";\nexport { type Lang, type TagSetValue } from \"./model\";"
408
408
  },
409
409
  {
410
410
  "path": "kind-config-editor/labels.ts",
@@ -416,7 +416,7 @@
416
416
  },
417
417
  {
418
418
  "path": "kind-config-editor/model.ts",
419
- "content": "// The pure changes of the admin's editors (krizaka-ts#89, `@krizaka/organize/contract`): each takes a descriptor and gives a new one,\n// never mutating, never throwing. The rules of the contract that the editors can keep by construction are kept here — a final state has\n// no way out, the initial state is never final, a move goes to another state, a transition exists when a role may make it — and the\n// rest (`kindConfigProblems`) is shown by the editor in place. Shared by the web and React Native editors; imports types only.\nimport type { Label, Marker, StatusSet, StatusState, StatusTone, StatusTransition, TagPreset } from \"@krizaka/organize/contract\";\n\n/** The `tags` part of a `KindConfig`. */\nexport type TagSetValue = {\n writers: string[];\n userTags: boolean;\n max: number;\n presets: Record<string, TagPreset[]>;\n};\n\n/** The language of a label. */\nexport type Lang = keyof Label;\n\n/** A list with the item at `from` put at `to` (the same list when either is out of range). */\nexport function move<T>(list: readonly T[], from: number, to: number): T[] {\n if (from === to || from < 0 || to < 0 || from >= list.length || to >= list.length) return [...list];\n const next = [...list];\n const [item] = next.splice(from, 1);\n next.splice(to, 0, item as T);\n return next;\n}\n\n// --- tags ------------------------------------------------------------------------------------------------------------------\n\nconst presetsOf = (tags: TagSetValue, variant: string): TagPreset[] => tags.presets[variant] ?? [];\nconst withPresets = (tags: TagSetValue, variant: string, list: TagPreset[]): TagSetValue => ({ ...tags, presets: { ...tags.presets, [variant]: list } });\n\n/** A name as the contract keeps it: spaces collapsed, trimmed. */\nexport const cleanName = (raw: string) => raw.replace(/\\s+/g, \" \").trim();\n\n/** Adds a preset at the end — refused (same value) for an empty name or one the variant already has (case ignored). */\nexport function addPreset(tags: TagSetValue, variant: string, name: string, marker: Marker): TagSetValue {\n const clean = cleanName(name);\n if (!clean || presetsOf(tags, variant).some((p) => p.name.toLocaleLowerCase() === clean.toLocaleLowerCase())) return tags;\n return withPresets(tags, variant, [...presetsOf(tags, variant), { name: clean, marker }]);\n}\n\n/** Renames the preset at `index` (kept as typed: the editor trims on blur, so a half-typed name is not lost). */\nexport const renamePreset = (tags: TagSetValue, variant: string, index: number, name: string): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).map((p, i) => (i === index ? { ...p, name } : p)));\n\nexport const recolorPreset = (tags: TagSetValue, variant: string, index: number, marker: Marker): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).map((p, i) => (i === index ? { ...p, marker } : p)));\n\nexport const removePreset = (tags: TagSetValue, variant: string, index: number): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).filter((_, i) => i !== index));\n\nexport const movePreset = (tags: TagSetValue, variant: string, from: number, to: number): TagSetValue => withPresets(tags, variant, move(presetsOf(tags, variant), from, to));\n\n/** The names a variant has twice (case ignored): the editor marks them in place. */\nexport function duplicatePresetNames(list: readonly TagPreset[]): Set<number> {\n const seen = new Map<string, number>();\n const twins = new Set<number>();\n list.forEach((p, i) => {\n const key = cleanName(p.name).toLocaleLowerCase();\n if (!key) return;\n const first = seen.get(key);\n if (first === undefined) seen.set(key, i);\n else twins.add(first).add(i);\n });\n return twins;\n}\n\n/** The most tags per scope and kind: the contract's 1 to 200. */\nexport const clampMax = (value: number, ceiling = 200) => (Number.isFinite(value) ? Math.min(ceiling, Math.max(1, Math.round(value))) : 1);\n\nexport const toggleRole = (roles: readonly string[], role: string): string[] => (roles.includes(role) ? roles.filter((r) => r !== role) : [...roles, role]);\n\n// --- statuses --------------------------------------------------------------------------------------------------------------\n\n/** The smallest `<prefix>_<n>` key no one holds yet. */\nexport function freshKey(taken: readonly string[], prefix = \"state\"): string {\n let n = taken.length + 1;\n while (taken.includes(`${prefix}_${n}`)) n += 1;\n return `${prefix}_${n}`;\n}\n\nexport const transitionOf = (set: StatusSet, from: string, to: string): StatusTransition | undefined => set.transitions.find((t) => t.from === from && t.to === to);\nexport const isFinal = (set: StatusSet, key: string) => Boolean(set.states.find((s) => s.key === key)?.final);\n\nconst withStates = (set: StatusSet, states: StatusState[], rest: Partial<StatusSet> = {}): StatusSet => ({ ...set, states, ...rest });\n\n/** Adds a state at the end (its key is fresh, its tone neutral); refused past `limit` (the contract's 12). */\nexport function addState(set: StatusSet, label: Label, limit = 12): StatusSet {\n if (set.states.length >= limit) return set;\n return withStates(set, [...set.states, { key: freshKey(set.states.map((s) => s.key)), label: { ...label }, tone: \"neutral\" }]);\n}\n\n/** Removes a state with every move that touches it; the initial state falls back to the first state that is not final. */\nexport function removeState(set: StatusSet, key: string): StatusSet {\n const states = set.states.filter((s) => s.key !== key);\n const transitions = set.transitions.filter((t) => t.from !== key && t.to !== key);\n const initial = set.initial === key ? states.find((s) => !s.final)?.key : set.initial;\n return withStates(set, states, { transitions, initial });\n}\n\nexport const setStateLabel = (set: StatusSet, key: string, lang: Lang, text: string): StatusSet =>\n withStates(set, set.states.map((s) => (s.key === key ? { ...s, label: { ...s.label, [lang]: text } } : s)));\n\nexport const setStateTone = (set: StatusSet, key: string, tone: StatusTone): StatusSet =>\n withStates(set, set.states.map((s) => (s.key === key ? { ...s, tone } : s)));\n\n/** Moves a state in the set's order — the order of a status column. */\nexport const moveState = (set: StatusSet, from: number, to: number): StatusSet => withStates(set, move(set.states, from, to));\n\n/** Makes a state final (its moves out are dropped: a final state has no way out) or not. Refused for the initial state: it is never final. */\nexport function setFinal(set: StatusSet, key: string, final: boolean): StatusSet {\n if (final && set.initial === key) return set;\n const states = set.states.map((s) => (s.key === key ? { ...s, final } : s));\n return withStates(set, states, final ? { transitions: set.transitions.filter((t) => t.from !== key) } : {});\n}\n\n/** The state of an entity nobody moved yet. Refused for a final state. */\nexport const setInitial = (set: StatusSet, key: string): StatusSet => (isFinal(set, key) || !set.states.some((s) => s.key === key) ? set : { ...set, initial: key });\n\nconst replaceTransition = (set: StatusSet, from: string, to: string, next: StatusTransition | null): StatusSet => {\n const kept = set.transitions.filter((t) => !(t.from === from && t.to === to));\n return { ...set, transitions: next ? [...kept, next] : kept };\n};\n\n/** The roles that may make `from → to`. No role removes the move. Refused out of a final state and onto itself. */\nexport function setTransitionRoles(set: StatusSet, from: string, to: string, roles: readonly string[]): StatusSet {\n if (from === to || isFinal(set, from)) return set;\n if (roles.length === 0) return replaceTransition(set, from, to, null);\n const current = transitionOf(set, from, to);\n return replaceTransition(set, from, to, { ...current, from, to, roles: [...roles] });\n}\n\n/** Asks for a second press on this move (off by default). */\nexport function setTransitionConfirm(set: StatusSet, from: string, to: string, confirm: boolean): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const { confirm: _old, ...rest } = current;\n return replaceTransition(set, from, to, confirm ? { ...rest, confirm: true } : rest);\n}\n\n/** The reasons a mover may pick for this move, as data; none removes the list (no reason is accepted). */\nexport function setTransitionReasons(set: StatusSet, from: string, to: string, reasons: StatusTransition[\"reasons\"]): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const { reasons: _old, ...rest } = current;\n return replaceTransition(set, from, to, reasons && reasons.length > 0 ? { ...rest, reasons: [...reasons] } : rest);\n}\n\n/** Adds an empty reason to a move (the editor then asks for its two labels). */\nexport function addReason(set: StatusSet, from: string, to: string, label: Label): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const reasons = current.reasons ?? [];\n return setTransitionReasons(set, from, to, [...reasons, { key: freshKey(reasons.map((r) => r.key), \"reason\"), label: { ...label } }]);\n}\n"
419
+ "content": "// The pure changes of the admin's editors (krizaka-ts#89, `@krizaka/organize/contract`): each takes a descriptor and gives a new one,\n// never mutating, never throwing. The rules of the contract that the editors can keep by construction are kept here — a final state has\n// no way out, the initial state is never final, a move goes to another state, a transition exists when a role may make it — and the\n// rest (`kindConfigProblems`) is shown by the editor in place. Shared by the web and React Native editors; imports types only.\nimport type { Label, Marker, StatusSet, StatusState, StatusTone, StatusTransition, TagPreset } from \"@krizaka/organize/contract\";\n\n/** The `tags` part of a `KindConfig`. */\nexport type TagSetValue = {\n writers: string[];\n userTags: boolean;\n max: number;\n presets: Record<string, TagPreset[]>;\n};\n\n/** The language of a label. */\nexport type Lang = keyof Label;\n\n/** A list with the item at `from` put at `to` (the same list when either is out of range). */\nexport function move<T>(list: readonly T[], from: number, to: number): T[] {\n if (from === to || from < 0 || to < 0 || from >= list.length || to >= list.length) return [...list];\n const next = [...list];\n const [item] = next.splice(from, 1);\n next.splice(to, 0, item as T);\n return next;\n}\n\n// --- tags ------------------------------------------------------------------------------------------------------------------\n\nconst presetsOf = (tags: TagSetValue, variant: string): TagPreset[] => tags.presets[variant] ?? [];\nconst withPresets = (tags: TagSetValue, variant: string, list: TagPreset[]): TagSetValue => ({ ...tags, presets: { ...tags.presets, [variant]: list } });\n\n/** A name as the contract keeps it: spaces collapsed, trimmed. */\nexport const cleanName = (raw: string) => raw.replaceAll(/\\s+/g, \" \").trim();\n\n/** Adds a preset at the end — refused (same value) for an empty name or one the variant already has (case ignored). */\nexport function addPreset(tags: TagSetValue, variant: string, name: string, marker: Marker): TagSetValue {\n const clean = cleanName(name);\n if (!clean || presetsOf(tags, variant).some((p) => p.name.toLocaleLowerCase() === clean.toLocaleLowerCase())) return tags;\n return withPresets(tags, variant, [...presetsOf(tags, variant), { name: clean, marker }]);\n}\n\n/** Renames the preset at `index` (kept as typed: the editor trims on blur, so a half-typed name is not lost). */\nexport const renamePreset = (tags: TagSetValue, variant: string, index: number, name: string): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).map((p, i) => (i === index ? { ...p, name } : p)));\n\nexport const recolorPreset = (tags: TagSetValue, variant: string, index: number, marker: Marker): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).map((p, i) => (i === index ? { ...p, marker } : p)));\n\nexport const removePreset = (tags: TagSetValue, variant: string, index: number): TagSetValue =>\n withPresets(tags, variant, presetsOf(tags, variant).filter((_, i) => i !== index));\n\nexport const movePreset = (tags: TagSetValue, variant: string, from: number, to: number): TagSetValue => withPresets(tags, variant, move(presetsOf(tags, variant), from, to));\n\n/** The names a variant has twice (case ignored): the editor marks them in place. */\nexport function duplicatePresetNames(list: readonly TagPreset[]): Set<number> {\n const seen = new Map<string, number>();\n const twins = new Set<number>();\n list.forEach((p, i) => {\n const key = cleanName(p.name).toLocaleLowerCase();\n if (!key) return;\n const first = seen.get(key);\n if (first === undefined) seen.set(key, i);\n else twins.add(first).add(i);\n });\n return twins;\n}\n\n/** The most tags per scope and kind: the contract's 1 to 200. */\nexport const clampMax = (value: number, ceiling = 200) => (Number.isFinite(value) ? Math.min(ceiling, Math.max(1, Math.round(value))) : 1);\n\nexport const toggleRole = (roles: readonly string[], role: string): string[] => (roles.includes(role) ? roles.filter((r) => r !== role) : [...roles, role]);\n\n// --- statuses --------------------------------------------------------------------------------------------------------------\n\n/** The smallest `<prefix>_<n>` key no one holds yet. */\nexport function freshKey(taken: readonly string[], prefix = \"state\"): string {\n let n = taken.length + 1;\n while (taken.includes(`${prefix}_${n}`)) n += 1;\n return `${prefix}_${n}`;\n}\n\nexport const transitionOf = (set: StatusSet, from: string, to: string): StatusTransition | undefined => set.transitions.find((t) => t.from === from && t.to === to);\nexport const isFinal = (set: StatusSet, key: string) => Boolean(set.states.find((s) => s.key === key)?.final);\n\nconst withStates = (set: StatusSet, states: StatusState[], rest: Partial<StatusSet> = {}): StatusSet => ({ ...set, states, ...rest });\n\n/** Adds a state at the end (its key is fresh, its tone neutral); refused past `limit` (the contract's 12). */\nexport function addState(set: StatusSet, label: Label, limit = 12): StatusSet {\n if (set.states.length >= limit) return set;\n return withStates(set, [...set.states, { key: freshKey(set.states.map((s) => s.key)), label: { ...label }, tone: \"neutral\" }]);\n}\n\n/** Removes a state with every move that touches it; the initial state falls back to the first state that is not final. */\nexport function removeState(set: StatusSet, key: string): StatusSet {\n const states = set.states.filter((s) => s.key !== key);\n const transitions = set.transitions.filter((t) => t.from !== key && t.to !== key);\n const initial = set.initial === key ? states.find((s) => !s.final)?.key : set.initial;\n return withStates(set, states, { transitions, initial });\n}\n\nexport const setStateLabel = (set: StatusSet, key: string, lang: Lang, text: string): StatusSet =>\n withStates(set, set.states.map((s) => (s.key === key ? { ...s, label: { ...s.label, [lang]: text } } : s)));\n\nexport const setStateTone = (set: StatusSet, key: string, tone: StatusTone): StatusSet =>\n withStates(set, set.states.map((s) => (s.key === key ? { ...s, tone } : s)));\n\n/** Moves a state in the set's order — the order of a status column. */\nexport const moveState = (set: StatusSet, from: number, to: number): StatusSet => withStates(set, move(set.states, from, to));\n\n/** Makes a state final (its moves out are dropped: a final state has no way out) or not. Refused for the initial state: it is never final. */\nexport function setFinal(set: StatusSet, key: string, final: boolean): StatusSet {\n if (final && set.initial === key) return set;\n const states = set.states.map((s) => (s.key === key ? { ...s, final } : s));\n return withStates(set, states, final ? { transitions: set.transitions.filter((t) => t.from !== key) } : {});\n}\n\n/** The state of an entity nobody moved yet. Refused for a final state. */\nexport const setInitial = (set: StatusSet, key: string): StatusSet => (isFinal(set, key) || !set.states.some((s) => s.key === key) ? set : { ...set, initial: key });\n\nconst replaceTransition = (set: StatusSet, from: string, to: string, next: StatusTransition | null): StatusSet => {\n const kept = set.transitions.filter((t) => !(t.from === from && t.to === to));\n return { ...set, transitions: next ? [...kept, next] : kept };\n};\n\n/** The roles that may make `from → to`. No role removes the move. Refused out of a final state and onto itself. */\nexport function setTransitionRoles(set: StatusSet, from: string, to: string, roles: readonly string[]): StatusSet {\n if (from === to || isFinal(set, from)) return set;\n if (roles.length === 0) return replaceTransition(set, from, to, null);\n const current = transitionOf(set, from, to);\n return replaceTransition(set, from, to, { ...current, from, to, roles: [...roles] });\n}\n\n/** Asks for a second press on this move (off by default). */\nexport function setTransitionConfirm(set: StatusSet, from: string, to: string, confirm: boolean): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const { confirm: _old, ...rest } = current;\n return replaceTransition(set, from, to, confirm ? { ...rest, confirm: true } : rest);\n}\n\n/** The reasons a mover may pick for this move, as data; none removes the list (no reason is accepted). */\nexport function setTransitionReasons(set: StatusSet, from: string, to: string, reasons: StatusTransition[\"reasons\"]): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const { reasons: _old, ...rest } = current;\n return replaceTransition(set, from, to, reasons && reasons.length > 0 ? { ...rest, reasons: [...reasons] } : rest);\n}\n\n/** Adds an empty reason to a move (the editor then asks for its two labels). */\nexport function addReason(set: StatusSet, from: string, to: string, label: Label): StatusSet {\n const current = transitionOf(set, from, to);\n if (!current) return set;\n const reasons = current.reasons ?? [];\n return setTransitionReasons(set, from, to, [...reasons, { key: freshKey(reasons.map((r) => r.key), \"reason\"), label: { ...label } }]);\n}\n"
420
420
  },
421
421
  {
422
422
  "path": "meta.ts",
@@ -217,7 +217,7 @@
217
217
  },
218
218
  {
219
219
  "path": "kpi-explained/kpi-explained.tsx",
220
- "content": "// Server-safe. A figure whose meaning, formula, source and freshness travel with its value.\nimport { type DateInput, formatDate, formatMoney, formatNumber, formatPercent, type Locale } from \"@krizaka/intl\";\nimport * as React from \"react\";\n\nexport type KpiNumberOptions = Omit<Intl.NumberFormatOptions, \"style\" | \"currency\" | \"currencyDisplay\">;\n\nexport type KpiFormat =\n | { type: \"money\"; currency: string; minorUnitDigits?: number }\n | { type: \"number\"; options?: KpiNumberOptions }\n | { type: \"percent\"; options?: KpiNumberOptions };\n\nexport type KpiState = \"ok\" | \"watch\" | \"act\";\n\nexport interface KpiExplainedProps extends Omit<React.ComponentProps<\"article\">, \"children\"> {\n /** The figure's name. */\n label: React.ReactNode;\n /** The raw number: money is integer minor units; percentages are ratios such as 0.125. */\n value: number;\n /** How to format the value with `@krizaka/intl`. */\n format: KpiFormat;\n /** The app's locale, e.g. `fr-CA`. */\n locale: Locale;\n /** The IANA time zone for freshness dates; defaults to UTC for deterministic rendering. */\n timeZone?: string;\n /** One plain-language sentence about what the figure means. */\n meaning: string;\n /** The localized label for the formula row. */\n formulaLabel: React.ReactNode;\n /** The calculation in words, e.g. “dépenses TTC ÷ ventes TTC”. */\n formula: string;\n /** The localized label for the source row. */\n sourceLabel: React.ReactNode;\n /** The source link or file name, supplied by the host. */\n source: React.ReactNode;\n /** A host-provided action such as “Verify”, next to the source. */\n verify?: React.ReactNode;\n /** Host-provided thresholds in the same units as `value`. */\n thresholds: {\n direction: \"above\" | \"below\";\n watchAt: number;\n actAt: number;\n };\n /** Host-provided words for the derived state. */\n stateLabels: Record<KpiState, React.ReactNode>;\n /** Reading time and the expected next reading time (the host derives it from its cadence). */\n freshness: {\n lastRead: DateInput;\n expectedAt: DateInput;\n now: DateInput;\n lastReadLabel: React.ReactNode;\n staleLabel: React.ReactNode;\n };\n /** An optional Sparkline from `@krizaka/charts`, with its own accessible summary. */\n sparkline?: React.ReactNode;\n /** Replace every non-space character in the value while preserving its formatted shape. */\n masked?: boolean;\n /** The accessible name shown instead of the value when masked. */\n maskedLabel: string;\n}\n\nfunction formatValue(value: number, format: KpiFormat, locale: Locale): string {\n switch (format.type) {\n case \"money\":\n return formatMoney(value, { currency: format.currency, locale, minorUnitDigits: format.minorUnitDigits });\n case \"percent\":\n return formatPercent(value, { locale, ...format.options });\n case \"number\":\n return formatNumber(value, { locale, ...format.options });\n }\n}\n\nfunction stateFor(value: number, thresholds: KpiExplainedProps[\"thresholds\"]): KpiState {\n const reaches = thresholds.direction === \"above\" ? (level: number) => value >= level : (level: number) => value <= level;\n if (reaches(thresholds.actAt)) return \"act\";\n if (reaches(thresholds.watchAt)) return \"watch\";\n return \"ok\";\n}\n\nfunction maskValue(value: string): string {\n return value.replace(/[^\\s]/gu, \"•\");\n}\n\n/** A key figure that explains what it means, how it is calculated and where it came from. */\nexport function KpiExplained({\n label,\n value,\n format,\n locale,\n timeZone = \"UTC\",\n meaning,\n formulaLabel,\n formula,\n sourceLabel,\n source,\n verify,\n thresholds,\n stateLabels,\n freshness,\n sparkline,\n masked = false,\n maskedLabel,\n className,\n ...props\n}: Readonly<KpiExplainedProps>) {\n const id = React.useId();\n const state = stateFor(value, thresholds);\n const formattedValue = formatValue(value, format, locale);\n const lastRead = new Date(freshness.lastRead);\n const stale = new Date(freshness.now) >= new Date(freshness.expectedAt);\n\n return (\n <article aria-labelledby={`${id}-label`} className={[\"kz-kpi\", className].filter(Boolean).join(\" \")} data-state={state} {...props}>\n <header className=\"kz-kpi-head\">\n <h3 id={`${id}-label`} className=\"kz-kpi-label\">{label}</h3>\n <span className=\"kz-kpi-state\" data-state={state}>{stateLabels[state]}</span>\n </header>\n <p className=\"kz-kpi-value\">\n {masked ? <span role=\"img\" aria-label={maskedLabel}>{maskValue(formattedValue)}</span> : formattedValue}\n </p>\n <p className=\"kz-kpi-meaning\">{meaning}</p>\n <dl className=\"kz-kpi-details\">\n <div><dt>{formulaLabel}</dt><dd>{formula}</dd></div>\n <div><dt>{sourceLabel}</dt><dd>{source}{verify ? <span className=\"kz-kpi-verify\">{verify}</span> : null}</dd></div>\n </dl>\n <p className=\"kz-kpi-freshness\">\n <span>{freshness.lastReadLabel}: </span>\n <time dateTime={lastRead.toISOString()}>{formatDate(lastRead, { locale, style: \"medium\", timeStyle: \"short\", timeZone })}</time>\n {stale ? <span className=\"kz-kpi-stale\" role=\"status\">{freshness.staleLabel}</span> : null}\n </p>\n {sparkline ? <div className=\"kz-kpi-sparkline\">{sparkline}</div> : null}\n </article>\n );\n}\n"
220
+ "content": "// Server-safe. A figure whose meaning, formula, source and freshness travel with its value.\nimport { type DateInput, formatDate, formatMoney, formatNumber, formatPercent, type Locale } from \"@krizaka/intl\";\nimport * as React from \"react\";\n\nexport type KpiNumberOptions = Omit<Intl.NumberFormatOptions, \"style\" | \"currency\" | \"currencyDisplay\">;\n\nexport type KpiFormat =\n | { type: \"money\"; currency: string; minorUnitDigits?: number }\n | { type: \"number\"; options?: KpiNumberOptions }\n | { type: \"percent\"; options?: KpiNumberOptions };\n\nexport type KpiState = \"ok\" | \"watch\" | \"act\";\n\nexport interface KpiExplainedProps extends Omit<React.ComponentProps<\"article\">, \"children\"> {\n /** The figure's name. */\n label: React.ReactNode;\n /** The raw number: money is integer minor units; percentages are ratios such as 0.125. */\n value: number;\n /** How to format the value with `@krizaka/intl`. */\n format: KpiFormat;\n /** The app's locale, e.g. `fr-CA`. */\n locale: Locale;\n /** The IANA time zone for freshness dates; defaults to UTC for deterministic rendering. */\n timeZone?: string;\n /** One plain-language sentence about what the figure means. */\n meaning: string;\n /** The localized label for the formula row. */\n formulaLabel: React.ReactNode;\n /** The calculation in words, e.g. “dépenses TTC ÷ ventes TTC”. */\n formula: string;\n /** The localized label for the source row. */\n sourceLabel: React.ReactNode;\n /** The source link or file name, supplied by the host. */\n source: React.ReactNode;\n /** A host-provided action such as “Verify”, next to the source. */\n verify?: React.ReactNode;\n /** Host-provided thresholds in the same units as `value`. */\n thresholds: {\n direction: \"above\" | \"below\";\n watchAt: number;\n actAt: number;\n };\n /** Host-provided words for the derived state. */\n stateLabels: Record<KpiState, React.ReactNode>;\n /** Reading time and the expected next reading time (the host derives it from its cadence). */\n freshness: {\n lastRead: DateInput;\n expectedAt: DateInput;\n now: DateInput;\n lastReadLabel: React.ReactNode;\n staleLabel: React.ReactNode;\n };\n /** An optional Sparkline from `@krizaka/charts`, with its own accessible summary. */\n sparkline?: React.ReactNode;\n /** Replace every non-space character in the value while preserving its formatted shape. */\n masked?: boolean;\n /** The accessible name shown instead of the value when masked. */\n maskedLabel: string;\n}\n\nfunction formatValue(value: number, format: KpiFormat, locale: Locale): string {\n switch (format.type) {\n case \"money\":\n return formatMoney(value, { currency: format.currency, locale, minorUnitDigits: format.minorUnitDigits });\n case \"percent\":\n return formatPercent(value, { locale, ...format.options });\n case \"number\":\n return formatNumber(value, { locale, ...format.options });\n }\n}\n\nfunction stateFor(value: number, thresholds: KpiExplainedProps[\"thresholds\"]): KpiState {\n const reaches = thresholds.direction === \"above\" ? (level: number) => value >= level : (level: number) => value <= level;\n if (reaches(thresholds.actAt)) return \"act\";\n if (reaches(thresholds.watchAt)) return \"watch\";\n return \"ok\";\n}\n\nfunction maskValue(value: string): string {\n return value.replaceAll(/[^\\s]/gu, \"•\");\n}\n\n/** A key figure that explains what it means, how it is calculated and where it came from. */\nexport function KpiExplained({\n label,\n value,\n format,\n locale,\n timeZone = \"UTC\",\n meaning,\n formulaLabel,\n formula,\n sourceLabel,\n source,\n verify,\n thresholds,\n stateLabels,\n freshness,\n sparkline,\n masked = false,\n maskedLabel,\n className,\n ...props\n}: Readonly<KpiExplainedProps>) {\n const id = React.useId();\n const state = stateFor(value, thresholds);\n const formattedValue = formatValue(value, format, locale);\n const lastRead = new Date(freshness.lastRead);\n const stale = new Date(freshness.now) >= new Date(freshness.expectedAt);\n\n return (\n <article aria-labelledby={`${id}-label`} className={[\"kz-kpi\", className].filter(Boolean).join(\" \")} data-state={state} {...props}>\n <header className=\"kz-kpi-head\">\n <h3 id={`${id}-label`} className=\"kz-kpi-label\">{label}</h3>\n <span className=\"kz-kpi-state\" data-state={state}>{stateLabels[state]}</span>\n </header>\n <p className=\"kz-kpi-value\">\n {masked ? <span role=\"img\" aria-label={maskedLabel}>{maskValue(formattedValue)}</span> : formattedValue}\n </p>\n <p className=\"kz-kpi-meaning\">{meaning}</p>\n <dl className=\"kz-kpi-details\">\n <div><dt>{formulaLabel}</dt><dd>{formula}</dd></div>\n <div><dt>{sourceLabel}</dt><dd>{source}{verify ? <span className=\"kz-kpi-verify\">{verify}</span> : null}</dd></div>\n </dl>\n <p className=\"kz-kpi-freshness\">\n <span>{freshness.lastReadLabel}: </span>\n <time dateTime={lastRead.toISOString()}>{formatDate(lastRead, { locale, style: \"medium\", timeStyle: \"short\", timeZone })}</time>\n {stale ? <span className=\"kz-kpi-stale\" role=\"status\">{freshness.staleLabel}</span> : null}\n </p>\n {sparkline ? <div className=\"kz-kpi-sparkline\">{sparkline}</div> : null}\n </article>\n );\n}\n"
221
221
  },
222
222
  {
223
223
  "path": "kpi-explained/meta.ts",
@@ -182,7 +182,7 @@
182
182
  },
183
183
  {
184
184
  "path": "landing-page/landing-page.tsx",
185
- "content": "// Server-safe. A landing page (blocks.css `.kz-tpl-*`): a split hero — the promise and its actions beside the product\n// alive (a recording, a demo; without one, a single column) — a band of proofs, the features as a bento where the main one takes the room, then the\n// closing call. The blocks come through their package entries, so their client parts keep their boundary.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Page, Section } from \"@krizaka/ui/page\";\nimport { SectionBackdrop } from \"@krizaka/ui/section-backdrop\";\nimport type * as React from \"react\";\n\nimport { HeroStage } from \"../page/hero-stage\";\n\nexport interface LandingFeature {\n /** A stable key. */\n id: string;\n /** Its name. */\n title: React.ReactNode;\n /** One or two sentences. */\n text: React.ReactNode;\n /** A signature icon above the title. */\n icon?: React.ReactNode;\n /** A visual at the bottom of the tile (a chart, a screenshot, a code line). */\n visual?: React.ReactNode;\n /**\n * Its weight in the bento: `lg` (four columns, two rows — the main one), `md` (three), `sm` (two).\n * @default \"sm\"\n */\n size?: \"lg\" | \"md\" | \"sm\";\n}\n\nexport type LandingPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The promise: the page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** The hero's actions (the main one cut, with shimmer). */\n actions?: React.ReactNode;\n /** The product, alive, beside the words: a recording, a live demo (framed as a window). Absent: a single-column hero, no empty stage. */\n visual?: React.ReactNode;\n /** The window's caption (`studio.app — studio`). */\n visualLabel?: React.ReactNode;\n /** Figures or facts in a band under the hero: `{ value, label }`. */\n proofs?: readonly { value: React.ReactNode; label: React.ReactNode }[];\n /** Full width, between the proofs and the features: a carousel, a demo, a wide plate. */\n showcase?: React.ReactNode;\n /**\n * The hero's backdrop: `grid` (the dome, the grid and the slow drift) or `quiet` (the still dome only: no grid layer, no drift).\n * @default \"grid\"\n */\n backdrop?: \"grid\" | \"quiet\";\n /** The features' section: its eyebrow, title and lead. */\n featuresHeading?: { eyebrow?: React.ReactNode; title: React.ReactNode; lead?: React.ReactNode };\n /** The features, as a bento. */\n features: readonly LandingFeature[];\n /** Between the features and the closing call: a story, a quote, testimonials. */\n children?: React.ReactNode;\n /** The closing call: its title, body and actions. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n};\n\n/** A landing page: split hero with the product alive, proofs, a bento of features, the closing call. */\nexport function LandingPage({ eyebrow, title, lead, actions, visual, visualLabel, proofs, showcase, backdrop = \"grid\", featuresHeading, features, closing, children, ...props }: LandingPageProps) {\n return (\n <div {...props}>\n <SectionBackdrop as=\"header\" grid={backdrop === \"grid\"} animated={backdrop === \"grid\"} className=\"kz-hero\">\n <Page className=\"kz-tpl-hero-frame\">\n <div className=\"kz-tpl-split\" data-single={visual ? undefined : \"\"}>\n <div className=\"kz-hero-text\">\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <h1 className=\"kz-hero-title\">{title}</h1>\n {lead && <p className=\"kz-hero-lead\">{lead}</p>}\n {actions && <div className=\"kz-tpl-actions kz-hero-extra\">{actions}</div>}\n </div>\n {visual && <HeroStage visual={visual} label={visualLabel} />}\n </div>\n </Page>\n </SectionBackdrop>\n {proofs && proofs.length > 0 && (\n <Page>\n <dl className=\"kz-tpl-band\">\n {proofs.map((p, i) => (\n <div key={i}>\n <dt>{p.value}</dt>\n <dd>{p.label}</dd>\n </div>\n ))}\n </dl>\n </Page>\n )}\n {showcase && (\n <Page data-landing-showcase=\"\" className=\"kz-tpl-showcase\">\n {showcase}\n </Page>\n )}\n <Section id=\"features\" eyebrow={featuresHeading?.eyebrow} title={featuresHeading?.title} lead={featuresHeading?.lead} reveal aria-label={featuresHeading ? undefined : \"Features\"}>\n <ul className=\"kz-tpl-bento\">\n {features.map((f) => (\n <li key={f.id} data-size={f.size === \"sm\" ? undefined : f.size} data-reveal=\"\">\n {f.icon && <span className=\"kz-block-icon\" aria-hidden>{f.icon}</span>}\n <h3>{f.title}</h3>\n <p>{f.text}</p>\n {f.visual && <div className=\"kz-tpl-bento-visual\">{f.visual}</div>}\n </li>\n ))}\n </ul>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"landing-closing\">\n <CtaPanel id=\"landing-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"
185
+ "content": "// Server-safe. A landing page (blocks.css `.kz-tpl-*`): a split hero — the promise and its actions beside the product\n// alive (a recording, a demo; without one, a single column) — a band of proofs, the features as a bento where the main one takes the room, then the\n// closing call. The blocks come through their package entries, so their client parts keep their boundary.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Page, Section } from \"@krizaka/ui/page\";\nimport { SectionBackdrop } from \"@krizaka/ui/section-backdrop\";\nimport type * as React from \"react\";\n\nimport { HeroStage } from \"../page/hero-stage\";\n\nexport interface LandingFeature {\n /** A stable key. */\n id: string;\n /** Its name. */\n title: React.ReactNode;\n /** One or two sentences. */\n text: React.ReactNode;\n /** A signature icon above the title. */\n icon?: React.ReactNode;\n /** A visual at the bottom of the tile (a chart, a screenshot, a code line). */\n visual?: React.ReactNode;\n /**\n * Its weight in the bento: `lg` (four columns, two rows — the main one), `md` (three), `sm` (two).\n * @default \"sm\"\n */\n size?: \"lg\" | \"md\" | \"sm\";\n}\n\nexport type LandingPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The promise: the page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** The hero's actions (the main one cut, with shimmer). */\n actions?: React.ReactNode;\n /** The product, alive, beside the words: a recording, a live demo (framed as a window). Absent: a single-column hero, no empty stage. */\n visual?: React.ReactNode;\n /** The window's caption (`studio.app — studio`). */\n visualLabel?: React.ReactNode;\n /** Figures or facts in a band under the hero: `{ value, label }`. */\n proofs?: readonly { value: React.ReactNode; label: React.ReactNode }[];\n /** Full width, between the proofs and the features: a carousel, a demo, a wide plate. */\n showcase?: React.ReactNode;\n /**\n * The hero's backdrop: `grid` (the dome, the grid and the slow drift) or `quiet` (the still dome only: no grid layer, no drift).\n * @default \"grid\"\n */\n backdrop?: \"grid\" | \"quiet\";\n /** The features' section: its eyebrow, title and lead. */\n featuresHeading?: { eyebrow?: React.ReactNode; title: React.ReactNode; lead?: React.ReactNode };\n /** The features, as a bento. */\n features: readonly LandingFeature[];\n /** Between the features and the closing call: a story, a quote, testimonials. */\n children?: React.ReactNode;\n /** The closing call: its title, body and actions. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n};\n\n/** A landing page: split hero with the product alive, proofs, a bento of features, the closing call. */\nexport function LandingPage({ eyebrow, title, lead, actions, visual, visualLabel, proofs, showcase, backdrop = \"grid\", featuresHeading, features, closing, children, ...props }: Readonly<LandingPageProps>) {\n return (\n <div {...props}>\n <SectionBackdrop as=\"header\" grid={backdrop === \"grid\"} animated={backdrop === \"grid\"} className=\"kz-hero\">\n <Page className=\"kz-tpl-hero-frame\">\n <div className=\"kz-tpl-split\" data-single={visual ? undefined : \"\"}>\n <div className=\"kz-hero-text\">\n {eyebrow && <p className=\"kz-eyebrow\">{eyebrow}</p>}\n <h1 className=\"kz-hero-title\">{title}</h1>\n {lead && <p className=\"kz-hero-lead\">{lead}</p>}\n {actions && <div className=\"kz-tpl-actions kz-hero-extra\">{actions}</div>}\n </div>\n {visual && <HeroStage visual={visual} label={visualLabel} />}\n </div>\n </Page>\n </SectionBackdrop>\n {proofs && proofs.length > 0 && (\n <Page>\n <dl className=\"kz-tpl-band\">\n {proofs.map((p, i) => (\n <div key={i}>\n <dt>{p.value}</dt>\n <dd>{p.label}</dd>\n </div>\n ))}\n </dl>\n </Page>\n )}\n {showcase && (\n <Page data-landing-showcase=\"\" className=\"kz-tpl-showcase\">\n {showcase}\n </Page>\n )}\n <Section id=\"features\" eyebrow={featuresHeading?.eyebrow} title={featuresHeading?.title} lead={featuresHeading?.lead} reveal aria-label={featuresHeading ? undefined : \"Features\"}>\n <ul className=\"kz-tpl-bento\">\n {features.map((f) => (\n <li key={f.id} data-size={f.size === \"sm\" ? undefined : f.size} data-reveal=\"\">\n {f.icon && <span className=\"kz-block-icon\" aria-hidden>{f.icon}</span>}\n <h3>{f.title}</h3>\n <p>{f.text}</p>\n {f.visual && <div className=\"kz-tpl-bento-visual\">{f.visual}</div>}\n </li>\n ))}\n </ul>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"landing-closing\">\n <CtaPanel id=\"landing-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"
186
186
  },
187
187
  {
188
188
  "path": "landing-page/meta.ts",