@krizaka/ui 4.7.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (965) hide show
  1. package/README.md +1 -0
  2. package/dist/{RotatingWord-D3tpDLE4.d.ts → RotatingWord-CkDcPH9x.d.ts} +2 -2
  3. package/dist/account-menu.js +2 -2
  4. package/dist/account-menu.js.map +1 -1
  5. package/dist/account-settings.d.ts +9 -9
  6. package/dist/account-settings.js +4 -4
  7. package/dist/account-settings.js.map +1 -1
  8. package/dist/achievement.d.ts +3 -3
  9. package/dist/achievement.js +1 -1
  10. package/dist/achievement.js.map +1 -1
  11. package/dist/action-bar.d.ts +1 -1
  12. package/dist/action-bar.js +5 -5
  13. package/dist/action-bar.js.map +1 -1
  14. package/dist/activity-feed.d.ts +2 -2
  15. package/dist/activity-feed.js +1 -1
  16. package/dist/activity-feed.js.map +1 -1
  17. package/dist/alert.d.ts +1 -1
  18. package/dist/alert.js.map +1 -1
  19. package/dist/analysis-report.d.ts +1 -1
  20. package/dist/analysis-report.js +4 -4
  21. package/dist/analysis-report.js.map +1 -1
  22. package/dist/anatomy-plate.d.ts +1 -1
  23. package/dist/anatomy-plate.js +1 -1
  24. package/dist/anatomy-plate.js.map +1 -1
  25. package/dist/app-header/search.d.ts +1 -1
  26. package/dist/app-header/search.js +2 -2
  27. package/dist/app-header/search.js.map +1 -1
  28. package/dist/app-header.d.ts +2 -2
  29. package/dist/app-header.js.map +1 -1
  30. package/dist/app-shell.d.ts +8 -8
  31. package/dist/app-shell.js +4 -4
  32. package/dist/app-shell.js.map +1 -1
  33. package/dist/architecture-diagram.d.ts +1 -1
  34. package/dist/architecture-diagram.js.map +1 -1
  35. package/dist/argument-card.d.ts +2 -2
  36. package/dist/argument-card.js +6 -6
  37. package/dist/argument-card.js.map +1 -1
  38. package/dist/auth-layout.d.ts +1 -1
  39. package/dist/auth-layout.js.map +1 -1
  40. package/dist/avatar.d.ts +2 -2
  41. package/dist/avatar.js.map +1 -1
  42. package/dist/badge.d.ts +1 -1
  43. package/dist/badge.js +1 -1
  44. package/dist/bird-plate.d.ts +1 -1
  45. package/dist/bird-plate.js +2 -2
  46. package/dist/bird-plate.js.map +1 -1
  47. package/dist/button/text-link.d.ts +8 -0
  48. package/dist/button/text-link.js +6 -0
  49. package/dist/button/text-link.js.map +1 -0
  50. package/dist/button.d.ts +2 -2
  51. package/dist/button.js +3 -3
  52. package/dist/captcha.d.ts +2 -2
  53. package/dist/captcha.js +3 -3
  54. package/dist/captcha.js.map +1 -1
  55. package/dist/card-grid.d.ts +1 -1
  56. package/dist/card-grid.js +1 -1
  57. package/dist/card-grid.js.map +1 -1
  58. package/dist/card.d.ts +9 -9
  59. package/dist/card.js +1 -1
  60. package/dist/card.js.map +1 -1
  61. package/dist/catalogue-page.d.ts +2 -2
  62. package/dist/catalogue-page.js.map +1 -1
  63. package/dist/changelog-page.d.ts +1 -1
  64. package/dist/changelog-page.js +2 -2
  65. package/dist/changelog-page.js.map +1 -1
  66. package/dist/chapter.d.ts +3 -3
  67. package/dist/chapter.js +2 -2
  68. package/dist/chapter.js.map +1 -1
  69. package/dist/chat.d.ts +3 -3
  70. package/dist/chat.js +1 -1
  71. package/dist/chat.js.map +1 -1
  72. package/dist/checkbox.d.ts +1 -1
  73. package/dist/checkbox.js.map +1 -1
  74. package/dist/chip-link.d.ts +1 -1
  75. package/dist/chip-link.js +1 -1
  76. package/dist/chip-row.d.ts +2 -2
  77. package/dist/chip-row.js +1 -1
  78. package/dist/chip-row.js.map +1 -1
  79. package/dist/chip.d.ts +4 -5
  80. package/dist/chip.js +2 -2
  81. package/dist/choice-grid.d.ts +1 -1
  82. package/dist/choice-grid.js +2 -2
  83. package/dist/choice-grid.js.map +1 -1
  84. package/dist/{chunk-S6NYGOJT.js → chunk-22IORLB5.js} +1 -1
  85. package/dist/chunk-22IORLB5.js.map +1 -0
  86. package/dist/{chunk-QA3WETWT.js → chunk-2P7Y3LNN.js} +1 -1
  87. package/dist/chunk-2P7Y3LNN.js.map +1 -0
  88. package/dist/{chunk-OGWB76BR.js → chunk-3CEMOJBL.js} +2 -2
  89. package/dist/chunk-3CEMOJBL.js.map +1 -0
  90. package/dist/{chunk-WC3SO4CE.js → chunk-3SWWUJJL.js} +2 -2
  91. package/dist/chunk-3SWWUJJL.js.map +1 -0
  92. package/dist/{chunk-S2O4NSN5.js → chunk-3TCHVNNB.js} +1 -1
  93. package/dist/chunk-3TCHVNNB.js.map +1 -0
  94. package/dist/{chunk-7P7I5OQV.js → chunk-5KBYZLU4.js} +2 -2
  95. package/dist/chunk-5KBYZLU4.js.map +1 -0
  96. package/dist/{chunk-WKQ5CB3I.js → chunk-6ARAO3TR.js} +1 -1
  97. package/dist/{chunk-WKQ5CB3I.js.map → chunk-6ARAO3TR.js.map} +1 -1
  98. package/dist/{chunk-QHVV2JGF.js → chunk-6LF6IZZM.js} +2 -2
  99. package/dist/chunk-6LF6IZZM.js.map +1 -0
  100. package/dist/{chunk-HP7BDMVK.js → chunk-7B5Q76JR.js} +2 -2
  101. package/dist/chunk-7B5Q76JR.js.map +1 -0
  102. package/dist/{chunk-F2UZ2WWL.js → chunk-7KIIAOQH.js} +1 -1
  103. package/dist/{chunk-F2UZ2WWL.js.map → chunk-7KIIAOQH.js.map} +1 -1
  104. package/dist/{chunk-ADRUEPYC.js → chunk-7MA3UODW.js} +2 -2
  105. package/dist/{chunk-ADRUEPYC.js.map → chunk-7MA3UODW.js.map} +1 -1
  106. package/dist/{chunk-KH3JOEPY.js → chunk-7PVLEALV.js} +1 -1
  107. package/dist/chunk-7PVLEALV.js.map +1 -0
  108. package/dist/{chunk-QVHSV6RA.js → chunk-7UBLUGNW.js} +1 -1
  109. package/dist/chunk-7UBLUGNW.js.map +1 -0
  110. package/dist/{chunk-YTYNKMNS.js → chunk-BKMHN4UA.js} +5 -5
  111. package/dist/chunk-BKMHN4UA.js.map +1 -0
  112. package/dist/{chunk-4QH6CP2Y.js → chunk-BRYRZWLV.js} +1 -1
  113. package/dist/{chunk-4QH6CP2Y.js.map → chunk-BRYRZWLV.js.map} +1 -1
  114. package/dist/{chunk-43PTCDTL.js → chunk-BVN7JFOP.js} +1 -1
  115. package/dist/chunk-BVN7JFOP.js.map +1 -0
  116. package/dist/{chunk-5RWHDX5J.js → chunk-BYKA3FHX.js} +2 -2
  117. package/dist/chunk-BYKA3FHX.js.map +1 -0
  118. package/dist/{chunk-5PFCELGW.js → chunk-DIOAQOR5.js} +1 -1
  119. package/dist/chunk-DIOAQOR5.js.map +1 -0
  120. package/dist/{chunk-HJFRHYCI.js → chunk-DTGRZXYO.js} +2 -2
  121. package/dist/{chunk-P7AFIKWG.js → chunk-DVC4YQI2.js} +2 -2
  122. package/dist/chunk-DVC4YQI2.js.map +1 -0
  123. package/dist/{chunk-V5RO6JYI.js → chunk-E3LFHTUV.js} +2 -2
  124. package/dist/chunk-E3LFHTUV.js.map +1 -0
  125. package/dist/{chunk-WEVYKZIF.js → chunk-EAXIDRMB.js} +1 -1
  126. package/dist/chunk-EAXIDRMB.js.map +1 -0
  127. package/dist/{chunk-WU4VLSEA.js → chunk-EYMS6VRF.js} +1 -1
  128. package/dist/chunk-EYMS6VRF.js.map +1 -0
  129. package/dist/{chunk-LH5J3VLZ.js → chunk-F7EJZV53.js} +1 -1
  130. package/dist/chunk-F7EJZV53.js.map +1 -0
  131. package/dist/{chunk-VPO27AFS.js → chunk-G3L7AKZJ.js} +1 -1
  132. package/dist/chunk-G3L7AKZJ.js.map +1 -0
  133. package/dist/{chunk-EB45EVPJ.js → chunk-G5NROYGK.js} +3 -3
  134. package/dist/chunk-G5NROYGK.js.map +1 -0
  135. package/dist/{chunk-HKEAYSFS.js → chunk-GQMINKT3.js} +1 -1
  136. package/dist/{chunk-ENOS6ETI.js.map → chunk-GQMINKT3.js.map} +1 -1
  137. package/dist/{chunk-3X3OF4TI.js → chunk-H4NXYAL7.js} +1 -1
  138. package/dist/{chunk-3X3OF4TI.js.map → chunk-H4NXYAL7.js.map} +1 -1
  139. package/dist/{chunk-KR2W4ONJ.js → chunk-H7I6YLI6.js} +1 -1
  140. package/dist/chunk-H7I6YLI6.js.map +1 -0
  141. package/dist/{chunk-PJNR4NTS.js → chunk-HC2TY45B.js} +4 -4
  142. package/dist/{chunk-NSLXEDIS.js → chunk-HHBTM4AU.js} +1 -1
  143. package/dist/chunk-HHBTM4AU.js.map +1 -0
  144. package/dist/{chunk-XVRKKYWU.js → chunk-HVUR3UNK.js} +2 -2
  145. package/dist/{chunk-XVRKKYWU.js.map → chunk-HVUR3UNK.js.map} +1 -1
  146. package/dist/{chunk-V7W4RLRW.js → chunk-HWIDTLLO.js} +3 -3
  147. package/dist/chunk-HWIDTLLO.js.map +1 -0
  148. package/dist/{chunk-W675RFOA.js → chunk-ISC2QBXJ.js} +1 -1
  149. package/dist/chunk-ISC2QBXJ.js.map +1 -0
  150. package/dist/{chunk-7DYZTEE3.js → chunk-IWPB6SSW.js} +1 -1
  151. package/dist/chunk-IWPB6SSW.js.map +1 -0
  152. package/dist/{chunk-TVLRE7S3.js → chunk-JDVWUF5W.js} +2 -2
  153. package/dist/{chunk-TVLRE7S3.js.map → chunk-JDVWUF5W.js.map} +1 -1
  154. package/dist/{chunk-757ZTGU5.js → chunk-JE2NY4XE.js} +4 -4
  155. package/dist/chunk-JE2NY4XE.js.map +1 -0
  156. package/dist/{chunk-HLEBSAGC.js → chunk-KBSZ6JRF.js} +2 -2
  157. package/dist/chunk-KBSZ6JRF.js.map +1 -0
  158. package/dist/{chunk-Y3P5B4XS.js → chunk-KCU45KQ3.js} +3 -3
  159. package/dist/chunk-KCU45KQ3.js.map +1 -0
  160. package/dist/{chunk-ST5P5HNI.js → chunk-L4YBG5US.js} +4 -4
  161. package/dist/{chunk-ST5P5HNI.js.map → chunk-L4YBG5US.js.map} +1 -1
  162. package/dist/{chunk-NG6G6V5E.js → chunk-LFH3LEWR.js} +1 -1
  163. package/dist/chunk-LFH3LEWR.js.map +1 -0
  164. package/dist/{chunk-YATTFMDV.js → chunk-LSQQSJ6J.js} +2 -2
  165. package/dist/{chunk-YATTFMDV.js.map → chunk-LSQQSJ6J.js.map} +1 -1
  166. package/dist/{chunk-LNAAWT4Y.js → chunk-MJWOZ3JI.js} +1 -1
  167. package/dist/chunk-MJWOZ3JI.js.map +1 -0
  168. package/dist/{chunk-KID32IRJ.js → chunk-MXHJMTZ5.js} +1 -1
  169. package/dist/{chunk-KID32IRJ.js.map → chunk-MXHJMTZ5.js.map} +1 -1
  170. package/dist/{chunk-GHAN7OOE.js → chunk-N6LAWI4F.js} +2 -2
  171. package/dist/chunk-N6LAWI4F.js.map +1 -0
  172. package/dist/{chunk-5VZ37TY3.js → chunk-NFJWD5BT.js} +2 -2
  173. package/dist/chunk-NFJWD5BT.js.map +1 -0
  174. package/dist/{chunk-ZPOVOEO3.js → chunk-NJLIHGU4.js} +2 -2
  175. package/dist/chunk-NJLIHGU4.js.map +1 -0
  176. package/dist/{chunk-PRD7JRQX.js → chunk-ONCQWOTH.js} +4 -4
  177. package/dist/{chunk-PRD7JRQX.js.map → chunk-ONCQWOTH.js.map} +1 -1
  178. package/dist/{chunk-ENOS6ETI.js → chunk-OZC6CDZF.js} +1 -1
  179. package/dist/{chunk-HKEAYSFS.js.map → chunk-OZC6CDZF.js.map} +1 -1
  180. package/dist/{chunk-TXFX4PMN.js → chunk-OZY4C4W5.js} +1 -1
  181. package/dist/{chunk-TXFX4PMN.js.map → chunk-OZY4C4W5.js.map} +1 -1
  182. package/dist/{chunk-NPMGYLJV.js → chunk-PIRYDEX2.js} +3 -3
  183. package/dist/chunk-PIRYDEX2.js.map +1 -0
  184. package/dist/{chunk-C57KK5VB.js → chunk-PM23USOC.js} +1 -1
  185. package/dist/chunk-PM23USOC.js.map +1 -0
  186. package/dist/{chunk-PGBF3UBX.js → chunk-QKL5TECH.js} +1 -1
  187. package/dist/chunk-QKL5TECH.js.map +1 -0
  188. package/dist/{chunk-Z47KIPCT.js → chunk-QY5JEUJT.js} +1 -1
  189. package/dist/chunk-QY5JEUJT.js.map +1 -0
  190. package/dist/{chunk-FVGFPB73.js → chunk-RPVKF4RR.js} +1 -1
  191. package/dist/{chunk-FVGFPB73.js.map → chunk-RPVKF4RR.js.map} +1 -1
  192. package/dist/{chunk-NM2DEHFZ.js → chunk-RXYKJIC4.js} +1 -1
  193. package/dist/chunk-RXYKJIC4.js.map +1 -0
  194. package/dist/{chunk-W64RAX4N.js → chunk-TKYNYIJS.js} +5 -5
  195. package/dist/chunk-TKYNYIJS.js.map +1 -0
  196. package/dist/{chunk-S4TLZRGZ.js → chunk-UMXWOA3I.js} +1 -1
  197. package/dist/chunk-UMXWOA3I.js.map +1 -0
  198. package/dist/{chunk-VA4NPCUQ.js → chunk-VD7QFUAP.js} +3 -3
  199. package/dist/chunk-VD7QFUAP.js.map +1 -0
  200. package/dist/{chunk-MDSP7DJR.js → chunk-VQELCPQJ.js} +5 -5
  201. package/dist/chunk-VQELCPQJ.js.map +1 -0
  202. package/dist/{chunk-2FCQCWIK.js → chunk-VXNBXW3P.js} +5 -5
  203. package/dist/chunk-VXNBXW3P.js.map +1 -0
  204. package/dist/{chunk-B47WSPMP.js → chunk-WPUDPH2Q.js} +1 -1
  205. package/dist/chunk-WPUDPH2Q.js.map +1 -0
  206. package/dist/{chunk-SG2RKUVJ.js → chunk-WTZUMVJI.js} +5 -5
  207. package/dist/chunk-WTZUMVJI.js.map +1 -0
  208. package/dist/{chunk-EDQLPCM4.js → chunk-WVZF6WK3.js} +2 -2
  209. package/dist/chunk-WVZF6WK3.js.map +1 -0
  210. package/dist/{chunk-5D7NMUF6.js → chunk-XDAETKWM.js} +2 -2
  211. package/dist/chunk-XDAETKWM.js.map +1 -0
  212. package/dist/{chunk-QD6SNXF5.js → chunk-XDWSGNL4.js} +3 -3
  213. package/dist/chunk-XDWSGNL4.js.map +1 -0
  214. package/dist/{chunk-SB5WSVPI.js → chunk-ZFH2BYXW.js} +2 -2
  215. package/dist/chunk-ZFH2BYXW.js.map +1 -0
  216. package/dist/{chunk-XVLWVTQA.js → chunk-ZI7K742O.js} +1 -1
  217. package/dist/{chunk-XVLWVTQA.js.map → chunk-ZI7K742O.js.map} +1 -1
  218. package/dist/{chunk-NQENOT6L.js → chunk-ZRRWSKV3.js} +8 -8
  219. package/dist/chunk-ZRRWSKV3.js.map +1 -0
  220. package/dist/cn.js +1 -1
  221. package/dist/code-block.d.ts +2 -2
  222. package/dist/code-block.js +2 -2
  223. package/dist/code-block.js.map +1 -1
  224. package/dist/collection-switcher.d.ts +1 -1
  225. package/dist/collection-switcher.js +1 -1
  226. package/dist/collection-switcher.js.map +1 -1
  227. package/dist/columns.d.ts +2 -2
  228. package/dist/columns.js.map +1 -1
  229. package/dist/combobox.js +4 -4
  230. package/dist/command.d.ts +10 -10
  231. package/dist/command.js +4 -4
  232. package/dist/command.js.map +1 -1
  233. package/dist/comparison-table.d.ts +1 -1
  234. package/dist/comparison-table.js +1 -1
  235. package/dist/comparison-table.js.map +1 -1
  236. package/dist/component-page.d.ts +1 -1
  237. package/dist/component-page.js.map +1 -1
  238. package/dist/confirm-button.d.ts +1 -1
  239. package/dist/confirm-button.js +4 -4
  240. package/dist/contact-page.d.ts +1 -1
  241. package/dist/contact-page.js.map +1 -1
  242. package/dist/continue-prompt.d.ts +1 -1
  243. package/dist/continue-prompt.js +1 -1
  244. package/dist/continue-prompt.js.map +1 -1
  245. package/dist/copy-button.d.ts +1 -1
  246. package/dist/copy-button.js +4 -4
  247. package/dist/copy-button.js.map +1 -1
  248. package/dist/countdown.d.ts +1 -1
  249. package/dist/countdown.js.map +1 -1
  250. package/dist/cover-hero.d.ts +1 -1
  251. package/dist/cover-hero.js +5 -5
  252. package/dist/cover-hero.js.map +1 -1
  253. package/dist/cta-panel.d.ts +1 -1
  254. package/dist/cta-panel.js +1 -1
  255. package/dist/cta-panel.js.map +1 -1
  256. package/dist/dashboard-layout.d.ts +2 -2
  257. package/dist/dashboard-layout.js.map +1 -1
  258. package/dist/data-table.d.ts +5 -5
  259. package/dist/data-table.js +9 -9
  260. package/dist/date-picker.d.ts +11 -11
  261. package/dist/date-picker.js +5 -5
  262. package/dist/date-picker.js.map +1 -1
  263. package/dist/decision-list.d.ts +1 -1
  264. package/dist/decision-list.js +2 -2
  265. package/dist/decision-list.js.map +1 -1
  266. package/dist/description-list.d.ts +2 -2
  267. package/dist/description-list.js.map +1 -1
  268. package/dist/detail-layout.d.ts +5 -5
  269. package/dist/detail-layout.js +1 -1
  270. package/dist/detail-layout.js.map +1 -1
  271. package/dist/{dialog-DpUwec2g.d.ts → dialog-CFnxFGyn.d.ts} +7 -7
  272. package/dist/dialog.d.ts +2 -2
  273. package/dist/dialog.js +4 -4
  274. package/dist/dialog.js.map +1 -1
  275. package/dist/docs-article-page.d.ts +1 -1
  276. package/dist/docs-article-page.js.map +1 -1
  277. package/dist/docs-hub-page.d.ts +1 -1
  278. package/dist/docs-hub-page.js.map +1 -1
  279. package/dist/docs-layout.d.ts +1 -1
  280. package/dist/docs-layout.js +1 -1
  281. package/dist/docs-layout.js.map +1 -1
  282. package/dist/docs-nav.d.ts +1 -1
  283. package/dist/docs-nav.js +1 -1
  284. package/dist/docs-nav.js.map +1 -1
  285. package/dist/document-viewer.d.ts +2 -2
  286. package/dist/document-viewer.js +3 -3
  287. package/dist/document-viewer.js.map +1 -1
  288. package/dist/doodle.d.ts +1 -1
  289. package/dist/doodle.js +1 -1
  290. package/dist/doodle.js.map +1 -1
  291. package/dist/drop-overlay.d.ts +1 -1
  292. package/dist/drop-overlay.js +1 -1
  293. package/dist/drop-overlay.js.map +1 -1
  294. package/dist/dropdown-menu.d.ts +8 -8
  295. package/dist/dropdown-menu.js +2 -2
  296. package/dist/embed-facade.js +1 -1
  297. package/dist/empty-state.d.ts +1 -1
  298. package/dist/empty-state.js.map +1 -1
  299. package/dist/engine-flow.d.ts +1 -1
  300. package/dist/engine-flow.js +1 -1
  301. package/dist/engine-flow.js.map +1 -1
  302. package/dist/entity-header.d.ts +1 -1
  303. package/dist/entity-header.js +1 -1
  304. package/dist/entity-header.js.map +1 -1
  305. package/dist/environment-notice.d.ts +1 -1
  306. package/dist/environment-notice.js.map +1 -1
  307. package/dist/error-page.d.ts +1 -1
  308. package/dist/error-page.js +1 -1
  309. package/dist/error-page.js.map +1 -1
  310. package/dist/field.d.ts +3 -3
  311. package/dist/field.js +1 -1
  312. package/dist/field.js.map +1 -1
  313. package/dist/file-upload.d.ts +1 -1
  314. package/dist/file-upload.js +1 -1
  315. package/dist/file-upload.js.map +1 -1
  316. package/dist/filter-bar.d.ts +2 -2
  317. package/dist/filter-bar.js +4 -4
  318. package/dist/flock.d.ts +1 -1
  319. package/dist/flock.js +2 -2
  320. package/dist/flock.js.map +1 -1
  321. package/dist/footnote.d.ts +3 -3
  322. package/dist/footnote.js +1 -1
  323. package/dist/footnote.js.map +1 -1
  324. package/dist/force-update-screen.d.ts +1 -1
  325. package/dist/force-update-screen.js +3 -3
  326. package/dist/force-update-screen.js.map +1 -1
  327. package/dist/form/server.js.map +1 -1
  328. package/dist/form.d.ts +12 -12
  329. package/dist/form.js +4 -4
  330. package/dist/form.js.map +1 -1
  331. package/dist/{frame-CmDztC_y.d.ts → frame-D5HU_cG8.d.ts} +2 -2
  332. package/dist/gallery-page.d.ts +1 -1
  333. package/dist/gallery-page.js +1 -1
  334. package/dist/gallery-page.js.map +1 -1
  335. package/dist/genui.d.ts +2 -2
  336. package/dist/genui.js +9 -9
  337. package/dist/genui.js.map +1 -1
  338. package/dist/glossary-term.js +2 -2
  339. package/dist/glow-card.d.ts +1 -1
  340. package/dist/glow-card.js +1 -1
  341. package/dist/glow-card.js.map +1 -1
  342. package/dist/goal-gauge.d.ts +1 -1
  343. package/dist/goal-gauge.js +1 -1
  344. package/dist/goal-gauge.js.map +1 -1
  345. package/dist/grade-stamp.d.ts +1 -1
  346. package/dist/grade-stamp.js +2 -2
  347. package/dist/grade-stamp.js.map +1 -1
  348. package/dist/identity-card.d.ts +1 -1
  349. package/dist/identity-card.js +5 -5
  350. package/dist/identity-card.js.map +1 -1
  351. package/dist/image-cropper.d.ts +1 -1
  352. package/dist/image-cropper.js +3 -3
  353. package/dist/image-cropper.js.map +1 -1
  354. package/dist/index.d.ts +5 -5
  355. package/dist/index.js +2 -2
  356. package/dist/index.js.map +1 -1
  357. package/dist/kanban.d.ts +1 -1
  358. package/dist/kanban.js.map +1 -1
  359. package/dist/kbd.d.ts +1 -1
  360. package/dist/kbd.js.map +1 -1
  361. package/dist/kind-config-editor.js +8 -8
  362. package/dist/kind-config-editor.js.map +1 -1
  363. package/dist/kpi-explained.js +1 -1
  364. package/dist/kpi-explained.js.map +1 -1
  365. package/dist/landing-page.d.ts +1 -1
  366. package/dist/landing-page.js.map +1 -1
  367. package/dist/landscape.d.ts +1 -1
  368. package/dist/landscape.js +2 -2
  369. package/dist/landscape.js.map +1 -1
  370. package/dist/language-switch.d.ts +10 -10
  371. package/dist/language-switch.js +1 -1
  372. package/dist/legal-page.d.ts +1 -1
  373. package/dist/legal-page.js.map +1 -1
  374. package/dist/{lightbox-MRB2YZEP.js → lightbox-JLWASIJC.js} +4 -4
  375. package/dist/link-card.d.ts +1 -1
  376. package/dist/link-card.js +4 -4
  377. package/dist/list.d.ts +1 -1
  378. package/dist/list.js +2 -2
  379. package/dist/list.js.map +1 -1
  380. package/dist/loader.d.ts +2 -2
  381. package/dist/loader.js +1 -1
  382. package/dist/loader.js.map +1 -1
  383. package/dist/longform-page.d.ts +1 -1
  384. package/dist/longform-page.js +1 -1
  385. package/dist/longform-page.js.map +1 -1
  386. package/dist/maintenance-screen.d.ts +1 -1
  387. package/dist/maintenance-screen.js +3 -3
  388. package/dist/maintenance-screen.js.map +1 -1
  389. package/dist/map/cards.d.ts +2 -2
  390. package/dist/map/cards.js +1 -1
  391. package/dist/map/cards.js.map +1 -1
  392. package/dist/map/pin.js +1 -1
  393. package/dist/map/sheet.d.ts +1 -1
  394. package/dist/map/sheet.js +1 -1
  395. package/dist/map/sheet.js.map +1 -1
  396. package/dist/map.d.ts +11 -11
  397. package/dist/map.js +4 -4
  398. package/dist/map.js.map +1 -1
  399. package/dist/margin-layout.d.ts +2 -2
  400. package/dist/margin-layout.js.map +1 -1
  401. package/dist/markdown.d.ts +1 -1
  402. package/dist/markdown.js.map +1 -1
  403. package/dist/marketing-layout.d.ts +1 -1
  404. package/dist/marketing-layout.js.map +1 -1
  405. package/dist/mascot-quote.d.ts +1 -1
  406. package/dist/mascot-quote.js +2 -2
  407. package/dist/mascot-quote.js.map +1 -1
  408. package/dist/mascot-state.d.ts +5 -5
  409. package/dist/mascot-state.js +1 -1
  410. package/dist/mascot-state.js.map +1 -1
  411. package/dist/mascots.d.ts +2 -2
  412. package/dist/mascots.js +2 -2
  413. package/dist/mascots.js.map +1 -1
  414. package/dist/match-dialog.d.ts +1 -1
  415. package/dist/match-dialog.js +4 -4
  416. package/dist/match-dialog.js.map +1 -1
  417. package/dist/media-capture.d.ts +1 -1
  418. package/dist/media-capture.js +1 -1
  419. package/dist/media-capture.js.map +1 -1
  420. package/dist/media-carousel.js +5 -5
  421. package/dist/media-carousel.js.map +1 -1
  422. package/dist/media-gallery.d.ts +1 -1
  423. package/dist/media-gallery.js +1 -1
  424. package/dist/media-gallery.js.map +1 -1
  425. package/dist/media-player.d.ts +1 -1
  426. package/dist/media-player.js +4 -4
  427. package/dist/meter.d.ts +2 -2
  428. package/dist/meter.js +1 -1
  429. package/dist/money-input.d.ts +1 -1
  430. package/dist/money-input.js +3 -3
  431. package/dist/motion.d.ts +1 -1
  432. package/dist/motion.js +1 -1
  433. package/dist/native/form.d.ts +12 -12
  434. package/dist/native/form.js +4 -4
  435. package/dist/native/form.js.map +1 -1
  436. package/dist/native/list.d.ts +1 -1
  437. package/dist/native/list.js.map +1 -1
  438. package/dist/native/map.d.ts +4 -4
  439. package/dist/native/map.js +2 -2
  440. package/dist/native/map.js.map +1 -1
  441. package/dist/native/markdown.js.map +1 -1
  442. package/dist/native/media-capture.d.ts +1 -1
  443. package/dist/native/media-capture.js.map +1 -1
  444. package/dist/native/media-picker.d.ts +1 -1
  445. package/dist/native/media-picker.js.map +1 -1
  446. package/dist/native/vertical-video.d.ts +2 -2
  447. package/dist/native/vertical-video.js.map +1 -1
  448. package/dist/native/video-player.d.ts +1 -1
  449. package/dist/native/video-player.js.map +1 -1
  450. package/dist/native.d.ts +95 -95
  451. package/dist/native.js +13 -13
  452. package/dist/native.js.map +1 -1
  453. package/dist/nav-bar.d.ts +13 -13
  454. package/dist/nav-bar.js +5 -5
  455. package/dist/nav-bar.js.map +1 -1
  456. package/dist/notification-preferences.js +3 -3
  457. package/dist/number-ticker.d.ts +1 -1
  458. package/dist/number-ticker.js +1 -1
  459. package/dist/number-ticker.js.map +1 -1
  460. package/dist/opening-hours.d.ts +1 -1
  461. package/dist/opening-hours.js +1 -1
  462. package/dist/opening-hours.js.map +1 -1
  463. package/dist/{page-DPHDmDAQ.d.ts → page-Ufnb5TrQ.d.ts} +5 -5
  464. package/dist/page-header.d.ts +1 -1
  465. package/dist/page-header.js.map +1 -1
  466. package/dist/page-hero.d.ts +1 -1
  467. package/dist/page-hero.js +5 -5
  468. package/dist/page-hero.js.map +1 -1
  469. package/dist/page-index.d.ts +1 -1
  470. package/dist/page-index.js +2 -2
  471. package/dist/page-index.js.map +1 -1
  472. package/dist/page.d.ts +1 -1
  473. package/dist/page.js +3 -3
  474. package/dist/pagination.d.ts +1 -1
  475. package/dist/pagination.js +1 -1
  476. package/dist/pagination.js.map +1 -1
  477. package/dist/pausable-loop.js +2 -2
  478. package/dist/platform-bar.d.ts +102 -0
  479. package/dist/platform-bar.js +42 -0
  480. package/dist/platform-bar.js.map +1 -0
  481. package/dist/{player-lightbox-BYQ57OXT.js → player-lightbox-SJR3GB7U.js} +5 -5
  482. package/dist/player-lightbox-SJR3GB7U.js.map +1 -0
  483. package/dist/pointer-light.d.ts +1 -1
  484. package/dist/pointer-light.js.map +1 -1
  485. package/dist/popover.d.ts +1 -1
  486. package/dist/popover.js +1 -1
  487. package/dist/popover.js.map +1 -1
  488. package/dist/price-catalogue-editor.js +8 -8
  489. package/dist/price-catalogue-editor.js.map +1 -1
  490. package/dist/pricing-page.d.ts +1 -1
  491. package/dist/pricing-page.js +1 -1
  492. package/dist/pricing-page.js.map +1 -1
  493. package/dist/product-page.d.ts +1 -1
  494. package/dist/product-page.js +1 -1
  495. package/dist/product-page.js.map +1 -1
  496. package/dist/profile-card.d.ts +3 -3
  497. package/dist/profile-card.js +1 -1
  498. package/dist/profile-card.js.map +1 -1
  499. package/dist/progress.d.ts +1 -1
  500. package/dist/progress.js.map +1 -1
  501. package/dist/promise-card.d.ts +1 -1
  502. package/dist/promise-card.js +1 -1
  503. package/dist/promise-card.js.map +1 -1
  504. package/dist/promo-code-field.js +4 -4
  505. package/dist/proposal.js +5 -5
  506. package/dist/qr-code.js +6 -6
  507. package/dist/qr-code.js.map +1 -1
  508. package/dist/quota-meter.d.ts +1 -1
  509. package/dist/quota-meter.js +1 -1
  510. package/dist/quota-meter.js.map +1 -1
  511. package/dist/radio-group.d.ts +5 -5
  512. package/dist/radio-group.js +3 -3
  513. package/dist/radio-group.js.map +1 -1
  514. package/dist/rail-nav.d.ts +4 -4
  515. package/dist/rail-nav.js +3 -3
  516. package/dist/rail-nav.js.map +1 -1
  517. package/dist/recipes.js +1 -1
  518. package/dist/recipes.js.map +1 -1
  519. package/dist/retro-tv-playlist.d.ts +1 -1
  520. package/dist/retro-tv-playlist.js.map +1 -1
  521. package/dist/retro-tv.js +6 -6
  522. package/dist/retro-tv.js.map +1 -1
  523. package/dist/reviews.js +3 -3
  524. package/dist/{schema-Dkn0uX72.d.ts → schema-Dd05m48Q.d.ts} +1 -1
  525. package/dist/schema-form.js +7 -7
  526. package/dist/schema-form.js.map +1 -1
  527. package/dist/scroll-stage.d.ts +2 -2
  528. package/dist/scroll-stage.js +2 -2
  529. package/dist/scroll-stage.js.map +1 -1
  530. package/dist/search-field.d.ts +1 -1
  531. package/dist/search-field.js +2 -2
  532. package/dist/section-backdrop.d.ts +1 -1
  533. package/dist/section-backdrop.js +1 -1
  534. package/dist/separator.d.ts +1 -1
  535. package/dist/separator.js.map +1 -1
  536. package/dist/service-card.d.ts +1 -1
  537. package/dist/service-card.js +6 -6
  538. package/dist/service-card.js.map +1 -1
  539. package/dist/settings-layout.d.ts +3 -3
  540. package/dist/settings-layout.js +2 -2
  541. package/dist/shop/booking.d.ts +1 -1
  542. package/dist/shop/booking.js +4 -4
  543. package/dist/shop/booking.js.map +1 -1
  544. package/dist/shop/bulletin.d.ts +1 -1
  545. package/dist/shop/bulletin.js +2 -2
  546. package/dist/shop/bulletin.js.map +1 -1
  547. package/dist/shop/faq.d.ts +1 -1
  548. package/dist/shop/faq.js +3 -3
  549. package/dist/shop/faq.js.map +1 -1
  550. package/dist/shop/gallery.d.ts +1 -1
  551. package/dist/shop/gallery.js +3 -3
  552. package/dist/shop/gallery.js.map +1 -1
  553. package/dist/shop/hero.d.ts +1 -1
  554. package/dist/shop/hero.js +2 -2
  555. package/dist/shop/hero.js.map +1 -1
  556. package/dist/shop/policies.d.ts +1 -1
  557. package/dist/shop/policies.js +2 -2
  558. package/dist/shop/policies.js.map +1 -1
  559. package/dist/shop/reviews.d.ts +1 -1
  560. package/dist/shop/reviews.js +2 -2
  561. package/dist/shop/reviews.js.map +1 -1
  562. package/dist/shop/services.d.ts +1 -1
  563. package/dist/shop/services.js +4 -4
  564. package/dist/shop/services.js.map +1 -1
  565. package/dist/shop/social.d.ts +1 -1
  566. package/dist/shop/social.js +2 -2
  567. package/dist/shop/social.js.map +1 -1
  568. package/dist/shop/story.d.ts +1 -1
  569. package/dist/shop/story.js +2 -2
  570. package/dist/shop/story.js.map +1 -1
  571. package/dist/shop/team.d.ts +1 -1
  572. package/dist/shop/team.js +2 -2
  573. package/dist/shop/team.js.map +1 -1
  574. package/dist/shop/video.d.ts +1 -1
  575. package/dist/shop/video.js +2 -2
  576. package/dist/shop/video.js.map +1 -1
  577. package/dist/shop/visit.d.ts +1 -1
  578. package/dist/shop/visit.js +2 -2
  579. package/dist/shop/visit.js.map +1 -1
  580. package/dist/shop-composer.js +2 -2
  581. package/dist/shop-composer.js.map +1 -1
  582. package/dist/shop-gallery.d.ts +1 -1
  583. package/dist/shop-gallery.js +2 -2
  584. package/dist/shop-gallery.js.map +1 -1
  585. package/dist/shop.d.ts +3 -3
  586. package/dist/shop.js +2 -2
  587. package/dist/showcase.d.ts +1 -1
  588. package/dist/showcase.js +6 -6
  589. package/dist/showcase.js.map +1 -1
  590. package/dist/signature.d.ts +1 -1
  591. package/dist/signature.js +2 -2
  592. package/dist/signature.js.map +1 -1
  593. package/dist/site-cahier.d.ts +8 -5
  594. package/dist/site-cahier.js +24 -10
  595. package/dist/site-cahier.js.map +1 -1
  596. package/dist/site-footer.d.ts +21 -6
  597. package/dist/site-footer.js +15 -1
  598. package/dist/site-footer.js.map +1 -1
  599. package/dist/skeleton.d.ts +3 -3
  600. package/dist/skeleton.js.map +1 -1
  601. package/dist/skip-link.d.ts +1 -1
  602. package/dist/skip-link.js +1 -1
  603. package/dist/slider.d.ts +1 -1
  604. package/dist/slider.js +2 -2
  605. package/dist/slider.js.map +1 -1
  606. package/dist/slot-picker.d.ts +1 -1
  607. package/dist/slot-picker.js +1 -1
  608. package/dist/slot-picker.js.map +1 -1
  609. package/dist/specimen-tag.d.ts +2 -2
  610. package/dist/specimen-tag.js +2 -2
  611. package/dist/speed-lines.d.ts +1 -1
  612. package/dist/speed-lines.js +1 -1
  613. package/dist/speed-lines.js.map +1 -1
  614. package/dist/spinner.d.ts +2 -2
  615. package/dist/spinner.js +1 -1
  616. package/dist/spinner.js.map +1 -1
  617. package/dist/split-view.d.ts +1 -1
  618. package/dist/split-view.js.map +1 -1
  619. package/dist/stage-banner.d.ts +1 -1
  620. package/dist/stage-banner.js +1 -1
  621. package/dist/stage-banner.js.map +1 -1
  622. package/dist/stat.d.ts +2 -2
  623. package/dist/stat.js +1 -1
  624. package/dist/status-chip.js +4 -4
  625. package/dist/status-chip.js.map +1 -1
  626. package/dist/status-page.d.ts +1 -1
  627. package/dist/status-page.js.map +1 -1
  628. package/dist/step-progress.d.ts +1 -1
  629. package/dist/step-progress.js.map +1 -1
  630. package/dist/step-showcase.d.ts +2 -2
  631. package/dist/step-showcase.js +3 -3
  632. package/dist/step-showcase.js.map +1 -1
  633. package/dist/stepper.d.ts +1 -1
  634. package/dist/stepper.js +1 -1
  635. package/dist/stepper.js.map +1 -1
  636. package/dist/sticky-action.d.ts +1 -1
  637. package/dist/sticky-action.js.map +1 -1
  638. package/dist/stuck.d.ts +1 -1
  639. package/dist/stuck.js +1 -1
  640. package/dist/stuck.js.map +1 -1
  641. package/dist/swipe-deck.d.ts +2 -2
  642. package/dist/swipe-deck.js.map +1 -1
  643. package/dist/switch.d.ts +1 -1
  644. package/dist/switch.js +1 -1
  645. package/dist/tabs.d.ts +6 -6
  646. package/dist/tabs.js +1 -1
  647. package/dist/tabs.js.map +1 -1
  648. package/dist/tag-input.d.ts +1 -1
  649. package/dist/tag-input.js +4 -4
  650. package/dist/tag-input.js.map +1 -1
  651. package/dist/tag-selector.d.ts +1 -1
  652. package/dist/tag-selector.js +3 -3
  653. package/dist/tag-selector.js.map +1 -1
  654. package/dist/taped-photo.d.ts +1 -1
  655. package/dist/taped-photo.js +2 -2
  656. package/dist/terminal-replay.d.ts +1 -1
  657. package/dist/terminal-replay.js +3 -3
  658. package/dist/terminal-replay.js.map +1 -1
  659. package/dist/text-style/server.d.ts +1 -1
  660. package/dist/text-style/server.js.map +1 -1
  661. package/dist/text-style.d.ts +2 -2
  662. package/dist/text-style.js.map +1 -1
  663. package/dist/theme.d.ts +3 -3
  664. package/dist/theme.js +3 -3
  665. package/dist/theme.js.map +1 -1
  666. package/dist/toast.d.ts +1 -1
  667. package/dist/toast.js +2 -2
  668. package/dist/toast.js.map +1 -1
  669. package/dist/toc.d.ts +2 -2
  670. package/dist/toc.js +1 -1
  671. package/dist/toc.js.map +1 -1
  672. package/dist/tooltip.d.ts +1 -1
  673. package/dist/tooltip.js +2 -2
  674. package/dist/tree-view.d.ts +1 -1
  675. package/dist/tree-view.js +2 -2
  676. package/dist/tree-view.js.map +1 -1
  677. package/dist/update-prompt.d.ts +1 -1
  678. package/dist/update-prompt.js +3 -3
  679. package/dist/update-prompt.js.map +1 -1
  680. package/dist/upload-queue.d.ts +2 -2
  681. package/dist/upload-queue.js +1 -1
  682. package/dist/upload-queue.js.map +1 -1
  683. package/dist/usage.d.ts +4 -4
  684. package/dist/usage.js +3 -3
  685. package/dist/usage.js.map +1 -1
  686. package/dist/verified-badge.d.ts +1 -1
  687. package/dist/verified-badge.js.map +1 -1
  688. package/dist/versus-card.d.ts +1 -1
  689. package/dist/versus-card.js +2 -2
  690. package/dist/versus-card.js.map +1 -1
  691. package/dist/vertical-video.d.ts +2 -2
  692. package/dist/vertical-video.js +6 -6
  693. package/dist/vertical-video.js.map +1 -1
  694. package/dist/video-player.d.ts +1 -1
  695. package/dist/video-player.js +5 -5
  696. package/dist/video-trimmer.d.ts +1 -1
  697. package/dist/video-trimmer.js.map +1 -1
  698. package/dist/virtual.d.ts +2 -2
  699. package/dist/virtual.js +1 -1
  700. package/dist/wall.js +2 -2
  701. package/dist/wall.js.map +1 -1
  702. package/dist/waveform.d.ts +1 -1
  703. package/dist/waveform.js.map +1 -1
  704. package/package.json +28 -8
  705. package/registry/account-menu.json +1 -1
  706. package/registry/account-settings.json +18 -18
  707. package/registry/achievement.json +2 -2
  708. package/registry/action-bar.json +4 -4
  709. package/registry/activity-feed.json +3 -3
  710. package/registry/agenda.json +1 -1
  711. package/registry/alert.json +2 -2
  712. package/registry/analysis-report.json +2 -2
  713. package/registry/anatomy-plate.json +2 -2
  714. package/registry/app-frame.json +7 -7
  715. package/registry/app-header.json +5 -5
  716. package/registry/app-shell.json +3 -3
  717. package/registry/architecture-diagram.json +2 -2
  718. package/registry/argument-card.json +4 -4
  719. package/registry/auth-layout.json +2 -2
  720. package/registry/avatar.json +4 -4
  721. package/registry/badge.json +2 -2
  722. package/registry/bird-plate.json +2 -2
  723. package/registry/button.json +6 -2
  724. package/registry/captcha.json +2 -2
  725. package/registry/card-grid.json +2 -2
  726. package/registry/card.json +2 -2
  727. package/registry/catalogue-page.json +2 -2
  728. package/registry/changelog-page.json +3 -3
  729. package/registry/chapter.json +3 -3
  730. package/registry/chat.json +2 -2
  731. package/registry/checkbox.json +2 -2
  732. package/registry/chip-link.json +2 -2
  733. package/registry/chip-row.json +2 -2
  734. package/registry/chip.json +3 -3
  735. package/registry/choice-grid.json +3 -3
  736. package/registry/cn.json +1 -1
  737. package/registry/code-block.json +3 -3
  738. package/registry/collection-switcher.json +3 -3
  739. package/registry/columns.json +2 -2
  740. package/registry/combobox.json +3 -3
  741. package/registry/command.json +2 -2
  742. package/registry/comparison-table.json +2 -2
  743. package/registry/component-page.json +2 -2
  744. package/registry/confirm-button.json +2 -2
  745. package/registry/contact-page.json +2 -2
  746. package/registry/continue-prompt.json +2 -2
  747. package/registry/copy-button.json +3 -3
  748. package/registry/countdown.json +2 -2
  749. package/registry/cover-hero.json +4 -4
  750. package/registry/cta-panel.json +2 -2
  751. package/registry/dashboard-layout.json +3 -3
  752. package/registry/data-table.json +5 -5
  753. package/registry/date-picker.json +9 -9
  754. package/registry/decision-list.json +3 -3
  755. package/registry/description-list.json +2 -2
  756. package/registry/desktop-window.json +1 -1
  757. package/registry/detail-layout.json +2 -2
  758. package/registry/dialog.json +3 -3
  759. package/registry/docs-article-page.json +2 -2
  760. package/registry/docs-hub-page.json +2 -2
  761. package/registry/docs-layout.json +3 -3
  762. package/registry/docs-nav.json +2 -2
  763. package/registry/document-viewer.json +3 -3
  764. package/registry/doodle.json +2 -2
  765. package/registry/drop-overlay.json +2 -2
  766. package/registry/dropdown-menu.json +2 -2
  767. package/registry/elephant.json +1 -1
  768. package/registry/embed-facade.json +1 -1
  769. package/registry/empty-state.json +2 -2
  770. package/registry/engine-flow.json +2 -2
  771. package/registry/entity-header.json +3 -3
  772. package/registry/environment-notice.json +2 -2
  773. package/registry/error-page.json +2 -2
  774. package/registry/examples/platform-bar/demo.d.ts +4 -0
  775. package/registry/examples/platform-bar/demo.js +24 -0
  776. package/registry/examples/platform-bar/demo.tsx +20 -0
  777. package/registry/examples/platform-bar/live.d.ts +4 -0
  778. package/registry/examples/platform-bar/live.js +22 -0
  779. package/registry/examples/platform-bar/live.tsx +22 -0
  780. package/registry/examples/site-footer/hosted.d.ts +4 -0
  781. package/registry/examples/site-footer/hosted.js +25 -0
  782. package/registry/examples/site-footer/hosted.tsx +23 -0
  783. package/registry/field.json +2 -2
  784. package/registry/file-upload.json +3 -3
  785. package/registry/filter-bar.json +5 -5
  786. package/registry/flock.json +2 -2
  787. package/registry/footnote.json +2 -2
  788. package/registry/force-update-screen.json +2 -2
  789. package/registry/form.json +65 -65
  790. package/registry/gallery-page.json +2 -2
  791. package/registry/genui.json +3 -3
  792. package/registry/glossary-term.json +1 -1
  793. package/registry/glossary.json +1 -1
  794. package/registry/glow-card.json +2 -2
  795. package/registry/goal-gauge.json +2 -2
  796. package/registry/grade-stamp.json +2 -2
  797. package/registry/identity-card.json +2 -2
  798. package/registry/image-cropper.json +2 -2
  799. package/registry/index.json +40 -9
  800. package/registry/kanban.json +2 -2
  801. package/registry/kbd.json +2 -2
  802. package/registry/kind-config-editor.json +3 -3
  803. package/registry/kpi-explained.json +2 -2
  804. package/registry/landing-page.json +2 -2
  805. package/registry/landscape.json +2 -2
  806. package/registry/language-switch.json +2 -2
  807. package/registry/legal-page.json +2 -2
  808. package/registry/link-card.json +4 -4
  809. package/registry/list.json +3 -3
  810. package/registry/loader.json +2 -2
  811. package/registry/longform-page.json +2 -2
  812. package/registry/maintenance-screen.json +2 -2
  813. package/registry/map.json +8 -8
  814. package/registry/margin-layout.json +2 -2
  815. package/registry/markdown.json +2 -2
  816. package/registry/marketing-layout.json +2 -2
  817. package/registry/mascot-quote.json +2 -2
  818. package/registry/mascot-state.json +3 -3
  819. package/registry/mascots.json +4 -4
  820. package/registry/match-dialog.json +2 -2
  821. package/registry/media-capture.json +3 -3
  822. package/registry/media-gallery.json +5 -5
  823. package/registry/meter.json +2 -2
  824. package/registry/money-input.json +2 -2
  825. package/registry/nav-bar.json +9 -9
  826. package/registry/next-actions.json +1 -1
  827. package/registry/notification-preferences.json +1 -1
  828. package/registry/number-ticker.json +2 -2
  829. package/registry/opening-hours.json +3 -3
  830. package/registry/page-header.json +2 -2
  831. package/registry/page-hero.json +4 -4
  832. package/registry/page-index.json +3 -3
  833. package/registry/page.json +2 -2
  834. package/registry/pagination.json +3 -3
  835. package/registry/platform-bar.json +179 -0
  836. package/registry/pointer-light.json +2 -2
  837. package/registry/popover.json +2 -2
  838. package/registry/price-catalogue-editor.json +2 -2
  839. package/registry/pricing-page.json +3 -3
  840. package/registry/product-page.json +2 -2
  841. package/registry/profile-card.json +4 -4
  842. package/registry/progress.json +2 -2
  843. package/registry/promise-card.json +2 -2
  844. package/registry/promo-code-field.json +1 -1
  845. package/registry/proposal.json +1 -1
  846. package/registry/qr-code.json +3 -3
  847. package/registry/quota-meter.json +2 -2
  848. package/registry/radio-group.json +15 -15
  849. package/registry/rail-nav.json +9 -9
  850. package/registry/recipes.json +2 -2
  851. package/registry/retro-tv.json +4 -4
  852. package/registry/reviews.json +1 -1
  853. package/registry/router.json +1 -1
  854. package/registry/schema-form.json +2 -2
  855. package/registry/scroll-stage.json +2 -2
  856. package/registry/search-field.json +3 -3
  857. package/registry/section-backdrop.json +2 -2
  858. package/registry/separator.json +2 -2
  859. package/registry/service-card.json +4 -4
  860. package/registry/settings-layout.json +2 -2
  861. package/registry/shop-composer.json +4 -4
  862. package/registry/shop-gallery.json +2 -2
  863. package/registry/shop.json +18 -18
  864. package/registry/showcase.json +2 -2
  865. package/registry/signature.json +2 -2
  866. package/registry/site-cahier.json +3 -3
  867. package/registry/site-footer.json +57 -20
  868. package/registry/sites.json +1 -1
  869. package/registry/skeleton.json +2 -2
  870. package/registry/skip-link.json +2 -2
  871. package/registry/slider.json +2 -2
  872. package/registry/slot-picker.json +3 -3
  873. package/registry/slot.json +1 -1
  874. package/registry/specimen-tag.json +2 -2
  875. package/registry/speed-lines.json +2 -2
  876. package/registry/spinner.json +3 -3
  877. package/registry/split-view.json +2 -2
  878. package/registry/stage-banner.json +2 -2
  879. package/registry/stat.json +2 -2
  880. package/registry/status-chip.json +3 -3
  881. package/registry/status-page.json +2 -2
  882. package/registry/step-progress.json +2 -2
  883. package/registry/step-showcase.json +3 -3
  884. package/registry/stepper.json +2 -2
  885. package/registry/sticky-action.json +2 -2
  886. package/registry/stuck.json +2 -2
  887. package/registry/swipe-deck.json +2 -2
  888. package/registry/switch.json +2 -2
  889. package/registry/tabs.json +2 -2
  890. package/registry/tag-input.json +2 -2
  891. package/registry/tag-selector.json +2 -2
  892. package/registry/taped-photo.json +2 -2
  893. package/registry/terminal-replay.json +3 -3
  894. package/registry/text-style.json +9 -9
  895. package/registry/theme.json +2 -2
  896. package/registry/toast.json +2 -2
  897. package/registry/toc.json +2 -2
  898. package/registry/tooltip.json +2 -2
  899. package/registry/tree-view.json +3 -3
  900. package/registry/update-prompt.json +2 -2
  901. package/registry/upload-queue.json +2 -2
  902. package/registry/usage.json +3 -3
  903. package/registry/verified-badge.json +2 -2
  904. package/registry/versus-card.json +2 -2
  905. package/registry/vertical-video.json +3 -3
  906. package/registry/video-player.json +3 -3
  907. package/registry/video-trimmer.json +2 -2
  908. package/registry/virtual.json +4 -4
  909. package/registry/wall.json +2 -2
  910. package/registry/waveform.json +2 -2
  911. package/dist/chunk-2FCQCWIK.js.map +0 -1
  912. package/dist/chunk-43PTCDTL.js.map +0 -1
  913. package/dist/chunk-5D7NMUF6.js.map +0 -1
  914. package/dist/chunk-5PFCELGW.js.map +0 -1
  915. package/dist/chunk-5RWHDX5J.js.map +0 -1
  916. package/dist/chunk-5VZ37TY3.js.map +0 -1
  917. package/dist/chunk-757ZTGU5.js.map +0 -1
  918. package/dist/chunk-7DYZTEE3.js.map +0 -1
  919. package/dist/chunk-7P7I5OQV.js.map +0 -1
  920. package/dist/chunk-B47WSPMP.js.map +0 -1
  921. package/dist/chunk-C57KK5VB.js.map +0 -1
  922. package/dist/chunk-EB45EVPJ.js.map +0 -1
  923. package/dist/chunk-EDQLPCM4.js.map +0 -1
  924. package/dist/chunk-GHAN7OOE.js.map +0 -1
  925. package/dist/chunk-HLEBSAGC.js.map +0 -1
  926. package/dist/chunk-HP7BDMVK.js.map +0 -1
  927. package/dist/chunk-KH3JOEPY.js.map +0 -1
  928. package/dist/chunk-KR2W4ONJ.js.map +0 -1
  929. package/dist/chunk-LH5J3VLZ.js.map +0 -1
  930. package/dist/chunk-LNAAWT4Y.js.map +0 -1
  931. package/dist/chunk-MDSP7DJR.js.map +0 -1
  932. package/dist/chunk-NG6G6V5E.js.map +0 -1
  933. package/dist/chunk-NM2DEHFZ.js.map +0 -1
  934. package/dist/chunk-NPMGYLJV.js.map +0 -1
  935. package/dist/chunk-NQENOT6L.js.map +0 -1
  936. package/dist/chunk-NSLXEDIS.js.map +0 -1
  937. package/dist/chunk-OGWB76BR.js.map +0 -1
  938. package/dist/chunk-P7AFIKWG.js.map +0 -1
  939. package/dist/chunk-PGBF3UBX.js.map +0 -1
  940. package/dist/chunk-QA3WETWT.js.map +0 -1
  941. package/dist/chunk-QD6SNXF5.js.map +0 -1
  942. package/dist/chunk-QHVV2JGF.js.map +0 -1
  943. package/dist/chunk-QVHSV6RA.js.map +0 -1
  944. package/dist/chunk-S2O4NSN5.js.map +0 -1
  945. package/dist/chunk-S4TLZRGZ.js.map +0 -1
  946. package/dist/chunk-S6NYGOJT.js.map +0 -1
  947. package/dist/chunk-SB5WSVPI.js.map +0 -1
  948. package/dist/chunk-SG2RKUVJ.js.map +0 -1
  949. package/dist/chunk-V5RO6JYI.js.map +0 -1
  950. package/dist/chunk-V7W4RLRW.js.map +0 -1
  951. package/dist/chunk-VA4NPCUQ.js.map +0 -1
  952. package/dist/chunk-VPO27AFS.js.map +0 -1
  953. package/dist/chunk-W64RAX4N.js.map +0 -1
  954. package/dist/chunk-W675RFOA.js.map +0 -1
  955. package/dist/chunk-WC3SO4CE.js.map +0 -1
  956. package/dist/chunk-WEVYKZIF.js.map +0 -1
  957. package/dist/chunk-WU4VLSEA.js.map +0 -1
  958. package/dist/chunk-Y3P5B4XS.js.map +0 -1
  959. package/dist/chunk-YTYNKMNS.js.map +0 -1
  960. package/dist/chunk-Z47KIPCT.js.map +0 -1
  961. package/dist/chunk-ZPOVOEO3.js.map +0 -1
  962. package/dist/player-lightbox-BYQ57OXT.js.map +0 -1
  963. /package/dist/{chunk-HJFRHYCI.js.map → chunk-DTGRZXYO.js.map} +0 -0
  964. /package/dist/{chunk-PJNR4NTS.js.map → chunk-HC2TY45B.js.map} +0 -0
  965. /package/dist/{lightbox-MRB2YZEP.js.map → lightbox-JLWASIJC.js.map} +0 -0
package/dist/genui.js CHANGED
@@ -1,24 +1,24 @@
1
1
  "use client";
2
2
  import {
3
3
  DataTable
4
- } from "./chunk-NQENOT6L.js";
4
+ } from "./chunk-ZRRWSKV3.js";
5
5
  import "./chunk-JXLDUDTD.js";
6
- import "./chunk-3X3OF4TI.js";
7
- import "./chunk-ZPOVOEO3.js";
8
- import "./chunk-KR2W4ONJ.js";
9
- import "./chunk-MDSP7DJR.js";
10
- import "./chunk-5VZ37TY3.js";
6
+ import "./chunk-H4NXYAL7.js";
7
+ import "./chunk-NJLIHGU4.js";
8
+ import "./chunk-H7I6YLI6.js";
9
+ import "./chunk-VQELCPQJ.js";
10
+ import "./chunk-NFJWD5BT.js";
11
11
  import {
12
12
  defineRecipe
13
13
  } from "./chunk-D3T54RSL.js";
14
14
  import "./chunk-J3NC6ER4.js";
15
15
  import {
16
16
  cn
17
- } from "./chunk-NSLXEDIS.js";
18
- import "./chunk-757ZTGU5.js";
17
+ } from "./chunk-HHBTM4AU.js";
18
+ import "./chunk-JE2NY4XE.js";
19
19
  import "./chunk-ZIXB33X7.js";
20
20
  import "./chunk-ZSCNMFE6.js";
21
- import "./chunk-PGBF3UBX.js";
21
+ import "./chunk-QKL5TECH.js";
22
22
 
23
23
  // src/genui/catalog.tsx
24
24
  import { formatCompact, formatMoney, formatNumber, formatPercent } from "@krizaka/intl";
package/dist/genui.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/genui/catalog.tsx","../src/alert/alert.tsx","../src/card/card.tsx","../src/card/recipe.ts","../src/genui/spec.ts","../src/genui/store.ts","../src/genui/surface.tsx","../src/skeleton/skeleton.tsx"],"sourcesContent":["// The base catalog of `krizaka:genui/v1` (ADR-082): layout, text, card, callout and table — what a model may draw with\n// @krizaka/ui alone. `KpiStat` and `ChartCard` come from @krizaka/charts (`chartsGenUiCatalog`), which depends on this\n// package, never the reverse.\nimport { formatCompact, formatMoney, formatNumber, formatPercent } from \"@krizaka/intl\";\nimport type * as React from \"react\";\n\nimport { Alert } from \"../alert\";\nimport { CardBody, CardRoot, CardTitle } from \"../card\";\nimport { DataTable, type DataTableColumn } from \"../data-table\";\nimport {\n allowKeys,\n checkBinding,\n checkChildren,\n checkCurrency,\n checkEnum,\n checkId,\n checkText,\n GENUI_FORMATS,\n GENUI_LIMITS,\n type GenUiComponent,\n type GenUiFormat,\n} from \"./spec\";\nimport type { GenUiCatalog, GenUiEntry, GenUiRenderContext } from \"./surface\";\n\nconst first = (...problems: (string | null)[]) => problems.find((p) => p !== null) ?? null;\n\n/** A resolved value as text — strings and numbers only; anything else is not drawn. */\nfunction asText(value: unknown): string {\n if (typeof value === \"string\") return value.slice(0, GENUI_LIMITS.string);\n if (typeof value === \"number\" && Number.isFinite(value)) return String(value);\n return \"\";\n}\n\n/** A number written in one of the closed formats. */\nexport function formatGenUiValue(value: unknown, format: GenUiFormat | undefined, locale: string, currency?: string): string {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return asText(value);\n switch (format) {\n case \"integer\":\n return formatNumber(Math.round(value), { locale, maximumFractionDigits: 0 });\n case \"compact\":\n return formatCompact(value, { locale });\n case \"percent\":\n return formatPercent(value, { locale, maximumFractionDigits: 1 });\n case \"money\":\n return currency ? formatMoney(Math.round(value), { currency, locale }) : formatNumber(value, { locale });\n default:\n return formatNumber(value, { locale, maximumFractionDigits: 2 });\n }\n}\n\nconst TONES = [\"info\", \"success\", \"warning\", \"danger\"] as const;\nconst VARIANTS = [\"body\", \"heading\", \"caption\"] as const;\n\nconst column: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"children\"]), checkChildren(c.children)),\n render: (c, ctx) => <div className=\"flex min-w-0 flex-col gap-4\">{ctx.children(c.children)}</div>,\n};\n\nconst row: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"children\"]), checkChildren(c.children)),\n render: (c, ctx) => <div className=\"grid min-w-0 gap-4 [grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))]\">{ctx.children(c.children)}</div>,\n};\n\nconst text: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"text\", \"variant\"]), checkText(c.text, \"text\", true), checkEnum(c.variant, \"variant\", VARIANTS)),\n render: (c, ctx) => {\n const value = asText(ctx.resolve(c.text));\n if (c.variant === \"heading\") return <h3 className=\"text-base font-semibold text-fg\">{value}</h3>;\n if (c.variant === \"caption\") return <p className=\"text-xs text-fg-muted\">{value}</p>;\n return <p className=\"text-sm text-fg\">{value}</p>;\n },\n};\n\nconst card: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"title\", \"child\"]), checkText(c.title, \"title\", false), c.child === undefined ? null : checkId(c.child, \"child\")),\n render: (c, ctx) => (\n <CardRoot>\n <CardBody>\n {c.title !== undefined && <CardTitle>{asText(ctx.resolve(c.title))}</CardTitle>}\n {c.child !== undefined && <div className=\"mt-3\">{ctx.child(c.child)}</div>}\n </CardBody>\n </CardRoot>\n ),\n};\n\nconst callout: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"tone\", \"title\", \"text\"]), checkEnum(c.tone, \"tone\", TONES), checkText(c.title, \"title\", false), checkText(c.text, \"text\", false)),\n render: (c, ctx) => (\n <Alert tone={(c.tone as (typeof TONES)[number] | undefined) ?? \"info\"} title={c.title === undefined ? undefined : asText(ctx.resolve(c.title))}>\n {c.text === undefined ? undefined : asText(ctx.resolve(c.text))}\n </Alert>\n ),\n};\n\ntype Column = { key: string; label: string; format?: GenUiFormat; currency?: string };\n\nfunction checkColumns(value: unknown): string | null {\n if (!Array.isArray(value) || value.length === 0 || value.length > 12) return \"columns is an array of 1 to 12\";\n for (const raw of value) {\n if (raw === null || typeof raw !== \"object\" || Array.isArray(raw)) return \"a column is an object\";\n const col = raw as Record<string, unknown>;\n const keys = Object.keys(col).find((k) => ![\"key\", \"label\", \"format\", \"currency\"].includes(k));\n if (keys) return `a column has no key \"${keys}\"`;\n if (typeof col.key !== \"string\" || !/^[A-Za-z0-9_]{1,64}$/.test(col.key)) return \"a column key is 1-64 characters of [A-Za-z0-9_]\";\n if (typeof col.label !== \"string\" || col.label.length > 120) return \"a column label is a string\";\n const problem = first(checkEnum(col.format, \"format\", GENUI_FORMATS), checkCurrency(col.currency, col.format === \"money\"));\n if (problem) return problem;\n }\n return null;\n}\n\ntype Row = Record<string, unknown> & { __genuiRow: string };\n\nfunction TableView({ c, ctx }: { c: GenUiComponent; ctx: GenUiRenderContext }) {\n const columns = c.columns as readonly Column[];\n const raw = ctx.resolve(c.rows);\n const rows: Row[] = Array.isArray(raw)\n ? raw.slice(0, GENUI_LIMITS.array).flatMap((r, i) => (r !== null && typeof r === \"object\" && !Array.isArray(r) ? [{ ...(r as Record<string, unknown>), __genuiRow: String(i) }] : []))\n : [];\n const cols: DataTableColumn<Row>[] = columns.map((col) => ({\n id: col.key,\n header: col.label,\n sortable: true,\n type: col.format ? \"number\" : \"text\",\n value: (r) => {\n const v = r[col.key];\n return typeof v === \"number\" || typeof v === \"string\" ? v : null;\n },\n cell: (r) => formatGenUiValue(r[col.key], col.format, ctx.locale, col.currency),\n }));\n if (rows.length === 0) return <p className=\"text-sm text-fg-muted\">{ctx.labels.noData}</p>;\n return <DataTable rows={rows} columns={cols} getRowId={(r) => r.__genuiRow} caption={c.caption === undefined ? ctx.labels.surface : asText(ctx.resolve(c.caption))} showCaption={c.caption !== undefined} />;\n}\n\nconst table: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"caption\", \"columns\", \"rows\"]), checkText(c.caption, \"caption\", false), checkColumns(c.columns), checkBinding(c.rows, \"rows\")),\n render: (c, ctx): React.ReactNode => <TableView c={c} ctx={ctx} />,\n};\n\n/** `Column`, `Row`, `Text`, `Card`, `Callout`, `Table` — the catalog @krizaka/ui draws on its own. */\nexport const baseGenUiCatalog: GenUiCatalog = { Column: column, Row: row, Text: text, Card: card, Callout: callout, Table: table };\n","// Server-safe. A message in the flow of the page (not a toast): a tone, an icon, a title, a text, an action.\n// danger and warning are announced at once (role=\"alert\"); info and success politely (role=\"status\").\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\n// Soft tones (a tint, a tinted border, a coloured icon): the text stays a text role — the invariant status tokens are\n// too light for small text on a light surface (WCAG AA).\nexport const alertVariants = tv({\n slots: {\n root: \"relative flex w-full items-start gap-3 rounded-xl border p-4 text-sm text-fg\",\n icon: \"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center [&>svg]:h-5 [&>svg]:w-5\",\n content: \"flex min-w-0 flex-1 flex-col gap-1\",\n title: \"font-semibold text-fg\",\n description: \"text-fg-secondary\",\n action: \"flex shrink-0 items-center gap-2 self-center\",\n },\n variants: {\n tone: {\n info: { root: \"border-info/40 bg-info/10\", icon: \"text-info\" },\n success: { root: \"border-success/40 bg-success/10\", icon: \"text-success\" },\n warning: { root: \"border-warning/50 bg-warning/10\", icon: \"text-warning\" },\n danger: { root: \"border-danger/50 bg-danger/10\", icon: \"text-danger\" },\n },\n },\n defaultVariants: { tone: \"info\" },\n});\n\nexport type AlertTone = NonNullable<VariantProps<typeof alertVariants>[\"tone\"]>;\n\nexport type AlertProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The tone: `danger` and `warning` are announced at once (`role=\"alert\"`), `info` and `success` politely. */\n tone?: AlertTone;\n /** A decorative icon (hidden from assistive technology). */\n icon?: React.ReactNode;\n /** The headline, in bold above the text. */\n title?: React.ReactNode;\n /** What to do: a Button, a link. */\n action?: React.ReactNode;\n};\n\nexport function Alert({ tone = \"info\", icon, title, action, className, children, ...props }: AlertProps) {\n const s = alertVariants({ tone });\n return (\n <div role={tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\"} data-tone={tone} className={s.root({ className })} {...props}>\n {icon && (\n <span aria-hidden className={s.icon()}>\n {icon}\n </span>\n )}\n <div className={s.content()}>\n {title && <p className={s.title()}>{title}</p>}\n {children && <div className={s.description()}>{children}</div>}\n </div>\n {action && <div className={s.action()}>{action}</div>}\n </div>\n );\n}\n","// Server-safe: no hook, no context. One `tv` definition with slots: each part takes its slot, and a product overrides\n// any part through `className` (merged last by tailwind-merge).\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { cardRecipe } from \"./recipe\";\n\nexport const card = tv(cardRecipe);\n\ntype CardVariants = VariantProps<typeof card>;\n/** The parts without a variant read the default slots: no context, so server-safe. */\nconst slots = card();\n\nexport type CardRootProps = React.ComponentProps<\"div\"> &\n Pick<CardVariants, \"radius\" | \"tone\" | \"interactive\"> & {\n /**\n * md · lg · xl.\n * @default \"xl\"\n */\n radius?: CardVariants[\"radius\"];\n /**\n * default (the base surface) · elevated (raised, a shadow) · glass (translucent, blurred).\n * @default \"default\"\n */\n tone?: CardVariants[\"tone\"];\n /** The quiet hover — the hairline and the surface one step up, nothing moves (krizaka-ui#393): for a card that is a link. */\n interactive?: CardVariants[\"interactive\"];\n /** Renders the child (a link, an article) instead of the <div>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Enters on scroll (MotionObserver): the index in the grid becomes the delay (50 ms a step, 8 steps at most). */\n reveal?: number;\n };\n\nexport function CardRoot({ asChild, reveal, radius, tone, interactive, className, style, ...props }: CardRootProps) {\n const Comp = asChild ? Slot.Root : \"div\";\n const revealStyle =\n reveal === undefined ? style : ({ ...style, \"--kz-delay\": `${Math.min(Math.max(reveal, 0), 8) * 50}ms` } as React.CSSProperties);\n return (\n <Comp\n data-reveal={reveal === undefined ? undefined : \"\"}\n data-interactive={interactive ? \"\" : undefined}\n style={revealStyle}\n className={card({ radius, tone, interactive }).root({ className })}\n {...props}\n />\n );\n}\n\nconst ASPECT = { video: \"aspect-video\", square: \"aspect-square\", portrait: \"aspect-[3/4]\", auto: \"\" } as const;\nexport type CardMediaProps = React.ComponentProps<\"div\"> & {\n /** The ratio of the media: video (16:9) · square · portrait (3:4) · auto (the content's). */\n aspect?: keyof typeof ASPECT;\n};\n\nexport function CardMedia({ aspect = \"video\", className, ...props }: CardMediaProps) {\n return <div data-aspect={aspect} className={slots.media({ className: cn(ASPECT[aspect], className) })} {...props} />;\n}\n\nexport type CardImageProps = Omit<React.ComponentProps<\"img\">, \"src\"> & {\n /** The image's URL; `null` or nothing shows the `fallback`. */\n src?: string | null;\n /** Shown when there is no image: an icon, an illustration (decorative). */\n fallback?: React.ReactNode;\n /**\n * When the browser loads it: `lazy` (default, a card in a list or below the fold) or `eager` for the first cards\n * of a page — the image that is the largest contentful paint must not wait (add `fetchPriority=\"high\"`).\n * @default \"lazy\"\n */\n loading?: \"lazy\" | \"eager\";\n};\n\n/** The image of a media, or its `fallback` when there is none. `alt` is empty by default: the title names the card. */\nexport function CardImage({ src, alt = \"\", fallback, loading = \"lazy\", className, ...props }: CardImageProps) {\n if (!src) {\n return (\n <div data-fallback=\"\" aria-hidden className={slots.fallback({ className })}>\n {fallback}\n </div>\n );\n }\n return <img src={src} alt={alt} loading={loading} decoding=\"async\" className={slots.image({ className })} {...props} />;\n}\n\nconst CORNER = {\n \"top-left\": \"left-2.5 top-2.5\",\n \"top-right\": \"right-2.5 top-2.5\",\n \"bottom-left\": \"bottom-2.5 left-2.5\",\n \"bottom-right\": \"bottom-2.5 right-2.5\",\n} as const;\nexport type CardOverlayProps = React.ComponentProps<\"div\"> & {\n /** The corner of the media it sits in. */\n corner?: keyof typeof CORNER;\n};\n\n/** What sits on the media (badges, a caption). `scrim` and `fg-on-media` are invariant: nothing to do for light. */\nexport function CardOverlay({ corner = \"top-left\", className, ...props }: CardOverlayProps) {\n return <div data-corner={corner} className={slots.overlay({ className: cn(CORNER[corner], className) })} {...props} />;\n}\n\nexport type CardBodyProps = React.ComponentProps<\"div\"> & {\n /**\n * none · sm · md · lg.\n * @default \"md\"\n */\n padding?: CardVariants[\"padding\"];\n};\n\nexport function CardBody({ padding, className, ...props }: CardBodyProps) {\n return <div className={card({ padding }).body({ className })} {...props} />;\n}\n\nexport type CardTitleProps = React.ComponentProps<\"h3\"> & {\n /** The heading level, to fit the page's outline. */\n as?: \"h2\" | \"h3\" | \"h4\";\n};\n\nexport function CardTitle({ as: Tag = \"h3\", className, ...props }: CardTitleProps) {\n return <Tag className={slots.title({ className })} {...props} />;\n}\n\nexport function CardDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return <p className={slots.description({ className })} {...props} />;\n}\n\nexport type CardStatProps = React.ComponentProps<\"div\"> & {\n /** What the figure is, in small capitals above it (the figure is the children). */\n label: React.ReactNode;\n};\n\n/** A figure put forward: the label in capitals, the value in tabular digits. */\nexport function CardStat({ label, className, children, ...props }: CardStatProps) {\n return (\n <div className={slots.stat({ className })} {...props}>\n <p className={slots.statLabel()}>{label}</p>\n <p className={slots.statValue()}>{children}</p>\n </div>\n );\n}\n\nexport function CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div className={slots.footer({ className })} {...props} />;\n}\n\n/** `Card.Root/Media/Image/Overlay/Body/Title/Description/Stat/Footer`. */\nexport const Card = {\n Root: CardRoot,\n Media: CardMedia,\n Image: CardImage,\n Overlay: CardOverlay,\n Body: CardBody,\n Title: CardTitle,\n Description: CardDescription,\n Stat: CardStat,\n Footer: CardFooter,\n};\n","// The card's parts, radii, tones and paddings, written once as classes of the Krizaka tokens: the web wears them with\n// `tv(cardRecipe)`, React Native reads the same classes into styles (native/card.tsx): a part of the card that exists only\n// on the web (the hover's tint) is simply ignored there.\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const cardRecipe = defineRecipe({\n slots: {\n root:\n \"group relative flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n media: \"relative overflow-hidden bg-media\",\n image: \"h-full w-full object-cover\",\n fallback: \"flex h-full w-full items-center justify-center bg-linear-to-br from-accent/15 via-media to-accent-2/15 text-accent/60\",\n overlay: \"absolute z-10 flex items-center gap-1.5\",\n body: \"relative flex flex-1 flex-col gap-3\",\n title: \"line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-fg-accent\",\n description: \"line-clamp-2 text-xs text-fg-secondary\",\n stat: \"min-w-0\",\n statLabel: \"font-mono text-[11.5px] text-fg-secondary\",\n statValue: \"font-display text-xl font-black tabular-nums text-fg\",\n footer: \"relative mt-auto flex items-center gap-2 border-t border-border-subtle pt-3 text-xs text-fg-secondary\",\n },\n variants: {\n radius: { md: { root: \"rounded-md\" }, lg: { root: \"rounded-lg\" }, xl: { root: \"rounded-xl\" } },\n tone: { default: {}, elevated: { root: \"bg-surface-2 shadow-md\" }, glass: { root: \"bg-glass border-glass-border\" } },\n interactive: { true: { root: \"duration-150 hover:border-border-strong hover:bg-surface-2\" } },\n padding: { none: { body: \"p-0\" }, sm: { body: \"p-3\" }, md: { body: \"p-4\" }, lg: { body: \"p-6\" } },\n },\n defaultVariants: { radius: \"xl\", tone: \"default\", padding: \"md\" },\n});\n","// The data-driven UI spec: a strict subset of A2UI v0.9 (ADR-082, krizaka/sovkora-packs). A model describes an interface\n// as data — never code — and only with the components of a catalog the client declares. Everything here is a pure\n// function over JSON: parse, validate, apply. Nothing is evaluated, nothing is trusted.\n\n/** The protocol version every message carries. */\nexport const GENUI_VERSION = \"v0.9\";\n\n/** The catalog a surface must name: the Krizaka components, version 1. */\nexport const GENUI_CATALOG_ID = \"krizaka:genui/v1\";\n\n/** The bounds of a surface — what a model may ask for, at most. */\nexport const GENUI_LIMITS = {\n /** Components per surface. */\n components: 300,\n /** Nesting depth from the root. */\n depth: 12,\n /** Characters in one string. */\n string: 4000,\n /** Items in one array of the data model. */\n array: 1000,\n /** Nesting depth of a data model value. */\n dataDepth: 12,\n /** Values (objects, arrays, scalars) in one data model update. */\n dataNodes: 50_000,\n /** Segments of a data path. */\n pathSegments: 16,\n} as const;\n\n/** One component as the model writes it: an id, the catalog name, its properties. */\nexport type GenUiComponent = { readonly id: string; readonly component: string } & Readonly<Record<string, unknown>>;\n\n/** A value bound to the data model: `{ \"path\": \"/rows\" }`. */\nexport type GenUiBinding = { readonly path: string };\n\n/** The four messages of A2UI v0.9. */\nexport type GenUiMessage =\n | { readonly version: typeof GENUI_VERSION; readonly createSurface: { readonly surfaceId: string; readonly catalogId: string } }\n | { readonly version: typeof GENUI_VERSION; readonly updateComponents: { readonly surfaceId: string; readonly components: readonly GenUiComponent[] } }\n | { readonly version: typeof GENUI_VERSION; readonly updateDataModel: { readonly surfaceId: string; readonly path: string; readonly value?: unknown } }\n | { readonly version: typeof GENUI_VERSION; readonly deleteSurface: { readonly surfaceId: string } };\n\n/** What validating a message says. */\nexport type GenUiResult<T> = { readonly ok: true; readonly value: T } | { readonly ok: false; readonly error: string };\n\n/** How a catalog entry checks a component's own properties: `null` when they are fine, else why not. */\nexport type GenUiPropsCheck = (component: GenUiComponent) => string | null;\n\nconst ID = /^[A-Za-z0-9_-]{1,64}$/;\nconst MESSAGE_KEYS = [\"createSurface\", \"updateComponents\", \"updateDataModel\", \"deleteSurface\"] as const;\nconst FORBIDDEN_SEGMENTS = new Set([\"__proto__\", \"prototype\", \"constructor\"]);\n\nconst fail = (error: string): { ok: false; error: string } => ({ ok: false, error });\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\nfunction onlyKeys(value: Record<string, unknown>, allowed: readonly string[], where: string): string | null {\n for (const key of Object.keys(value)) if (!allowed.includes(key)) return `${where}: unknown key \"${key}\"`;\n return null;\n}\n\n/** An id of a surface or a component, or why not. */\nexport function checkId(value: unknown, where: string): string | null {\n return typeof value === \"string\" && ID.test(value) ? null : `${where}: an id is 1-64 characters of [A-Za-z0-9_-]`;\n}\n\n/** The segments of a JSON pointer (`/a/b/0`), or why it is refused — `__proto__` and friends never pass. */\nexport function parsePath(path: unknown): GenUiResult<readonly string[]> {\n if (typeof path !== \"string\" || (path !== \"/\" && !path.startsWith(\"/\")) || path.length > 512) return fail(\"a path is a JSON pointer: /a/b\");\n if (path === \"/\") return { ok: true, value: [] };\n const segments = path\n .slice(1)\n .split(\"/\")\n .map((s) => s.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n if (segments.length > GENUI_LIMITS.pathSegments) return fail(`a path has at most ${GENUI_LIMITS.pathSegments} segments`);\n for (const s of segments) {\n if (s === \"\" || FORBIDDEN_SEGMENTS.has(s)) return fail(`a path may not hold the segment \"${s}\"`);\n }\n return { ok: true, value: segments };\n}\n\n/** `true` when the value is a binding `{ path }` (and only that). */\nexport function isBinding(value: unknown): value is GenUiBinding {\n return isPlainObject(value) && Object.keys(value).length === 1 && typeof value.path === \"string\";\n}\n\n/**\n * A copy of a data model value that is plain JSON within the limits — strings, finite numbers, booleans, null, arrays\n * and plain objects — or why it is refused. The copy has a null prototype for every object: nothing it holds can\n * reach `Object.prototype`.\n */\nexport function sanitizeData(value: unknown): GenUiResult<unknown> {\n let nodes = 0;\n const walk = (v: unknown, depth: number): GenUiResult<unknown> => {\n if (++nodes > GENUI_LIMITS.dataNodes) return fail(`the data holds more than ${GENUI_LIMITS.dataNodes} values`);\n if (depth > GENUI_LIMITS.dataDepth) return fail(`the data nests deeper than ${GENUI_LIMITS.dataDepth}`);\n if (v === null || typeof v === \"boolean\") return { ok: true, value: v };\n if (typeof v === \"number\") return Number.isFinite(v) ? { ok: true, value: v } : fail(\"a number must be finite\");\n if (typeof v === \"string\") return v.length <= GENUI_LIMITS.string ? { ok: true, value: v } : fail(`a string has at most ${GENUI_LIMITS.string} characters`);\n if (Array.isArray(v)) {\n if (v.length > GENUI_LIMITS.array) return fail(`an array has at most ${GENUI_LIMITS.array} items`);\n const out: unknown[] = [];\n for (const item of v) {\n const r = walk(item, depth + 1);\n if (!r.ok) return r;\n out.push(r.value);\n }\n return { ok: true, value: out };\n }\n if (isPlainObject(v)) {\n const out: Record<string, unknown> = Object.create(null);\n for (const [key, item] of Object.entries(v)) {\n if (FORBIDDEN_SEGMENTS.has(key)) return fail(`a key may not be \"${key}\"`);\n const r = walk(item, depth + 1);\n if (!r.ok) return r;\n out[key] = r.value;\n }\n return { ok: true, value: out };\n }\n return fail(\"the data is plain JSON only\");\n };\n return walk(value, 0);\n}\n\n/**\n * A message as the model sent it — parsed and checked against the spec and the catalog, or why it is refused. A\n * component's own properties are checked by its catalog entry; a component the catalog does not hold is refused.\n */\nexport function validateMessage(input: unknown, catalog: Readonly<Record<string, { readonly check: GenUiPropsCheck }>>): GenUiResult<GenUiMessage> {\n if (!isPlainObject(input)) return fail(\"a message is a JSON object\");\n if (input.version !== GENUI_VERSION) return fail(`version must be \"${GENUI_VERSION}\"`);\n const present = MESSAGE_KEYS.filter((k) => k in input);\n if (present.length !== 1) return fail(\"a message holds exactly one of createSurface, updateComponents, updateDataModel, deleteSurface\");\n const kind = present[0];\n const extra = onlyKeys(input, [\"version\", kind], \"message\");\n if (extra) return fail(extra);\n const body = input[kind];\n if (!isPlainObject(body)) return fail(`${kind} is an object`);\n const surface = checkId(body.surfaceId, `${kind}.surfaceId`);\n if (surface) return fail(surface);\n\n switch (kind) {\n case \"createSurface\": {\n const keys = onlyKeys(body, [\"surfaceId\", \"catalogId\", \"theme\", \"sendDataModel\"], kind);\n if (keys) return fail(keys);\n if (body.catalogId !== GENUI_CATALOG_ID) return fail(`catalogId must be \"${GENUI_CATALOG_ID}\"`);\n return { ok: true, value: { version: GENUI_VERSION, createSurface: { surfaceId: body.surfaceId as string, catalogId: GENUI_CATALOG_ID } } };\n }\n case \"updateComponents\": {\n const keys = onlyKeys(body, [\"surfaceId\", \"components\"], kind);\n if (keys) return fail(keys);\n if (!Array.isArray(body.components) || body.components.length > GENUI_LIMITS.components) {\n return fail(`components is an array of at most ${GENUI_LIMITS.components}`);\n }\n const components: GenUiComponent[] = [];\n for (const raw of body.components) {\n if (!isPlainObject(raw)) return fail(\"a component is an object\");\n const id = checkId(raw.id, \"component.id\");\n if (id) return fail(id);\n if (typeof raw.component !== \"string\" || !Object.hasOwn(catalog, raw.component)) {\n return fail(`component \"${String(raw.id)}\": \"${String(raw.component)}\" is not in the catalog`);\n }\n const clean = sanitizeData(raw);\n if (!clean.ok) return fail(`component \"${raw.id}\": ${clean.error}`);\n const component = { ...(clean.value as Record<string, unknown>) } as GenUiComponent;\n const problem = catalog[raw.component].check(component);\n if (problem) return fail(`component \"${raw.id}\" (${raw.component}): ${problem}`);\n components.push(component);\n }\n return { ok: true, value: { version: GENUI_VERSION, updateComponents: { surfaceId: body.surfaceId as string, components } } };\n }\n case \"updateDataModel\": {\n const keys = onlyKeys(body, [\"surfaceId\", \"path\", \"value\"], kind);\n if (keys) return fail(keys);\n const path = body.path === undefined ? \"/\" : body.path;\n const parsed = parsePath(path);\n if (!parsed.ok) return parsed;\n if (!(\"value\" in body)) return { ok: true, value: { version: GENUI_VERSION, updateDataModel: { surfaceId: body.surfaceId as string, path: path as string } } };\n const clean = sanitizeData(body.value);\n if (!clean.ok) return clean;\n return { ok: true, value: { version: GENUI_VERSION, updateDataModel: { surfaceId: body.surfaceId as string, path: path as string, value: clean.value } } };\n }\n default: {\n const keys = onlyKeys(body, [\"surfaceId\"], kind);\n if (keys) return fail(keys);\n return { ok: true, value: { version: GENUI_VERSION, deleteSurface: { surfaceId: body.surfaceId as string } } };\n }\n }\n}\n\n// ── checks the catalog entries share ─────────────────────────────────────────────────────────────────────────────\n\n/** Why the component's keys are refused, or null: only `id`, `component` and the entry's own keys. */\nexport function allowKeys(component: GenUiComponent, keys: readonly string[]): string | null {\n return onlyKeys(component, [\"id\", \"component\", ...keys], \"properties\");\n}\n\n/** A short text (or a binding to one), required or not. */\nexport function checkText(value: unknown, name: string, required: boolean): string | null {\n if (value === undefined) return required ? `${name} is required` : null;\n if (isBinding(value)) return parsePath(value.path).ok ? null : `${name}: a bad path`;\n return typeof value === \"string\" ? null : `${name} is a string`;\n}\n\n/** A value among a closed list. */\nexport function checkEnum(value: unknown, name: string, allowed: readonly string[], required = false): string | null {\n if (value === undefined) return required ? `${name} is required` : null;\n return typeof value === \"string\" && allowed.includes(value) ? null : `${name} is one of ${allowed.join(\", \")}`;\n}\n\n/** A list of child ids. */\nexport function checkChildren(value: unknown, name = \"children\"): string | null {\n if (!Array.isArray(value) || value.length > GENUI_LIMITS.components) return `${name} is an array of component ids`;\n for (const id of value) if (checkId(id, name)) return `${name} holds ids only`;\n return null;\n}\n\n/** A binding to the data model (required). */\nexport function checkBinding(value: unknown, name: string): string | null {\n if (!isBinding(value)) return `${name} is a binding { \"path\": \"/…\" }`;\n return parsePath(value.path).ok ? null : `${name}: a bad path`;\n}\n\n/** A number, or a binding to one. */\nexport function checkNumber(value: unknown, name: string, required: boolean): string | null {\n if (value === undefined) return required ? `${name} is required` : null;\n if (isBinding(value)) return parsePath(value.path).ok ? null : `${name}: a bad path`;\n return typeof value === \"number\" && Number.isFinite(value) ? null : `${name} is a number`;\n}\n\n/** The value formats a model may name. */\nexport const GENUI_FORMATS = [\"number\", \"integer\", \"compact\", \"percent\", \"money\"] as const;\nexport type GenUiFormat = (typeof GENUI_FORMATS)[number];\n\n/** A three-letter currency code. */\nexport function checkCurrency(value: unknown, required: boolean): string | null {\n if (value === undefined) return required ? \"currency is required with the money format\" : null;\n return typeof value === \"string\" && /^[A-Z]{3}$/.test(value) ? null : \"currency is a three-letter code (CAD)\";\n}\n","// The surfaces a stream of A2UI messages builds — pure: `applyMessage` returns a new state, `readStream` turns a growing\n// text (a model's answer as it arrives) into the messages it holds so far. Nothing here renders.\nimport { GENUI_LIMITS, type GenUiComponent, type GenUiMessage, type GenUiPropsCheck, parsePath, validateMessage } from \"./spec\";\n\n/** One surface: its components by id, and its data model. */\nexport type GenUiSurfaceState = {\n readonly id: string;\n readonly components: ReadonlyMap<string, GenUiComponent>;\n readonly data: unknown;\n};\n\n/** Every surface of a stream, and what was refused on the way. */\nexport type GenUiState = {\n readonly surfaces: ReadonlyMap<string, GenUiSurfaceState>;\n /** The order surfaces were created in. */\n readonly order: readonly string[];\n /** Why messages were dropped, in order (a dropped message leaves the rest of the surface as it was). */\n readonly errors: readonly string[];\n};\n\nexport const emptyGenUiState: GenUiState = { surfaces: new Map(), order: [], errors: [] };\n\nconst withError = (state: GenUiState, error: string): GenUiState => ({ ...state, errors: [...state.errors, error] });\n\nfunction setAt(root: unknown, segments: readonly string[], value: unknown, remove: boolean): unknown {\n if (segments.length === 0) return remove ? Object.create(null) : value;\n const [head, ...rest] = segments;\n if (Array.isArray(root)) {\n const index = Number(head);\n if (!Number.isInteger(index) || index < 0 || index > root.length || index >= GENUI_LIMITS.array) return root;\n const copy = [...root];\n if (remove && rest.length === 0) copy.splice(index, 1);\n else copy[index] = setAt(root[index], rest, value, remove);\n return copy;\n }\n const base: Record<string, unknown> = Object.assign(Object.create(null), root !== null && typeof root === \"object\" ? root : {});\n if (remove && rest.length === 0) delete base[head];\n else base[head] = setAt(base[head], rest, value, remove);\n return base;\n}\n\n/** The value at a JSON pointer of the data model, `undefined` when there is none. */\nexport function readPath(data: unknown, path: string): unknown {\n const parsed = parsePath(path);\n if (!parsed.ok) return undefined;\n let cursor: unknown = data;\n for (const segment of parsed.value) {\n if (cursor === null || typeof cursor !== \"object\") return undefined;\n if (!Object.hasOwn(cursor, segment)) return undefined;\n cursor = (cursor as Record<string, unknown>)[segment];\n }\n return cursor;\n}\n\n/** The state after one validated message. */\nexport function applyMessage(state: GenUiState, message: GenUiMessage): GenUiState {\n if (\"createSurface\" in message) {\n const { surfaceId } = message.createSurface;\n if (state.surfaces.has(surfaceId)) return withError(state, `surface \"${surfaceId}\" already exists`);\n const surfaces = new Map(state.surfaces);\n surfaces.set(surfaceId, { id: surfaceId, components: new Map(), data: Object.create(null) });\n return { ...state, surfaces, order: [...state.order, surfaceId] };\n }\n if (\"deleteSurface\" in message) {\n const surfaces = new Map(state.surfaces);\n surfaces.delete(message.deleteSurface.surfaceId);\n return { ...state, surfaces, order: state.order.filter((id) => id !== message.deleteSurface.surfaceId) };\n }\n const surfaceId = \"updateComponents\" in message ? message.updateComponents.surfaceId : message.updateDataModel.surfaceId;\n const surface = state.surfaces.get(surfaceId);\n if (!surface) return withError(state, `surface \"${surfaceId}\" was not created`);\n const surfaces = new Map(state.surfaces);\n if (\"updateComponents\" in message) {\n const components = new Map(surface.components);\n for (const component of message.updateComponents.components) components.set(component.id, component);\n if (components.size > GENUI_LIMITS.components) return withError(state, `surface \"${surfaceId}\" holds more than ${GENUI_LIMITS.components} components`);\n surfaces.set(surfaceId, { ...surface, components });\n } else {\n const { path, value } = message.updateDataModel;\n const parsed = parsePath(path);\n if (!parsed.ok) return withError(state, parsed.error);\n surfaces.set(surfaceId, { ...surface, data: setAt(surface.data, parsed.value, value, !(\"value\" in message.updateDataModel)) });\n }\n return { ...state, surfaces };\n}\n\n/** The first complete JSON object of a line when only stray `}` / `]` follow it, else null. Strings are skipped. */\nexport function leadingObject(text: string): string | null {\n if (!text.startsWith(\"{\")) return null;\n let depth = 0;\n let inString = false;\n for (let i = 0; i < text.length; i++) {\n const c = text[i];\n if (inString) {\n if (c === \"\\\\\") i++;\n else if (c === '\"') inString = false;\n continue;\n }\n if (c === '\"') inString = true;\n else if (c === \"{\" || c === \"[\") depth++;\n else if (c === \"}\" || c === \"]\") {\n depth--;\n if (depth === 0) return /^[\\s}\\]]*$/.test(text.slice(i + 1)) ? text.slice(0, i + 1) : null;\n }\n }\n return null;\n}\n\n/** The state after a line of JSON (one message), the line refused with its reason when it is not valid. */\nexport function applyLine(state: GenUiState, line: string, catalog: Readonly<Record<string, { readonly check: GenUiPropsCheck }>>): GenUiState {\n const text = line.trim();\n if (!text) return state;\n let json: unknown;\n try {\n json = JSON.parse(text);\n } catch {\n // Models sometimes close one brace too many: the first complete object is kept when what follows it is only\n // stray closing brackets. Anything else is not JSON and is refused. (The object is still validated as any other.)\n const head = leadingObject(text);\n if (head === null) return withError(state, \"a line is not JSON\");\n try {\n json = JSON.parse(head);\n } catch {\n return withError(state, \"a line is not JSON\");\n }\n }\n const result = validateMessage(json, catalog);\n return result.ok ? applyMessage(state, result.value) : withError(state, result.error);\n}\n\n/** Where a fenced `a2ui` block sits in a text: its JSON Lines so far, whether it is closed, and the prose around it. */\nexport type GenUiExtract = { readonly lines: readonly string[]; readonly closed: boolean; readonly prose: string; readonly found: boolean };\n\nconst FENCE = /```a2ui[^\\n]*\\n/;\n\n/**\n * Splits a model's answer — complete or still arriving — into its prose and the complete lines of its `a2ui` fence.\n * A line still being written (no newline yet, the fence open) is left for the next call: the surface grows message by\n * message as the answer streams.\n */\nexport function extractGenUi(text: string): GenUiExtract {\n const open = FENCE.exec(text);\n if (!open) return { lines: [], closed: false, prose: text, found: false };\n const start = open.index + open[0].length;\n const end = text.indexOf(\"\\n```\", start - 1);\n const closed = end >= 0;\n const body = closed ? text.slice(start, end) : text.slice(start);\n const parts = body.split(\"\\n\");\n const lines = closed ? parts : parts.slice(0, -1);\n const after = closed ? text.slice(end + 4).replace(/^[^\\n]*\\n?/, \"\") : \"\";\n const prose = [text.slice(0, open.index).trim(), after.trim()].filter(Boolean).join(\"\\n\\n\");\n return { lines: lines.filter((l) => l.trim()), closed, prose, found: true };\n}\n\n/** The state of every surface a model's answer describes so far. */\nexport function readStream(text: string, catalog: Readonly<Record<string, { readonly check: GenUiPropsCheck }>>): GenUiState & { readonly prose: string; readonly found: boolean } {\n const { lines, prose, found } = extractGenUi(text);\n const state = lines.reduce((s, line) => applyLine(s, line, catalog), emptyGenUiState);\n return { ...state, prose, found };\n}\n","// Renders a surface from its root: each component through its catalog entry, children by id, bound values from the data\n// model. A tree only — a component met twice (a cycle, two parents) or beyond the depth is not drawn — and a child still\n// to come (the answer is streaming) is a skeleton. Text is text: React escapes it, nothing is ever parsed as HTML.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Skeleton } from \"../skeleton\";\nimport { GENUI_LIMITS, type GenUiComponent, type GenUiPropsCheck, isBinding } from \"./spec\";\nimport { type GenUiState, type GenUiSurfaceState, readPath, readStream } from \"./store\";\n\n/** What an entry gets to draw a component. */\nexport type GenUiRenderContext = {\n /** A child by id: drawn, a skeleton while it has not arrived, nothing when refused. */\n child: (id: unknown) => React.ReactNode;\n /** Children by id, in order. */\n children: (ids: unknown) => React.ReactNode[];\n /** A literal, or the value a binding `{ path }` points at in the data model. */\n resolve: (value: unknown) => unknown;\n /** The words of the surface. */\n labels: GenUiLabels;\n /** The locale numbers and dates are written in. */\n locale: string;\n};\n\n/** One component of a catalog: how its properties are checked, how it is drawn. */\nexport type GenUiEntry = {\n /** `null` when the component's own properties are fine, else why not (the message is refused). */\n readonly check: GenUiPropsCheck;\n /** Draws the component. */\n readonly render: (component: GenUiComponent, context: GenUiRenderContext) => React.ReactNode;\n};\n\n/** The components a model may use, by name: `baseGenUiCatalog`, merged with `chartsGenUiCatalog` of @krizaka/charts. */\nexport type GenUiCatalog = Readonly<Record<string, GenUiEntry>>;\n\n/** The surface's own words (passed translated). */\nexport type GenUiLabels = {\n /** Announced while the surface is still arriving. */\n loading: string;\n /** The accessible name of the surface. */\n surface: string;\n /** Under a table whose data has not arrived or is not a list. */\n noData: string;\n};\n\nexport const genUiLabels: GenUiLabels = { loading: \"Building the view…\", surface: \"Generated view\", noData: \"No data\" };\n\nexport type GenUiSurfaceProps = {\n /** The surface to draw (from `readStream` or `applyMessage`). */\n surface: GenUiSurfaceState;\n /** The components it may use. */\n catalog: GenUiCatalog;\n /** The answer is still arriving: missing children are skeletons and the surface is busy. */\n streaming?: boolean;\n /** The surface's words. */\n labels?: Partial<GenUiLabels>;\n /** The locale numbers are written in. Default `en`. */\n locale?: string;\n /** Called with what could not be drawn (a cycle, a missing child once the answer is complete). */\n onError?: (error: string) => void;\n /** Extra classes on the frame. */\n className?: string;\n};\n\n/** One surface, drawn from its root. */\nexport function GenUiSurface({ surface, catalog, streaming = false, labels, locale = \"en\", onError, className }: GenUiSurfaceProps) {\n const words = { ...genUiLabels, ...labels };\n const problems: string[] = [];\n const seen = new Set<string>();\n\n const draw = (id: unknown, depth: number): React.ReactNode => {\n if (typeof id !== \"string\") return null;\n if (depth > GENUI_LIMITS.depth) {\n problems.push(`\"${id}\" is deeper than ${GENUI_LIMITS.depth}`);\n return null;\n }\n if (seen.has(id)) {\n problems.push(`\"${id}\" is drawn twice (a cycle or two parents)`);\n return null;\n }\n const component = surface.components.get(id);\n if (!component) {\n if (!streaming) problems.push(`\"${id}\" never arrived`);\n return streaming ? <Skeleton key={id} className=\"h-10 w-full rounded-lg\" /> : null;\n }\n const entry = Object.hasOwn(catalog, component.component) ? catalog[component.component] : undefined;\n if (!entry) return null;\n seen.add(id);\n const context: GenUiRenderContext = {\n child: (c) => draw(c, depth + 1),\n children: (ids) => (Array.isArray(ids) ? ids.map((c) => <React.Fragment key={String(c)}>{draw(c, depth + 1)}</React.Fragment>) : []),\n resolve: (value) => (isBinding(value) ? readPath(surface.data, value.path) : value),\n labels: words,\n locale,\n };\n return <React.Fragment key={id}>{entry.render(component, context)}</React.Fragment>;\n };\n\n const root = draw(\"root\", 0);\n React.useEffect(() => {\n if (onError) for (const problem of problems) onError(problem);\n // Reported once per drawn state.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [surface, streaming]);\n\n return (\n <section aria-label={words.surface} aria-busy={streaming || undefined} data-genui-surface={surface.id} className={cn(\"flex flex-col gap-4\", className)}>\n {root ?? (streaming ? <Skeleton className=\"h-24 w-full rounded-xl\" /> : null)}\n </section>\n );\n}\n\nexport type GenUiStreamProps = Omit<GenUiSurfaceProps, \"surface\"> & {\n /** A model's answer, complete or still arriving: its prose and its `a2ui` fence. */\n text: string;\n /** Draws the prose (markdown in a chat); default: paragraphs of text. */\n renderProse?: (prose: string) => React.ReactNode;\n /** What to show when the answer holds no valid surface: the answer itself, as text (the fallback). */\n fallback?: (text: string) => React.ReactNode;\n};\n\n/**\n * A model's answer with its generated view: the prose, then every surface of its `a2ui` fence, growing as the answer\n * streams. An answer without a valid surface falls back to its text.\n */\nexport function GenUiStream({ text, catalog, streaming, renderProse, fallback, onError, ...rest }: GenUiStreamProps) {\n const state = React.useMemo(() => readStream(text, catalog), [text, catalog]);\n const reported = React.useRef(0);\n React.useEffect(() => {\n if (!onError) return;\n for (const error of state.errors.slice(reported.current)) onError(error);\n reported.current = state.errors.length;\n }, [state, onError]);\n const prose = (value: string) => (renderProse ? renderProse(value) : value.split(/\\n{2,}/).map((p, i) => <p key={i}>{p}</p>));\n const surfaces = state.order.map((id) => state.surfaces.get(id)).filter((s): s is GenUiSurfaceState => !!s && s.components.has(\"root\"));\n if (!state.found || (!streaming && surfaces.length === 0)) return <>{fallback ? fallback(text) : prose(text)}</>;\n return (\n <div className=\"flex flex-col gap-4\" data-genui-stream=\"\">\n {state.prose && prose(state.prose)}\n {surfaces.map((surface) => (\n <GenUiSurface key={surface.id} surface={surface} catalog={catalog} streaming={streaming} onError={onError} {...rest} />\n ))}\n {streaming && surfaces.length === 0 && <Skeleton className=\"h-24 w-full rounded-xl\" />}\n </div>\n );\n}\n\n/** The state a list of messages builds — for a surface the app holds itself (not from a model's text). */\nexport type { GenUiState };\n","// Server-safe. A placeholder for content on its way: decorative, so hidden from assistive technology. One reflection of\n// the brand light crosses every skeleton of the page together (`background-attachment: fixed`), instead of each one\n// pulsing on its own; under reduced motion they rest, tinted.\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const skeletonVariants = tv({\n base: \"kz-skeleton block bg-surface-3\",\n variants: {\n shape: { text: \"h-3 w-full rounded-sm\", circle: \"aspect-square h-10 rounded-full\", rect: \"h-24 w-full rounded-lg\" },\n },\n defaultVariants: { shape: \"text\" },\n});\n\nexport type SkeletonProps = React.ComponentProps<\"span\"> & {\n /**\n * text (a line) · circle (an avatar; give it a height) · rect (a media; give it a height).\n * @default \"text\"\n */\n shape?: VariantProps<typeof skeletonVariants>[\"shape\"];\n};\n\n/** A shape the size of what is loading. Announce the wait elsewhere (`LoadingRegion` does it, with `aria-busy`). */\nexport function Skeleton({ shape, className, ...props }: SkeletonProps) {\n return <span aria-hidden data-shape={shape ?? \"text\"} className={skeletonVariants({ shape, className })} {...props} />;\n}\n\nexport type SkeletonTextProps = React.ComponentProps<\"span\"> & {\n /**\n * How many lines.\n * @default 3\n */\n lines?: number;\n};\n\n/** A paragraph on its way: `lines` lines, the last one shorter — like text that wraps. */\nexport function SkeletonText({ lines = 3, className, ...props }: SkeletonTextProps) {\n return (\n <span aria-hidden className={[\"flex w-full flex-col gap-2\", className].filter(Boolean).join(\" \")} {...props}>\n {Array.from({ length: lines }, (_, i) => (\n <Skeleton key={i} className={i === lines - 1 && lines > 1 ? \"w-3/5\" : undefined} />\n ))}\n </span>\n );\n}\n\nexport type SkeletonShapeProps = React.ComponentProps<\"div\">;\n\n/**\n * The skeleton of the real thing: render your component with placeholder data inside, and its text, images and icons\n * become skeleton shapes in place — the exact layout, nothing to draw twice. Inert and hidden from assistive technology.\n */\nexport function SkeletonShape({ className, children, ...props }: SkeletonShapeProps) {\n return (\n <div aria-hidden inert className={[\"kz-skeleton-shape\", className].filter(Boolean).join(\" \")} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,eAAe,aAAa,cAAc,qBAAqB;;;ACAxE,SAAS,UAA6B;AA0C9B,cAIF,YAJE;AAtCD,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A,OAAM,OAAO,GAAG,CAACA,OAAM,OAAO,CAAC;AAC5E,QAAM,WAAiB,aAAO,CAAC;AAC/B,EAAM,gBAAU,MAAM;AACpB,QAAI,CAAC,QAAS;AACd,eAAW,SAAS,MAAM,OAAO,MAAM,SAAS,OAAO,EAAG,SAAQ,KAAK;AACvE,aAAS,UAAU,MAAM,OAAO;AAAA,EAClC,GAAG,CAAC,OAAO,OAAO,CAAC;AACnB,QAAM,QAAQ,CAAC,UAAmB,cAAc,YAAY,KAAK,IAAI,MAAM,MAAM,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,gBAAAF,KAAC,OAAW,eAAJ,CAAM,CAAI;AAC3H,QAAM,WAAW,MAAM,MAAM,IAAI,CAAC,OAAO,MAAM,SAAS,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,MAA8B,CAAC,CAAC,KAAK,EAAE,WAAW,IAAI,MAAM,CAAC;AACtI,MAAI,CAAC,MAAM,SAAU,CAAC,aAAa,SAAS,WAAW,EAAI,QAAO,gBAAAA,KAAAD,WAAA,EAAG,qBAAW,SAASG,KAAI,IAAI,MAAMA,KAAI,GAAE;AAC7G,SACE,gBAAAD,MAAC,SAAI,WAAU,uBAAsB,qBAAkB,IACpD;AAAA,UAAM,SAAS,MAAM,MAAM,KAAK;AAAA,IAChC,SAAS,IAAI,CAAC,YACb,gBAAAD,KAAC,gBAA8B,SAAkB,SAAkB,WAAsB,SAAmB,GAAG,QAA5F,QAAQ,EAA0F,CACtH;AAAA,IACA,aAAa,SAAS,WAAW,KAAK,gBAAAA,KAAC,YAAS,WAAU,0BAAyB;AAAA,KACtF;AAEJ;","names":["tv","jsx","jsxs","tv","jsx","jsx","jsxs","card","surfaceId","surfaces","text","tv","jsx","Fragment","jsx","jsxs","text"]}
1
+ {"version":3,"sources":["../src/genui/catalog.tsx","../src/alert/alert.tsx","../src/card/card.tsx","../src/card/recipe.ts","../src/genui/spec.ts","../src/genui/store.ts","../src/genui/surface.tsx","../src/skeleton/skeleton.tsx"],"sourcesContent":["// The base catalog of `krizaka:genui/v1` (ADR-082): layout, text, card, callout and table — what a model may draw with\n// @krizaka/ui alone. `KpiStat` and `ChartCard` come from @krizaka/charts (`chartsGenUiCatalog`), which depends on this\n// package, never the reverse.\nimport { formatCompact, formatMoney, formatNumber, formatPercent } from \"@krizaka/intl\";\nimport type * as React from \"react\";\n\nimport { Alert } from \"../alert\";\nimport { CardBody, CardRoot, CardTitle } from \"../card\";\nimport { DataTable, type DataTableColumn } from \"../data-table\";\nimport {\n allowKeys,\n checkBinding,\n checkChildren,\n checkCurrency,\n checkEnum,\n checkId,\n checkText,\n GENUI_FORMATS,\n GENUI_LIMITS,\n type GenUiComponent,\n type GenUiFormat,\n} from \"./spec\";\nimport type { GenUiCatalog, GenUiEntry, GenUiRenderContext } from \"./surface\";\n\nconst first = (...problems: (string | null)[]) => problems.find((p) => p !== null) ?? null;\n\n/** A resolved value as text — strings and numbers only; anything else is not drawn. */\nfunction asText(value: unknown): string {\n if (typeof value === \"string\") return value.slice(0, GENUI_LIMITS.string);\n if (typeof value === \"number\" && Number.isFinite(value)) return String(value);\n return \"\";\n}\n\n/** A number written in one of the closed formats. */\nexport function formatGenUiValue(value: unknown, format: GenUiFormat | undefined, locale: string, currency?: string): string {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return asText(value);\n switch (format) {\n case \"integer\":\n return formatNumber(Math.round(value), { locale, maximumFractionDigits: 0 });\n case \"compact\":\n return formatCompact(value, { locale });\n case \"percent\":\n return formatPercent(value, { locale, maximumFractionDigits: 1 });\n case \"money\":\n return currency ? formatMoney(Math.round(value), { currency, locale }) : formatNumber(value, { locale });\n default:\n return formatNumber(value, { locale, maximumFractionDigits: 2 });\n }\n}\n\nconst TONES = [\"info\", \"success\", \"warning\", \"danger\"] as const;\nconst VARIANTS = [\"body\", \"heading\", \"caption\"] as const;\n\nconst column: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"children\"]), checkChildren(c.children)),\n render: (c, ctx) => <div className=\"flex min-w-0 flex-col gap-4\">{ctx.children(c.children)}</div>,\n};\n\nconst row: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"children\"]), checkChildren(c.children)),\n render: (c, ctx) => <div className=\"grid min-w-0 gap-4 [grid-template-columns:repeat(auto-fit,minmax(12rem,1fr))]\">{ctx.children(c.children)}</div>,\n};\n\nconst text: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"text\", \"variant\"]), checkText(c.text, \"text\", true), checkEnum(c.variant, \"variant\", VARIANTS)),\n render: (c, ctx) => {\n const value = asText(ctx.resolve(c.text));\n if (c.variant === \"heading\") return <h3 className=\"text-base font-semibold text-fg\">{value}</h3>;\n if (c.variant === \"caption\") return <p className=\"text-xs text-fg-muted\">{value}</p>;\n return <p className=\"text-sm text-fg\">{value}</p>;\n },\n};\n\nconst card: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"title\", \"child\"]), checkText(c.title, \"title\", false), c.child === undefined ? null : checkId(c.child, \"child\")),\n render: (c, ctx) => (\n <CardRoot>\n <CardBody>\n {c.title !== undefined && <CardTitle>{asText(ctx.resolve(c.title))}</CardTitle>}\n {c.child !== undefined && <div className=\"mt-3\">{ctx.child(c.child)}</div>}\n </CardBody>\n </CardRoot>\n ),\n};\n\nconst callout: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"tone\", \"title\", \"text\"]), checkEnum(c.tone, \"tone\", TONES), checkText(c.title, \"title\", false), checkText(c.text, \"text\", false)),\n render: (c, ctx) => (\n <Alert tone={(c.tone as (typeof TONES)[number] | undefined) ?? \"info\"} title={c.title === undefined ? undefined : asText(ctx.resolve(c.title))}>\n {c.text === undefined ? undefined : asText(ctx.resolve(c.text))}\n </Alert>\n ),\n};\n\ntype Column = { key: string; label: string; format?: GenUiFormat; currency?: string };\n\nfunction checkColumns(value: unknown): string | null {\n if (!Array.isArray(value) || value.length === 0 || value.length > 12) return \"columns is an array of 1 to 12\";\n for (const raw of value) {\n if (raw === null || typeof raw !== \"object\" || Array.isArray(raw)) return \"a column is an object\";\n const col = raw as Record<string, unknown>;\n const keys = Object.keys(col).find((k) => ![\"key\", \"label\", \"format\", \"currency\"].includes(k));\n if (keys) return `a column has no key \"${keys}\"`;\n if (typeof col.key !== \"string\" || !/^[A-Za-z0-9_]{1,64}$/.test(col.key)) return \"a column key is 1-64 characters of [A-Za-z0-9_]\";\n if (typeof col.label !== \"string\" || col.label.length > 120) return \"a column label is a string\";\n const problem = first(checkEnum(col.format, \"format\", GENUI_FORMATS), checkCurrency(col.currency, col.format === \"money\"));\n if (problem) return problem;\n }\n return null;\n}\n\ntype Row = Record<string, unknown> & { __genuiRow: string };\n\nfunction TableView({ c, ctx }: Readonly<{ c: GenUiComponent; ctx: GenUiRenderContext }>) {\n const columns = c.columns as readonly Column[];\n const raw = ctx.resolve(c.rows);\n const rows: Row[] = Array.isArray(raw)\n ? raw.slice(0, GENUI_LIMITS.array).flatMap((r, i) => (r !== null && typeof r === \"object\" && !Array.isArray(r) ? [{ ...(r as Record<string, unknown>), __genuiRow: String(i) }] : []))\n : [];\n const cols: DataTableColumn<Row>[] = columns.map((col) => ({\n id: col.key,\n header: col.label,\n sortable: true,\n type: col.format ? \"number\" : \"text\",\n value: (r) => {\n const v = r[col.key];\n return typeof v === \"number\" || typeof v === \"string\" ? v : null;\n },\n cell: (r) => formatGenUiValue(r[col.key], col.format, ctx.locale, col.currency),\n }));\n if (rows.length === 0) return <p className=\"text-sm text-fg-muted\">{ctx.labels.noData}</p>;\n return <DataTable rows={rows} columns={cols} getRowId={(r) => r.__genuiRow} caption={c.caption === undefined ? ctx.labels.surface : asText(ctx.resolve(c.caption))} showCaption={c.caption !== undefined} />;\n}\n\nconst table: GenUiEntry = {\n check: (c) => first(allowKeys(c, [\"caption\", \"columns\", \"rows\"]), checkText(c.caption, \"caption\", false), checkColumns(c.columns), checkBinding(c.rows, \"rows\")),\n render: (c, ctx): React.ReactNode => <TableView c={c} ctx={ctx} />,\n};\n\n/** `Column`, `Row`, `Text`, `Card`, `Callout`, `Table` — the catalog @krizaka/ui draws on its own. */\nexport const baseGenUiCatalog: GenUiCatalog = { Column: column, Row: row, Text: text, Card: card, Callout: callout, Table: table };\n","// Server-safe. A message in the flow of the page (not a toast): a tone, an icon, a title, a text, an action.\n// danger and warning are announced at once (role=\"alert\"); info and success politely (role=\"status\").\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\n// Soft tones (a tint, a tinted border, a coloured icon): the text stays a text role — the invariant status tokens are\n// too light for small text on a light surface (WCAG AA).\nexport const alertVariants = tv({\n slots: {\n root: \"relative flex w-full items-start gap-3 rounded-xl border p-4 text-sm text-fg\",\n icon: \"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center [&>svg]:h-5 [&>svg]:w-5\",\n content: \"flex min-w-0 flex-1 flex-col gap-1\",\n title: \"font-semibold text-fg\",\n description: \"text-fg-secondary\",\n action: \"flex shrink-0 items-center gap-2 self-center\",\n },\n variants: {\n tone: {\n info: { root: \"border-info/40 bg-info/10\", icon: \"text-info\" },\n success: { root: \"border-success/40 bg-success/10\", icon: \"text-success\" },\n warning: { root: \"border-warning/50 bg-warning/10\", icon: \"text-warning\" },\n danger: { root: \"border-danger/50 bg-danger/10\", icon: \"text-danger\" },\n },\n },\n defaultVariants: { tone: \"info\" },\n});\n\nexport type AlertTone = NonNullable<VariantProps<typeof alertVariants>[\"tone\"]>;\n\nexport type AlertProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The tone: `danger` and `warning` are announced at once (`role=\"alert\"`), `info` and `success` politely. */\n tone?: AlertTone;\n /** A decorative icon (hidden from assistive technology). */\n icon?: React.ReactNode;\n /** The headline, in bold above the text. */\n title?: React.ReactNode;\n /** What to do: a Button, a link. */\n action?: React.ReactNode;\n};\n\nexport function Alert({ tone = \"info\", icon, title, action, className, children, ...props }: Readonly<AlertProps>) {\n const s = alertVariants({ tone });\n return (\n <div role={tone === \"danger\" || tone === \"warning\" ? \"alert\" : \"status\"} data-tone={tone} className={s.root({ className })} {...props}>\n {icon && (\n <span aria-hidden className={s.icon()}>\n {icon}\n </span>\n )}\n <div className={s.content()}>\n {title && <p className={s.title()}>{title}</p>}\n {children && <div className={s.description()}>{children}</div>}\n </div>\n {action && <div className={s.action()}>{action}</div>}\n </div>\n );\n}\n","// Server-safe: no hook, no context. One `tv` definition with slots: each part takes its slot, and a product overrides\n// any part through `className` (merged last by tailwind-merge).\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { cardRecipe } from \"./recipe\";\n\nexport const card = tv(cardRecipe);\n\ntype CardVariants = VariantProps<typeof card>;\n/** The parts without a variant read the default slots: no context, so server-safe. */\nconst slots = card();\n\nexport type CardRootProps = React.ComponentProps<\"div\"> &\n Pick<CardVariants, \"radius\" | \"tone\" | \"interactive\"> & {\n /**\n * md · lg · xl.\n * @default \"xl\"\n */\n radius?: CardVariants[\"radius\"];\n /**\n * default (the base surface) · elevated (raised, a shadow) · glass (translucent, blurred).\n * @default \"default\"\n */\n tone?: CardVariants[\"tone\"];\n /** The quiet hover — the hairline and the surface one step up, nothing moves (krizaka-ui#393): for a card that is a link. */\n interactive?: CardVariants[\"interactive\"];\n /** Renders the child (a link, an article) instead of the <div>, with props, classes and ref merged. */\n asChild?: boolean;\n /** Enters on scroll (MotionObserver): the index in the grid becomes the delay (50 ms a step, 8 steps at most). */\n reveal?: number;\n };\n\nexport function CardRoot({ asChild, reveal, radius, tone, interactive, className, style, ...props }: Readonly<CardRootProps>) {\n const Comp = asChild ? Slot.Root : \"div\";\n const revealStyle =\n reveal === undefined ? style : ({ ...style, \"--kz-delay\": `${Math.min(Math.max(reveal, 0), 8) * 50}ms` } as React.CSSProperties);\n return (\n <Comp\n data-reveal={reveal === undefined ? undefined : \"\"}\n data-interactive={interactive ? \"\" : undefined}\n style={revealStyle}\n className={card({ radius, tone, interactive }).root({ className })}\n {...props}\n />\n );\n}\n\nconst ASPECT = { video: \"aspect-video\", square: \"aspect-square\", portrait: \"aspect-[3/4]\", auto: \"\" } as const;\nexport type CardMediaProps = React.ComponentProps<\"div\"> & {\n /** The ratio of the media: video (16:9) · square · portrait (3:4) · auto (the content's). */\n aspect?: keyof typeof ASPECT;\n};\n\nexport function CardMedia({ aspect = \"video\", className, ...props }: Readonly<CardMediaProps>) {\n return <div data-aspect={aspect} className={slots.media({ className: cn(ASPECT[aspect], className) })} {...props} />;\n}\n\nexport type CardImageProps = Omit<React.ComponentProps<\"img\">, \"src\"> & {\n /** The image's URL; `null` or nothing shows the `fallback`. */\n src?: string | null;\n /** Shown when there is no image: an icon, an illustration (decorative). */\n fallback?: React.ReactNode;\n /**\n * When the browser loads it: `lazy` (default, a card in a list or below the fold) or `eager` for the first cards\n * of a page — the image that is the largest contentful paint must not wait (add `fetchPriority=\"high\"`).\n * @default \"lazy\"\n */\n loading?: \"lazy\" | \"eager\";\n};\n\n/** The image of a media, or its `fallback` when there is none. `alt` is empty by default: the title names the card. */\nexport function CardImage({ src, alt = \"\", fallback, loading = \"lazy\", className, ...props }: Readonly<CardImageProps>) {\n if (!src) {\n return (\n <div data-fallback=\"\" aria-hidden className={slots.fallback({ className })}>\n {fallback}\n </div>\n );\n }\n return <img src={src} alt={alt} loading={loading} decoding=\"async\" className={slots.image({ className })} {...props} />;\n}\n\nconst CORNER = {\n \"top-left\": \"left-2.5 top-2.5\",\n \"top-right\": \"right-2.5 top-2.5\",\n \"bottom-left\": \"bottom-2.5 left-2.5\",\n \"bottom-right\": \"bottom-2.5 right-2.5\",\n} as const;\nexport type CardOverlayProps = React.ComponentProps<\"div\"> & {\n /** The corner of the media it sits in. */\n corner?: keyof typeof CORNER;\n};\n\n/** What sits on the media (badges, a caption). `scrim` and `fg-on-media` are invariant: nothing to do for light. */\nexport function CardOverlay({ corner = \"top-left\", className, ...props }: Readonly<CardOverlayProps>) {\n return <div data-corner={corner} className={slots.overlay({ className: cn(CORNER[corner], className) })} {...props} />;\n}\n\nexport type CardBodyProps = React.ComponentProps<\"div\"> & {\n /**\n * none · sm · md · lg.\n * @default \"md\"\n */\n padding?: CardVariants[\"padding\"];\n};\n\nexport function CardBody({ padding, className, ...props }: Readonly<CardBodyProps>) {\n return <div className={card({ padding }).body({ className })} {...props} />;\n}\n\nexport type CardTitleProps = React.ComponentProps<\"h3\"> & {\n /** The heading level, to fit the page's outline. */\n as?: \"h2\" | \"h3\" | \"h4\";\n};\n\nexport function CardTitle({ as: Tag = \"h3\", className, ...props }: Readonly<CardTitleProps>) {\n return <Tag className={slots.title({ className })} {...props} />;\n}\n\nexport function CardDescription({ className, ...props }: Readonly<React.ComponentProps<\"p\">>) {\n return <p className={slots.description({ className })} {...props} />;\n}\n\nexport type CardStatProps = React.ComponentProps<\"div\"> & {\n /** What the figure is, in small capitals above it (the figure is the children). */\n label: React.ReactNode;\n};\n\n/** A figure put forward: the label in capitals, the value in tabular digits. */\nexport function CardStat({ label, className, children, ...props }: Readonly<CardStatProps>) {\n return (\n <div className={slots.stat({ className })} {...props}>\n <p className={slots.statLabel()}>{label}</p>\n <p className={slots.statValue()}>{children}</p>\n </div>\n );\n}\n\nexport function CardFooter({ className, ...props }: Readonly<React.ComponentProps<\"div\">>) {\n return <div className={slots.footer({ className })} {...props} />;\n}\n\n/** `Card.Root/Media/Image/Overlay/Body/Title/Description/Stat/Footer`. */\nexport const Card = {\n Root: CardRoot,\n Media: CardMedia,\n Image: CardImage,\n Overlay: CardOverlay,\n Body: CardBody,\n Title: CardTitle,\n Description: CardDescription,\n Stat: CardStat,\n Footer: CardFooter,\n};\n","// The card's parts, radii, tones and paddings, written once as classes of the Krizaka tokens: the web wears them with\n// `tv(cardRecipe)`, React Native reads the same classes into styles (native/card.tsx): a part of the card that exists only\n// on the web (the hover's tint) is simply ignored there.\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const cardRecipe = defineRecipe({\n slots: {\n root:\n \"group relative flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n media: \"relative overflow-hidden bg-media\",\n image: \"h-full w-full object-cover\",\n fallback: \"flex h-full w-full items-center justify-center bg-linear-to-br from-accent/15 via-media to-accent-2/15 text-accent/60\",\n overlay: \"absolute z-10 flex items-center gap-1.5\",\n body: \"relative flex flex-1 flex-col gap-3\",\n title: \"line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-fg-accent\",\n description: \"line-clamp-2 text-xs text-fg-secondary\",\n stat: \"min-w-0\",\n statLabel: \"font-mono text-[11.5px] text-fg-secondary\",\n statValue: \"font-display text-xl font-black tabular-nums text-fg\",\n footer: \"relative mt-auto flex items-center gap-2 border-t border-border-subtle pt-3 text-xs text-fg-secondary\",\n },\n variants: {\n radius: { md: { root: \"rounded-md\" }, lg: { root: \"rounded-lg\" }, xl: { root: \"rounded-xl\" } },\n tone: { default: {}, elevated: { root: \"bg-surface-2 shadow-md\" }, glass: { root: \"bg-glass border-glass-border\" } },\n interactive: { true: { root: \"duration-150 hover:border-border-strong hover:bg-surface-2\" } },\n padding: { none: { body: \"p-0\" }, sm: { body: \"p-3\" }, md: { body: \"p-4\" }, lg: { body: \"p-6\" } },\n },\n defaultVariants: { radius: \"xl\", tone: \"default\", padding: \"md\" },\n});\n","// The data-driven UI spec: a strict subset of A2UI v0.9 (ADR-082, krizaka/sovkora-packs). A model describes an interface\n// as data — never code — and only with the components of a catalog the client declares. Everything here is a pure\n// function over JSON: parse, validate, apply. Nothing is evaluated, nothing is trusted.\n\n/** The protocol version every message carries. */\nexport const GENUI_VERSION = \"v0.9\";\n\n/** The catalog a surface must name: the Krizaka components, version 1. */\nexport const GENUI_CATALOG_ID = \"krizaka:genui/v1\";\n\n/** The bounds of a surface — what a model may ask for, at most. */\nexport const GENUI_LIMITS = {\n /** Components per surface. */\n components: 300,\n /** Nesting depth from the root. */\n depth: 12,\n /** Characters in one string. */\n string: 4000,\n /** Items in one array of the data model. */\n array: 1000,\n /** Nesting depth of a data model value. */\n dataDepth: 12,\n /** Values (objects, arrays, scalars) in one data model update. */\n dataNodes: 50_000,\n /** Segments of a data path. */\n pathSegments: 16,\n} as const;\n\n/** One component as the model writes it: an id, the catalog name, its properties. */\nexport type GenUiComponent = { readonly id: string; readonly component: string } & Readonly<Record<string, unknown>>;\n\n/** A value bound to the data model: `{ \"path\": \"/rows\" }`. */\nexport type GenUiBinding = { readonly path: string };\n\n/** The four messages of A2UI v0.9. */\nexport type GenUiMessage =\n | { readonly version: typeof GENUI_VERSION; readonly createSurface: { readonly surfaceId: string; readonly catalogId: string } }\n | { readonly version: typeof GENUI_VERSION; readonly updateComponents: { readonly surfaceId: string; readonly components: readonly GenUiComponent[] } }\n | { readonly version: typeof GENUI_VERSION; readonly updateDataModel: { readonly surfaceId: string; readonly path: string; readonly value?: unknown } }\n | { readonly version: typeof GENUI_VERSION; readonly deleteSurface: { readonly surfaceId: string } };\n\n/** What validating a message says. */\nexport type GenUiResult<T> = { readonly ok: true; readonly value: T } | { readonly ok: false; readonly error: string };\n\n/** How a catalog entry checks a component's own properties: `null` when they are fine, else why not. */\nexport type GenUiPropsCheck = (component: GenUiComponent) => string | null;\n\nconst ID = /^[A-Za-z0-9_-]{1,64}$/;\nconst MESSAGE_KEYS = [\"createSurface\", \"updateComponents\", \"updateDataModel\", \"deleteSurface\"] as const;\nconst FORBIDDEN_SEGMENTS = new Set([\"__proto__\", \"prototype\", \"constructor\"]);\n\nconst fail = (error: string): { ok: false; error: string } => ({ ok: false, error });\n\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return false;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n}\n\nfunction onlyKeys(value: Record<string, unknown>, allowed: readonly string[], where: string): string | null {\n for (const key of Object.keys(value)) if (!allowed.includes(key)) return `${where}: unknown key \"${key}\"`;\n return null;\n}\n\n/** An id of a surface or a component, or why not. */\nexport function checkId(value: unknown, where: string): string | null {\n return typeof value === \"string\" && ID.test(value) ? null : `${where}: an id is 1-64 characters of [A-Za-z0-9_-]`;\n}\n\n/** The segments of a JSON pointer (`/a/b/0`), or why it is refused — `__proto__` and friends never pass. */\nexport function parsePath(path: unknown): GenUiResult<readonly string[]> {\n if (typeof path !== \"string\" || (path !== \"/\" && !path.startsWith(\"/\")) || path.length > 512) return fail(\"a path is a JSON pointer: /a/b\");\n if (path === \"/\") return { ok: true, value: [] };\n const segments = path\n .slice(1)\n .split(\"/\")\n .map((s) => s.replace(/~1/g, \"/\").replace(/~0/g, \"~\"));\n if (segments.length > GENUI_LIMITS.pathSegments) return fail(`a path has at most ${GENUI_LIMITS.pathSegments} segments`);\n for (const s of segments) {\n if (s === \"\" || FORBIDDEN_SEGMENTS.has(s)) return fail(`a path may not hold the segment \"${s}\"`);\n }\n return { ok: true, value: segments };\n}\n\n/** `true` when the value is a binding `{ path }` (and only that). */\nexport function isBinding(value: unknown): value is GenUiBinding {\n return isPlainObject(value) && Object.keys(value).length === 1 && typeof value.path === \"string\";\n}\n\n/**\n * A copy of a data model value that is plain JSON within the limits — strings, finite numbers, booleans, null, arrays\n * and plain objects — or why it is refused. The copy has a null prototype for every object: nothing it holds can\n * reach `Object.prototype`.\n */\nexport function sanitizeData(value: unknown): GenUiResult<unknown> {\n let nodes = 0;\n const walk = (v: unknown, depth: number): GenUiResult<unknown> => {\n if (++nodes > GENUI_LIMITS.dataNodes) return fail(`the data holds more than ${GENUI_LIMITS.dataNodes} values`);\n if (depth > GENUI_LIMITS.dataDepth) return fail(`the data nests deeper than ${GENUI_LIMITS.dataDepth}`);\n if (v === null || typeof v === \"boolean\") return { ok: true, value: v };\n if (typeof v === \"number\") return Number.isFinite(v) ? { ok: true, value: v } : fail(\"a number must be finite\");\n if (typeof v === \"string\") return v.length <= GENUI_LIMITS.string ? { ok: true, value: v } : fail(`a string has at most ${GENUI_LIMITS.string} characters`);\n if (Array.isArray(v)) {\n if (v.length > GENUI_LIMITS.array) return fail(`an array has at most ${GENUI_LIMITS.array} items`);\n const out: unknown[] = [];\n for (const item of v) {\n const r = walk(item, depth + 1);\n if (!r.ok) return r;\n out.push(r.value);\n }\n return { ok: true, value: out };\n }\n if (isPlainObject(v)) {\n const out: Record<string, unknown> = Object.create(null);\n for (const [key, item] of Object.entries(v)) {\n if (FORBIDDEN_SEGMENTS.has(key)) return fail(`a key may not be \"${key}\"`);\n const r = walk(item, depth + 1);\n if (!r.ok) return r;\n out[key] = r.value;\n }\n return { ok: true, value: out };\n }\n return fail(\"the data is plain JSON only\");\n };\n return walk(value, 0);\n}\n\n/**\n * A message as the model sent it — parsed and checked against the spec and the catalog, or why it is refused. A\n * component's own properties are checked by its catalog entry; a component the catalog does not hold is refused.\n */\nexport function validateMessage(input: unknown, catalog: Readonly<Record<string, { readonly check: GenUiPropsCheck }>>): GenUiResult<GenUiMessage> {\n if (!isPlainObject(input)) return fail(\"a message is a JSON object\");\n if (input.version !== GENUI_VERSION) return fail(`version must be \"${GENUI_VERSION}\"`);\n const present = MESSAGE_KEYS.filter((k) => k in input);\n if (present.length !== 1) return fail(\"a message holds exactly one of createSurface, updateComponents, updateDataModel, deleteSurface\");\n const kind = present[0];\n const extra = onlyKeys(input, [\"version\", kind], \"message\");\n if (extra) return fail(extra);\n const body = input[kind];\n if (!isPlainObject(body)) return fail(`${kind} is an object`);\n const surface = checkId(body.surfaceId, `${kind}.surfaceId`);\n if (surface) return fail(surface);\n\n switch (kind) {\n case \"createSurface\": {\n const keys = onlyKeys(body, [\"surfaceId\", \"catalogId\", \"theme\", \"sendDataModel\"], kind);\n if (keys) return fail(keys);\n if (body.catalogId !== GENUI_CATALOG_ID) return fail(`catalogId must be \"${GENUI_CATALOG_ID}\"`);\n return { ok: true, value: { version: GENUI_VERSION, createSurface: { surfaceId: body.surfaceId as string, catalogId: GENUI_CATALOG_ID } } };\n }\n case \"updateComponents\": {\n const keys = onlyKeys(body, [\"surfaceId\", \"components\"], kind);\n if (keys) return fail(keys);\n if (!Array.isArray(body.components) || body.components.length > GENUI_LIMITS.components) {\n return fail(`components is an array of at most ${GENUI_LIMITS.components}`);\n }\n const components: GenUiComponent[] = [];\n for (const raw of body.components) {\n if (!isPlainObject(raw)) return fail(\"a component is an object\");\n const id = checkId(raw.id, \"component.id\");\n if (id) return fail(id);\n if (typeof raw.component !== \"string\" || !Object.hasOwn(catalog, raw.component)) {\n return fail(`component \"${String(raw.id)}\": \"${String(raw.component)}\" is not in the catalog`);\n }\n const clean = sanitizeData(raw);\n if (!clean.ok) return fail(`component \"${raw.id}\": ${clean.error}`);\n const component = { ...(clean.value as Record<string, unknown>) } as GenUiComponent;\n const problem = catalog[raw.component].check(component);\n if (problem) return fail(`component \"${raw.id}\" (${raw.component}): ${problem}`);\n components.push(component);\n }\n return { ok: true, value: { version: GENUI_VERSION, updateComponents: { surfaceId: body.surfaceId as string, components } } };\n }\n case \"updateDataModel\": {\n const keys = onlyKeys(body, [\"surfaceId\", \"path\", \"value\"], kind);\n if (keys) return fail(keys);\n const path = body.path === undefined ? \"/\" : body.path;\n const parsed = parsePath(path);\n if (!parsed.ok) return parsed;\n if (!(\"value\" in body)) return { ok: true, value: { version: GENUI_VERSION, updateDataModel: { surfaceId: body.surfaceId as string, path: path as string } } };\n const clean = sanitizeData(body.value);\n if (!clean.ok) return clean;\n return { ok: true, value: { version: GENUI_VERSION, updateDataModel: { surfaceId: body.surfaceId as string, path: path as string, value: clean.value } } };\n }\n default: {\n const keys = onlyKeys(body, [\"surfaceId\"], kind);\n if (keys) return fail(keys);\n return { ok: true, value: { version: GENUI_VERSION, deleteSurface: { surfaceId: body.surfaceId as string } } };\n }\n }\n}\n\n// ── checks the catalog entries share ─────────────────────────────────────────────────────────────────────────────\n\n/** Why the component's keys are refused, or null: only `id`, `component` and the entry's own keys. */\nexport function allowKeys(component: GenUiComponent, keys: readonly string[]): string | null {\n return onlyKeys(component, [\"id\", \"component\", ...keys], \"properties\");\n}\n\n/** A short text (or a binding to one), required or not. */\nexport function checkText(value: unknown, name: string, required: boolean): string | null {\n if (value === undefined) return required ? `${name} is required` : null;\n if (isBinding(value)) return parsePath(value.path).ok ? null : `${name}: a bad path`;\n return typeof value === \"string\" ? null : `${name} is a string`;\n}\n\n/** A value among a closed list. */\nexport function checkEnum(value: unknown, name: string, allowed: readonly string[], required = false): string | null {\n if (value === undefined) return required ? `${name} is required` : null;\n return typeof value === \"string\" && allowed.includes(value) ? null : `${name} is one of ${allowed.join(\", \")}`;\n}\n\n/** A list of child ids. */\nexport function checkChildren(value: unknown, name = \"children\"): string | null {\n if (!Array.isArray(value) || value.length > GENUI_LIMITS.components) return `${name} is an array of component ids`;\n for (const id of value) if (checkId(id, name)) return `${name} holds ids only`;\n return null;\n}\n\n/** A binding to the data model (required). */\nexport function checkBinding(value: unknown, name: string): string | null {\n if (!isBinding(value)) return `${name} is a binding { \"path\": \"/…\" }`;\n return parsePath(value.path).ok ? null : `${name}: a bad path`;\n}\n\n/** A number, or a binding to one. */\nexport function checkNumber(value: unknown, name: string, required: boolean): string | null {\n if (value === undefined) return required ? `${name} is required` : null;\n if (isBinding(value)) return parsePath(value.path).ok ? null : `${name}: a bad path`;\n return typeof value === \"number\" && Number.isFinite(value) ? null : `${name} is a number`;\n}\n\n/** The value formats a model may name. */\nexport const GENUI_FORMATS = [\"number\", \"integer\", \"compact\", \"percent\", \"money\"] as const;\nexport type GenUiFormat = (typeof GENUI_FORMATS)[number];\n\n/** A three-letter currency code. */\nexport function checkCurrency(value: unknown, required: boolean): string | null {\n if (value === undefined) return required ? \"currency is required with the money format\" : null;\n return typeof value === \"string\" && /^[A-Z]{3}$/.test(value) ? null : \"currency is a three-letter code (CAD)\";\n}\n","// The surfaces a stream of A2UI messages builds — pure: `applyMessage` returns a new state, `readStream` turns a growing\n// text (a model's answer as it arrives) into the messages it holds so far. Nothing here renders.\nimport { GENUI_LIMITS, type GenUiComponent, type GenUiMessage, type GenUiPropsCheck, parsePath, validateMessage } from \"./spec\";\n\n/** One surface: its components by id, and its data model. */\nexport type GenUiSurfaceState = {\n readonly id: string;\n readonly components: ReadonlyMap<string, GenUiComponent>;\n readonly data: unknown;\n};\n\n/** Every surface of a stream, and what was refused on the way. */\nexport type GenUiState = {\n readonly surfaces: ReadonlyMap<string, GenUiSurfaceState>;\n /** The order surfaces were created in. */\n readonly order: readonly string[];\n /** Why messages were dropped, in order (a dropped message leaves the rest of the surface as it was). */\n readonly errors: readonly string[];\n};\n\nexport const emptyGenUiState: GenUiState = { surfaces: new Map(), order: [], errors: [] };\n\nconst withError = (state: GenUiState, error: string): GenUiState => ({ ...state, errors: [...state.errors, error] });\n\nfunction setAt(root: unknown, segments: readonly string[], value: unknown, remove: boolean): unknown {\n if (segments.length === 0) return remove ? Object.create(null) : value;\n const [head, ...rest] = segments;\n if (Array.isArray(root)) {\n const index = Number(head);\n if (!Number.isInteger(index) || index < 0 || index > root.length || index >= GENUI_LIMITS.array) return root;\n const copy = [...root];\n if (remove && rest.length === 0) copy.splice(index, 1);\n else copy[index] = setAt(root[index], rest, value, remove);\n return copy;\n }\n const base: Record<string, unknown> = Object.assign(Object.create(null), root !== null && typeof root === \"object\" ? root : {});\n if (remove && rest.length === 0) delete base[head];\n else base[head] = setAt(base[head], rest, value, remove);\n return base;\n}\n\n/** The value at a JSON pointer of the data model, `undefined` when there is none. */\nexport function readPath(data: unknown, path: string): unknown {\n const parsed = parsePath(path);\n if (!parsed.ok) return undefined;\n let cursor: unknown = data;\n for (const segment of parsed.value) {\n if (cursor === null || typeof cursor !== \"object\") return undefined;\n if (!Object.hasOwn(cursor, segment)) return undefined;\n cursor = (cursor as Record<string, unknown>)[segment];\n }\n return cursor;\n}\n\n/** The state after one validated message. */\nexport function applyMessage(state: GenUiState, message: GenUiMessage): GenUiState {\n if (\"createSurface\" in message) {\n const { surfaceId } = message.createSurface;\n if (state.surfaces.has(surfaceId)) return withError(state, `surface \"${surfaceId}\" already exists`);\n const surfaces = new Map(state.surfaces);\n surfaces.set(surfaceId, { id: surfaceId, components: new Map(), data: Object.create(null) });\n return { ...state, surfaces, order: [...state.order, surfaceId] };\n }\n if (\"deleteSurface\" in message) {\n const surfaces = new Map(state.surfaces);\n surfaces.delete(message.deleteSurface.surfaceId);\n return { ...state, surfaces, order: state.order.filter((id) => id !== message.deleteSurface.surfaceId) };\n }\n const surfaceId = \"updateComponents\" in message ? message.updateComponents.surfaceId : message.updateDataModel.surfaceId;\n const surface = state.surfaces.get(surfaceId);\n if (!surface) return withError(state, `surface \"${surfaceId}\" was not created`);\n const surfaces = new Map(state.surfaces);\n if (\"updateComponents\" in message) {\n const components = new Map(surface.components);\n for (const component of message.updateComponents.components) components.set(component.id, component);\n if (components.size > GENUI_LIMITS.components) return withError(state, `surface \"${surfaceId}\" holds more than ${GENUI_LIMITS.components} components`);\n surfaces.set(surfaceId, { ...surface, components });\n } else {\n const { path, value } = message.updateDataModel;\n const parsed = parsePath(path);\n if (!parsed.ok) return withError(state, parsed.error);\n surfaces.set(surfaceId, { ...surface, data: setAt(surface.data, parsed.value, value, !(\"value\" in message.updateDataModel)) });\n }\n return { ...state, surfaces };\n}\n\n/** The first complete JSON object of a line when only stray `}` / `]` follow it, else null. Strings are skipped. */\nexport function leadingObject(text: string): string | null {\n if (!text.startsWith(\"{\")) return null;\n let depth = 0;\n let inString = false;\n for (let i = 0; i < text.length; i++) {\n const c = text[i];\n if (inString) {\n if (c === \"\\\\\") i++;\n else if (c === '\"') inString = false;\n continue;\n }\n if (c === '\"') inString = true;\n else if (c === \"{\" || c === \"[\") depth++;\n else if (c === \"}\" || c === \"]\") {\n depth--;\n if (depth === 0) return /^[\\s}\\]]*$/.test(text.slice(i + 1)) ? text.slice(0, i + 1) : null;\n }\n }\n return null;\n}\n\n/** The state after a line of JSON (one message), the line refused with its reason when it is not valid. */\nexport function applyLine(state: GenUiState, line: string, catalog: Readonly<Record<string, { readonly check: GenUiPropsCheck }>>): GenUiState {\n const text = line.trim();\n if (!text) return state;\n let json: unknown;\n try {\n json = JSON.parse(text);\n } catch {\n // Models sometimes close one brace too many: the first complete object is kept when what follows it is only\n // stray closing brackets. Anything else is not JSON and is refused. (The object is still validated as any other.)\n const head = leadingObject(text);\n if (head === null) return withError(state, \"a line is not JSON\");\n try {\n json = JSON.parse(head);\n } catch {\n return withError(state, \"a line is not JSON\");\n }\n }\n const result = validateMessage(json, catalog);\n return result.ok ? applyMessage(state, result.value) : withError(state, result.error);\n}\n\n/** Where a fenced `a2ui` block sits in a text: its JSON Lines so far, whether it is closed, and the prose around it. */\nexport type GenUiExtract = { readonly lines: readonly string[]; readonly closed: boolean; readonly prose: string; readonly found: boolean };\n\nconst FENCE = /```a2ui[^\\n]*\\n/;\n\n/**\n * Splits a model's answer — complete or still arriving — into its prose and the complete lines of its `a2ui` fence.\n * A line still being written (no newline yet, the fence open) is left for the next call: the surface grows message by\n * message as the answer streams.\n */\nexport function extractGenUi(text: string): GenUiExtract {\n const open = FENCE.exec(text);\n if (!open) return { lines: [], closed: false, prose: text, found: false };\n const start = open.index + open[0].length;\n const end = text.indexOf(\"\\n```\", start - 1);\n const closed = end >= 0;\n const body = closed ? text.slice(start, end) : text.slice(start);\n const parts = body.split(\"\\n\");\n const lines = closed ? parts : parts.slice(0, -1);\n const after = closed ? text.slice(end + 4).replace(/^[^\\n]*\\n?/, \"\") : \"\";\n const prose = [text.slice(0, open.index).trim(), after.trim()].filter(Boolean).join(\"\\n\\n\");\n return { lines: lines.filter((l) => l.trim()), closed, prose, found: true };\n}\n\n/** The state of every surface a model's answer describes so far. */\nexport function readStream(text: string, catalog: Readonly<Record<string, { readonly check: GenUiPropsCheck }>>): GenUiState & { readonly prose: string; readonly found: boolean } {\n const { lines, prose, found } = extractGenUi(text);\n const state = lines.reduce((s, line) => applyLine(s, line, catalog), emptyGenUiState);\n return { ...state, prose, found };\n}\n","// Renders a surface from its root: each component through its catalog entry, children by id, bound values from the data\n// model. A tree only — a component met twice (a cycle, two parents) or beyond the depth is not drawn — and a child still\n// to come (the answer is streaming) is a skeleton. Text is text: React escapes it, nothing is ever parsed as HTML.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Skeleton } from \"../skeleton\";\nimport { GENUI_LIMITS, type GenUiComponent, type GenUiPropsCheck, isBinding } from \"./spec\";\nimport { type GenUiState, type GenUiSurfaceState, readPath, readStream } from \"./store\";\n\n/** What an entry gets to draw a component. */\nexport type GenUiRenderContext = {\n /** A child by id: drawn, a skeleton while it has not arrived, nothing when refused. */\n child: (id: unknown) => React.ReactNode;\n /** Children by id, in order. */\n children: (ids: unknown) => React.ReactNode[];\n /** A literal, or the value a binding `{ path }` points at in the data model. */\n resolve: (value: unknown) => unknown;\n /** The words of the surface. */\n labels: GenUiLabels;\n /** The locale numbers and dates are written in. */\n locale: string;\n};\n\n/** One component of a catalog: how its properties are checked, how it is drawn. */\nexport type GenUiEntry = {\n /** `null` when the component's own properties are fine, else why not (the message is refused). */\n readonly check: GenUiPropsCheck;\n /** Draws the component. */\n readonly render: (component: GenUiComponent, context: GenUiRenderContext) => React.ReactNode;\n};\n\n/** The components a model may use, by name: `baseGenUiCatalog`, merged with `chartsGenUiCatalog` of @krizaka/charts. */\nexport type GenUiCatalog = Readonly<Record<string, GenUiEntry>>;\n\n/** The surface's own words (passed translated). */\nexport type GenUiLabels = {\n /** Announced while the surface is still arriving. */\n loading: string;\n /** The accessible name of the surface. */\n surface: string;\n /** Under a table whose data has not arrived or is not a list. */\n noData: string;\n};\n\nexport const genUiLabels: GenUiLabels = { loading: \"Building the view…\", surface: \"Generated view\", noData: \"No data\" };\n\nexport type GenUiSurfaceProps = {\n /** The surface to draw (from `readStream` or `applyMessage`). */\n surface: GenUiSurfaceState;\n /** The components it may use. */\n catalog: GenUiCatalog;\n /** The answer is still arriving: missing children are skeletons and the surface is busy. */\n streaming?: boolean;\n /** The surface's words. */\n labels?: Partial<GenUiLabels>;\n /** The locale numbers are written in. Default `en`. */\n locale?: string;\n /** Called with what could not be drawn (a cycle, a missing child once the answer is complete). */\n onError?: (error: string) => void;\n /** Extra classes on the frame. */\n className?: string;\n};\n\n/** One surface, drawn from its root. */\nexport function GenUiSurface({ surface, catalog, streaming = false, labels, locale = \"en\", onError, className }: Readonly<GenUiSurfaceProps>) {\n const words = { ...genUiLabels, ...labels };\n const problems: string[] = [];\n const seen = new Set<string>();\n\n const draw = (id: unknown, depth: number): React.ReactNode => {\n if (typeof id !== \"string\") return null;\n if (depth > GENUI_LIMITS.depth) {\n problems.push(`\"${id}\" is deeper than ${GENUI_LIMITS.depth}`);\n return null;\n }\n if (seen.has(id)) {\n problems.push(`\"${id}\" is drawn twice (a cycle or two parents)`);\n return null;\n }\n const component = surface.components.get(id);\n if (!component) {\n if (!streaming) problems.push(`\"${id}\" never arrived`);\n return streaming ? <Skeleton key={id} className=\"h-10 w-full rounded-lg\" /> : null;\n }\n const entry = Object.hasOwn(catalog, component.component) ? catalog[component.component] : undefined;\n if (!entry) return null;\n seen.add(id);\n const context: GenUiRenderContext = {\n child: (c) => draw(c, depth + 1),\n children: (ids) => (Array.isArray(ids) ? ids.map((c) => <React.Fragment key={String(c)}>{draw(c, depth + 1)}</React.Fragment>) : []),\n resolve: (value) => (isBinding(value) ? readPath(surface.data, value.path) : value),\n labels: words,\n locale,\n };\n return <React.Fragment key={id}>{entry.render(component, context)}</React.Fragment>;\n };\n\n const root = draw(\"root\", 0);\n React.useEffect(() => {\n if (onError) for (const problem of problems) onError(problem);\n // Reported once per drawn state.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [surface, streaming]);\n\n return (\n <section aria-label={words.surface} aria-busy={streaming || undefined} data-genui-surface={surface.id} className={cn(\"flex flex-col gap-4\", className)}>\n {root ?? (streaming ? <Skeleton className=\"h-24 w-full rounded-xl\" /> : null)}\n </section>\n );\n}\n\nexport type GenUiStreamProps = Omit<GenUiSurfaceProps, \"surface\"> & {\n /** A model's answer, complete or still arriving: its prose and its `a2ui` fence. */\n text: string;\n /** Draws the prose (markdown in a chat); default: paragraphs of text. */\n renderProse?: (prose: string) => React.ReactNode;\n /** What to show when the answer holds no valid surface: the answer itself, as text (the fallback). */\n fallback?: (text: string) => React.ReactNode;\n};\n\n/**\n * A model's answer with its generated view: the prose, then every surface of its `a2ui` fence, growing as the answer\n * streams. An answer without a valid surface falls back to its text.\n */\nexport function GenUiStream({ text, catalog, streaming, renderProse, fallback, onError, ...rest }: Readonly<GenUiStreamProps>) {\n const state = React.useMemo(() => readStream(text, catalog), [text, catalog]);\n const reported = React.useRef(0);\n React.useEffect(() => {\n if (!onError) return;\n for (const error of state.errors.slice(reported.current)) onError(error);\n reported.current = state.errors.length;\n }, [state, onError]);\n const prose = (value: string) => (renderProse ? renderProse(value) : value.split(/\\n{2,}/).map((p, i) => <p key={i}>{p}</p>));\n const surfaces = state.order.map((id) => state.surfaces.get(id)).filter((s): s is GenUiSurfaceState => !!s && s.components.has(\"root\"));\n if (!state.found || (!streaming && surfaces.length === 0)) return <>{fallback ? fallback(text) : prose(text)}</>;\n return (\n <div className=\"flex flex-col gap-4\" data-genui-stream=\"\">\n {state.prose && prose(state.prose)}\n {surfaces.map((surface) => (\n <GenUiSurface key={surface.id} surface={surface} catalog={catalog} streaming={streaming} onError={onError} {...rest} />\n ))}\n {streaming && surfaces.length === 0 && <Skeleton className=\"h-24 w-full rounded-xl\" />}\n </div>\n );\n}\n\n/** The state a list of messages builds — for a surface the app holds itself (not from a model's text). */\nexport type { GenUiState };\n","// Server-safe. A placeholder for content on its way: decorative, so hidden from assistive technology. One reflection of\n// the brand light crosses every skeleton of the page together (`background-attachment: fixed`), instead of each one\n// pulsing on its own; under reduced motion they rest, tinted.\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const skeletonVariants = tv({\n base: \"kz-skeleton block bg-surface-3\",\n variants: {\n shape: { text: \"h-3 w-full rounded-sm\", circle: \"aspect-square h-10 rounded-full\", rect: \"h-24 w-full rounded-lg\" },\n },\n defaultVariants: { shape: \"text\" },\n});\n\nexport type SkeletonProps = React.ComponentProps<\"span\"> & {\n /**\n * text (a line) · circle (an avatar; give it a height) · rect (a media; give it a height).\n * @default \"text\"\n */\n shape?: VariantProps<typeof skeletonVariants>[\"shape\"];\n};\n\n/** A shape the size of what is loading. Announce the wait elsewhere (`LoadingRegion` does it, with `aria-busy`). */\nexport function Skeleton({ shape, className, ...props }: Readonly<SkeletonProps>) {\n return <span aria-hidden data-shape={shape ?? \"text\"} className={skeletonVariants({ shape, className })} {...props} />;\n}\n\nexport type SkeletonTextProps = React.ComponentProps<\"span\"> & {\n /**\n * How many lines.\n * @default 3\n */\n lines?: number;\n};\n\n/** A paragraph on its way: `lines` lines, the last one shorter — like text that wraps. */\nexport function SkeletonText({ lines = 3, className, ...props }: Readonly<SkeletonTextProps>) {\n return (\n <span aria-hidden className={[\"flex w-full flex-col gap-2\", className].filter(Boolean).join(\" \")} {...props}>\n {Array.from({ length: lines }, (_, i) => (\n <Skeleton key={i} className={i === lines - 1 && lines > 1 ? \"w-3/5\" : undefined} />\n ))}\n </span>\n );\n}\n\nexport type SkeletonShapeProps = React.ComponentProps<\"div\">;\n\n/**\n * The skeleton of the real thing: render your component with placeholder data inside, and its text, images and icons\n * become skeleton shapes in place — the exact layout, nothing to draw twice. Inert and hidden from assistive technology.\n */\nexport function SkeletonShape({ className, children, ...props }: Readonly<SkeletonShapeProps>) {\n return (\n <div aria-hidden inert className={[\"kz-skeleton-shape\", className].filter(Boolean).join(\" \")} {...props}>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA,SAAS,eAAe,aAAa,cAAc,qBAAqB;;;ACAxE,SAAS,UAA6B;AA0C9B,cAIF,YAJE;AAtCD,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,IACb,QAAQ;AAAA,EACV;AAAA,EACA,UAAU;AAAA,IACR,MA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G,SAAQ,KAAK;AACvE,aAAS,UAAU,MAAM,OAAO;AAAA,EAClC,GAAG,CAAC,OAAO,OAAO,CAAC;AACnB,QAAM,QAAQ,CAAC,UAAmB,cAAc,YAAY,KAAK,IAAI,MAAM,MAAM,QAAQ,EAAE,IAAI,CAAC,GAAG,MAAM,gBAAAF,KAAC,OAAW,eAAJ,CAAM,CAAI;AAC3H,QAAM,WAAW,MAAM,MAAM,IAAI,CAAC,OAAO,MAAM,SAAS,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,MAA8B,CAAC,CAAC,KAAK,EAAE,WAAW,IAAI,MAAM,CAAC;AACtI,MAAI,CAAC,MAAM,SAAU,CAAC,aAAa,SAAS,WAAW,EAAI,QAAO,gBAAAA,KAAAD,WAAA,EAAG,qBAAW,SAASG,KAAI,IAAI,MAAMA,KAAI,GAAE;AAC7G,SACE,gBAAAD,MAAC,SAAI,WAAU,uBAAsB,qBAAkB,IACpD;AAAA,UAAM,SAAS,MAAM,MAAM,KAAK;AAAA,IAChC,SAAS,IAAI,CAAC,YACb,gBAAAD,KAAC,gBAA8B,SAAkB,SAAkB,WAAsB,SAAmB,GAAG,QAA5F,QAAQ,EAA0F,CACtH;AAAA,IACA,aAAa,SAAS,WAAW,KAAK,gBAAAA,KAAC,YAAS,WAAU,0BAAyB;AAAA,KACtF;AAEJ;","names":["tv","jsx","jsxs","tv","jsx","jsx","jsxs","card","surfaceId","surfaces","text","tv","jsx","Fragment","jsx","jsxs","text"]}
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import {
3
3
  Tooltip
4
- } from "./chunk-YATTFMDV.js";
4
+ } from "./chunk-LSQQSJ6J.js";
5
5
  import "./chunk-J3NC6ER4.js";
6
- import "./chunk-NSLXEDIS.js";
6
+ import "./chunk-HHBTM4AU.js";
7
7
 
8
8
  // src/glossary-term/glossary-term.tsx
9
9
  import { jsx } from "react/jsx-runtime";
@@ -16,7 +16,7 @@ type GlowCardProps = React.ComponentProps<"div"> & {
16
16
  alive?: boolean;
17
17
  };
18
18
  /** A card ringed by the brand: a still hairline of its gradient, a step brighter under the pointer. Content is yours. */
19
- declare function GlowCard({ glow, asChild, alive, className, ...props }: GlowCardProps): React.JSX.Element;
19
+ declare function GlowCard({ glow, asChild, alive, className, ...props }: Readonly<GlowCardProps>): React.JSX.Element;
20
20
 
21
21
  export { GlowCard };
22
22
  export type { GlowCardProps };
package/dist/glow-card.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  cn
4
- } from "./chunk-NSLXEDIS.js";
4
+ } from "./chunk-HHBTM4AU.js";
5
5
 
6
6
  // src/glow-card/glow-card.tsx
7
7
  import { Slot } from "radix-ui";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/glow-card/glow-card.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;AAIA,SAAS,YAAY;AAyBjB;AAHG,SAAS,SAAS,EAAE,OAAO,QAAQ,SAAS,OAAO,WAAW,GAAG,MAAM,GAAkB;AAC9F,QAAM,OAAO,UAAU,KAAK,OAAO;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,cAAY,QAAQ,KAAK;AAAA,MACzB,WAAW,GAAG,sFAAsF,SAAS;AAAA,MAC5G,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/glow-card/glow-card.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;AAIA,SAAS,YAAY;AAyBjB;AAHG,SAAS,SAAS,EAAE,OAAO,QAAQ,SAAS,OAAO,WAAW,GAAG,MAAM,GAA4B;AACxG,QAAM,OAAO,UAAU,KAAK,OAAO;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAW;AAAA,MACX,cAAY,QAAQ,KAAK;AAAA,MACzB,WAAW,GAAG,sFAAsF,SAAS;AAAA,MAC5G,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -33,7 +33,7 @@ type GoalGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
33
33
  brand?: string;
34
34
  };
35
35
  /** A goal in steps: `role="meter"`, the reached steps lit, the value in words beside the label. */
36
- declare function GoalGauge({ label, segments, value, valueText, mode, showLabel, variant, brand, className, style, ...props }: GoalGaugeProps): React.JSX.Element;
36
+ declare function GoalGauge({ label, segments, value, valueText, mode, showLabel, variant, brand, className, style, ...props }: Readonly<GoalGaugeProps>): React.JSX.Element;
37
37
 
38
38
  export { GoalGauge };
39
39
  export type { GoalGaugeProps };
@@ -2,7 +2,7 @@ import {
2
2
  brandClass,
3
3
  cn,
4
4
  storyVariantClass
5
- } from "./chunk-LH5J3VLZ.js";
5
+ } from "./chunk-F7EJZV53.js";
6
6
 
7
7
  // src/goal-gauge/goal-gauge.tsx
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/goal-gauge/goal-gauge.tsx"],"sourcesContent":["// 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 ? ({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UAAW,EAAE,OAAO,MAAM,IAA4B;AAAA;AAAA,YAJxD;AAAA,UAKP;AAAA,QAEJ,CAAC,GACH;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/goal-gauge/goal-gauge.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;AA0DQ,SACE,KADF;AAlBD,SAAS,UAAU,EAAE,OAAO,UAAU,OAAO,WAAW,OAAO,QAAQ,YAAY,MAAM,SAAS,OAAO,WAAW,OAAO,GAAG,MAAM,GAA6B;AACtK,QAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,QAAQ,CAAC;AAC9C,QAAM,MAAM,KAAK,IAAI,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,SAAS,KAAK,CAAC,CAAC;AACnE,QAAM,QAAQ,aAAa,GAAG,GAAG,MAAM,KAAK;AAC5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,kBAAgB;AAAA,MAChB,aAAW;AAAA,MACX,WAAW,GAAG,aAAa,kBAAkB,OAAO,GAAG,WAAW,KAAK,GAAG,SAAS;AAAA,MACnF,OAAO,EAAE,kBAAkB,OAAO,GAAG,MAAM;AAAA,MAC1C,GAAG;AAAA,MAEH;AAAA,qBACC,qBAAC,SAAI,WAAU,kBAAiB,eAAW,MACzC;AAAA,8BAAC,UAAK,WAAU,mBAAmB,iBAAM;AAAA,UACzC,oBAAC,UAAK,WAAU,mBAAmB,iBAAM;AAAA,WAC3C;AAAA,QAEF,oBAAC,SAAI,WAAU,mBAAkB,eAAW,MACzC,gBAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,CAAC,GAAG,MAAM;AACvC,gBAAM,KAAK,IAAI;AACf,gBAAM,UAAU,SAAS,SAAS,KAAK,CAAC;AACxC,gBAAM,QAAQ,SAAS,SAAS,IAAI,IAAI;AACxC,iBACE;AAAA,YAAC;AAAA;AAAA,cAEC,WAAU;AAAA,cACV,YAAU,KAAK,KAAK;AAAA,cACpB,gBAAc,UAAU,KAAK;AAAA,cAC7B,OAAO,UAAW,EAAE,OAAO,MAAM,IAA4B;AAAA;AAAA,YAJxD;AAAA,UAKP;AAAA,QAEJ,CAAC,GACH;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -17,7 +17,7 @@ type GradeStampProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> &
17
17
  tilt?: number;
18
18
  };
19
19
  /** A teacher's red-ink grade, `18/20` with a remark, only from real data: its source is in a tooltip. */
20
- declare function GradeStamp({ value, outOf, remark, source, sourceLabel, locale, tilt, className, style, ...props }: GradeStampProps): React.JSX.Element | null;
20
+ declare function GradeStamp({ value, outOf, remark, source, sourceLabel, locale, tilt, className, style, ...props }: Readonly<GradeStampProps>): React.JSX.Element | null;
21
21
 
22
22
  export { GradeStamp };
23
23
  export type { GradeStampProps };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  Tooltip
4
- } from "./chunk-EDQLPCM4.js";
4
+ } from "./chunk-WVZF6WK3.js";
5
5
  import {
6
6
  cn
7
- } from "./chunk-NSLXEDIS.js";
7
+ } from "./chunk-HHBTM4AU.js";
8
8
 
9
9
  // src/grade-stamp/grade-stamp.tsx
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/grade-stamp/grade-stamp.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;AAwCU,SAEQ,KAFR;AAbH,SAAS,WAAW,EAAE,OAAO,QAAQ,IAAI,QAAQ,QAAQ,cAAc,UAAU,SAAS,MAAM,OAAO,IAAI,WAAW,OAAO,GAAG,MAAM,GAAoB;AAC/J,MAAI,CAAC,OAAO,SAAS,KAAK,KAAK,CAAC,OAAO,SAAS,KAAK,KAAK,SAAS,KAAK,QAAQ,KAAK,QAAQ,SAAS,CAAC,OAAO,KAAK,EAAG,QAAO;AAC7H,QAAM,SAAS,IAAI,KAAK,aAAa,QAAQ,EAAE,uBAAuB,EAAE,CAAC;AACzE,SACE,oBAAC,WAAQ,SAAS,QAChB;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,YAAY,SAAS;AAAA,MACnC,UAAU;AAAA,MACV,OAAO,EAAE,GAAG,OAAO,CAAC,iBAA2B,GAAG,GAAG,IAAI,MAAM;AAAA,MAC9D,GAAG;AAAA,MAEJ;AAAA,6BAAC,UAAK,WAAU,kBACb;AAAA,iBAAO,OAAO,KAAK;AAAA,UACpB,qBAAC,UAAK,WAAU,gBAAe;AAAA;AAAA,YAAE,OAAO,OAAO,KAAK;AAAA,aAAE;AAAA,WACxD;AAAA,QACC,SAAS,oBAAC,UAAK,WAAU,mBAAmB,kBAAO,IAAU;AAAA,QAC9D,qBAAC,UAAK,WAAU,cACb;AAAA;AAAA,UAAY;AAAA,UAAG;AAAA,WAClB;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/grade-stamp/grade-stamp.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;AAwCU,SAEQ,KAFR;AAbH,SAAS,WAAW,EAAE,OAAO,QAAQ,IAAI,QAAQ,QAAQ,cAAc,UAAU,SAAS,MAAM,OAAO,IAAI,WAAW,OAAO,GAAG,MAAM,GAA8B;AACzK,MAAI,CAAC,OAAO,SAAS,KAAK,KAAK,CAAC,OAAO,SAAS,KAAK,KAAK,SAAS,KAAK,QAAQ,KAAK,QAAQ,SAAS,CAAC,OAAO,KAAK,EAAG,QAAO;AAC7H,QAAM,SAAS,IAAI,KAAK,aAAa,QAAQ,EAAE,uBAAuB,EAAE,CAAC;AACzE,SACE,oBAAC,WAAQ,SAAS,QAChB;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,YAAY,SAAS;AAAA,MACnC,UAAU;AAAA,MACV,OAAO,EAAE,GAAG,OAAO,CAAC,iBAA2B,GAAG,GAAG,IAAI,MAAM;AAAA,MAC9D,GAAG;AAAA,MAEJ;AAAA,6BAAC,UAAK,WAAU,kBACb;AAAA,iBAAO,OAAO,KAAK;AAAA,UACpB,qBAAC,UAAK,WAAU,gBAAe;AAAA;AAAA,YAAE,OAAO,OAAO,KAAK;AAAA,aAAE;AAAA,WACxD;AAAA,QACC,SAAS,oBAAC,UAAK,WAAU,mBAAmB,kBAAO,IAAU;AAAA,QAC9D,qBAAC,UAAK,WAAU,cACb;AAAA;AAAA,UAAY;AAAA,UAAG;AAAA,WAClB;AAAA;AAAA;AAAA,EACF,GACF;AAEJ;","names":[]}
@@ -33,7 +33,7 @@ type IdentityCardProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
33
33
  qr?: IdentityCardQr;
34
34
  };
35
35
  /** The identity of a business or a person: mark, name, subtitle, chips and a contact QR code. Wraps to one column on a phone. */
36
- declare function IdentityCard({ mark, eyebrow, name, nameAs: Name, subtitle, chips, qr, className, ...props }: IdentityCardProps): React.JSX.Element;
36
+ declare function IdentityCard({ mark, eyebrow, name, nameAs: Name, subtitle, chips, qr, className, ...props }: Readonly<IdentityCardProps>): React.JSX.Element;
37
37
 
38
38
  export { IdentityCard };
39
39
  export type { IdentityCardProps, IdentityCardQr };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  QrCode
3
- } from "./chunk-PJNR4NTS.js";
4
- import "./chunk-C57KK5VB.js";
5
- import "./chunk-EB45EVPJ.js";
6
- import "./chunk-43PTCDTL.js";
3
+ } from "./chunk-HC2TY45B.js";
4
+ import "./chunk-PM23USOC.js";
5
+ import "./chunk-G5NROYGK.js";
6
+ import "./chunk-BVN7JFOP.js";
7
7
  import "./chunk-2VNYHG4E.js";
8
8
  import {
9
9
  cn
10
- } from "./chunk-W675RFOA.js";
10
+ } from "./chunk-ISC2QBXJ.js";
11
11
 
12
12
  // src/identity-card/identity-card.tsx
13
13
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/identity-card/identity-card.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;;;;AA8CQ,cACA,YADA;AAJD,SAAS,aAAa,EAAE,MAAM,SAAS,MAAM,QAAQ,OAAO,MAAM,UAAU,OAAO,IAAI,WAAW,GAAG,MAAM,GAAsB;AACtI,SACE,qBAAC,aAAQ,aAAU,iBAAgB,WAAW,GAAG,6HAA6H,SAAS,GAAI,GAAG,OAC5L;AAAA,yBAAC,SAAI,WAAU,mDACb;AAAA,0BAAC,SAAI,eAAY,QAAO,WAAU,YAAY,gBAAK;AAAA,MACnD,qBAAC,SAAI,WAAU,WACZ;AAAA,kBAAU,oBAAC,OAAE,WAAU,uCAAuC,mBAAQ,IAAO;AAAA,QAC9E,oBAAC,QAAK,WAAU,gFAAgF,gBAAK;AAAA,QACpG,WAAW,oBAAC,OAAE,WAAU,kCAAkC,oBAAS,IAAO;AAAA,QAC1E,QAAQ,oBAAC,SAAI,WAAU,0CAA0C,iBAAM,IAAS;AAAA,SACnF;AAAA,OACF;AAAA,IACC,KACC,qBAAC,SAAI,WAAU,oCACb;AAAA,0BAAC,UAAO,OAAO,GAAG,OAAO,OAAO,GAAG,OAAO,MAAM,GAAG,QAAQ,KAAK,WAAW,GAAG,WAAW,aAAa,GAAG,aAAa;AAAA,MACrH,GAAG,OAAO,oBAAC,OAAE,WAAU,uDAAuD,aAAG,MAAK,IAAO;AAAA,OAChG,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/identity-card/identity-card.tsx"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;;;;AA8CQ,cACA,YADA;AAJD,SAAS,aAAa,EAAE,MAAM,SAAS,MAAM,QAAQ,OAAO,MAAM,UAAU,OAAO,IAAI,WAAW,GAAG,MAAM,GAAgC;AAChJ,SACE,qBAAC,aAAQ,aAAU,iBAAgB,WAAW,GAAG,6HAA6H,SAAS,GAAI,GAAG,OAC5L;AAAA,yBAAC,SAAI,WAAU,mDACb;AAAA,0BAAC,SAAI,eAAY,QAAO,WAAU,YAAY,gBAAK;AAAA,MACnD,qBAAC,SAAI,WAAU,WACZ;AAAA,kBAAU,oBAAC,OAAE,WAAU,uCAAuC,mBAAQ,IAAO;AAAA,QAC9E,oBAAC,QAAK,WAAU,gFAAgF,gBAAK;AAAA,QACpG,WAAW,oBAAC,OAAE,WAAU,kCAAkC,oBAAS,IAAO;AAAA,QAC1E,QAAQ,oBAAC,SAAI,WAAU,0CAA0C,iBAAM,IAAS;AAAA,SACnF;AAAA,OACF;AAAA,IACC,KACC,qBAAC,SAAI,WAAU,oCACb;AAAA,0BAAC,UAAO,OAAO,GAAG,OAAO,OAAO,GAAG,OAAO,MAAM,GAAG,QAAQ,KAAK,WAAW,GAAG,WAAW,aAAa,GAAG,aAAa;AAAA,MACrH,GAAG,OAAO,oBAAC,OAAE,WAAU,uDAAuD,aAAG,MAAK,IAAO;AAAA,OAChG,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -118,7 +118,7 @@ type ImageCropperProps = {
118
118
  * Chooses what a fixed frame keeps of a picture or a video: drag, zoom, keyboard; a focus point and a zoom out.
119
119
  * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
120
120
  */
121
- declare function ImageCropper({ src, alt, children, naturalSize, aspect, round, value: valueProp, defaultValue, onValueChange, maxZoom, showZoom, labels: given, className, }: ImageCropperProps): React.JSX.Element;
121
+ declare function ImageCropper({ src, alt, children, naturalSize, aspect, round, value: valueProp, defaultValue, onValueChange, maxZoom, showZoom, labels: given, className, }: Readonly<ImageCropperProps>): React.JSX.Element;
122
122
 
123
123
  export { ImageCropper, cropRect, imageCropper, imageCropperLabels };
124
124
  export type { CropValue, ImageCropperLabels, ImageCropperProps };