@krizaka/ui 4.6.0 → 4.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (959) 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 +46 -0
  34. package/dist/architecture-diagram.js +324 -0
  35. package/dist/architecture-diagram.js.map +1 -0
  36. package/dist/argument-card.d.ts +2 -2
  37. package/dist/argument-card.js +8 -8
  38. package/dist/argument-card.js.map +1 -1
  39. package/dist/auth-layout.d.ts +1 -1
  40. package/dist/auth-layout.js.map +1 -1
  41. package/dist/avatar.d.ts +2 -2
  42. package/dist/avatar.js.map +1 -1
  43. package/dist/badge.d.ts +1 -1
  44. package/dist/badge.js +1 -1
  45. package/dist/bird-plate.d.ts +1 -1
  46. package/dist/bird-plate.js +2 -2
  47. package/dist/bird-plate.js.map +1 -1
  48. package/dist/blocks.css +33 -0
  49. package/dist/button.d.ts +2 -2
  50. package/dist/button.js +3 -3
  51. package/dist/captcha.d.ts +2 -2
  52. package/dist/captcha.js +3 -3
  53. package/dist/captcha.js.map +1 -1
  54. package/dist/card-grid.d.ts +1 -1
  55. package/dist/card-grid.js +1 -1
  56. package/dist/card-grid.js.map +1 -1
  57. package/dist/card.d.ts +9 -9
  58. package/dist/card.js +1 -1
  59. package/dist/card.js.map +1 -1
  60. package/dist/catalogue-page.d.ts +2 -2
  61. package/dist/catalogue-page.js.map +1 -1
  62. package/dist/changelog-page.d.ts +1 -1
  63. package/dist/changelog-page.js +2 -2
  64. package/dist/changelog-page.js.map +1 -1
  65. package/dist/chapter.d.ts +3 -3
  66. package/dist/chapter.js +2 -2
  67. package/dist/chapter.js.map +1 -1
  68. package/dist/chat.d.ts +3 -3
  69. package/dist/chat.js +1 -1
  70. package/dist/chat.js.map +1 -1
  71. package/dist/checkbox.d.ts +1 -1
  72. package/dist/checkbox.js.map +1 -1
  73. package/dist/chip-link.d.ts +1 -1
  74. package/dist/chip-link.js +1 -1
  75. package/dist/chip-row.d.ts +2 -2
  76. package/dist/chip-row.js +1 -1
  77. package/dist/chip-row.js.map +1 -1
  78. package/dist/chip.d.ts +4 -5
  79. package/dist/chip.js +2 -2
  80. package/dist/choice-grid.d.ts +1 -1
  81. package/dist/choice-grid.js +2 -2
  82. package/dist/choice-grid.js.map +1 -1
  83. package/dist/{chunk-S6NYGOJT.js → chunk-22IORLB5.js} +1 -1
  84. package/dist/chunk-22IORLB5.js.map +1 -0
  85. package/dist/{chunk-QA3WETWT.js → chunk-2P7Y3LNN.js} +1 -1
  86. package/dist/chunk-2P7Y3LNN.js.map +1 -0
  87. package/dist/{chunk-OGWB76BR.js → chunk-3CEMOJBL.js} +2 -2
  88. package/dist/chunk-3CEMOJBL.js.map +1 -0
  89. package/dist/{chunk-WC3SO4CE.js → chunk-3SWWUJJL.js} +2 -2
  90. package/dist/chunk-3SWWUJJL.js.map +1 -0
  91. package/dist/{chunk-S2O4NSN5.js → chunk-3TCHVNNB.js} +1 -1
  92. package/dist/chunk-3TCHVNNB.js.map +1 -0
  93. package/dist/{chunk-7P7I5OQV.js → chunk-5KBYZLU4.js} +2 -2
  94. package/dist/chunk-5KBYZLU4.js.map +1 -0
  95. package/dist/{chunk-WKQ5CB3I.js → chunk-6ARAO3TR.js} +1 -1
  96. package/dist/{chunk-WKQ5CB3I.js.map → chunk-6ARAO3TR.js.map} +1 -1
  97. package/dist/{chunk-QHVV2JGF.js → chunk-6LF6IZZM.js} +2 -2
  98. package/dist/chunk-6LF6IZZM.js.map +1 -0
  99. package/dist/{chunk-HP7BDMVK.js → chunk-7B5Q76JR.js} +2 -2
  100. package/dist/chunk-7B5Q76JR.js.map +1 -0
  101. package/dist/{chunk-F2UZ2WWL.js → chunk-7KIIAOQH.js} +1 -1
  102. package/dist/{chunk-F2UZ2WWL.js.map → chunk-7KIIAOQH.js.map} +1 -1
  103. package/dist/{chunk-ADRUEPYC.js → chunk-7MA3UODW.js} +2 -2
  104. package/dist/{chunk-ADRUEPYC.js.map → chunk-7MA3UODW.js.map} +1 -1
  105. package/dist/{chunk-KH3JOEPY.js → chunk-7PVLEALV.js} +1 -1
  106. package/dist/chunk-7PVLEALV.js.map +1 -0
  107. package/dist/{chunk-QVHSV6RA.js → chunk-7UBLUGNW.js} +1 -1
  108. package/dist/chunk-7UBLUGNW.js.map +1 -0
  109. package/dist/{chunk-YTYNKMNS.js → chunk-BKMHN4UA.js} +5 -5
  110. package/dist/chunk-BKMHN4UA.js.map +1 -0
  111. package/dist/{chunk-4QH6CP2Y.js → chunk-BRYRZWLV.js} +1 -1
  112. package/dist/{chunk-4QH6CP2Y.js.map → chunk-BRYRZWLV.js.map} +1 -1
  113. package/dist/{chunk-43PTCDTL.js → chunk-BVN7JFOP.js} +1 -1
  114. package/dist/chunk-BVN7JFOP.js.map +1 -0
  115. package/dist/{chunk-5RWHDX5J.js → chunk-BYKA3FHX.js} +2 -2
  116. package/dist/chunk-BYKA3FHX.js.map +1 -0
  117. package/dist/{chunk-5PFCELGW.js → chunk-DIOAQOR5.js} +1 -1
  118. package/dist/chunk-DIOAQOR5.js.map +1 -0
  119. package/dist/{chunk-HJFRHYCI.js → chunk-DTGRZXYO.js} +2 -2
  120. package/dist/{chunk-P7AFIKWG.js → chunk-DVC4YQI2.js} +2 -2
  121. package/dist/chunk-DVC4YQI2.js.map +1 -0
  122. package/dist/{chunk-V5RO6JYI.js → chunk-E3LFHTUV.js} +2 -2
  123. package/dist/chunk-E3LFHTUV.js.map +1 -0
  124. package/dist/{chunk-WEVYKZIF.js → chunk-EAXIDRMB.js} +1 -1
  125. package/dist/chunk-EAXIDRMB.js.map +1 -0
  126. package/dist/{chunk-WU4VLSEA.js → chunk-EYMS6VRF.js} +1 -1
  127. package/dist/chunk-EYMS6VRF.js.map +1 -0
  128. package/dist/{chunk-LH5J3VLZ.js → chunk-F7EJZV53.js} +1 -1
  129. package/dist/chunk-F7EJZV53.js.map +1 -0
  130. package/dist/{chunk-VPO27AFS.js → chunk-G3L7AKZJ.js} +1 -1
  131. package/dist/chunk-G3L7AKZJ.js.map +1 -0
  132. package/dist/{chunk-EB45EVPJ.js → chunk-G5NROYGK.js} +3 -3
  133. package/dist/chunk-G5NROYGK.js.map +1 -0
  134. package/dist/{chunk-HKEAYSFS.js → chunk-GQMINKT3.js} +1 -1
  135. package/dist/{chunk-ENOS6ETI.js.map → chunk-GQMINKT3.js.map} +1 -1
  136. package/dist/{chunk-3X3OF4TI.js → chunk-H4NXYAL7.js} +1 -1
  137. package/dist/{chunk-3X3OF4TI.js.map → chunk-H4NXYAL7.js.map} +1 -1
  138. package/dist/{chunk-KR2W4ONJ.js → chunk-H7I6YLI6.js} +1 -1
  139. package/dist/chunk-H7I6YLI6.js.map +1 -0
  140. package/dist/{chunk-PJNR4NTS.js → chunk-HC2TY45B.js} +4 -4
  141. package/dist/{chunk-NSLXEDIS.js → chunk-HHBTM4AU.js} +1 -1
  142. package/dist/chunk-HHBTM4AU.js.map +1 -0
  143. package/dist/{chunk-XVRKKYWU.js → chunk-HVUR3UNK.js} +2 -2
  144. package/dist/{chunk-XVRKKYWU.js.map → chunk-HVUR3UNK.js.map} +1 -1
  145. package/dist/{chunk-V7W4RLRW.js → chunk-HWIDTLLO.js} +3 -3
  146. package/dist/chunk-HWIDTLLO.js.map +1 -0
  147. package/dist/{chunk-W675RFOA.js → chunk-ISC2QBXJ.js} +1 -1
  148. package/dist/chunk-ISC2QBXJ.js.map +1 -0
  149. package/dist/{chunk-7DYZTEE3.js → chunk-IWPB6SSW.js} +1 -1
  150. package/dist/chunk-IWPB6SSW.js.map +1 -0
  151. package/dist/{chunk-TVLRE7S3.js → chunk-JDVWUF5W.js} +2 -2
  152. package/dist/{chunk-TVLRE7S3.js.map → chunk-JDVWUF5W.js.map} +1 -1
  153. package/dist/{chunk-757ZTGU5.js → chunk-JE2NY4XE.js} +4 -4
  154. package/dist/chunk-JE2NY4XE.js.map +1 -0
  155. package/dist/{chunk-HLEBSAGC.js → chunk-KBSZ6JRF.js} +2 -2
  156. package/dist/chunk-KBSZ6JRF.js.map +1 -0
  157. package/dist/{chunk-Y3P5B4XS.js → chunk-KCU45KQ3.js} +3 -3
  158. package/dist/chunk-KCU45KQ3.js.map +1 -0
  159. package/dist/{chunk-ST5P5HNI.js → chunk-L4YBG5US.js} +4 -4
  160. package/dist/{chunk-ST5P5HNI.js.map → chunk-L4YBG5US.js.map} +1 -1
  161. package/dist/{chunk-NG6G6V5E.js → chunk-LFH3LEWR.js} +1 -1
  162. package/dist/chunk-LFH3LEWR.js.map +1 -0
  163. package/dist/{chunk-YATTFMDV.js → chunk-LSQQSJ6J.js} +2 -2
  164. package/dist/{chunk-YATTFMDV.js.map → chunk-LSQQSJ6J.js.map} +1 -1
  165. package/dist/{chunk-LNAAWT4Y.js → chunk-MJWOZ3JI.js} +1 -1
  166. package/dist/chunk-MJWOZ3JI.js.map +1 -0
  167. package/dist/{chunk-KID32IRJ.js → chunk-MXHJMTZ5.js} +1 -1
  168. package/dist/{chunk-KID32IRJ.js.map → chunk-MXHJMTZ5.js.map} +1 -1
  169. package/dist/{chunk-GHAN7OOE.js → chunk-N6LAWI4F.js} +2 -2
  170. package/dist/chunk-N6LAWI4F.js.map +1 -0
  171. package/dist/{chunk-5VZ37TY3.js → chunk-NFJWD5BT.js} +2 -2
  172. package/dist/chunk-NFJWD5BT.js.map +1 -0
  173. package/dist/{chunk-ZPOVOEO3.js → chunk-NJLIHGU4.js} +2 -2
  174. package/dist/chunk-NJLIHGU4.js.map +1 -0
  175. package/dist/{chunk-PRD7JRQX.js → chunk-ONCQWOTH.js} +4 -4
  176. package/dist/{chunk-PRD7JRQX.js.map → chunk-ONCQWOTH.js.map} +1 -1
  177. package/dist/{chunk-ENOS6ETI.js → chunk-OZC6CDZF.js} +1 -1
  178. package/dist/{chunk-HKEAYSFS.js.map → chunk-OZC6CDZF.js.map} +1 -1
  179. package/dist/{chunk-TXFX4PMN.js → chunk-OZY4C4W5.js} +1 -1
  180. package/dist/{chunk-TXFX4PMN.js.map → chunk-OZY4C4W5.js.map} +1 -1
  181. package/dist/{chunk-NPMGYLJV.js → chunk-PIRYDEX2.js} +3 -3
  182. package/dist/chunk-PIRYDEX2.js.map +1 -0
  183. package/dist/{chunk-C57KK5VB.js → chunk-PM23USOC.js} +1 -1
  184. package/dist/chunk-PM23USOC.js.map +1 -0
  185. package/dist/{chunk-PGBF3UBX.js → chunk-QKL5TECH.js} +1 -1
  186. package/dist/chunk-QKL5TECH.js.map +1 -0
  187. package/dist/{chunk-Z47KIPCT.js → chunk-QY5JEUJT.js} +1 -1
  188. package/dist/chunk-QY5JEUJT.js.map +1 -0
  189. package/dist/{chunk-FVGFPB73.js → chunk-RPVKF4RR.js} +1 -1
  190. package/dist/{chunk-FVGFPB73.js.map → chunk-RPVKF4RR.js.map} +1 -1
  191. package/dist/{chunk-NM2DEHFZ.js → chunk-RXYKJIC4.js} +1 -1
  192. package/dist/chunk-RXYKJIC4.js.map +1 -0
  193. package/dist/{chunk-W64RAX4N.js → chunk-TKYNYIJS.js} +5 -5
  194. package/dist/chunk-TKYNYIJS.js.map +1 -0
  195. package/dist/{chunk-S4TLZRGZ.js → chunk-UMXWOA3I.js} +1 -1
  196. package/dist/chunk-UMXWOA3I.js.map +1 -0
  197. package/dist/{chunk-VA4NPCUQ.js → chunk-VD7QFUAP.js} +3 -3
  198. package/dist/chunk-VD7QFUAP.js.map +1 -0
  199. package/dist/{chunk-MDSP7DJR.js → chunk-VQELCPQJ.js} +5 -5
  200. package/dist/chunk-VQELCPQJ.js.map +1 -0
  201. package/dist/{chunk-2FCQCWIK.js → chunk-VXNBXW3P.js} +5 -5
  202. package/dist/chunk-VXNBXW3P.js.map +1 -0
  203. package/dist/{chunk-B47WSPMP.js → chunk-WPUDPH2Q.js} +1 -1
  204. package/dist/chunk-WPUDPH2Q.js.map +1 -0
  205. package/dist/{chunk-SG2RKUVJ.js → chunk-WTZUMVJI.js} +5 -5
  206. package/dist/chunk-WTZUMVJI.js.map +1 -0
  207. package/dist/{chunk-EDQLPCM4.js → chunk-WVZF6WK3.js} +2 -2
  208. package/dist/chunk-WVZF6WK3.js.map +1 -0
  209. package/dist/{chunk-5D7NMUF6.js → chunk-XDAETKWM.js} +2 -2
  210. package/dist/chunk-XDAETKWM.js.map +1 -0
  211. package/dist/{chunk-QD6SNXF5.js → chunk-XDWSGNL4.js} +3 -3
  212. package/dist/chunk-XDWSGNL4.js.map +1 -0
  213. package/dist/{chunk-SB5WSVPI.js → chunk-ZFH2BYXW.js} +2 -2
  214. package/dist/chunk-ZFH2BYXW.js.map +1 -0
  215. package/dist/{chunk-XVLWVTQA.js → chunk-ZI7K742O.js} +1 -1
  216. package/dist/{chunk-XVLWVTQA.js.map → chunk-ZI7K742O.js.map} +1 -1
  217. package/dist/{chunk-NQENOT6L.js → chunk-ZRRWSKV3.js} +8 -8
  218. package/dist/chunk-ZRRWSKV3.js.map +1 -0
  219. package/dist/cn.js +1 -1
  220. package/dist/code-block.d.ts +2 -2
  221. package/dist/code-block.js +2 -2
  222. package/dist/code-block.js.map +1 -1
  223. package/dist/collection-switcher.d.ts +1 -1
  224. package/dist/collection-switcher.js +1 -1
  225. package/dist/collection-switcher.js.map +1 -1
  226. package/dist/columns.d.ts +2 -2
  227. package/dist/columns.js.map +1 -1
  228. package/dist/combobox.js +4 -4
  229. package/dist/command.d.ts +10 -10
  230. package/dist/command.js +4 -4
  231. package/dist/command.js.map +1 -1
  232. package/dist/comparison-table.d.ts +1 -1
  233. package/dist/comparison-table.js +1 -1
  234. package/dist/comparison-table.js.map +1 -1
  235. package/dist/component-page.d.ts +1 -1
  236. package/dist/component-page.js.map +1 -1
  237. package/dist/confirm-button.d.ts +1 -1
  238. package/dist/confirm-button.js +4 -4
  239. package/dist/contact-page.d.ts +1 -1
  240. package/dist/contact-page.js.map +1 -1
  241. package/dist/continue-prompt.d.ts +1 -1
  242. package/dist/continue-prompt.js +1 -1
  243. package/dist/continue-prompt.js.map +1 -1
  244. package/dist/copy-button.d.ts +1 -1
  245. package/dist/copy-button.js +4 -4
  246. package/dist/copy-button.js.map +1 -1
  247. package/dist/countdown.d.ts +1 -1
  248. package/dist/countdown.js.map +1 -1
  249. package/dist/cover-hero.d.ts +1 -1
  250. package/dist/cover-hero.js +5 -5
  251. package/dist/cover-hero.js.map +1 -1
  252. package/dist/cta-panel.d.ts +1 -1
  253. package/dist/cta-panel.js +1 -1
  254. package/dist/cta-panel.js.map +1 -1
  255. package/dist/dashboard-layout.d.ts +2 -2
  256. package/dist/dashboard-layout.js.map +1 -1
  257. package/dist/data-table.d.ts +5 -5
  258. package/dist/data-table.js +9 -9
  259. package/dist/date-picker.d.ts +11 -11
  260. package/dist/date-picker.js +5 -5
  261. package/dist/date-picker.js.map +1 -1
  262. package/dist/decision-list.d.ts +1 -1
  263. package/dist/decision-list.js +2 -2
  264. package/dist/decision-list.js.map +1 -1
  265. package/dist/description-list.d.ts +2 -2
  266. package/dist/description-list.js.map +1 -1
  267. package/dist/detail-layout.d.ts +5 -5
  268. package/dist/detail-layout.js +1 -1
  269. package/dist/detail-layout.js.map +1 -1
  270. package/dist/{dialog-DpUwec2g.d.ts → dialog-CFnxFGyn.d.ts} +7 -7
  271. package/dist/dialog.d.ts +2 -2
  272. package/dist/dialog.js +4 -4
  273. package/dist/dialog.js.map +1 -1
  274. package/dist/docs-article-page.d.ts +1 -1
  275. package/dist/docs-article-page.js.map +1 -1
  276. package/dist/docs-hub-page.d.ts +1 -1
  277. package/dist/docs-hub-page.js.map +1 -1
  278. package/dist/docs-layout.d.ts +1 -1
  279. package/dist/docs-layout.js +1 -1
  280. package/dist/docs-layout.js.map +1 -1
  281. package/dist/docs-nav.d.ts +1 -1
  282. package/dist/docs-nav.js +1 -1
  283. package/dist/docs-nav.js.map +1 -1
  284. package/dist/document-viewer.d.ts +2 -2
  285. package/dist/document-viewer.js +3 -3
  286. package/dist/document-viewer.js.map +1 -1
  287. package/dist/doodle.d.ts +1 -1
  288. package/dist/doodle.js +1 -1
  289. package/dist/doodle.js.map +1 -1
  290. package/dist/drop-overlay.d.ts +1 -1
  291. package/dist/drop-overlay.js +1 -1
  292. package/dist/drop-overlay.js.map +1 -1
  293. package/dist/dropdown-menu.d.ts +8 -8
  294. package/dist/dropdown-menu.js +2 -2
  295. package/dist/embed-facade.js +1 -1
  296. package/dist/empty-state.d.ts +1 -1
  297. package/dist/empty-state.js.map +1 -1
  298. package/dist/engine-flow.d.ts +1 -1
  299. package/dist/engine-flow.js +1 -1
  300. package/dist/engine-flow.js.map +1 -1
  301. package/dist/entity-header.d.ts +1 -1
  302. package/dist/entity-header.js +1 -1
  303. package/dist/entity-header.js.map +1 -1
  304. package/dist/environment-notice.d.ts +1 -1
  305. package/dist/environment-notice.js.map +1 -1
  306. package/dist/error-page.d.ts +1 -1
  307. package/dist/error-page.js +1 -1
  308. package/dist/error-page.js.map +1 -1
  309. package/dist/field.d.ts +3 -3
  310. package/dist/field.js +1 -1
  311. package/dist/field.js.map +1 -1
  312. package/dist/file-upload.d.ts +1 -1
  313. package/dist/file-upload.js +1 -1
  314. package/dist/file-upload.js.map +1 -1
  315. package/dist/filter-bar.d.ts +2 -2
  316. package/dist/filter-bar.js +4 -4
  317. package/dist/flock.d.ts +1 -1
  318. package/dist/flock.js +2 -2
  319. package/dist/flock.js.map +1 -1
  320. package/dist/footnote.d.ts +3 -3
  321. package/dist/footnote.js +1 -1
  322. package/dist/footnote.js.map +1 -1
  323. package/dist/force-update-screen.d.ts +1 -1
  324. package/dist/force-update-screen.js +3 -3
  325. package/dist/force-update-screen.js.map +1 -1
  326. package/dist/form/server.js.map +1 -1
  327. package/dist/form.d.ts +12 -12
  328. package/dist/form.js +4 -4
  329. package/dist/form.js.map +1 -1
  330. package/dist/{frame-CmDztC_y.d.ts → frame-D5HU_cG8.d.ts} +2 -2
  331. package/dist/gallery-page.d.ts +1 -1
  332. package/dist/gallery-page.js +1 -1
  333. package/dist/gallery-page.js.map +1 -1
  334. package/dist/genui.d.ts +2 -2
  335. package/dist/genui.js +9 -9
  336. package/dist/genui.js.map +1 -1
  337. package/dist/glossary-term.js +2 -2
  338. package/dist/glow-card.d.ts +1 -1
  339. package/dist/glow-card.js +1 -1
  340. package/dist/glow-card.js.map +1 -1
  341. package/dist/goal-gauge.d.ts +1 -1
  342. package/dist/goal-gauge.js +1 -1
  343. package/dist/goal-gauge.js.map +1 -1
  344. package/dist/grade-stamp.d.ts +1 -1
  345. package/dist/grade-stamp.js +2 -2
  346. package/dist/grade-stamp.js.map +1 -1
  347. package/dist/identity-card.d.ts +1 -1
  348. package/dist/identity-card.js +5 -5
  349. package/dist/identity-card.js.map +1 -1
  350. package/dist/image-cropper.d.ts +1 -1
  351. package/dist/image-cropper.js +3 -3
  352. package/dist/image-cropper.js.map +1 -1
  353. package/dist/index.d.ts +5 -5
  354. package/dist/index.js +2 -2
  355. package/dist/index.js.map +1 -1
  356. package/dist/kanban.d.ts +1 -1
  357. package/dist/kanban.js.map +1 -1
  358. package/dist/kbd.d.ts +1 -1
  359. package/dist/kbd.js.map +1 -1
  360. package/dist/kind-config-editor.js +8 -8
  361. package/dist/kind-config-editor.js.map +1 -1
  362. package/dist/kpi-explained.js +1 -1
  363. package/dist/kpi-explained.js.map +1 -1
  364. package/dist/landing-page.d.ts +1 -1
  365. package/dist/landing-page.js.map +1 -1
  366. package/dist/landscape.d.ts +1 -1
  367. package/dist/landscape.js +2 -2
  368. package/dist/landscape.js.map +1 -1
  369. package/dist/language-switch.d.ts +1 -1
  370. package/dist/language-switch.js +1 -1
  371. package/dist/legal-page.d.ts +1 -1
  372. package/dist/legal-page.js.map +1 -1
  373. package/dist/{lightbox-MRB2YZEP.js → lightbox-JLWASIJC.js} +4 -4
  374. package/dist/link-card.d.ts +1 -1
  375. package/dist/link-card.js +4 -4
  376. package/dist/list.d.ts +1 -1
  377. package/dist/list.js +2 -2
  378. package/dist/list.js.map +1 -1
  379. package/dist/loader.d.ts +2 -2
  380. package/dist/loader.js +1 -1
  381. package/dist/loader.js.map +1 -1
  382. package/dist/longform-page.d.ts +1 -1
  383. package/dist/longform-page.js +1 -1
  384. package/dist/longform-page.js.map +1 -1
  385. package/dist/maintenance-screen.d.ts +1 -1
  386. package/dist/maintenance-screen.js +3 -3
  387. package/dist/maintenance-screen.js.map +1 -1
  388. package/dist/map/cards.d.ts +2 -2
  389. package/dist/map/cards.js +1 -1
  390. package/dist/map/cards.js.map +1 -1
  391. package/dist/map/pin.js +1 -1
  392. package/dist/map/sheet.d.ts +1 -1
  393. package/dist/map/sheet.js +1 -1
  394. package/dist/map/sheet.js.map +1 -1
  395. package/dist/map.d.ts +5 -5
  396. package/dist/map.js +4 -4
  397. package/dist/map.js.map +1 -1
  398. package/dist/margin-layout.d.ts +2 -2
  399. package/dist/margin-layout.js.map +1 -1
  400. package/dist/markdown.d.ts +1 -1
  401. package/dist/markdown.js.map +1 -1
  402. package/dist/marketing-layout.d.ts +1 -1
  403. package/dist/marketing-layout.js.map +1 -1
  404. package/dist/mascot-quote.d.ts +1 -1
  405. package/dist/mascot-quote.js +2 -2
  406. package/dist/mascot-quote.js.map +1 -1
  407. package/dist/mascot-state.d.ts +5 -5
  408. package/dist/mascot-state.js +1 -1
  409. package/dist/mascot-state.js.map +1 -1
  410. package/dist/mascots.d.ts +2 -2
  411. package/dist/mascots.js +2 -2
  412. package/dist/mascots.js.map +1 -1
  413. package/dist/match-dialog.d.ts +1 -1
  414. package/dist/match-dialog.js +4 -4
  415. package/dist/match-dialog.js.map +1 -1
  416. package/dist/media-capture.d.ts +1 -1
  417. package/dist/media-capture.js +1 -1
  418. package/dist/media-capture.js.map +1 -1
  419. package/dist/media-carousel.js +5 -5
  420. package/dist/media-carousel.js.map +1 -1
  421. package/dist/media-gallery.d.ts +1 -1
  422. package/dist/media-gallery.js +1 -1
  423. package/dist/media-gallery.js.map +1 -1
  424. package/dist/media-player.d.ts +1 -1
  425. package/dist/media-player.js +4 -4
  426. package/dist/meter.d.ts +2 -2
  427. package/dist/meter.js +1 -1
  428. package/dist/money-input.d.ts +1 -1
  429. package/dist/money-input.js +3 -3
  430. package/dist/motion.d.ts +1 -1
  431. package/dist/motion.js +1 -1
  432. package/dist/native/form.d.ts +12 -12
  433. package/dist/native/form.js +4 -4
  434. package/dist/native/form.js.map +1 -1
  435. package/dist/native/list.d.ts +1 -1
  436. package/dist/native/list.js.map +1 -1
  437. package/dist/native/map.d.ts +4 -4
  438. package/dist/native/map.js +2 -2
  439. package/dist/native/map.js.map +1 -1
  440. package/dist/native/markdown.js.map +1 -1
  441. package/dist/native/media-capture.d.ts +1 -1
  442. package/dist/native/media-capture.js.map +1 -1
  443. package/dist/native/media-picker.d.ts +1 -1
  444. package/dist/native/media-picker.js.map +1 -1
  445. package/dist/native/vertical-video.d.ts +2 -2
  446. package/dist/native/vertical-video.js.map +1 -1
  447. package/dist/native/video-player.d.ts +1 -1
  448. package/dist/native/video-player.js.map +1 -1
  449. package/dist/native.d.ts +95 -95
  450. package/dist/native.js +13 -13
  451. package/dist/native.js.map +1 -1
  452. package/dist/nav-bar.d.ts +13 -13
  453. package/dist/nav-bar.js +5 -5
  454. package/dist/nav-bar.js.map +1 -1
  455. package/dist/notification-preferences.js +3 -3
  456. package/dist/number-ticker.d.ts +1 -1
  457. package/dist/number-ticker.js +1 -1
  458. package/dist/number-ticker.js.map +1 -1
  459. package/dist/opening-hours.d.ts +1 -1
  460. package/dist/opening-hours.js +1 -1
  461. package/dist/opening-hours.js.map +1 -1
  462. package/dist/{page-DPHDmDAQ.d.ts → page-Ufnb5TrQ.d.ts} +5 -5
  463. package/dist/page-header.d.ts +1 -1
  464. package/dist/page-header.js.map +1 -1
  465. package/dist/page-hero.d.ts +1 -1
  466. package/dist/page-hero.js +5 -5
  467. package/dist/page-hero.js.map +1 -1
  468. package/dist/page-index.d.ts +1 -1
  469. package/dist/page-index.js +2 -2
  470. package/dist/page-index.js.map +1 -1
  471. package/dist/page.d.ts +1 -1
  472. package/dist/page.js +3 -3
  473. package/dist/pagination.d.ts +1 -1
  474. package/dist/pagination.js +1 -1
  475. package/dist/pagination.js.map +1 -1
  476. package/dist/pausable-loop.js +2 -2
  477. package/dist/{player-lightbox-BYQ57OXT.js → player-lightbox-SJR3GB7U.js} +5 -5
  478. package/dist/player-lightbox-SJR3GB7U.js.map +1 -0
  479. package/dist/pointer-light.d.ts +1 -1
  480. package/dist/pointer-light.js.map +1 -1
  481. package/dist/popover.d.ts +1 -1
  482. package/dist/popover.js +1 -1
  483. package/dist/popover.js.map +1 -1
  484. package/dist/price-catalogue-editor.js +8 -8
  485. package/dist/price-catalogue-editor.js.map +1 -1
  486. package/dist/pricing-page.d.ts +1 -1
  487. package/dist/pricing-page.js +1 -1
  488. package/dist/pricing-page.js.map +1 -1
  489. package/dist/product-page.d.ts +1 -1
  490. package/dist/product-page.js +1 -1
  491. package/dist/product-page.js.map +1 -1
  492. package/dist/profile-card.d.ts +3 -3
  493. package/dist/profile-card.js +1 -1
  494. package/dist/profile-card.js.map +1 -1
  495. package/dist/progress.d.ts +1 -1
  496. package/dist/progress.js.map +1 -1
  497. package/dist/promise-card.d.ts +1 -1
  498. package/dist/promise-card.js +1 -1
  499. package/dist/promise-card.js.map +1 -1
  500. package/dist/promo-code-field.js +4 -4
  501. package/dist/proposal.js +5 -5
  502. package/dist/qr-code.js +6 -6
  503. package/dist/qr-code.js.map +1 -1
  504. package/dist/quota-meter.d.ts +1 -1
  505. package/dist/quota-meter.js +1 -1
  506. package/dist/quota-meter.js.map +1 -1
  507. package/dist/radio-group.d.ts +5 -5
  508. package/dist/radio-group.js +3 -3
  509. package/dist/radio-group.js.map +1 -1
  510. package/dist/rail-nav.d.ts +4 -4
  511. package/dist/rail-nav.js +3 -3
  512. package/dist/rail-nav.js.map +1 -1
  513. package/dist/recipes.js +1 -1
  514. package/dist/recipes.js.map +1 -1
  515. package/dist/retro-tv-playlist.d.ts +1 -1
  516. package/dist/retro-tv-playlist.js.map +1 -1
  517. package/dist/retro-tv.js +6 -6
  518. package/dist/retro-tv.js.map +1 -1
  519. package/dist/reviews.js +3 -3
  520. package/dist/schema-form.js +7 -7
  521. package/dist/schema-form.js.map +1 -1
  522. package/dist/scroll-stage.d.ts +2 -2
  523. package/dist/scroll-stage.js +2 -2
  524. package/dist/scroll-stage.js.map +1 -1
  525. package/dist/search-field.d.ts +1 -1
  526. package/dist/search-field.js +2 -2
  527. package/dist/section-backdrop.d.ts +1 -1
  528. package/dist/section-backdrop.js +1 -1
  529. package/dist/separator.d.ts +1 -1
  530. package/dist/separator.js.map +1 -1
  531. package/dist/service-card.d.ts +1 -1
  532. package/dist/service-card.js +6 -6
  533. package/dist/service-card.js.map +1 -1
  534. package/dist/settings-layout.d.ts +3 -3
  535. package/dist/settings-layout.js +2 -2
  536. package/dist/shop/booking.d.ts +1 -1
  537. package/dist/shop/booking.js +4 -4
  538. package/dist/shop/booking.js.map +1 -1
  539. package/dist/shop/bulletin.d.ts +1 -1
  540. package/dist/shop/bulletin.js +2 -2
  541. package/dist/shop/bulletin.js.map +1 -1
  542. package/dist/shop/faq.d.ts +1 -1
  543. package/dist/shop/faq.js +3 -3
  544. package/dist/shop/faq.js.map +1 -1
  545. package/dist/shop/gallery.d.ts +1 -1
  546. package/dist/shop/gallery.js +3 -3
  547. package/dist/shop/gallery.js.map +1 -1
  548. package/dist/shop/hero.d.ts +1 -1
  549. package/dist/shop/hero.js +2 -2
  550. package/dist/shop/hero.js.map +1 -1
  551. package/dist/shop/policies.d.ts +1 -1
  552. package/dist/shop/policies.js +2 -2
  553. package/dist/shop/policies.js.map +1 -1
  554. package/dist/shop/reviews.d.ts +1 -1
  555. package/dist/shop/reviews.js +2 -2
  556. package/dist/shop/reviews.js.map +1 -1
  557. package/dist/shop/services.d.ts +1 -1
  558. package/dist/shop/services.js +4 -4
  559. package/dist/shop/services.js.map +1 -1
  560. package/dist/shop/social.d.ts +1 -1
  561. package/dist/shop/social.js +2 -2
  562. package/dist/shop/social.js.map +1 -1
  563. package/dist/shop/story.d.ts +1 -1
  564. package/dist/shop/story.js +2 -2
  565. package/dist/shop/story.js.map +1 -1
  566. package/dist/shop/team.d.ts +1 -1
  567. package/dist/shop/team.js +2 -2
  568. package/dist/shop/team.js.map +1 -1
  569. package/dist/shop/video.d.ts +1 -1
  570. package/dist/shop/video.js +2 -2
  571. package/dist/shop/video.js.map +1 -1
  572. package/dist/shop/visit.d.ts +1 -1
  573. package/dist/shop/visit.js +2 -2
  574. package/dist/shop/visit.js.map +1 -1
  575. package/dist/shop-composer.js +2 -2
  576. package/dist/shop-composer.js.map +1 -1
  577. package/dist/shop-gallery.d.ts +1 -1
  578. package/dist/shop-gallery.js +2 -2
  579. package/dist/shop-gallery.js.map +1 -1
  580. package/dist/shop.d.ts +1 -1
  581. package/dist/shop.js +2 -2
  582. package/dist/showcase.d.ts +1 -1
  583. package/dist/showcase.js +6 -6
  584. package/dist/showcase.js.map +1 -1
  585. package/dist/signature.d.ts +1 -1
  586. package/dist/signature.js +2 -2
  587. package/dist/signature.js.map +1 -1
  588. package/dist/site-cahier.d.ts +3 -3
  589. package/dist/site-cahier.js +10 -10
  590. package/dist/site-cahier.js.map +1 -1
  591. package/dist/site-footer.d.ts +4 -4
  592. package/dist/site-footer.js +1 -1
  593. package/dist/site-footer.js.map +1 -1
  594. package/dist/skeleton.d.ts +3 -3
  595. package/dist/skeleton.js.map +1 -1
  596. package/dist/skip-link.d.ts +1 -1
  597. package/dist/skip-link.js +1 -1
  598. package/dist/slider.d.ts +1 -1
  599. package/dist/slider.js +2 -2
  600. package/dist/slider.js.map +1 -1
  601. package/dist/slot-picker.d.ts +1 -1
  602. package/dist/slot-picker.js +1 -1
  603. package/dist/slot-picker.js.map +1 -1
  604. package/dist/specimen-tag.d.ts +2 -2
  605. package/dist/specimen-tag.js +2 -2
  606. package/dist/speed-lines.d.ts +1 -1
  607. package/dist/speed-lines.js +1 -1
  608. package/dist/speed-lines.js.map +1 -1
  609. package/dist/spinner.d.ts +2 -2
  610. package/dist/spinner.js +1 -1
  611. package/dist/spinner.js.map +1 -1
  612. package/dist/split-view.d.ts +1 -1
  613. package/dist/split-view.js.map +1 -1
  614. package/dist/stage-banner.d.ts +1 -1
  615. package/dist/stage-banner.js +1 -1
  616. package/dist/stage-banner.js.map +1 -1
  617. package/dist/stat.d.ts +2 -2
  618. package/dist/stat.js +1 -1
  619. package/dist/status-chip.js +4 -4
  620. package/dist/status-chip.js.map +1 -1
  621. package/dist/status-page.d.ts +1 -1
  622. package/dist/status-page.js.map +1 -1
  623. package/dist/step-progress.d.ts +1 -1
  624. package/dist/step-progress.js.map +1 -1
  625. package/dist/step-showcase.d.ts +2 -2
  626. package/dist/step-showcase.js +3 -3
  627. package/dist/step-showcase.js.map +1 -1
  628. package/dist/stepper.d.ts +1 -1
  629. package/dist/stepper.js +1 -1
  630. package/dist/stepper.js.map +1 -1
  631. package/dist/sticky-action.d.ts +1 -1
  632. package/dist/sticky-action.js.map +1 -1
  633. package/dist/stuck.d.ts +1 -1
  634. package/dist/stuck.js +1 -1
  635. package/dist/stuck.js.map +1 -1
  636. package/dist/swipe-deck.d.ts +2 -2
  637. package/dist/swipe-deck.js.map +1 -1
  638. package/dist/switch.d.ts +1 -1
  639. package/dist/switch.js +1 -1
  640. package/dist/tabs.d.ts +6 -6
  641. package/dist/tabs.js +1 -1
  642. package/dist/tabs.js.map +1 -1
  643. package/dist/tag-input.d.ts +1 -1
  644. package/dist/tag-input.js +4 -4
  645. package/dist/tag-input.js.map +1 -1
  646. package/dist/tag-selector.d.ts +1 -1
  647. package/dist/tag-selector.js +3 -3
  648. package/dist/tag-selector.js.map +1 -1
  649. package/dist/taped-photo.d.ts +1 -1
  650. package/dist/taped-photo.js +2 -2
  651. package/dist/terminal-replay.d.ts +1 -1
  652. package/dist/terminal-replay.js +3 -3
  653. package/dist/terminal-replay.js.map +1 -1
  654. package/dist/text-style/server.d.ts +1 -1
  655. package/dist/text-style/server.js.map +1 -1
  656. package/dist/text-style.d.ts +2 -2
  657. package/dist/text-style.js.map +1 -1
  658. package/dist/theme.d.ts +3 -3
  659. package/dist/theme.js +3 -3
  660. package/dist/theme.js.map +1 -1
  661. package/dist/toast.d.ts +1 -1
  662. package/dist/toast.js +2 -2
  663. package/dist/toast.js.map +1 -1
  664. package/dist/toc.d.ts +2 -2
  665. package/dist/toc.js +1 -1
  666. package/dist/toc.js.map +1 -1
  667. package/dist/tooltip.d.ts +1 -1
  668. package/dist/tooltip.js +2 -2
  669. package/dist/tree-view.d.ts +1 -1
  670. package/dist/tree-view.js +2 -2
  671. package/dist/tree-view.js.map +1 -1
  672. package/dist/update-prompt.d.ts +1 -1
  673. package/dist/update-prompt.js +3 -3
  674. package/dist/update-prompt.js.map +1 -1
  675. package/dist/upload-queue.d.ts +2 -2
  676. package/dist/upload-queue.js +1 -1
  677. package/dist/upload-queue.js.map +1 -1
  678. package/dist/usage.d.ts +4 -4
  679. package/dist/usage.js +3 -3
  680. package/dist/usage.js.map +1 -1
  681. package/dist/verified-badge.d.ts +1 -1
  682. package/dist/verified-badge.js.map +1 -1
  683. package/dist/versus-card.d.ts +1 -1
  684. package/dist/versus-card.js +2 -2
  685. package/dist/versus-card.js.map +1 -1
  686. package/dist/vertical-video.d.ts +2 -2
  687. package/dist/vertical-video.js +6 -6
  688. package/dist/vertical-video.js.map +1 -1
  689. package/dist/video-player.d.ts +1 -1
  690. package/dist/video-player.js +5 -5
  691. package/dist/video-trimmer.d.ts +1 -1
  692. package/dist/video-trimmer.js.map +1 -1
  693. package/dist/virtual.d.ts +2 -2
  694. package/dist/virtual.js +1 -1
  695. package/dist/wall.js +2 -2
  696. package/dist/wall.js.map +1 -1
  697. package/dist/waveform.d.ts +1 -1
  698. package/dist/waveform.js.map +1 -1
  699. package/package.json +26 -7
  700. package/registry/account-menu.json +1 -1
  701. package/registry/account-settings.json +18 -18
  702. package/registry/achievement.json +2 -2
  703. package/registry/action-bar.json +4 -4
  704. package/registry/activity-feed.json +3 -3
  705. package/registry/agenda.json +1 -1
  706. package/registry/alert.json +2 -2
  707. package/registry/analysis-report.json +2 -2
  708. package/registry/anatomy-plate.json +2 -2
  709. package/registry/app-frame.json +7 -7
  710. package/registry/app-header.json +5 -5
  711. package/registry/app-shell.json +3 -3
  712. package/registry/architecture-diagram.json +239 -0
  713. package/registry/argument-card.json +4 -4
  714. package/registry/auth-layout.json +2 -2
  715. package/registry/avatar.json +4 -4
  716. package/registry/badge.json +2 -2
  717. package/registry/bird-plate.json +2 -2
  718. package/registry/button.json +2 -2
  719. package/registry/captcha.json +2 -2
  720. package/registry/card-grid.json +2 -2
  721. package/registry/card.json +2 -2
  722. package/registry/catalogue-page.json +2 -2
  723. package/registry/changelog-page.json +3 -3
  724. package/registry/chapter.json +3 -3
  725. package/registry/chat.json +2 -2
  726. package/registry/checkbox.json +2 -2
  727. package/registry/chip-link.json +2 -2
  728. package/registry/chip-row.json +2 -2
  729. package/registry/chip.json +3 -3
  730. package/registry/choice-grid.json +3 -3
  731. package/registry/cn.json +1 -1
  732. package/registry/code-block.json +3 -3
  733. package/registry/collection-switcher.json +3 -3
  734. package/registry/columns.json +2 -2
  735. package/registry/combobox.json +3 -3
  736. package/registry/command.json +2 -2
  737. package/registry/comparison-table.json +2 -2
  738. package/registry/component-page.json +2 -2
  739. package/registry/confirm-button.json +2 -2
  740. package/registry/contact-page.json +2 -2
  741. package/registry/continue-prompt.json +2 -2
  742. package/registry/copy-button.json +3 -3
  743. package/registry/countdown.json +2 -2
  744. package/registry/cover-hero.json +4 -4
  745. package/registry/cta-panel.json +2 -2
  746. package/registry/dashboard-layout.json +3 -3
  747. package/registry/data-table.json +5 -5
  748. package/registry/date-picker.json +9 -9
  749. package/registry/decision-list.json +3 -3
  750. package/registry/description-list.json +2 -2
  751. package/registry/desktop-window.json +1 -1
  752. package/registry/detail-layout.json +2 -2
  753. package/registry/dialog.json +3 -3
  754. package/registry/docs-article-page.json +2 -2
  755. package/registry/docs-hub-page.json +2 -2
  756. package/registry/docs-layout.json +3 -3
  757. package/registry/docs-nav.json +2 -2
  758. package/registry/document-viewer.json +3 -3
  759. package/registry/doodle.json +2 -2
  760. package/registry/drop-overlay.json +2 -2
  761. package/registry/dropdown-menu.json +2 -2
  762. package/registry/elephant.json +1 -1
  763. package/registry/embed-facade.json +1 -1
  764. package/registry/empty-state.json +2 -2
  765. package/registry/engine-flow.json +2 -2
  766. package/registry/entity-header.json +3 -3
  767. package/registry/environment-notice.json +2 -2
  768. package/registry/error-page.json +2 -2
  769. package/registry/examples/architecture-diagram/containers.d.ts +4 -0
  770. package/registry/examples/architecture-diagram/containers.js +28 -0
  771. package/registry/examples/architecture-diagram/containers.tsx +24 -0
  772. package/registry/examples/architecture-diagram/context.d.ts +4 -0
  773. package/registry/examples/architecture-diagram/context.js +26 -0
  774. package/registry/examples/architecture-diagram/context.tsx +22 -0
  775. package/registry/examples/architecture-diagram/dynamic.d.ts +4 -0
  776. package/registry/examples/architecture-diagram/dynamic.js +27 -0
  777. package/registry/examples/architecture-diagram/dynamic.tsx +23 -0
  778. package/registry/field.json +2 -2
  779. package/registry/file-upload.json +3 -3
  780. package/registry/filter-bar.json +5 -5
  781. package/registry/flock.json +2 -2
  782. package/registry/footnote.json +2 -2
  783. package/registry/force-update-screen.json +2 -2
  784. package/registry/form.json +65 -65
  785. package/registry/gallery-page.json +2 -2
  786. package/registry/genui.json +3 -3
  787. package/registry/glossary-term.json +1 -1
  788. package/registry/glossary.json +1 -1
  789. package/registry/glow-card.json +2 -2
  790. package/registry/goal-gauge.json +2 -2
  791. package/registry/grade-stamp.json +2 -2
  792. package/registry/identity-card.json +2 -2
  793. package/registry/image-cropper.json +2 -2
  794. package/registry/index.json +37 -8
  795. package/registry/kanban.json +2 -2
  796. package/registry/kbd.json +2 -2
  797. package/registry/kind-config-editor.json +3 -3
  798. package/registry/kpi-explained.json +2 -2
  799. package/registry/landing-page.json +2 -2
  800. package/registry/landscape.json +2 -2
  801. package/registry/language-switch.json +2 -2
  802. package/registry/legal-page.json +2 -2
  803. package/registry/link-card.json +4 -4
  804. package/registry/list.json +3 -3
  805. package/registry/loader.json +2 -2
  806. package/registry/longform-page.json +2 -2
  807. package/registry/maintenance-screen.json +2 -2
  808. package/registry/map.json +8 -8
  809. package/registry/margin-layout.json +2 -2
  810. package/registry/markdown.json +2 -2
  811. package/registry/marketing-layout.json +2 -2
  812. package/registry/mascot-quote.json +2 -2
  813. package/registry/mascot-state.json +3 -3
  814. package/registry/mascots.json +4 -4
  815. package/registry/match-dialog.json +2 -2
  816. package/registry/media-capture.json +3 -3
  817. package/registry/media-gallery.json +5 -5
  818. package/registry/meter.json +2 -2
  819. package/registry/money-input.json +2 -2
  820. package/registry/nav-bar.json +9 -9
  821. package/registry/next-actions.json +1 -1
  822. package/registry/notification-preferences.json +1 -1
  823. package/registry/number-ticker.json +2 -2
  824. package/registry/opening-hours.json +3 -3
  825. package/registry/page-header.json +2 -2
  826. package/registry/page-hero.json +4 -4
  827. package/registry/page-index.json +3 -3
  828. package/registry/page.json +2 -2
  829. package/registry/pagination.json +3 -3
  830. package/registry/pointer-light.json +2 -2
  831. package/registry/popover.json +2 -2
  832. package/registry/price-catalogue-editor.json +2 -2
  833. package/registry/pricing-page.json +3 -3
  834. package/registry/product-page.json +2 -2
  835. package/registry/profile-card.json +4 -4
  836. package/registry/progress.json +2 -2
  837. package/registry/promise-card.json +2 -2
  838. package/registry/promo-code-field.json +1 -1
  839. package/registry/proposal.json +1 -1
  840. package/registry/qr-code.json +3 -3
  841. package/registry/quota-meter.json +2 -2
  842. package/registry/radio-group.json +15 -15
  843. package/registry/rail-nav.json +9 -9
  844. package/registry/recipes.json +2 -2
  845. package/registry/retro-tv.json +4 -4
  846. package/registry/reviews.json +1 -1
  847. package/registry/router.json +1 -1
  848. package/registry/schema-form.json +2 -2
  849. package/registry/scroll-stage.json +2 -2
  850. package/registry/search-field.json +3 -3
  851. package/registry/section-backdrop.json +2 -2
  852. package/registry/separator.json +2 -2
  853. package/registry/service-card.json +4 -4
  854. package/registry/settings-layout.json +2 -2
  855. package/registry/shop-composer.json +4 -4
  856. package/registry/shop-gallery.json +2 -2
  857. package/registry/shop.json +18 -18
  858. package/registry/showcase.json +2 -2
  859. package/registry/signature.json +2 -2
  860. package/registry/site-cahier.json +3 -3
  861. package/registry/site-footer.json +11 -11
  862. package/registry/sites.json +1 -1
  863. package/registry/skeleton.json +2 -2
  864. package/registry/skip-link.json +2 -2
  865. package/registry/slider.json +2 -2
  866. package/registry/slot-picker.json +3 -3
  867. package/registry/slot.json +1 -1
  868. package/registry/specimen-tag.json +2 -2
  869. package/registry/speed-lines.json +2 -2
  870. package/registry/spinner.json +3 -3
  871. package/registry/split-view.json +2 -2
  872. package/registry/stage-banner.json +2 -2
  873. package/registry/stat.json +2 -2
  874. package/registry/status-chip.json +3 -3
  875. package/registry/status-page.json +2 -2
  876. package/registry/step-progress.json +2 -2
  877. package/registry/step-showcase.json +3 -3
  878. package/registry/stepper.json +2 -2
  879. package/registry/sticky-action.json +2 -2
  880. package/registry/stuck.json +2 -2
  881. package/registry/swipe-deck.json +2 -2
  882. package/registry/switch.json +2 -2
  883. package/registry/tabs.json +2 -2
  884. package/registry/tag-input.json +2 -2
  885. package/registry/tag-selector.json +2 -2
  886. package/registry/taped-photo.json +2 -2
  887. package/registry/terminal-replay.json +3 -3
  888. package/registry/text-style.json +9 -9
  889. package/registry/theme.json +2 -2
  890. package/registry/toast.json +2 -2
  891. package/registry/toc.json +2 -2
  892. package/registry/tooltip.json +2 -2
  893. package/registry/tree-view.json +3 -3
  894. package/registry/update-prompt.json +2 -2
  895. package/registry/upload-queue.json +2 -2
  896. package/registry/usage.json +3 -3
  897. package/registry/verified-badge.json +2 -2
  898. package/registry/versus-card.json +2 -2
  899. package/registry/vertical-video.json +3 -3
  900. package/registry/video-player.json +3 -3
  901. package/registry/video-trimmer.json +2 -2
  902. package/registry/virtual.json +4 -4
  903. package/registry/wall.json +2 -2
  904. package/registry/waveform.json +2 -2
  905. package/dist/chunk-2FCQCWIK.js.map +0 -1
  906. package/dist/chunk-43PTCDTL.js.map +0 -1
  907. package/dist/chunk-5D7NMUF6.js.map +0 -1
  908. package/dist/chunk-5PFCELGW.js.map +0 -1
  909. package/dist/chunk-5RWHDX5J.js.map +0 -1
  910. package/dist/chunk-5VZ37TY3.js.map +0 -1
  911. package/dist/chunk-757ZTGU5.js.map +0 -1
  912. package/dist/chunk-7DYZTEE3.js.map +0 -1
  913. package/dist/chunk-7P7I5OQV.js.map +0 -1
  914. package/dist/chunk-B47WSPMP.js.map +0 -1
  915. package/dist/chunk-C57KK5VB.js.map +0 -1
  916. package/dist/chunk-EB45EVPJ.js.map +0 -1
  917. package/dist/chunk-EDQLPCM4.js.map +0 -1
  918. package/dist/chunk-GHAN7OOE.js.map +0 -1
  919. package/dist/chunk-HLEBSAGC.js.map +0 -1
  920. package/dist/chunk-HP7BDMVK.js.map +0 -1
  921. package/dist/chunk-KH3JOEPY.js.map +0 -1
  922. package/dist/chunk-KR2W4ONJ.js.map +0 -1
  923. package/dist/chunk-LH5J3VLZ.js.map +0 -1
  924. package/dist/chunk-LNAAWT4Y.js.map +0 -1
  925. package/dist/chunk-MDSP7DJR.js.map +0 -1
  926. package/dist/chunk-NG6G6V5E.js.map +0 -1
  927. package/dist/chunk-NM2DEHFZ.js.map +0 -1
  928. package/dist/chunk-NPMGYLJV.js.map +0 -1
  929. package/dist/chunk-NQENOT6L.js.map +0 -1
  930. package/dist/chunk-NSLXEDIS.js.map +0 -1
  931. package/dist/chunk-OGWB76BR.js.map +0 -1
  932. package/dist/chunk-P7AFIKWG.js.map +0 -1
  933. package/dist/chunk-PGBF3UBX.js.map +0 -1
  934. package/dist/chunk-QA3WETWT.js.map +0 -1
  935. package/dist/chunk-QD6SNXF5.js.map +0 -1
  936. package/dist/chunk-QHVV2JGF.js.map +0 -1
  937. package/dist/chunk-QVHSV6RA.js.map +0 -1
  938. package/dist/chunk-S2O4NSN5.js.map +0 -1
  939. package/dist/chunk-S4TLZRGZ.js.map +0 -1
  940. package/dist/chunk-S6NYGOJT.js.map +0 -1
  941. package/dist/chunk-SB5WSVPI.js.map +0 -1
  942. package/dist/chunk-SG2RKUVJ.js.map +0 -1
  943. package/dist/chunk-V5RO6JYI.js.map +0 -1
  944. package/dist/chunk-V7W4RLRW.js.map +0 -1
  945. package/dist/chunk-VA4NPCUQ.js.map +0 -1
  946. package/dist/chunk-VPO27AFS.js.map +0 -1
  947. package/dist/chunk-W64RAX4N.js.map +0 -1
  948. package/dist/chunk-W675RFOA.js.map +0 -1
  949. package/dist/chunk-WC3SO4CE.js.map +0 -1
  950. package/dist/chunk-WEVYKZIF.js.map +0 -1
  951. package/dist/chunk-WU4VLSEA.js.map +0 -1
  952. package/dist/chunk-Y3P5B4XS.js.map +0 -1
  953. package/dist/chunk-YTYNKMNS.js.map +0 -1
  954. package/dist/chunk-Z47KIPCT.js.map +0 -1
  955. package/dist/chunk-ZPOVOEO3.js.map +0 -1
  956. package/dist/player-lightbox-BYQ57OXT.js.map +0 -1
  957. /package/dist/{chunk-HJFRHYCI.js.map → chunk-DTGRZXYO.js.map} +0 -0
  958. /package/dist/{chunk-PJNR4NTS.js.map → chunk-HC2TY45B.js.map} +0 -0
  959. /package/dist/{lightbox-MRB2YZEP.js.map → lightbox-JLWASIJC.js.map} +0 -0
@@ -180,7 +180,7 @@ type ActivityFeedProps<T extends ActivityEvent> = {
180
180
  * What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events
181
181
  * announced when `live`. Sovkora's job activity, a creator's notifications, the console's audit log.
182
182
  */
183
- declare function ActivityFeed<T extends ActivityEvent>({ events, "aria-label": label, locale, now: given, ticking, fold, live, leading, action, labels: words, empty, className }: ActivityFeedProps<T>): React.JSX.Element;
183
+ declare function ActivityFeed<T extends ActivityEvent>({ events, "aria-label": label, locale, now: given, ticking, fold, live, leading, action, labels: words, empty, className }: Readonly<ActivityFeedProps<T>>): React.JSX.Element;
184
184
  type TimelineProps<T extends ActivityEvent> = {
185
185
  /** One thing's events, oldest first (a job's run, a payout's life). */
186
186
  events: readonly T[];
@@ -194,7 +194,7 @@ type TimelineProps<T extends ActivityEvent> = {
194
194
  className?: string;
195
195
  };
196
196
  /** One thing's history on a rail, oldest first: each event a marker in its tone, its time and its words. */
197
- declare function Timeline<T extends ActivityEvent>({ events, "aria-label": label, locale, timeStyle, className }: TimelineProps<T>): React.JSX.Element;
197
+ declare function Timeline<T extends ActivityEvent>({ events, "aria-label": label, locale, timeStyle, className }: Readonly<TimelineProps<T>>): React.JSX.Element;
198
198
 
199
199
  export { ActivityFeed, Timeline, activityFeed, activityFeedLabels, groupActivity, timeAgo };
200
200
  export type { ActivityEvent, ActivityFeedLabels, ActivityFeedProps, ActivityGroup, ActivityTone, TimelineProps };
@@ -22,7 +22,7 @@ function groupActivity(events, { now = /* @__PURE__ */ new Date(), locale = "en-
22
22
  current = { label: key === todayKey ? today : key === yesterdayKey ? yesterday : day.format(date), events: [] };
23
23
  groups.push(current);
24
24
  }
25
- const last = current.events[current.events.length - 1];
25
+ const last = current.events.at(-1);
26
26
  if (fold && last && event.actor && event.kind && last.event.actor === event.actor && last.event.kind === event.kind) last.count += 1;
27
27
  else current.events.push({ event, count: 1 });
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/activity-feed/activity-feed.tsx","../src/activity-feed/group.ts"],"sourcesContent":["// Client (the clock of “… ago”, the announcement of new events). What happened, newest first: an activity feed\n// grouped by day with folded runs and relative times, announced politely when it is live; and a `Timeline` — one\n// thing's history on a rail, oldest first. Words are props.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { type ActivityEvent, type ActivityTone, groupActivity, timeAgo } from \"./group\";\n\nexport const activityFeed = tv({\n slots: {\n root: \"flex flex-col gap-5\",\n group: \"flex flex-col gap-1\",\n heading: \"sticky top-0 z-10 bg-surface-0 py-1 text-xs font-semibold text-fg-secondary\",\n ol: \"m-0 flex list-none flex-col p-0\",\n item: \"relative flex gap-3 py-2.5\",\n marker: \"relative mt-1 flex h-2.5 w-2.5 shrink-0 rounded-full bg-[var(--kz-af-tone)] ring-4 ring-surface-0\",\n rail: \"absolute left-[4.5px] top-5 -bottom-1 w-px bg-border-default\",\n body: \"flex min-w-0 flex-1 flex-col\",\n title: \"text-sm text-fg\",\n count: \"ml-1.5 inline-flex rounded-sm bg-surface-3 px-1.5 text-xs font-semibold tabular-nums text-fg-secondary\",\n description: \"text-xs text-fg-secondary\",\n time: \"shrink-0 pt-0.5 text-xs tabular-nums text-fg-secondary\",\n leading: \"shrink-0\",\n },\n});\n\nconst TONE: Record<ActivityTone, string> = {\n neutral: \"var(--kz-border-strong)\",\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success)\",\n warning: \"var(--kz-warning)\",\n danger: \"var(--kz-danger)\",\n info: \"var(--kz-info)\",\n};\n\nexport type ActivityFeedLabels = {\n /** The heading of today's events. */\n today: string;\n /** The heading of yesterday's. */\n yesterday: string;\n /** A folded run: `(n) => \"×\" + n` (“3 times”). */\n times: (count: number) => string;\n /** Announced when new events arrive in a live feed: `(n) => n + \" new events\"`. */\n newEvents: (count: number) => string;\n};\n\nexport const activityFeedLabels: ActivityFeedLabels = {\n today: \"Today\",\n yesterday: \"Yesterday\",\n times: (count) => `×${count}`,\n newEvents: (count) => (count === 1 ? \"1 new event\" : `${count} new events`),\n};\n\nexport type ActivityFeedProps<T extends ActivityEvent> = {\n /** The events, in any order. */\n events: readonly T[];\n /** The feed's accessible name (“Activity”). */\n \"aria-label\": string;\n /** The locale of the dates and the “… ago”. Default `en-US`. */\n locale?: string;\n /** Now, for the “… ago” and the day headings: the host gives the time (from the server, the same text on both sides); the feed never reads the clock. */\n now: Date;\n /** Keep the “… ago” fresh: the feed's time moves a minute every minute from `now`. Default true. */\n ticking?: boolean;\n /** Fold the runs of the same actor and kind. Default true. */\n fold?: boolean;\n /** Announce new events politely (a stream). */\n live?: boolean;\n /** Before an event's text: its actor's `Avatar`, an icon. */\n leading?: (event: T) => React.ReactNode;\n /** After an event's text: an action (Reply, View). */\n action?: (event: T) => React.ReactNode;\n /** The words, passed translated; English by default. */\n labels?: Partial<ActivityFeedLabels>;\n /** Shown when there is no event (an `EmptyState`). */\n empty?: React.ReactNode;\n /** Classes merged on the root. */\n className?: string;\n};\n\n// @fixed: the « … ago » is worded to the minute, so the feed's time moves by one minute, every minute\nconst MINUTE_MS = 60_000;\n\n/** `start`, `minutes` later (calendar arithmetic, no millisecond sums). */\nconst minutesAfter = (start: Date, minutes: number): Date => {\n const at = new Date(start);\n at.setMinutes(at.getMinutes() + minutes);\n return at;\n};\n\n/** The feed's time: `start`, then one minute later every minute while it ticks. Never the wall clock: the host gives it. */\nfunction useNow(start: Date, ticking: boolean) {\n const [minutes, setMinutes] = React.useState(0);\n React.useEffect(() => {\n if (!ticking) return;\n const timer = setInterval(() => setMinutes((m) => m + 1), MINUTE_MS);\n return () => clearInterval(timer);\n }, [ticking]);\n return minutes === 0 ? start : minutesAfter(start, minutes);\n}\n\n/**\n * What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events\n * announced when `live`. Sovkora's job activity, a creator's notifications, the console's audit log.\n */\nexport function ActivityFeed<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", now: given, ticking = true, fold = true, live, leading, action, labels: words, empty, className }: ActivityFeedProps<T>) {\n const labels = { ...activityFeedLabels, ...words };\n const s = activityFeed();\n const now = useNow(given, ticking);\n const groups = groupActivity(events, { now, locale, today: labels.today, yesterday: labels.yesterday, fold });\n const seen = React.useRef(events.length);\n const [announcement, setAnnouncement] = React.useState(\"\");\n React.useEffect(() => {\n const added = events.length - seen.current;\n seen.current = events.length;\n if (!live || added <= 0) return;\n const timer = setTimeout(() => setAnnouncement(labels.newEvents(added)), 0);\n return () => clearTimeout(timer);\n }, [events.length, live]); // eslint-disable-line react-hooks/exhaustive-deps -- announce on a new count only\n return (\n <section aria-label={label} className={s.root({ className })}>\n {live ? (\n <p className=\"sr-only\" aria-live=\"polite\">\n {announcement}\n </p>\n ) : null}\n {groups.length === 0 && empty ? empty : null}\n {groups.map((group) => (\n <div key={group.label} className={s.group()}>\n <h3 className={s.heading()}>{group.label}</h3>\n <ol className={s.ol()}>\n {group.events.map(({ event, count }) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n {leading ? <span className={s.leading()}>{leading(event)}</span> : <span aria-hidden className={s.marker()} />}\n <span className={s.body()}>\n <span className={s.title()}>\n {event.title}\n {count > 1 ? <span className={s.count()}>{labels.times(count)}</span> : null}\n </span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} title={date.toLocaleString(locale)} className={s.time()}>\n {timeAgo(date, { now, locale })}\n </time>\n {action ? <span className=\"shrink-0\">{action(event)}</span> : null}\n </li>\n );\n })}\n </ol>\n </div>\n ))}\n </section>\n );\n}\n\nexport type TimelineProps<T extends ActivityEvent> = {\n /** One thing's events, oldest first (a job's run, a payout's life). */\n events: readonly T[];\n /** The timeline's accessible name (“History of the payout”). */\n \"aria-label\": string;\n /** The locale of the times. Default `en-US`. */\n locale?: string;\n /** How a time is written: `time` (14:02, default), `datetime`, `date`. */\n timeStyle?: \"time\" | \"datetime\" | \"date\";\n /** Classes merged on the list. */\n className?: string;\n};\n\n/** One thing's history on a rail, oldest first: each event a marker in its tone, its time and its words. */\nexport function Timeline<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", timeStyle = \"time\", className }: TimelineProps<T>) {\n const s = activityFeed();\n const options: Intl.DateTimeFormatOptions =\n timeStyle === \"time\" ? { hour: \"2-digit\", minute: \"2-digit\" } : timeStyle === \"date\" ? { dateStyle: \"medium\" } : { dateStyle: \"medium\", timeStyle: \"short\" };\n const write = new Intl.DateTimeFormat(locale, options);\n return (\n <ol aria-label={label} className={s.ol({ className })}>\n {events.map((event, i) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n <span aria-hidden className={s.marker()} />\n {i < events.length - 1 ? <span aria-hidden className={s.rail()} /> : null}\n <span className={s.body()}>\n <span className={s.title()}>{event.title}</span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} className={s.time()}>\n {write.format(date)}\n </time>\n </li>\n );\n })}\n </ol>\n );\n}\n","// Shared by the web and React Native ActivityFeed: the events grouped by day (“Today”, “Yesterday”, a date), the same\n// events of one actor in a row folded into one (“Mina tipped 3 times”), and how long ago each happened — Intl only.\n\nexport type ActivityTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport type ActivityEvent = {\n /** A stable id. */\n id: string;\n /** When it happened: an ISO date-time, an epoch in ms or a `Date`. */\n at: string | number | Date;\n /** What happened, in a sentence — passed translated (“Mina tipped your video $5”). */\n title: string;\n /** A detail under it. */\n description?: string;\n /** Who did it (folds a run of the same `kind` by the same actor). */\n actor?: string;\n /** The kind of event (`tip`, `bid`, `job.done`): with `actor`, what folds. */\n kind?: string;\n /** The tone of its marker: success for a payout, danger for a failure. */\n tone?: ActivityTone;\n};\n\nexport type ActivityGroup<T extends ActivityEvent> = {\n /** The day's heading (“Today”, “Yesterday”, “Monday, Oct 6”). */\n label: string;\n /** Its events, newest first; a folded run is its newest event with `count` > 1. */\n events: { event: T; count: number }[];\n};\n\nconst dayKey = (date: Date) => `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;\n\n/** Groups events (any order) by day, newest first, folding runs of the same actor and kind when `fold` is set. */\nexport function groupActivity<T extends ActivityEvent>(\n events: readonly T[],\n { now = new Date(), locale = \"en-US\", today = \"Today\", yesterday = \"Yesterday\", fold = true }: { now?: Date; locale?: string; today?: string; yesterday?: string; fold?: boolean } = {},\n): ActivityGroup<T>[] {\n const sorted = [...events].sort((a, b) => new Date(b.at).getTime() - new Date(a.at).getTime());\n const day = new Intl.DateTimeFormat(locale, { weekday: \"long\", month: \"short\", day: \"numeric\" });\n const todayKey = dayKey(now);\n const yesterdayKey = dayKey(new Date(now.getTime() - 86_400_000));\n const groups: ActivityGroup<T>[] = [];\n let current: ActivityGroup<T> | null = null;\n let currentKey = \"\";\n for (const event of sorted) {\n const date = new Date(event.at);\n const key = dayKey(date);\n if (!current || key !== currentKey) {\n currentKey = key;\n current = { label: key === todayKey ? today : key === yesterdayKey ? yesterday : day.format(date), events: [] };\n groups.push(current);\n }\n const last = current.events[current.events.length - 1];\n if (fold && last && event.actor && event.kind && last.event.actor === event.actor && last.event.kind === event.kind) last.count += 1;\n else current.events.push({ event, count: 1 });\n }\n return groups;\n}\n\nconst UNITS: [Intl.RelativeTimeFormatUnit, number][] = [\n [\"second\", 60],\n [\"minute\", 60],\n [\"hour\", 24],\n [\"day\", 7],\n [\"week\", 4.35],\n [\"month\", 12],\n [\"year\", Number.POSITIVE_INFINITY],\n];\n\n/** “2 minutes ago”, “yesterday”: how long ago, in the largest unit that reads well (`style` short: “2 min. ago”). */\nexport function timeAgo(at: string | number | Date, { now = new Date(), locale = \"en-US\", style = \"short\" }: { now?: Date; locale?: string; style?: \"long\" | \"short\" | \"narrow\" } = {}): string {\n let value = (new Date(at).getTime() - now.getTime()) / 1000;\n let unit: Intl.RelativeTimeFormatUnit = \"second\";\n for (const [name, size] of UNITS) {\n unit = name;\n if (Math.abs(value) < size - 0.5) break;\n value /= size;\n }\n return new Intl.RelativeTimeFormat(locale, { numeric: \"auto\", style }).format(Math.round(value) + 0, unit);\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACyBnB,IAAM,SAAS,CAAC,SAAe,GAAG,KAAK,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC;AAGlF,SAAS,cACd,QACA,EAAE,MAAM,oBAAI,KAAK,GAAG,SAAS,SAAS,QAAQ,SAAS,YAAY,aAAa,OAAO,KAAK,IAAyF,CAAC,GAClK;AACpB,QAAM,SAAS,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE,EAAE,QAAQ,CAAC;AAC7F,QAAM,MAAM,IAAI,KAAK,eAAe,QAAQ,EAAE,SAAS,QAAQ,OAAO,SAAS,KAAK,UAAU,CAAC;AAC/F,QAAM,WAAW,OAAO,GAAG;AAC3B,QAAM,eAAe,OAAO,IAAI,KAAK,IAAI,QAAQ,IAAI,KAAU,CAAC;AAChE,QAAM,SAA6B,CAAC;AACpC,MAAI,UAAmC;AACvC,MAAI,aAAa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AQ,SAAS,EAAE,GACzG;AAAA,0BAAC,UAAK,eAAW,MAAC,WAAW,EAAE,OAAO,GAAG;AAAA,MACxC,IAAI,OAAO,SAAS,IAAI,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,MACrE,qBAAC,UAAK,WAAW,EAAE,KAAK,GACtB;AAAA,4BAAC,UAAK,WAAW,EAAE,MAAM,GAAI,gBAAM,OAAM;AAAA,QACxC,MAAM,cAAc,oBAAC,UAAK,WAAW,EAAE,YAAY,GAAI,gBAAM,aAAY,IAAU;AAAA,SACtF;AAAA,MACA,oBAAC,UAAK,UAAU,KAAK,YAAY,GAAG,WAAW,EAAE,KAAK,GACnD,gBAAM,OAAO,IAAI,GACpB;AAAA,SATO,MAAM,EAUf;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/activity-feed/activity-feed.tsx","../src/activity-feed/group.ts"],"sourcesContent":["// Client (the clock of “… ago”, the announcement of new events). What happened, newest first: an activity feed\n// grouped by day with folded runs and relative times, announced politely when it is live; and a `Timeline` — one\n// thing's history on a rail, oldest first. Words are props.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { type ActivityEvent, type ActivityTone, groupActivity, timeAgo } from \"./group\";\n\nexport const activityFeed = tv({\n slots: {\n root: \"flex flex-col gap-5\",\n group: \"flex flex-col gap-1\",\n heading: \"sticky top-0 z-10 bg-surface-0 py-1 text-xs font-semibold text-fg-secondary\",\n ol: \"m-0 flex list-none flex-col p-0\",\n item: \"relative flex gap-3 py-2.5\",\n marker: \"relative mt-1 flex h-2.5 w-2.5 shrink-0 rounded-full bg-[var(--kz-af-tone)] ring-4 ring-surface-0\",\n rail: \"absolute left-[4.5px] top-5 -bottom-1 w-px bg-border-default\",\n body: \"flex min-w-0 flex-1 flex-col\",\n title: \"text-sm text-fg\",\n count: \"ml-1.5 inline-flex rounded-sm bg-surface-3 px-1.5 text-xs font-semibold tabular-nums text-fg-secondary\",\n description: \"text-xs text-fg-secondary\",\n time: \"shrink-0 pt-0.5 text-xs tabular-nums text-fg-secondary\",\n leading: \"shrink-0\",\n },\n});\n\nconst TONE: Record<ActivityTone, string> = {\n neutral: \"var(--kz-border-strong)\",\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success)\",\n warning: \"var(--kz-warning)\",\n danger: \"var(--kz-danger)\",\n info: \"var(--kz-info)\",\n};\n\nexport type ActivityFeedLabels = {\n /** The heading of today's events. */\n today: string;\n /** The heading of yesterday's. */\n yesterday: string;\n /** A folded run: `(n) => \"×\" + n` (“3 times”). */\n times: (count: number) => string;\n /** Announced when new events arrive in a live feed: `(n) => n + \" new events\"`. */\n newEvents: (count: number) => string;\n};\n\nexport const activityFeedLabels: ActivityFeedLabels = {\n today: \"Today\",\n yesterday: \"Yesterday\",\n times: (count) => `×${count}`,\n newEvents: (count) => (count === 1 ? \"1 new event\" : `${count} new events`),\n};\n\nexport type ActivityFeedProps<T extends ActivityEvent> = {\n /** The events, in any order. */\n events: readonly T[];\n /** The feed's accessible name (“Activity”). */\n \"aria-label\": string;\n /** The locale of the dates and the “… ago”. Default `en-US`. */\n locale?: string;\n /** Now, for the “… ago” and the day headings: the host gives the time (from the server, the same text on both sides); the feed never reads the clock. */\n now: Date;\n /** Keep the “… ago” fresh: the feed's time moves a minute every minute from `now`. Default true. */\n ticking?: boolean;\n /** Fold the runs of the same actor and kind. Default true. */\n fold?: boolean;\n /** Announce new events politely (a stream). */\n live?: boolean;\n /** Before an event's text: its actor's `Avatar`, an icon. */\n leading?: (event: T) => React.ReactNode;\n /** After an event's text: an action (Reply, View). */\n action?: (event: T) => React.ReactNode;\n /** The words, passed translated; English by default. */\n labels?: Partial<ActivityFeedLabels>;\n /** Shown when there is no event (an `EmptyState`). */\n empty?: React.ReactNode;\n /** Classes merged on the root. */\n className?: string;\n};\n\n// @fixed: the « … ago » is worded to the minute, so the feed's time moves by one minute, every minute\nconst MINUTE_MS = 60_000;\n\n/** `start`, `minutes` later (calendar arithmetic, no millisecond sums). */\nconst minutesAfter = (start: Date, minutes: number): Date => {\n const at = new Date(start);\n at.setMinutes(at.getMinutes() + minutes);\n return at;\n};\n\n/** The feed's time: `start`, then one minute later every minute while it ticks. Never the wall clock: the host gives it. */\nfunction useNow(start: Date, ticking: boolean) {\n const [minutes, setMinutes] = React.useState(0);\n React.useEffect(() => {\n if (!ticking) return;\n const timer = setInterval(() => setMinutes((m) => m + 1), MINUTE_MS);\n return () => clearInterval(timer);\n }, [ticking]);\n return minutes === 0 ? start : minutesAfter(start, minutes);\n}\n\n/**\n * What happened, newest first: grouped by day, runs folded (“Mina tipped ×3”), “2 min ago” kept fresh, new events\n * announced when `live`. Sovkora's job activity, a creator's notifications, the console's audit log.\n */\nexport function ActivityFeed<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", now: given, ticking = true, fold = true, live, leading, action, labels: words, empty, className }: Readonly<ActivityFeedProps<T>>) {\n const labels = { ...activityFeedLabels, ...words };\n const s = activityFeed();\n const now = useNow(given, ticking);\n const groups = groupActivity(events, { now, locale, today: labels.today, yesterday: labels.yesterday, fold });\n const seen = React.useRef(events.length);\n const [announcement, setAnnouncement] = React.useState(\"\");\n React.useEffect(() => {\n const added = events.length - seen.current;\n seen.current = events.length;\n if (!live || added <= 0) return;\n const timer = setTimeout(() => setAnnouncement(labels.newEvents(added)), 0);\n return () => clearTimeout(timer);\n }, [events.length, live]); // eslint-disable-line react-hooks/exhaustive-deps -- announce on a new count only\n return (\n <section aria-label={label} className={s.root({ className })}>\n {live ? (\n <p className=\"sr-only\" aria-live=\"polite\">\n {announcement}\n </p>\n ) : null}\n {groups.length === 0 && empty ? empty : null}\n {groups.map((group) => (\n <div key={group.label} className={s.group()}>\n <h3 className={s.heading()}>{group.label}</h3>\n <ol className={s.ol()}>\n {group.events.map(({ event, count }) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n {leading ? <span className={s.leading()}>{leading(event)}</span> : <span aria-hidden className={s.marker()} />}\n <span className={s.body()}>\n <span className={s.title()}>\n {event.title}\n {count > 1 ? <span className={s.count()}>{labels.times(count)}</span> : null}\n </span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} title={date.toLocaleString(locale)} className={s.time()}>\n {timeAgo(date, { now, locale })}\n </time>\n {action ? <span className=\"shrink-0\">{action(event)}</span> : null}\n </li>\n );\n })}\n </ol>\n </div>\n ))}\n </section>\n );\n}\n\nexport type TimelineProps<T extends ActivityEvent> = {\n /** One thing's events, oldest first (a job's run, a payout's life). */\n events: readonly T[];\n /** The timeline's accessible name (“History of the payout”). */\n \"aria-label\": string;\n /** The locale of the times. Default `en-US`. */\n locale?: string;\n /** How a time is written: `time` (14:02, default), `datetime`, `date`. */\n timeStyle?: \"time\" | \"datetime\" | \"date\";\n /** Classes merged on the list. */\n className?: string;\n};\n\n/** One thing's history on a rail, oldest first: each event a marker in its tone, its time and its words. */\nexport function Timeline<T extends ActivityEvent>({ events, \"aria-label\": label, locale = \"en-US\", timeStyle = \"time\", className }: Readonly<TimelineProps<T>>) {\n const s = activityFeed();\n const options: Intl.DateTimeFormatOptions =\n timeStyle === \"time\" ? { hour: \"2-digit\", minute: \"2-digit\" } : timeStyle === \"date\" ? { dateStyle: \"medium\" } : { dateStyle: \"medium\", timeStyle: \"short\" };\n const write = new Intl.DateTimeFormat(locale, options);\n return (\n <ol aria-label={label} className={s.ol({ className })}>\n {events.map((event, i) => {\n const date = new Date(event.at);\n return (\n <li key={event.id} className={s.item()} style={{ [\"--kz-af-tone\" as string]: TONE[event.tone ?? \"neutral\"] }}>\n <span aria-hidden className={s.marker()} />\n {i < events.length - 1 ? <span aria-hidden className={s.rail()} /> : null}\n <span className={s.body()}>\n <span className={s.title()}>{event.title}</span>\n {event.description ? <span className={s.description()}>{event.description}</span> : null}\n </span>\n <time dateTime={date.toISOString()} className={s.time()}>\n {write.format(date)}\n </time>\n </li>\n );\n })}\n </ol>\n );\n}\n","// Shared by the web and React Native ActivityFeed: the events grouped by day (“Today”, “Yesterday”, a date), the same\n// events of one actor in a row folded into one (“Mina tipped 3 times”), and how long ago each happened — Intl only.\n\nexport type ActivityTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\" | \"info\";\n\nexport type ActivityEvent = {\n /** A stable id. */\n id: string;\n /** When it happened: an ISO date-time, an epoch in ms or a `Date`. */\n at: string | number | Date;\n /** What happened, in a sentence — passed translated (“Mina tipped your video $5”). */\n title: string;\n /** A detail under it. */\n description?: string;\n /** Who did it (folds a run of the same `kind` by the same actor). */\n actor?: string;\n /** The kind of event (`tip`, `bid`, `job.done`): with `actor`, what folds. */\n kind?: string;\n /** The tone of its marker: success for a payout, danger for a failure. */\n tone?: ActivityTone;\n};\n\nexport type ActivityGroup<T extends ActivityEvent> = {\n /** The day's heading (“Today”, “Yesterday”, “Monday, Oct 6”). */\n label: string;\n /** Its events, newest first; a folded run is its newest event with `count` > 1. */\n events: { event: T; count: number }[];\n};\n\nconst dayKey = (date: Date) => `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;\n\n/** Groups events (any order) by day, newest first, folding runs of the same actor and kind when `fold` is set. */\nexport function groupActivity<T extends ActivityEvent>(\n events: readonly T[],\n { now = new Date(), locale = \"en-US\", today = \"Today\", yesterday = \"Yesterday\", fold = true }: { now?: Date; locale?: string; today?: string; yesterday?: string; fold?: boolean } = {},\n): ActivityGroup<T>[] {\n const sorted = [...events].sort((a, b) => new Date(b.at).getTime() - new Date(a.at).getTime());\n const day = new Intl.DateTimeFormat(locale, { weekday: \"long\", month: \"short\", day: \"numeric\" });\n const todayKey = dayKey(now);\n const yesterdayKey = dayKey(new Date(now.getTime() - 86_400_000));\n const groups: ActivityGroup<T>[] = [];\n let current: ActivityGroup<T> | null = null;\n let currentKey = \"\";\n for (const event of sorted) {\n const date = new Date(event.at);\n const key = dayKey(date);\n if (!current || key !== currentKey) {\n currentKey = key;\n current = { label: key === todayKey ? today : key === yesterdayKey ? yesterday : day.format(date), events: [] };\n groups.push(current);\n }\n const last = current.events.at(-1);\n if (fold && last && event.actor && event.kind && last.event.actor === event.actor && last.event.kind === event.kind) last.count += 1;\n else current.events.push({ event, count: 1 });\n }\n return groups;\n}\n\nconst UNITS: [Intl.RelativeTimeFormatUnit, number][] = [\n [\"second\", 60],\n [\"minute\", 60],\n [\"hour\", 24],\n [\"day\", 7],\n [\"week\", 4.35],\n [\"month\", 12],\n [\"year\", Number.POSITIVE_INFINITY],\n];\n\n/** “2 minutes ago”, “yesterday”: how long ago, in the largest unit that reads well (`style` short: “2 min. ago”). */\nexport function timeAgo(at: string | number | Date, { now = new Date(), locale = \"en-US\", style = \"short\" }: { now?: Date; locale?: string; style?: \"long\" | \"short\" | \"narrow\" } = {}): string {\n let value = (new Date(at).getTime() - now.getTime()) / 1000;\n let unit: Intl.RelativeTimeFormatUnit = \"second\";\n for (const [name, size] of UNITS) {\n unit = name;\n if (Math.abs(value) < size - 0.5) break;\n value /= size;\n }\n return new Intl.RelativeTimeFormat(locale, { numeric: \"auto\", style }).format(Math.round(value) + 0, unit);\n}\n"],"mappings":";;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACyBnB,IAAM,SAAS,CAAC,SAAe,GAAG,KAAK,YAAY,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,KAAK,QAAQ,CAAC;AAGlF,SAAS,cACd,QACA,EAAE,MAAM,oBAAI,KAAK,GAAG,SAAS,SAAS,QAAQ,SAAS,YAAY,aAAa,OAAO,KAAK,IAAyF,CAAC,GAClK;AACpB,QAAM,SAAS,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,IAAI,KAAK,EAAE,EAAE,EAAE,QAAQ,IAAI,IAAI,KAAK,EAAE,EAAE,EAAE,QAAQ,CAAC;AAC7F,QAAM,MAAM,IAAI,KAAK,eAAe,QAAQ,EAAE,S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,UAAU,CAAC,GACjD,iBAAO,IAAI,CAAC,OAAO,MAAM;AACxB,UAAM,OAAO,IAAI,KAAK,MAAM,EAAE;AAC9B,WACE,qBAAC,QAAkB,WAAW,EAAE,KAAK,GAAG,OAAO,EAAE,CAAC,cAAwB,GAAG,KAAK,MAAM,QAAQ,SAAS,EAAE,GACzG;AAAA,0BAAC,UAAK,eAAW,MAAC,WAAW,EAAE,OAAO,GAAG;AAAA,MACxC,IAAI,OAAO,SAAS,IAAI,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GAAG,IAAK;AAAA,MACrE,qBAAC,UAAK,WAAW,EAAE,KAAK,GACtB;AAAA,4BAAC,UAAK,WAAW,EAAE,MAAM,GAAI,gBAAM,OAAM;AAAA,QACxC,MAAM,cAAc,oBAAC,UAAK,WAAW,EAAE,YAAY,GAAI,gBAAM,aAAY,IAAU;AAAA,SACtF;AAAA,MACA,oBAAC,UAAK,UAAU,KAAK,YAAY,GAAG,WAAW,EAAE,KAAK,GACnD,gBAAM,OAAO,IAAI,GACpB;AAAA,SATO,MAAM,EAUf;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
package/dist/alert.d.ts CHANGED
@@ -92,7 +92,7 @@ type AlertProps = Omit<React.ComponentProps<"div">, "title"> & {
92
92
  /** What to do: a Button, a link. */
93
93
  action?: React.ReactNode;
94
94
  };
95
- declare function Alert({ tone, icon, title, action, className, children, ...props }: AlertProps): React.JSX.Element;
95
+ declare function Alert({ tone, icon, title, action, className, children, ...props }: Readonly<AlertProps>): React.JSX.Element;
96
96
 
97
97
  export { Alert, alertVariants };
98
98
  export type { AlertProps, AlertTone };
package/dist/alert.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/alert/alert.tsx"],"sourcesContent":["// 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"],"mappings":";AAGA,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,MAAM;AAAA,MACJ,MAAM,EAAE,MAAM,6BAA6B,MAAM,YAAY;AAAA,MAC7D,SAAS,EAAE,MAAM,mCAAmC,MAAM,eAAe;AAAA,MACzE,SAAS,EAAE,MAAM,mCAAmC,MAAM,eAAe;AAAA,MACzE,QAAQ,EAAE,MAAM,iCAAiC,MAAM,cAAc;AAAA,IACvE;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,OAAO;AAClC,CAAC;AAeM,SAAS,MAAM,EAAE,OAAO,QAAQ,MAAM,OAAO,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAe;AACvG,QAAM,IAAI,cAAc,EAAE,KAAK,CAAC;AAChC,SACE,qBAAC,SAAI,MAAM,SAAS,YAAY,SAAS,YAAY,UAAU,UAAU,aAAW,MAAM,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAC7H;AAAA,YACC,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GACjC,gBACH;AAAA,IAEF,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACvB;AAAA,eAAS,oBAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,MACzC,YAAY,oBAAC,SAAI,WAAW,EAAE,YAAY,GAAI,UAAS;AAAA,OAC1D;AAAA,IACC,UAAU,oBAAC,SAAI,WAAW,EAAE,OAAO,GAAI,kBAAO;AAAA,KACjD;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/alert/alert.tsx"],"sourcesContent":["// 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"],"mappings":";AAGA,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,MAAM;AAAA,MACJ,MAAM,EAAE,MAAM,6BAA6B,MAAM,YAAY;AAAA,MAC7D,SAAS,EAAE,MAAM,mCAAmC,MAAM,eAAe;AAAA,MACzE,SAAS,EAAE,MAAM,mCAAmC,MAAM,eAAe;AAAA,MACzE,QAAQ,EAAE,MAAM,iCAAiC,MAAM,cAAc;AAAA,IACvE;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,OAAO;AAClC,CAAC;AAeM,SAAS,MAAM,EAAE,OAAO,QAAQ,MAAM,OAAO,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAyB;AACjH,QAAM,IAAI,cAAc,EAAE,KAAK,CAAC;AAChC,SACE,qBAAC,SAAI,MAAM,SAAS,YAAY,SAAS,YAAY,UAAU,UAAU,aAAW,MAAM,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAC7H;AAAA,YACC,oBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GACjC,gBACH;AAAA,IAEF,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACvB;AAAA,eAAS,oBAAC,OAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,MACzC,YAAY,oBAAC,SAAI,WAAW,EAAE,YAAY,GAAI,UAAS;AAAA,OAC1D;AAAA,IACC,UAAU,oBAAC,SAAI,WAAW,EAAE,OAAO,GAAI,kBAAO;AAAA,KACjD;AAEJ;","names":[]}
@@ -310,7 +310,7 @@ type AnalysisReportProps = Omit<React.ComponentProps<"section">, "title" | "chil
310
310
  provenanceFolded?: boolean;
311
311
  };
312
312
  /** The result of an AI analysis: summary, findings by status, limits, next steps, provenance, copy as JSON or Markdown. */
313
- declare function AnalysisReport({ title, summary, status, findings, limits, nextSteps, provenance, labels, mark, streaming, onLocate, onCopy, hideActions, folded, provenanceFolded, className, ...props }: AnalysisReportProps): React.JSX.Element;
313
+ declare function AnalysisReport({ title, summary, status, findings, limits, nextSteps, provenance, labels, mark, streaming, onLocate, onCopy, hideActions, folded, provenanceFolded, className, ...props }: Readonly<AnalysisReportProps>): React.JSX.Element;
314
314
 
315
315
  export { ANALYSIS_STATUSES, AnalysisReport, analysisReportStyles, countByStatus, exportReport, groupFindings, reportToJson, reportToMarkdown };
316
316
  export type { AnalysisExport, AnalysisFinding, AnalysisProvenance, AnalysisReference, AnalysisReportData, AnalysisReportLabels, AnalysisReportProps, AnalysisStatus };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Badge
3
- } from "./chunk-5PFCELGW.js";
3
+ } from "./chunk-DIOAQOR5.js";
4
4
  import {
5
5
  Button
6
- } from "./chunk-EB45EVPJ.js";
7
- import "./chunk-43PTCDTL.js";
6
+ } from "./chunk-G5NROYGK.js";
7
+ import "./chunk-BVN7JFOP.js";
8
8
  import "./chunk-2VNYHG4E.js";
9
- import "./chunk-W675RFOA.js";
9
+ import "./chunk-ISC2QBXJ.js";
10
10
 
11
11
  // src/analysis-report/analysis-report.tsx
12
12
  import * as React from "react";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/analysis-report/analysis-report.tsx","../src/analysis-report/model.ts"],"sourcesContent":["// Client (the copy buttons, the folds). The result of an AI analysis, read in five seconds then deeper on demand: a header\n// (studio, one sentence, overall status, counts), findings grouped by status (the most serious first), the limits and the\n// next steps as a calm two-column section, a provenance footer, and copy as JSON / Markdown. Words arrive as props.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Badge } from \"../badge/badge\";\nimport { Button } from \"../button/button\";\nimport {\n type AnalysisExport,\n type AnalysisFinding,\n type AnalysisReportData,\n type AnalysisReportLabels,\n type AnalysisStatus,\n countByStatus,\n exportReport,\n groupFindings,\n} from \"./model\";\n\nexport const analysisReportStyles = tv({\n slots: {\n root: \"flex w-full min-w-0 flex-col gap-6 wrap-anywhere text-fg\",\n header: \"flex items-start gap-4\",\n headText: \"flex min-w-0 flex-1 flex-col gap-2\",\n title: \"font-display text-xl font-bold tracking-tight text-fg\",\n summary: \"text-base text-fg-secondary\",\n counts: \"flex flex-wrap items-center gap-2\",\n actions: \"flex flex-wrap gap-2\",\n group: \"flex flex-col gap-3\",\n groupTitle: \"text-sm font-semibold text-fg-secondary\",\n list: \"flex flex-col gap-3\",\n finding: \"flex min-w-0 flex-col wrap-anywhere gap-2 rounded-lg border border-border-default bg-surface-1 p-4\",\n findingHead: \"flex flex-wrap items-center gap-2\",\n code: \"font-mono text-xs text-fg-secondary\",\n findingTitle: \"text-base font-semibold text-fg\",\n muted: \"text-sm text-fg-secondary\",\n locate: \"w-fit\",\n fold: \"text-sm text-fg-secondary\",\n quote: \"m-0 wrap-anywhere text-sm text-fg-secondary\",\n reference: \"w-fit max-w-full wrap-anywhere text-sm font-semibold text-fg-accent\",\n referenceLink: \"rounded-sm underline underline-offset-2 focus-visible:focus-ring\",\n evidence: \"mt-2 overflow-x-auto rounded-md border border-border-default bg-surface-2 p-3 font-mono text-xs text-fg focus-visible:focus-ring\",\n foldSummary: \"w-fit cursor-pointer rounded-sm font-semibold text-fg-accent focus-visible:focus-ring\",\n columns: \"grid gap-6 border-t border-border-default pt-6 @lg:grid-cols-2\",\n column: \"flex flex-col gap-2\",\n columnTitle: \"text-sm font-semibold text-fg\",\n items: \"flex min-w-0 list-disc wrap-anywhere flex-col gap-1 pl-5 text-sm text-fg-secondary\",\n provenance: \"flex flex-wrap gap-x-6 gap-y-1 border-t border-border-default pt-4 text-xs text-fg-secondary\",\n provenanceFold: \"border-t border-border-default pt-4 text-xs text-fg-secondary\",\n provenanceList: \"mt-2 flex flex-wrap gap-x-6 gap-y-1\",\n term: \"font-semibold text-fg\",\n live: \"text-sm text-fg-secondary\",\n },\n});\n\nconst TONE = { inconsistent: \"danger\", attention: \"warning\", unverified: \"neutral\", consistent: \"success\" } as const satisfies Record<AnalysisStatus, string>;\n\nexport type AnalysisReportProps = Omit<React.ComponentProps<\"section\">, \"title\" | \"children\"> &\n AnalysisReportData & {\n /** Every word the report prints, passed translated (statuses, section titles, buttons). */\n labels: AnalysisReportLabels;\n /** The pack's bird (a mark of `@krizaka/ui/mascots`), shown beside the studio's name. */\n mark?: React.ReactNode;\n /** Findings are still arriving: the list is announced politely and marked busy. */\n streaming?: boolean;\n /** Makes a finding's location a button (scroll a document viewer to it). */\n onLocate?: (finding: AnalysisFinding) => void;\n /** Called after the report is copied (`json` or `markdown`), with the copied text. Without a clipboard, the app can copy it here. */\n onCopy?: (kind: AnalysisExport, text: string) => void;\n /** Hides the copy buttons (a read-only embed). */\n hideActions?: boolean;\n /** Status groups closed by default (a native `details`, the count in its summary): « respected », « not applicable ». */\n folded?: readonly AnalysisStatus[];\n /** The provenance (run id, ruleset, version) in one closed fold, titled `labels.provenance`. */\n provenanceFolded?: boolean;\n };\n\nfunction FindingCard({ finding, labels, onLocate }: Readonly<{ finding: AnalysisFinding; labels: AnalysisReportLabels; onLocate: AnalysisReportProps[\"onLocate\"] }>) {\n const s = analysisReportStyles();\n let locationSlot: React.ReactNode = null;\n if (finding.location) {\n locationSlot = onLocate ? (\n <Button variant=\"ghost\" size=\"sm\" className={s.locate()} onClick={() => onLocate(finding)}>\n {labels.location} {finding.location}\n </Button>\n ) : (\n <p className={s.muted()}>\n <span className={s.term()}>{labels.location}</span> {finding.location}\n </p>\n );\n }\n return (\n <li className={s.finding()}>\n <div className={s.findingHead()}>\n <Badge tone={TONE[finding.status]} dot>\n {labels.status[finding.status]}\n </Badge>\n {finding.code ? <span className={s.code()}>{finding.code}</span> : null}\n </div>\n <h4 className={s.findingTitle()}>{finding.title}</h4>\n {finding.observation ? <p className={s.muted()}>{finding.observation}</p> : null}\n {finding.mayIndicate ? (\n <p className={s.muted()}>\n <span className={s.term()}>{labels.mayIndicate}</span> {finding.mayIndicate}\n </p>\n ) : null}\n {finding.quote ? <p className={s.quote()}>« {finding.quote} »</p> : null}\n {finding.reference ? (\n <p className={s.reference()}>\n {finding.reference.href ? (\n <a href={finding.reference.href} className={s.referenceLink()}>\n {finding.reference.label}\n </a>\n ) : (\n finding.reference.label\n )}\n </p>\n ) : null}\n {locationSlot}\n {finding.evidence ? (\n <details className={s.fold()}>\n <summary className={s.foldSummary()}>{labels.evidence}</summary>\n <pre tabIndex={0} className={s.evidence()}>\n <code>{finding.evidence}</code>\n </pre>\n </details>\n ) : null}\n </li>\n );\n}\n\nfunction TextColumn({ title, items }: Readonly<{ title: string; items: readonly string[] | undefined }>) {\n const s = analysisReportStyles();\n if (!items?.length) return null;\n return (\n <section className={s.column()}>\n <h3 className={s.columnTitle()}>{title}</h3>\n <ul className={s.items()}>\n {items.map((i) => (\n <li key={i}>{i}</li>\n ))}\n </ul>\n </section>\n );\n}\n\nfunction Provenance({ data, labels, folded }: Readonly<{ data: NonNullable<AnalysisReportData[\"provenance\"]>; labels: AnalysisReportLabels; folded?: boolean }>) {\n const s = analysisReportStyles();\n const rows = [\n [labels.model, data.model],\n [labels.runId, data.runId],\n [labels.duration, data.duration],\n [labels.version, data.version],\n ].filter((r): r is [string, string] => Boolean(r[1]));\n if (!rows.length) return null;\n const list = (\n <dl aria-label={folded ? undefined : labels.provenance} className={folded ? s.provenanceList() : s.provenance()}>\n {rows.map(([k, v]) => (\n <div key={k} className=\"flex min-w-0 gap-1.5\">\n <dt className={s.term()}>{k}</dt>\n <dd className=\"min-w-0 break-all font-mono\">{v}</dd>\n </div>\n ))}\n </dl>\n );\n if (!folded) return list;\n return (\n <details className={s.provenanceFold()}>\n <summary className={s.foldSummary()}>{labels.provenance}</summary>\n {list}\n </details>\n );\n}\n\n/** The result of an AI analysis: summary, findings by status, limits, next steps, provenance, copy as JSON or Markdown. */\nexport function AnalysisReport({ title, summary, status, findings, limits, nextSteps, provenance, labels, mark, streaming, onLocate, onCopy, hideActions, folded, provenanceFolded, className, ...props }: AnalysisReportProps) {\n const s = analysisReportStyles();\n const [copied, setCopied] = React.useState<AnalysisExport | null>(null);\n const report: AnalysisReportData = { title, summary, status, findings, limits, nextSteps, provenance };\n const counts = countByStatus(findings);\n const heading = React.useId();\n let announcement = \"\";\n if (copied) announcement = labels.copied;\n else if (streaming) announcement = labels.streaming;\n const copy = (kind: AnalysisExport) => {\n const text = exportReport(kind, report, labels);\n void navigator.clipboard?.writeText(text).then(() => setCopied(kind));\n onCopy?.(kind, text);\n };\n return (\n <section aria-labelledby={heading} aria-busy={streaming || undefined} className={s.root({ className })} {...props}>\n <header className={s.header()}>\n {mark}\n <div className={s.headText()}>\n <h2 id={heading} className={s.title()}>\n {title}\n </h2>\n <p className={s.summary()}>{summary}</p>\n <div className={s.counts()}>\n <Badge tone={TONE[status]} size=\"md\" dot>\n {labels.status[status]}\n </Badge>\n {(Object.keys(counts) as AnalysisStatus[])\n .filter((k) => counts[k] > 0)\n .map((k) => (\n <Badge key={k} tone={TONE[k]}>\n {counts[k]} {labels.status[k]}\n </Badge>\n ))}\n </div>\n </div>\n {hideActions ? null : (\n <div className={s.actions()}>\n <Button variant=\"outline\" size=\"sm\" onClick={() => copy(\"json\")}>\n {labels.copyJson}\n </Button>\n <Button variant=\"outline\" size=\"sm\" onClick={() => copy(\"markdown\")}>\n {labels.copyMarkdown}\n </Button>\n </div>\n )}\n </header>\n <p role=\"status\" className=\"sr-only\">\n {announcement}\n </p>\n <div aria-live={streaming ? \"polite\" : undefined} className=\"flex flex-col gap-6\">\n {findings.length === 0 && !streaming ? <p className={s.live()}>{labels.noFindings}</p> : null}\n {groupFindings(findings).map((g) => {\n const title = `${labels.status[g.status]} · ${g.findings.length}`;\n const list = (\n <ul className={s.list()}>\n {g.findings.map((f) => (\n <FindingCard key={f.id} finding={f} labels={labels} onLocate={onLocate} />\n ))}\n </ul>\n );\n return folded?.includes(g.status) ? (\n <details key={g.status} className={s.group()} aria-label={`${labels.findings}: ${labels.status[g.status]}`}>\n <summary className={s.foldSummary()}>{title}</summary>\n <div className=\"mt-3\">{list}</div>\n </details>\n ) : (\n <section key={g.status} className={s.group()} aria-label={`${labels.findings}: ${labels.status[g.status]}`}>\n <h3 className={s.groupTitle()}>{title}</h3>\n {list}\n </section>\n );\n })}\n </div>\n {limits?.length || nextSteps?.length ? (\n <div className=\"@container\">\n <div className={s.columns()}>\n <TextColumn title={labels.limits} items={limits} />\n <TextColumn title={labels.nextSteps} items={nextSteps} />\n </div>\n </div>\n ) : null}\n {provenance ? <Provenance data={provenance} labels={labels} folded={provenanceFolded} /> : null}\n </section>\n );\n}\n","// The rules of an analysis report, shared by the web entry and tested alone: the order of the statuses, the grouping of the\n// findings (the most serious first), the counts, and the two exports (JSON, Markdown). No words of its own: the labels arrive.\n\n/** How a finding or a whole report reads, from the most serious to the calmest. */\nexport const ANALYSIS_STATUSES = [\"inconsistent\", \"attention\", \"unverified\", \"consistent\"] as const;\nexport type AnalysisStatus = (typeof ANALYSIS_STATUSES)[number];\n\nexport type AnalysisFinding = {\n id: string;\n status: AnalysisStatus;\n /** The rule's identifier, in mono (`PDF-META-002`). */\n code?: string;\n title: string;\n /** What was observed. */\n observation?: string;\n /** What it may indicate, with its honest caveat. */\n mayIndicate?: string;\n /** Where in the document: « metadata », « page 3 ». `onLocate` receives the finding. */\n location?: string;\n /** The raw evidence, shown in a code block. */\n evidence?: string;\n /** The passage of the document the finding rests on, shown as a « » line (prose, not code: `evidence` stays for code). */\n quote?: string;\n /** The article of law or rule the finding cites (« C.c.Q., art. 1904, al. 1 »); `href` makes it a link. */\n reference?: AnalysisReference;\n};\n\nexport type AnalysisReference = { label: string; href?: string };\n\nexport type AnalysisProvenance = { model?: string; runId?: string; duration?: string; version?: string };\n\nexport type AnalysisReportData = {\n /** The studio's name (« Document validation »). */\n title: string;\n /** One sentence: the answer. */\n summary: string;\n /** The overall status of the report. */\n status: AnalysisStatus;\n /** The findings, in any order: the report groups them by status, the most serious first. */\n findings: readonly AnalysisFinding[];\n /** « What this report did not examine ». */\n limits?: readonly string[];\n /** What to do next, one step per item. */\n nextSteps?: readonly string[];\n /** Where the result comes from: model, run id, duration, version. */\n provenance?: AnalysisProvenance;\n};\n\n/** Every word the report prints, passed translated (the package ships none). */\nexport type AnalysisReportLabels = {\n status: Record<AnalysisStatus, string>;\n findings: string;\n mayIndicate: string;\n location: string;\n evidence: string;\n details: string;\n limits: string;\n nextSteps: string;\n provenance: string;\n model: string;\n runId: string;\n duration: string;\n version: string;\n copyJson: string;\n copyMarkdown: string;\n copied: string;\n /** Said while findings are still arriving. */\n streaming: string;\n /** Said when the report has no finding. */\n noFindings: string;\n};\n\nexport type AnalysisExport = \"json\" | \"markdown\";\n\n/** The findings grouped by status, the most serious group first; empty groups are left out. */\nexport function groupFindings(findings: readonly AnalysisFinding[]): { status: AnalysisStatus; findings: AnalysisFinding[] }[] {\n return ANALYSIS_STATUSES.map((status) => ({ status, findings: findings.filter((f) => f.status === status) })).filter((g) => g.findings.length > 0);\n}\n\n/** How many findings wear each status (zero included, so a count row is stable). */\nexport function countByStatus(findings: readonly AnalysisFinding[]): Record<AnalysisStatus, number> {\n const counts = { inconsistent: 0, attention: 0, unverified: 0, consistent: 0 } satisfies Record<AnalysisStatus, number>;\n for (const f of findings) counts[f.status] += 1;\n return counts;\n}\n\nexport function reportToJson(report: AnalysisReportData): string {\n return JSON.stringify(report, null, 2);\n}\n\nconst bullets = (items: readonly string[]) => items.map((i) => `- ${i}`);\n\nfunction findingLines(f: AnalysisFinding, labels: AnalysisReportLabels): string[] {\n const code = f.code ? `\\`${f.code}\\` · ` : \"\";\n const head = `### ${code}${f.title}`;\n return [\n head,\n ...(f.observation ? [\"\", f.observation] : []),\n ...(f.mayIndicate ? [\"\", `**${labels.mayIndicate}** ${f.mayIndicate}`] : []),\n ...(f.quote ? [\"\", `> « ${f.quote} »`] : []),\n ...(f.reference ? [\"\", f.reference.href ? `[${f.reference.label}](${f.reference.href})` : f.reference.label] : []),\n ...(f.location ? [\"\", `**${labels.location}** ${f.location}`] : []),\n ...(f.evidence ? [\"\", \"```\", f.evidence, \"```\"] : []),\n \"\",\n ];\n}\n\nfunction provenanceLines(p: AnalysisProvenance | undefined, labels: AnalysisReportLabels): string[] {\n const rows: [string, string | undefined][] = [\n [labels.model, p?.model],\n [labels.runId, p?.runId],\n [labels.duration, p?.duration],\n [labels.version, p?.version],\n ];\n return rows.filter((r): r is [string, string] => Boolean(r[1])).map(([k, v]) => `- ${k}: ${v}`);\n}\n\n/** The report as Markdown, in the same order as the page. */\nexport function reportToMarkdown(report: AnalysisReportData, labels: AnalysisReportLabels): string {\n const sections: string[][] = [\n [`# ${report.title}`, \"\", `**${labels.status[report.status]}** — ${report.summary}`],\n ...groupFindings(report.findings).map((g) => [`## ${labels.status[g.status]}`, \"\", ...g.findings.flatMap((f) => findingLines(f, labels))]),\n ...(report.limits?.length ? [[`## ${labels.limits}`, \"\", ...bullets(report.limits)]] : []),\n ...(report.nextSteps?.length ? [[`## ${labels.nextSteps}`, \"\", ...bullets(report.nextSteps)]] : []),\n ...(provenanceLines(report.provenance, labels).length ? [[`## ${labels.provenance}`, \"\", ...provenanceLines(report.provenance, labels)]] : []),\n ];\n return sections.map((s) => s.join(\"\\n\").trimEnd()).join(\"\\n\\n\") + \"\\n\";\n}\n\n/** The text of an export. */\nexport function exportReport(kind: AnalysisExport, report: AnalysisReportData, labels: AnalysisReportLabels): string {\n return kind === \"json\" ? reportToJson(report) : reportToMarkdown(report, labels);\n}\n"],"mappings":";;;;;;;;;;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACAZ,IAAM,oBAAoB,CAAC,gBAAgB,aAAa,cAAc,YAAY;AAuElF,SAAS,cAAc,UAAiG;AAC7H,SAAO,kBAAkB,IAAI,CAAC,YAAY,EAAE,QAAQ,UAAU,SAAS,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,SAAS,CAAC;AACnJ;AA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I,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,cAAW,OAAO,OAAO,QAAQ,OAAO,QAAQ;AAAA,MACjD,oBAAC,cAAW,OAAO,OAAO,WAAW,OAAO,WAAW;AAAA,OACzD,GACF,IACE;AAAA,IACH,aAAa,oBAAC,cAAW,MAAM,YAAY,QAAgB,QAAQ,kBAAkB,IAAK;AAAA,KAC7F;AAEJ;","names":["title"]}
1
+ {"version":3,"sources":["../src/analysis-report/analysis-report.tsx","../src/analysis-report/model.ts"],"sourcesContent":["// Client (the copy buttons, the folds). The result of an AI analysis, read in five seconds then deeper on demand: a header\n// (studio, one sentence, overall status, counts), findings grouped by status (the most serious first), the limits and the\n// next steps as a calm two-column section, a provenance footer, and copy as JSON / Markdown. Words arrive as props.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Badge } from \"../badge/badge\";\nimport { Button } from \"../button/button\";\nimport {\n type AnalysisExport,\n type AnalysisFinding,\n type AnalysisReportData,\n type AnalysisReportLabels,\n type AnalysisStatus,\n countByStatus,\n exportReport,\n groupFindings,\n} from \"./model\";\n\nexport const analysisReportStyles = tv({\n slots: {\n root: \"flex w-full min-w-0 flex-col gap-6 wrap-anywhere text-fg\",\n header: \"flex items-start gap-4\",\n headText: \"flex min-w-0 flex-1 flex-col gap-2\",\n title: \"font-display text-xl font-bold tracking-tight text-fg\",\n summary: \"text-base text-fg-secondary\",\n counts: \"flex flex-wrap items-center gap-2\",\n actions: \"flex flex-wrap gap-2\",\n group: \"flex flex-col gap-3\",\n groupTitle: \"text-sm font-semibold text-fg-secondary\",\n list: \"flex flex-col gap-3\",\n finding: \"flex min-w-0 flex-col wrap-anywhere gap-2 rounded-lg border border-border-default bg-surface-1 p-4\",\n findingHead: \"flex flex-wrap items-center gap-2\",\n code: \"font-mono text-xs text-fg-secondary\",\n findingTitle: \"text-base font-semibold text-fg\",\n muted: \"text-sm text-fg-secondary\",\n locate: \"w-fit\",\n fold: \"text-sm text-fg-secondary\",\n quote: \"m-0 wrap-anywhere text-sm text-fg-secondary\",\n reference: \"w-fit max-w-full wrap-anywhere text-sm font-semibold text-fg-accent\",\n referenceLink: \"rounded-sm underline underline-offset-2 focus-visible:focus-ring\",\n evidence: \"mt-2 overflow-x-auto rounded-md border border-border-default bg-surface-2 p-3 font-mono text-xs text-fg focus-visible:focus-ring\",\n foldSummary: \"w-fit cursor-pointer rounded-sm font-semibold text-fg-accent focus-visible:focus-ring\",\n columns: \"grid gap-6 border-t border-border-default pt-6 @lg:grid-cols-2\",\n column: \"flex flex-col gap-2\",\n columnTitle: \"text-sm font-semibold text-fg\",\n items: \"flex min-w-0 list-disc wrap-anywhere flex-col gap-1 pl-5 text-sm text-fg-secondary\",\n provenance: \"flex flex-wrap gap-x-6 gap-y-1 border-t border-border-default pt-4 text-xs text-fg-secondary\",\n provenanceFold: \"border-t border-border-default pt-4 text-xs text-fg-secondary\",\n provenanceList: \"mt-2 flex flex-wrap gap-x-6 gap-y-1\",\n term: \"font-semibold text-fg\",\n live: \"text-sm text-fg-secondary\",\n },\n});\n\nconst TONE = { inconsistent: \"danger\", attention: \"warning\", unverified: \"neutral\", consistent: \"success\" } as const satisfies Record<AnalysisStatus, string>;\n\nexport type AnalysisReportProps = Omit<React.ComponentProps<\"section\">, \"title\" | \"children\"> &\n AnalysisReportData & {\n /** Every word the report prints, passed translated (statuses, section titles, buttons). */\n labels: AnalysisReportLabels;\n /** The pack's bird (a mark of `@krizaka/ui/mascots`), shown beside the studio's name. */\n mark?: React.ReactNode;\n /** Findings are still arriving: the list is announced politely and marked busy. */\n streaming?: boolean;\n /** Makes a finding's location a button (scroll a document viewer to it). */\n onLocate?: (finding: AnalysisFinding) => void;\n /** Called after the report is copied (`json` or `markdown`), with the copied text. Without a clipboard, the app can copy it here. */\n onCopy?: (kind: AnalysisExport, text: string) => void;\n /** Hides the copy buttons (a read-only embed). */\n hideActions?: boolean;\n /** Status groups closed by default (a native `details`, the count in its summary): « respected », « not applicable ». */\n folded?: readonly AnalysisStatus[];\n /** The provenance (run id, ruleset, version) in one closed fold, titled `labels.provenance`. */\n provenanceFolded?: boolean;\n };\n\nfunction FindingCard({ finding, labels, onLocate }: Readonly<{ finding: AnalysisFinding; labels: AnalysisReportLabels; onLocate: AnalysisReportProps[\"onLocate\"] }>) {\n const s = analysisReportStyles();\n let locationSlot: React.ReactNode = null;\n if (finding.location) {\n locationSlot = onLocate ? (\n <Button variant=\"ghost\" size=\"sm\" className={s.locate()} onClick={() => onLocate(finding)}>\n {labels.location} {finding.location}\n </Button>\n ) : (\n <p className={s.muted()}>\n <span className={s.term()}>{labels.location}</span> {finding.location}\n </p>\n );\n }\n return (\n <li className={s.finding()}>\n <div className={s.findingHead()}>\n <Badge tone={TONE[finding.status]} dot>\n {labels.status[finding.status]}\n </Badge>\n {finding.code ? <span className={s.code()}>{finding.code}</span> : null}\n </div>\n <h4 className={s.findingTitle()}>{finding.title}</h4>\n {finding.observation ? <p className={s.muted()}>{finding.observation}</p> : null}\n {finding.mayIndicate ? (\n <p className={s.muted()}>\n <span className={s.term()}>{labels.mayIndicate}</span> {finding.mayIndicate}\n </p>\n ) : null}\n {finding.quote ? <p className={s.quote()}>« {finding.quote} »</p> : null}\n {finding.reference ? (\n <p className={s.reference()}>\n {finding.reference.href ? (\n <a href={finding.reference.href} className={s.referenceLink()}>\n {finding.reference.label}\n </a>\n ) : (\n finding.reference.label\n )}\n </p>\n ) : null}\n {locationSlot}\n {finding.evidence ? (\n <details className={s.fold()}>\n <summary className={s.foldSummary()}>{labels.evidence}</summary>\n <pre tabIndex={0} className={s.evidence()}>\n <code>{finding.evidence}</code>\n </pre>\n </details>\n ) : null}\n </li>\n );\n}\n\nfunction TextColumn({ title, items }: Readonly<{ title: string; items: readonly string[] | undefined }>) {\n const s = analysisReportStyles();\n if (!items?.length) return null;\n return (\n <section className={s.column()}>\n <h3 className={s.columnTitle()}>{title}</h3>\n <ul className={s.items()}>\n {items.map((i) => (\n <li key={i}>{i}</li>\n ))}\n </ul>\n </section>\n );\n}\n\nfunction Provenance({ data, labels, folded }: Readonly<{ data: NonNullable<AnalysisReportData[\"provenance\"]>; labels: AnalysisReportLabels; folded?: boolean }>) {\n const s = analysisReportStyles();\n const rows = [\n [labels.model, data.model],\n [labels.runId, data.runId],\n [labels.duration, data.duration],\n [labels.version, data.version],\n ].filter((r): r is [string, string] => Boolean(r[1]));\n if (!rows.length) return null;\n const list = (\n <dl aria-label={folded ? undefined : labels.provenance} className={folded ? s.provenanceList() : s.provenance()}>\n {rows.map(([k, v]) => (\n <div key={k} className=\"flex min-w-0 gap-1.5\">\n <dt className={s.term()}>{k}</dt>\n <dd className=\"min-w-0 break-all font-mono\">{v}</dd>\n </div>\n ))}\n </dl>\n );\n if (!folded) return list;\n return (\n <details className={s.provenanceFold()}>\n <summary className={s.foldSummary()}>{labels.provenance}</summary>\n {list}\n </details>\n );\n}\n\n/** The result of an AI analysis: summary, findings by status, limits, next steps, provenance, copy as JSON or Markdown. */\nexport function AnalysisReport({ title, summary, status, findings, limits, nextSteps, provenance, labels, mark, streaming, onLocate, onCopy, hideActions, folded, provenanceFolded, className, ...props }: Readonly<AnalysisReportProps>) {\n const s = analysisReportStyles();\n const [copied, setCopied] = React.useState<AnalysisExport | null>(null);\n const report: AnalysisReportData = { title, summary, status, findings, limits, nextSteps, provenance };\n const counts = countByStatus(findings);\n const heading = React.useId();\n let announcement = \"\";\n if (copied) announcement = labels.copied;\n else if (streaming) announcement = labels.streaming;\n const copy = (kind: AnalysisExport) => {\n const text = exportReport(kind, report, labels);\n void navigator.clipboard?.writeText(text).then(() => setCopied(kind));\n onCopy?.(kind, text);\n };\n return (\n <section aria-labelledby={heading} aria-busy={streaming || undefined} className={s.root({ className })} {...props}>\n <header className={s.header()}>\n {mark}\n <div className={s.headText()}>\n <h2 id={heading} className={s.title()}>\n {title}\n </h2>\n <p className={s.summary()}>{summary}</p>\n <div className={s.counts()}>\n <Badge tone={TONE[status]} size=\"md\" dot>\n {labels.status[status]}\n </Badge>\n {(Object.keys(counts) as AnalysisStatus[])\n .filter((k) => counts[k] > 0)\n .map((k) => (\n <Badge key={k} tone={TONE[k]}>\n {counts[k]} {labels.status[k]}\n </Badge>\n ))}\n </div>\n </div>\n {hideActions ? null : (\n <div className={s.actions()}>\n <Button variant=\"outline\" size=\"sm\" onClick={() => copy(\"json\")}>\n {labels.copyJson}\n </Button>\n <Button variant=\"outline\" size=\"sm\" onClick={() => copy(\"markdown\")}>\n {labels.copyMarkdown}\n </Button>\n </div>\n )}\n </header>\n <p role=\"status\" className=\"sr-only\">\n {announcement}\n </p>\n <div aria-live={streaming ? \"polite\" : undefined} className=\"flex flex-col gap-6\">\n {findings.length === 0 && !streaming ? <p className={s.live()}>{labels.noFindings}</p> : null}\n {groupFindings(findings).map((g) => {\n const title = `${labels.status[g.status]} · ${g.findings.length}`;\n const list = (\n <ul className={s.list()}>\n {g.findings.map((f) => (\n <FindingCard key={f.id} finding={f} labels={labels} onLocate={onLocate} />\n ))}\n </ul>\n );\n return folded?.includes(g.status) ? (\n <details key={g.status} className={s.group()} aria-label={`${labels.findings}: ${labels.status[g.status]}`}>\n <summary className={s.foldSummary()}>{title}</summary>\n <div className=\"mt-3\">{list}</div>\n </details>\n ) : (\n <section key={g.status} className={s.group()} aria-label={`${labels.findings}: ${labels.status[g.status]}`}>\n <h3 className={s.groupTitle()}>{title}</h3>\n {list}\n </section>\n );\n })}\n </div>\n {limits?.length || nextSteps?.length ? (\n <div className=\"@container\">\n <div className={s.columns()}>\n <TextColumn title={labels.limits} items={limits} />\n <TextColumn title={labels.nextSteps} items={nextSteps} />\n </div>\n </div>\n ) : null}\n {provenance ? <Provenance data={provenance} labels={labels} folded={provenanceFolded} /> : null}\n </section>\n );\n}\n","// The rules of an analysis report, shared by the web entry and tested alone: the order of the statuses, the grouping of the\n// findings (the most serious first), the counts, and the two exports (JSON, Markdown). No words of its own: the labels arrive.\n\n/** How a finding or a whole report reads, from the most serious to the calmest. */\nexport const ANALYSIS_STATUSES = [\"inconsistent\", \"attention\", \"unverified\", \"consistent\"] as const;\nexport type AnalysisStatus = (typeof ANALYSIS_STATUSES)[number];\n\nexport type AnalysisFinding = {\n id: string;\n status: AnalysisStatus;\n /** The rule's identifier, in mono (`PDF-META-002`). */\n code?: string;\n title: string;\n /** What was observed. */\n observation?: string;\n /** What it may indicate, with its honest caveat. */\n mayIndicate?: string;\n /** Where in the document: « metadata », « page 3 ». `onLocate` receives the finding. */\n location?: string;\n /** The raw evidence, shown in a code block. */\n evidence?: string;\n /** The passage of the document the finding rests on, shown as a « » line (prose, not code: `evidence` stays for code). */\n quote?: string;\n /** The article of law or rule the finding cites (« C.c.Q., art. 1904, al. 1 »); `href` makes it a link. */\n reference?: AnalysisReference;\n};\n\nexport type AnalysisReference = { label: string; href?: string };\n\nexport type AnalysisProvenance = { model?: string; runId?: string; duration?: string; version?: string };\n\nexport type AnalysisReportData = {\n /** The studio's name (« Document validation »). */\n title: string;\n /** One sentence: the answer. */\n summary: string;\n /** The overall status of the report. */\n status: AnalysisStatus;\n /** The findings, in any order: the report groups them by status, the most serious first. */\n findings: readonly AnalysisFinding[];\n /** « What this report did not examine ». */\n limits?: readonly string[];\n /** What to do next, one step per item. */\n nextSteps?: readonly string[];\n /** Where the result comes from: model, run id, duration, version. */\n provenance?: AnalysisProvenance;\n};\n\n/** Every word the report prints, passed translated (the package ships none). */\nexport type AnalysisReportLabels = {\n status: Record<AnalysisStatus, string>;\n findings: string;\n mayIndicate: string;\n location: string;\n evidence: string;\n details: string;\n limits: string;\n nextSteps: string;\n provenance: string;\n model: string;\n runId: string;\n duration: string;\n version: string;\n copyJson: string;\n copyMarkdown: string;\n copied: string;\n /** Said while findings are still arriving. */\n streaming: string;\n /** Said when the report has no finding. */\n noFindings: string;\n};\n\nexport type AnalysisExport = \"json\" | \"markdown\";\n\n/** The findings grouped by status, the most serious group first; empty groups are left out. */\nexport function groupFindings(findings: readonly AnalysisFinding[]): { status: AnalysisStatus; findings: AnalysisFinding[] }[] {\n return ANALYSIS_STATUSES.map((status) => ({ status, findings: findings.filter((f) => f.status === status) })).filter((g) => g.findings.length > 0);\n}\n\n/** How many findings wear each status (zero included, so a count row is stable). */\nexport function countByStatus(findings: readonly AnalysisFinding[]): Record<AnalysisStatus, number> {\n const counts = { inconsistent: 0, attention: 0, unverified: 0, consistent: 0 } satisfies Record<AnalysisStatus, number>;\n for (const f of findings) counts[f.status] += 1;\n return counts;\n}\n\nexport function reportToJson(report: AnalysisReportData): string {\n return JSON.stringify(report, null, 2);\n}\n\nconst bullets = (items: readonly string[]) => items.map((i) => `- ${i}`);\n\nfunction findingLines(f: AnalysisFinding, labels: AnalysisReportLabels): string[] {\n const code = f.code ? `\\`${f.code}\\` · ` : \"\";\n const head = `### ${code}${f.title}`;\n return [\n head,\n ...(f.observation ? [\"\", f.observation] : []),\n ...(f.mayIndicate ? [\"\", `**${labels.mayIndicate}** ${f.mayIndicate}`] : []),\n ...(f.quote ? [\"\", `> « ${f.quote} »`] : []),\n ...(f.reference ? [\"\", f.reference.href ? `[${f.reference.label}](${f.reference.href})` : f.reference.label] : []),\n ...(f.location ? [\"\", `**${labels.location}** ${f.location}`] : []),\n ...(f.evidence ? [\"\", \"```\", f.evidence, \"```\"] : []),\n \"\",\n ];\n}\n\nfunction provenanceLines(p: AnalysisProvenance | undefined, labels: AnalysisReportLabels): string[] {\n const rows: [string, string | undefined][] = [\n [labels.model, p?.model],\n [labels.runId, p?.runId],\n [labels.duration, p?.duration],\n [labels.version, p?.version],\n ];\n return rows.filter((r): r is [string, string] => Boolean(r[1])).map(([k, v]) => `- ${k}: ${v}`);\n}\n\n/** The report as Markdown, in the same order as the page. */\nexport function reportToMarkdown(report: AnalysisReportData, labels: AnalysisReportLabels): string {\n const sections: string[][] = [\n [`# ${report.title}`, \"\", `**${labels.status[report.status]}** — ${report.summary}`],\n ...groupFindings(report.findings).map((g) => [`## ${labels.status[g.status]}`, \"\", ...g.findings.flatMap((f) => findingLines(f, labels))]),\n ...(report.limits?.length ? [[`## ${labels.limits}`, \"\", ...bullets(report.limits)]] : []),\n ...(report.nextSteps?.length ? [[`## ${labels.nextSteps}`, \"\", ...bullets(report.nextSteps)]] : []),\n ...(provenanceLines(report.provenance, labels).length ? [[`## ${labels.provenance}`, \"\", ...provenanceLines(report.provenance, labels)]] : []),\n ];\n return sections.map((s) => s.join(\"\\n\").trimEnd()).join(\"\\n\\n\") + \"\\n\";\n}\n\n/** The text of an export. */\nexport function exportReport(kind: AnalysisExport, report: AnalysisReportData, labels: AnalysisReportLabels): string {\n return kind === \"json\" ? reportToJson(report) : reportToMarkdown(report, labels);\n}\n"],"mappings":";;;;;;;;;;;AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;;;ACAZ,IAAM,oBAAoB,CAAC,gBAAgB,aAAa,cAAc,YAAY;AAuElF,SAAS,cAAc,UAAiG;AAC7H,SAAO,kBAAkB,IAAI,CAAC,YAAY,EAAE,QAAQ,UAAU,SAAS,OAAO,CAAC,MAAM,EAAE,WAAW,MAAM,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,EAAE,SAAS,SAAS,CAAC;AACnJ;AAGO,SAAS,cAAc,UAAsE;AAClG,QAAM,SAAS,EAAE,cAAc,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,EAAE;AAC7E,aAAW,KAAK,SAAU,QAAO,EAAE,MAAM,KAAK;AAC9C,SAAO;AACT;AAEO,SAAS,aAAa,QAAoC;AAC/D,SAAO,KAAK,UAAU,QAAQ,MAAM,CAAC;AACvC;AAEA,IAAM,UAAU,CAAC,UAA6B,MAAM,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AAEvE,SAAS,aAAa,GAAoB,QAAwC;AAChF,QAAM,OAAO,EAAE,OAAO,KAAK,EAAE,IAAI,aAAU;AAC3C,QAAM,OAAO,OAAO,IAAI,GAAG,EAAE,KAAK;AAClC,SAAO;AAAA,IACL;AAAA,IACA,GAAI,EAAE,cAAc,CAAC,IAAI,EAAE,WAAW,IAAI,CAA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,KAAK,GACnB,YAAE,SAAS,IAAI,CAAC,MACf,oBAAC,eAAuB,SAAS,GAAG,QAAgB,YAAlC,EAAE,EAAoD,CACzE,GACH;AAEF,eAAO,QAAQ,SAAS,EAAE,MAAM,IAC9B,qBAAC,aAAuB,WAAW,EAAE,MAAM,GAAG,cAAY,GAAG,OAAO,QAAQ,KAAK,OAAO,OAAO,EAAE,MAAM,CAAC,IACtG;AAAA,8BAAC,aAAQ,WAAW,EAAE,YAAY,GAAI,UAAAA,QAAM;AAAA,UAC5C,oBAAC,SAAI,WAAU,QAAQ,gBAAK;AAAA,aAFhB,EAAE,MAGhB,IAEA,qBAAC,aAAuB,WAAW,EAAE,MAAM,GAAG,cAAY,GAAG,OAAO,QAAQ,KAAK,OAAO,OAAO,EAAE,MAAM,CAAC,IACtG;AAAA,8BAAC,QAAG,WAAW,EAAE,WAAW,GAAI,UAAAA,QAAM;AAAA,UACrC;AAAA,aAFW,EAAE,MAGhB;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,IACC,QAAQ,UAAU,WAAW,SAC5B,oBAAC,SAAI,WAAU,cACb,+BAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,cAAW,OAAO,OAAO,QAAQ,OAAO,QAAQ;AAAA,MACjD,oBAAC,cAAW,OAAO,OAAO,WAAW,OAAO,WAAW;AAAA,OACzD,GACF,IACE;AAAA,IACH,aAAa,oBAAC,cAAW,MAAM,YAAY,QAAgB,QAAQ,kBAAkB,IAAK;AAAA,KAC7F;AAEJ;","names":["title"]}
@@ -24,7 +24,7 @@ type AnatomyPlateProps = Omit<React.HTMLAttributes<HTMLElement>, "title"> & {
24
24
  * A component's anatomy as a naturalist's plate: the specimen in the middle, its numbered parts and their reasons around it.
25
25
  * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
26
26
  */
27
- declare function AnatomyPlate({ title, subtitle, parts, children, scale, className, style, ...props }: AnatomyPlateProps): React.JSX.Element;
27
+ declare function AnatomyPlate({ title, subtitle, parts, children, scale, className, style, ...props }: Readonly<AnatomyPlateProps>): React.JSX.Element;
28
28
 
29
29
  export { AnatomyPlate };
30
30
  export type { AnatomyPart, AnatomyPlateProps };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-KGLRZMCY.js";
4
4
  import {
5
5
  cn
6
- } from "./chunk-W675RFOA.js";
6
+ } from "./chunk-ISC2QBXJ.js";
7
7
 
8
8
  // src/anatomy-plate/anatomy-plate.tsx
9
9
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/anatomy-plate/anatomy-plate.tsx"],"sourcesContent":["// Server-safe. The anatomy plate of the Cahier (ADR-004, blocks.css): a component drawn large in the middle of a plate,\n// its parts numbered and named on both sides, a hairline leading from each note to the specimen — the way a field guide\n// shows a bird's anatomy. The notes are real text in an ordered list: the plate is its own text version, and on a phone\n// it stacks (the specimen, then the list).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { warnDeprecated } from \"../deprecated\";\n\nexport interface AnatomyPart {\n /** The part's name: `the cut`. */\n label: React.ReactNode;\n /** Why it is there, in one sentence: `45°, the Krizaka chamfer; it points where the action goes.` */\n note: React.ReactNode;\n /** The side of the plate it is written on. @default alternates, left first */\n side?: \"left\" | \"right\";\n}\n\nexport type AnatomyPlateProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The plate's title: `Anatomy`. */\n title?: React.ReactNode;\n /** One line under the title, or the scale: `to scale × 1.9`. */\n subtitle?: React.ReactNode;\n /** The parts, numbered in this order. */\n parts: readonly AnatomyPart[];\n /** The specimen: the live component, drawn large. */\n children: React.ReactNode;\n /** The specimen's scale on a wide screen (it is drawn at 1 on a phone). @default 1.6 */\n scale?: number;\n};\n\n/**\n * A component's anatomy as a naturalist's plate: the specimen in the middle, its numbered parts and their reasons around it.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function AnatomyPlate({ title, subtitle, parts, children, scale = 1.6, className, style, ...props }: AnatomyPlateProps) {\n warnDeprecated(\"anatomy-plate\");\n const numbered = parts.map((p, i) => ({ ...p, n: i + 1, side: p.side ?? (i % 2 === 0 ? \"left\" : \"right\") }));\n const column = (side: \"left\" | \"right\") => (\n <ol className=\"kz-anatomy-parts\" data-side={side}>\n {numbered\n .filter((p) => p.side === side)\n .map((p) => (\n <li key={p.n} value={p.n} className=\"kz-anatomy-part\">\n <span className=\"kz-anatomy-n\" aria-hidden>\n {p.n}\n </span>\n <span className=\"kz-anatomy-text\">\n <b>{p.label}</b> {p.note}\n </span>\n </li>\n ))}\n </ol>\n );\n return (\n <figure className={cn(\"kz-anatomy\", className)} style={{ [\"--kz-anatomy-scale\" as string]: scale, ...style }} {...props}>\n {(title || subtitle) && (\n <figcaption className=\"kz-anatomy-head\">\n {title && <span className=\"kz-plate-title\">{title}</span>}\n {subtitle && <span className=\"kz-plate-sub\">{subtitle}</span>}\n </figcaption>\n )}\n <div className=\"kz-anatomy-stage\">\n {column(\"left\")}\n <div className=\"kz-anatomy-specimen\">\n <div className=\"kz-anatomy-scale\">{children}</div>\n </div>\n {column(\"right\")}\n </div>\n </figure>\n );\n}\n"],"mappings":";;;;;;;;AA4CY,cAGA,YAHA;AATL,SAAS,aAAa,EAAE,OAAO,UAAU,OAAO,UAAU,QAAQ,KAAK,WAAW,OAAO,GAAG,MAAM,GAAsB;AAC7H,iBAAe,eAAe;AAC9B,QAAM,WAAW,MAAM,IAAI,CAAC,GAAG,OAAO,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,EAAE,SAAS,IAAI,MAAM,IAAI,SAAS,SAAS,EAAE;AAC3G,QAAM,SAAS,CAAC,SACd,oBAAC,QAAG,WAAU,oBAAmB,aAAW,MACzC,mBACE,OAAO,CAAC,MAAM,EAAE,SAAS,IAAI,EAC7B,IAAI,CAAC,MACJ,qBAAC,QAAa,OAAO,EAAE,GAAG,WAAU,mBAClC;AAAA,wBAAC,UAAK,WAAU,gBAAe,eAAW,MACvC,YAAE,GACL;AAAA,IACA,qBAAC,UAAK,WAAU,mBACd;AAAA,0BAAC,OAAG,YAAE,OAAM;AAAA,MAAI;AAAA,MAAE,EAAE;AAAA,OACtB;AAAA,OANO,EAAE,CAOX,CACD,GACL;AAEF,SACE,qBAAC,YAAO,WAAW,GAAG,cAAc,SAAS,GAAG,OAAO,EAAE,CAAC,oBAA8B,GAAG,OAAO,GAAG,MAAM,GAAI,GAAG,OAC9G;AAAA,cAAS,aACT,qBAAC,gBAAW,WAAU,mBACnB;AAAA,eAAS,oBAAC,UAAK,WAAU,kBAAkB,iBAAM;AAAA,MACjD,YAAY,oBAAC,UAAK,WAAU,gBAAgB,oBAAS;AAAA,OACxD;AAAA,IAEF,qBAAC,SAAI,WAAU,oBACZ;AAAA,aAAO,MAAM;AAAA,MACd,oBAAC,SAAI,WAAU,uBACb,8BAAC,SAAI,WAAU,oBAAoB,UAAS,GAC9C;AAAA,MACC,OAAO,OAAO;AAAA,OACjB;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/anatomy-plate/anatomy-plate.tsx"],"sourcesContent":["// Server-safe. The anatomy plate of the Cahier (ADR-004, blocks.css): a component drawn large in the middle of a plate,\n// its parts numbered and named on both sides, a hairline leading from each note to the specimen — the way a field guide\n// shows a bird's anatomy. The notes are real text in an ordered list: the plate is its own text version, and on a phone\n// it stacks (the specimen, then the list).\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { warnDeprecated } from \"../deprecated\";\n\nexport interface AnatomyPart {\n /** The part's name: `the cut`. */\n label: React.ReactNode;\n /** Why it is there, in one sentence: `45°, the Krizaka chamfer; it points where the action goes.` */\n note: React.ReactNode;\n /** The side of the plate it is written on. @default alternates, left first */\n side?: \"left\" | \"right\";\n}\n\nexport type AnatomyPlateProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The plate's title: `Anatomy`. */\n title?: React.ReactNode;\n /** One line under the title, or the scale: `to scale × 1.9`. */\n subtitle?: React.ReactNode;\n /** The parts, numbered in this order. */\n parts: readonly AnatomyPart[];\n /** The specimen: the live component, drawn large. */\n children: React.ReactNode;\n /** The specimen's scale on a wide screen (it is drawn at 1 on a phone). @default 1.6 */\n scale?: number;\n};\n\n/**\n * A component's anatomy as a naturalist's plate: the specimen in the middle, its numbered parts and their reasons around it.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function AnatomyPlate({ title, subtitle, parts, children, scale = 1.6, className, style, ...props }: Readonly<AnatomyPlateProps>) {\n warnDeprecated(\"anatomy-plate\");\n const numbered = parts.map((p, i) => ({ ...p, n: i + 1, side: p.side ?? (i % 2 === 0 ? \"left\" : \"right\") }));\n const column = (side: \"left\" | \"right\") => (\n <ol className=\"kz-anatomy-parts\" data-side={side}>\n {numbered\n .filter((p) => p.side === side)\n .map((p) => (\n <li key={p.n} value={p.n} className=\"kz-anatomy-part\">\n <span className=\"kz-anatomy-n\" aria-hidden>\n {p.n}\n </span>\n <span className=\"kz-anatomy-text\">\n <b>{p.label}</b> {p.note}\n </span>\n </li>\n ))}\n </ol>\n );\n return (\n <figure className={cn(\"kz-anatomy\", className)} style={{ [\"--kz-anatomy-scale\" as string]: scale, ...style }} {...props}>\n {(title || subtitle) && (\n <figcaption className=\"kz-anatomy-head\">\n {title && <span className=\"kz-plate-title\">{title}</span>}\n {subtitle && <span className=\"kz-plate-sub\">{subtitle}</span>}\n </figcaption>\n )}\n <div className=\"kz-anatomy-stage\">\n {column(\"left\")}\n <div className=\"kz-anatomy-specimen\">\n <div className=\"kz-anatomy-scale\">{children}</div>\n </div>\n {column(\"right\")}\n </div>\n </figure>\n );\n}\n"],"mappings":";;;;;;;;AA4CY,cAGA,YAHA;AATL,SAAS,aAAa,EAAE,OAAO,UAAU,OAAO,UAAU,QAAQ,KAAK,WAAW,OAAO,GAAG,MAAM,GAAgC;AACvI,iBAAe,eAAe;AAC9B,QAAM,WAAW,MAAM,IAAI,CAAC,GAAG,OAAO,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,MAAM,EAAE,SAAS,IAAI,MAAM,IAAI,SAAS,SAAS,EAAE;AAC3G,QAAM,SAAS,CAAC,SACd,oBAAC,QAAG,WAAU,oBAAmB,aAAW,MACzC,mBACE,OAAO,CAAC,MAAM,EAAE,SAAS,IAAI,EAC7B,IAAI,CAAC,MACJ,qBAAC,QAAa,OAAO,EAAE,GAAG,WAAU,mBAClC;AAAA,wBAAC,UAAK,WAAU,gBAAe,eAAW,MACvC,YAAE,GACL;AAAA,IACA,qBAAC,UAAK,WAAU,mBACd;AAAA,0BAAC,OAAG,YAAE,OAAM;AAAA,MAAI;AAAA,MAAE,EAAE;AAAA,OACtB;AAAA,OANO,EAAE,CAOX,CACD,GACL;AAEF,SACE,qBAAC,YAAO,WAAW,GAAG,cAAc,SAAS,GAAG,OAAO,EAAE,CAAC,oBAA8B,GAAG,OAAO,GAAG,MAAM,GAAI,GAAG,OAC9G;AAAA,cAAS,aACT,qBAAC,gBAAW,WAAU,mBACnB;AAAA,eAAS,oBAAC,UAAK,WAAU,kBAAkB,iBAAM;AAAA,MACjD,YAAY,oBAAC,UAAK,WAAU,gBAAgB,oBAAS;AAAA,OACxD;AAAA,IAEF,qBAAC,SAAI,WAAU,oBACZ;AAAA,aAAO,MAAM;AAAA,MACd,oBAAC,SAAI,WAAU,uBACb,8BAAC,SAAI,WAAU,oBAAoB,UAAS,GAC9C;AAAA,MACC,OAAO,OAAO;AAAA,OACjB;AAAA,KACF;AAEJ;","names":[]}
@@ -58,7 +58,7 @@ type AppHeaderSearchProps = Omit<React.ComponentProps<"button">, "children" | "o
58
58
  shortcut?: string | false;
59
59
  };
60
60
  /** The top bar's search trigger: a field from `md`, an icon below; it opens the host's palette, also on ⌘K. */
61
- declare function AppHeaderSearch({ label, onOpen, shortcut, className, type, ...props }: AppHeaderSearchProps): React.JSX.Element;
61
+ declare function AppHeaderSearch({ label, onOpen, shortcut, className, type, ...props }: Readonly<AppHeaderSearchProps>): React.JSX.Element;
62
62
 
63
63
  export { AppHeaderSearch, appHeaderSearch, isSearchShortcut };
64
64
  export type { AppHeaderSearchProps };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  Kbd
4
- } from "../chunk-KID32IRJ.js";
4
+ } from "../chunk-MXHJMTZ5.js";
5
5
  import {
6
6
  SearchGlyph
7
- } from "../chunk-S2O4NSN5.js";
7
+ } from "../chunk-3TCHVNNB.js";
8
8
 
9
9
  // src/app-header/search/search.tsx
10
10
  import * as React from "react";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/app-header/search/search.tsx"],"sourcesContent":["// Client (a global shortcut). The top bar's search trigger: a field-like button (the glyph, the label, ⌘K) from `md`, an\n// icon below. It does not search: it opens the host's palette (`CommandDialog` of @krizaka/ui/command) — on a click, on\n// Enter, and on ⌘K / Ctrl+K from anywhere on the page.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { SearchGlyph } from \"../../glyphs\";\nimport { Kbd } from \"../../kbd/kbd\";\n\nexport const appHeaderSearch = tv({\n slots: {\n root:\n \"inline-flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-lg text-fg-secondary transition-colors \" +\n \"hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none \" +\n \"md:w-56 md:justify-start md:border md:border-border-default md:bg-surface-2/60 md:px-3 md:text-xs md:hover:border-border-strong lg:w-72\",\n glyph: \"h-5 w-5 shrink-0 md:h-4 md:w-4\",\n // Hidden on a phone, still the button's name there (sr-only), so the name is the same at every width.\n label: \"sr-only md:not-sr-only md:flex-1 md:truncate md:text-left\",\n keys: \"ml-auto hidden shrink-0 items-center gap-0.5 lg:flex\",\n },\n});\nconst s = appHeaderSearch();\n\nconst isApple = () => typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);\n\n/** Whether a keydown is the shortcut: ⌘ or Ctrl with the key, no Alt. */\nexport function isSearchShortcut(event: Pick<KeyboardEvent, \"key\" | \"metaKey\" | \"ctrlKey\" | \"altKey\">, key: string): boolean {\n return event.key.toLowerCase() === key.toLowerCase() && (event.metaKey || event.ctrlKey) && !event.altKey;\n}\n\nexport type AppHeaderSearchProps = Omit<React.ComponentProps<\"button\">, \"children\" | \"onClick\"> & {\n /** What it searches (« Search files and checks ») — passed translated: the field's words from `md`, the button's name at every width. */\n label: string;\n /** Opens the palette: a click, Enter, and the shortcut. */\n onOpen: () => void;\n /**\n * The shortcut's key with ⌘ (Apple) or Ctrl (elsewhere), global to the page; `false` for none. One per page.\n * @default \"k\"\n */\n shortcut?: string | false;\n};\n\n/** The top bar's search trigger: a field from `md`, an icon below; it opens the host's palette, also on ⌘K. */\nexport function AppHeaderSearch({ label, onOpen, shortcut = \"k\", className, type, ...props }: AppHeaderSearchProps) {\n const [apple, setApple] = React.useState(true);\n const open = React.useRef(onOpen);\n React.useEffect(() => {\n open.current = onOpen;\n }, [onOpen]);\n\n React.useEffect(() => {\n if (!shortcut) return;\n // eslint-disable-next-line react-hooks/set-state-in-effect -- the platform is only known in the browser (no hydration mismatch)\n setApple(isApple());\n const onKey = (event: KeyboardEvent) => {\n if (!isSearchShortcut(event, shortcut)) return;\n event.preventDefault();\n open.current();\n };\n globalThis.addEventListener(\"keydown\", onKey);\n return () => globalThis.removeEventListener(\"keydown\", onKey);\n }, [shortcut]);\n\n const key = shortcut ? shortcut.toUpperCase() : null;\n return (\n <button\n type={type ?? \"button\"}\n aria-haspopup=\"dialog\"\n aria-keyshortcuts={key ? `Meta+${key} Control+${key}` : undefined}\n {...props}\n onClick={() => onOpen()}\n className={s.root({ className })}\n >\n <SearchGlyph className={s.glyph()} />\n <span className={s.label()}>{label}</span>\n {key && (\n <span aria-hidden className={s.keys()}>\n <Kbd size=\"sm\">{apple ? \"⌘\" : \"Ctrl\"}</Kbd>\n <Kbd size=\"sm\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ACvD,GAAG;AAAA,MACJ,SAAS,MAAM,OAAO;AAAA,MACtB,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC;AAAA,MAE/B;AAAA,4BAAC,eAAY,WAAW,EAAE,MAAM,GAAG;AAAA,QACnC,oBAAC,UAAK,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,QAClC,OACC,qBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GAClC;AAAA,8BAAC,OAAI,MAAK,MAAM,kBAAQ,WAAM,QAAO;AAAA,UACrC,oBAAC,OAAI,MAAK,MAAM,eAAI;AAAA,WACtB;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/app-header/search/search.tsx"],"sourcesContent":["// Client (a global shortcut). The top bar's search trigger: a field-like button (the glyph, the label, ⌘K) from `md`, an\n// icon below. It does not search: it opens the host's palette (`CommandDialog` of @krizaka/ui/command) — on a click, on\n// Enter, and on ⌘K / Ctrl+K from anywhere on the page.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { SearchGlyph } from \"../../glyphs\";\nimport { Kbd } from \"../../kbd/kbd\";\n\nexport const appHeaderSearch = tv({\n slots: {\n root:\n \"inline-flex h-9 w-9 shrink-0 items-center justify-center gap-2 rounded-lg text-fg-secondary transition-colors \" +\n \"hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none \" +\n \"md:w-56 md:justify-start md:border md:border-border-default md:bg-surface-2/60 md:px-3 md:text-xs md:hover:border-border-strong lg:w-72\",\n glyph: \"h-5 w-5 shrink-0 md:h-4 md:w-4\",\n // Hidden on a phone, still the button's name there (sr-only), so the name is the same at every width.\n label: \"sr-only md:not-sr-only md:flex-1 md:truncate md:text-left\",\n keys: \"ml-auto hidden shrink-0 items-center gap-0.5 lg:flex\",\n },\n});\nconst s = appHeaderSearch();\n\nconst isApple = () => typeof navigator !== \"undefined\" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);\n\n/** Whether a keydown is the shortcut: ⌘ or Ctrl with the key, no Alt. */\nexport function isSearchShortcut(event: Pick<KeyboardEvent, \"key\" | \"metaKey\" | \"ctrlKey\" | \"altKey\">, key: string): boolean {\n return event.key.toLowerCase() === key.toLowerCase() && (event.metaKey || event.ctrlKey) && !event.altKey;\n}\n\nexport type AppHeaderSearchProps = Omit<React.ComponentProps<\"button\">, \"children\" | \"onClick\"> & {\n /** What it searches (« Search files and checks ») — passed translated: the field's words from `md`, the button's name at every width. */\n label: string;\n /** Opens the palette: a click, Enter, and the shortcut. */\n onOpen: () => void;\n /**\n * The shortcut's key with ⌘ (Apple) or Ctrl (elsewhere), global to the page; `false` for none. One per page.\n * @default \"k\"\n */\n shortcut?: string | false;\n};\n\n/** The top bar's search trigger: a field from `md`, an icon below; it opens the host's palette, also on ⌘K. */\nexport function AppHeaderSearch({ label, onOpen, shortcut = \"k\", className, type, ...props }: Readonly<AppHeaderSearchProps>) {\n const [apple, setApple] = React.useState(true);\n const open = React.useRef(onOpen);\n React.useEffect(() => {\n open.current = onOpen;\n }, [onOpen]);\n\n React.useEffect(() => {\n if (!shortcut) return;\n // eslint-disable-next-line react-hooks/set-state-in-effect -- the platform is only known in the browser (no hydration mismatch)\n setApple(isApple());\n const onKey = (event: KeyboardEvent) => {\n if (!isSearchShortcut(event, shortcut)) return;\n event.preventDefault();\n open.current();\n };\n globalThis.addEventListener(\"keydown\", onKey);\n return () => globalThis.removeEventListener(\"keydown\", onKey);\n }, [shortcut]);\n\n const key = shortcut ? shortcut.toUpperCase() : null;\n return (\n <button\n type={type ?? \"button\"}\n aria-haspopup=\"dialog\"\n aria-keyshortcuts={key ? `Meta+${key} Control+${key}` : undefined}\n {...props}\n onClick={() => onOpen()}\n className={s.root({ className })}\n >\n <SearchGlyph className={s.glyph()} />\n <span className={s.label()}>{label}</span>\n {key && (\n <span aria-hidden className={s.keys()}>\n <Kbd size=\"sm\">{apple ? \"⌘\" :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AAQ,GAAG,YAAY,GAAG,KAAK;AAAA,MACvD,GAAG;AAAA,MACJ,SAAS,MAAM,OAAO;AAAA,MACtB,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC;AAAA,MAE/B;AAAA,4BAAC,eAAY,WAAW,EAAE,MAAM,GAAG;AAAA,QACnC,oBAAC,UAAK,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,QAClC,OACC,qBAAC,UAAK,eAAW,MAAC,WAAW,EAAE,KAAK,GAClC;AAAA,8BAAC,OAAI,MAAK,MAAM,kBAAQ,WAAM,QAAO;AAAA,UACrC,oBAAC,OAAI,MAAK,MAAM,eAAI;AAAA,WACtB;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
@@ -94,7 +94,7 @@ type AppHeaderProps = Omit<React.ComponentProps<"header">, "children"> & {
94
94
  account?: React.ReactNode;
95
95
  };
96
96
  /** The app's top bar: the name next to the rail, the mark on a phone, chips, then search · language · actions · messages · notifications · primary · account. */
97
- declare function AppHeader({ name, mark, href, homeLink, homeClassName, chips, search, language, actions, messages, notifications, primary, account, className, ...props }: AppHeaderProps): React.JSX.Element;
97
+ declare function AppHeader({ name, mark, href, homeLink, homeClassName, chips, search, language, actions, messages, notifications, primary, account, className, ...props }: Readonly<AppHeaderProps>): React.JSX.Element;
98
98
 
99
99
  declare const appHeaderCount: tailwind_variants.TVReturnType<{
100
100
  [key: string]: {
@@ -155,7 +155,7 @@ type AppHeaderCountProps = Omit<React.ComponentProps<"button">, "children"> & {
155
155
  current?: boolean;
156
156
  };
157
157
  /** An icon button or link of the top bar with an unread count, the count announced in its name. */
158
- declare function AppHeaderCount({ label, icon, count, countLabel, max, href, linkAs, current, className, type, ...props }: AppHeaderCountProps): React.JSX.Element;
158
+ declare function AppHeaderCount({ label, icon, count, countLabel, max, href, linkAs, current, className, type, ...props }: Readonly<AppHeaderCountProps>): React.JSX.Element;
159
159
 
160
160
  /** What the badge shows: the count, or `max+` above `max`; nothing at 0. */
161
161
  declare function countText(count: number | undefined, max?: number): string | null;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/app-header/app-header.tsx","../src/app-header/count.tsx","../src/app-header/count-text.ts"],"sourcesContent":["// Server-safe: no hook, no context. The family's top bar (#640): the product's NAME as text (the mark is the rail's), optional\n// chips, then the session's controls in a fixed order — search, language, the host's actions (a theme toggle), messages,\n// notifications, the primary action, the account. Every slot is the host's; a slot left empty draws nothing. Where the\n// rail is a bottom tab bar (a phone) it has no room for the mark, so the header shows it there and only there: exactly\n// one brand mark is visible at every width. At 360 px the name truncates first; the controls never clip.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const appHeader = tv({\n slots: {\n root: \"sticky top-0 z-30 flex h-14 w-full min-w-0 shrink-0 items-center gap-3 border-b border-border-subtle bg-surface-1 px-4 md:bg-surface-1 md:pl-3 md:pr-5\",\n // The rail's mark is 56 px tall and so is this bar: the word shares the mark's line, right after the rail.\n brand: \"flex min-w-0 items-center gap-2 font-display text-sm font-bold tracking-tight text-fg no-underline\",\n mark: \"inline-flex shrink-0 md:hidden\",\n name: \"truncate\",\n chips: \"flex shrink-0 items-center gap-2\",\n // The controls: one row at the right, in the order of the slots. They keep their size; the name gives way.\n actions: \"ml-auto flex shrink-0 items-center gap-1 sm:gap-2\",\n search: \"flex min-w-0 shrink-0\",\n },\n});\nconst s = appHeader();\n\nexport type AppHeaderProps = Omit<React.ComponentProps<\"header\">, \"children\"> & {\n /** The product's name, as text (`Sovkora`): the only brand element on a desktop. */\n name: string;\n /** The product's mark (`<ProductLogo id=\"sovkora\" size={22} />`): shown below `md` only, where the rail (which carries it) is a bottom bar. */\n mark?: React.ReactNode;\n /** Makes the name (and the mark) a link home: pass your router's link as `homeLink` or give a `href`. */\n href?: string;\n /** Your router's link element for the home link; it receives the name and the mark as children. */\n homeLink?: React.ReactElement<{ className?: string; children?: React.ReactNode }>;\n /** Classes added to the home link (from `href` or `homeLink`), e.g. a 44 px floor; the header fills the link itself. */\n homeClassName?: string;\n /** Status chips beside the name (`Badge`): « Local · Sovereign », « Dev », a version. */\n chips?: React.ReactNode;\n /** The search trigger, first of the controls: `AppHeaderSearch` (`@krizaka/ui/app-header/search`) — a field from `md`, an icon below, ⌘K. */\n search?: React.ReactNode;\n /** The language: `LanguageSwitch` (`@krizaka/ui/language-switch`) — a globe and « FR », labelled. */\n language?: React.ReactNode;\n /** The host's own controls, after the language (a theme toggle). Alone, it is the whole right side, as before. */\n actions?: React.ReactNode;\n /** Messages: an `AppHeaderCount` (an icon button or link with its unread count). Empty: hidden. */\n messages?: React.ReactNode;\n /** Notifications: an `AppHeaderCount` (or the trigger of the host's popover). Empty: hidden. */\n notifications?: React.ReactNode;\n /** The one primary action of the app (« New check », #588), before the account. */\n primary?: React.ReactNode;\n /** The account, last: `AccountMenu` with `showName` (the name from `sm`), or the visitor's Sign in. */\n account?: React.ReactNode;\n};\n\n/** The app's top bar: the name next to the rail, the mark on a phone, chips, then search · language · actions · messages · notifications · primary · account. */\nexport function AppHeader({ name, mark, href, homeLink, homeClassName, chips, search, language, actions, messages, notifications, primary, account, className, ...props }: AppHeaderProps) {\n const brand = (\n <>\n {mark && <span data-brand-mark className={s.mark()}>{mark}</span>}\n <span className={s.name()}>{name}</span>\n </>\n );\n const hasControls = [search, language, actions, messages, notifications, primary, account].some(Boolean);\n return (\n <header className={s.root({ className })} {...props}>\n {homeLink ? (\n React.cloneElement(homeLink, { className: s.brand({ className: [homeLink.props.className, homeClassName] }) }, brand)\n ) : href ? (\n <a href={href} className={s.brand({ className: homeClassName })}>{brand}</a>\n ) : (\n <div className={s.brand()}>{brand}</div>\n )}\n {chips && <div className={s.chips()}>{chips}</div>}\n {/* The order is the family's, not the host's: the same bar in every product. */}\n {hasControls && (\n <div className={s.actions()}>\n {search && <div data-slot=\"search\" className={s.search()}>{search}</div>}\n {language}\n {actions}\n {messages}\n {notifications}\n {primary}\n {account}\n </div>\n )}\n </header>\n );\n}\n","// Server-safe: no hook. An icon control of the top bar with an unread count — messages, notifications. A link (`href`, your\n// router's `linkAs`) or a button (the trigger of the host's popover, through `asChild` of Radix: its props and ref are\n// spread here). The count is drawn as a small badge and said in the name: « Notifications, 3 new ».\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { countName, countText } from \"./count-text\";\n\nexport const appHeaderCount = tv({\n slots: {\n root:\n \"relative inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-fg-secondary no-underline transition-colors \" +\n \"hover:bg-surface-2 hover:text-fg aria-expanded:bg-surface-2 aria-expanded:text-fg aria-[current=page]:bg-surface-2 aria-[current=page]:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none\",\n icon: \"inline-flex h-5 w-5 items-center justify-center [&>svg]:h-5 [&>svg]:w-5\",\n count:\n \"pointer-events-none absolute -right-0.5 -top-0.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-accent px-1 \" +\n \"font-mono text-[10px] font-bold leading-none tabular-nums text-on-accent ring-2 ring-surface-1\",\n },\n});\nconst s = appHeaderCount();\n\nexport type AppHeaderCountProps = Omit<React.ComponentProps<\"button\">, \"children\"> & {\n /** What it is (« Notifications », « Messages ») — passed translated; its accessible name, with the count. */\n label: string;\n /** The icon (`<NotificationIcon />` of @krizaka/icons): decorative, the name is `label`. */\n icon: React.ReactNode;\n /** The unread count; 0 or absent draws no badge. */\n count?: number;\n /** The count in words, said after the label (« 3 new », « 3 nouvelles ») — passed translated, with its plural. Default: the number. */\n countLabel?: string;\n /**\n * Above it the badge shows `max+`.\n * @default 99\n */\n max?: number;\n /** A link to the page (`/notifications`) instead of a button. */\n href?: string;\n /** Your router's link (Next's `Link`) for `href`; an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The page is the one it leads to (`aria-current=\"page\"`). */\n current?: boolean;\n};\n\n/** An icon button or link of the top bar with an unread count, the count announced in its name. */\nexport function AppHeaderCount({ label, icon, count, countLabel, max = 99, href, linkAs, current, className, type, ...props }: AppHeaderCountProps) {\n const text = countText(count, max);\n const shared = {\n ...props,\n \"aria-label\": countName(label, count, countLabel),\n \"aria-current\": current ? (\"page\" as const) : undefined,\n \"data-unread\": text ? \"\" : undefined,\n className: s.root({ className }),\n };\n const children = (\n <>\n <span aria-hidden className={s.icon()}>{icon}</span>\n {text && <span aria-hidden data-count className={s.count()}>{text}</span>}\n </>\n );\n if (href) {\n const Link = linkAs ?? \"a\";\n return <Link href={href} {...shared}>{children}</Link>;\n }\n return <button type={type ?? \"button\"} {...shared}>{children}</button>;\n}\n","// Pure, no import: shared by the web's AppHeaderCount and the native one (src/native/app-header.tsx).\n\n/** What the badge shows: the count, or `max+` above `max`; nothing at 0. */\nexport function countText(count: number | undefined, max = 99): string | null {\n if (!count || count <= 0 || !Number.isFinite(count)) return null;\n return count > max ? `${max}+` : String(Math.floor(count));\n}\n\n/** The control's accessible name: the label alone, or the label and the count's words (« Notifications, 3 new »). */\nexport function countName(label: string, count: number | undefined, countLabel?: string): string {\n if (!countText(count, Number.POSITIVE_INFINITY)) return label;\n return `${label}, ${countLabel ?? String(Math.floor(count!))}`;\n}\n"],"mappings":";AAKA,YAAY,WAAW;AACvB,SAAS,UAAU;AAiDf,mBACW,KADX;AA/CG,IAAM,YAAY,GAAG;AAAA,EAC1B,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA;AAAA,IAEP,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AACF,CAAC;AACD,IAAM,IAAI,UAAU;AAgCb,SAAS,UAAU,EAAE,MAAM,MAAM,MAAM,UAAU,eAAe,OAAO,QAAQ,UAAU,SAAS,UAAU,eAAe,SAAS,SAAS,WAAW,GAAG,MAAM,GAAmB;AACzL,QAAM,QACJ,iCACG;AAAA,YAAQ,oBAAC,UAAK,mBAAe,MAAC,WAAW,EAAE,KAAK,GAAI,gBAAK;AAAA,IAC1D,oBAAC,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AAG;AAAA,EAC/B,OAAO;AAAA,IACL,MACE;AAAA,IAGF,MAAM;AAAA,IACN,OACE;AAAA,EAEJ;AACF,CAAC;AACD,IAAMC,KAAI,eAAe;AAyBlB,SAAS,eAAe,EAAE,OAAO,MAAM,OAAO,YAAY,MAAM,IAAI,MAAM,QAAQ,SAAS,WAAW,MAAM,GAAG,MAAM,GAAwB;AAClJ,QAAM,OAAO,UAAU,OAAO,GAAG;AACjC,QAAM,SAAS;AAAA,IACb,GAAG;AAAA,IACH,cAAc,UAAU,OAAO,OAAO,UAAU;AAAA,IAChD,gBAAgB,UAAW,SAAmB;AAAA,IAC9C,eAAe,OAAO,KAAK;AAAA,IAC3B,WAAWA,GAAE,KAAK,EAAE,UAAU,CAAC;AAAA,EACjC;AACA,QAAM,WACJ,gBAAAF,MAAAF,WAAA,EACE;AAAA,oBAAAC,KAAC,UAAK,eAAW,MAAC,WAAWG,GAAE,KAAK,GAAI,gBAAK;AAAA,IAC5C,QAAQ,gBAAAH,KAAC,UAAK,eAAW,MAAC,cAAU,MAAC,WAAWG,GAAE,MAAM,GAAI,gBAAK;AAAA,KACpE;AAEF,MAAI,MAAM;AACR,UAAM,OAAO,UAAU;AACvB,WAAO,gBAAAH,KAAC,QAAK,MAAa,GAAG,QAAS,UAAS;AAAA,EACjD;AACA,SAAO,gBAAAA,KAAC,YAAO,MAAM,QAAQ,UAAW,GAAG,QAAS,UAAS;AAC/D;","names":["tv","Fragment","jsx","jsxs","tv","s"]}
1
+ {"version":3,"sources":["../src/app-header/app-header.tsx","../src/app-header/count.tsx","../src/app-header/count-text.ts"],"sourcesContent":["// Server-safe: no hook, no context. The family's top bar (#640): the product's NAME as text (the mark is the rail's), optional\n// chips, then the session's controls in a fixed order — search, language, the host's actions (a theme toggle), messages,\n// notifications, the primary action, the account. Every slot is the host's; a slot left empty draws nothing. Where the\n// rail is a bottom tab bar (a phone) it has no room for the mark, so the header shows it there and only there: exactly\n// one brand mark is visible at every width. At 360 px the name truncates first; the controls never clip.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const appHeader = tv({\n slots: {\n root: \"sticky top-0 z-30 flex h-14 w-full min-w-0 shrink-0 items-center gap-3 border-b border-border-subtle bg-surface-1 px-4 md:bg-surface-1 md:pl-3 md:pr-5\",\n // The rail's mark is 56 px tall and so is this bar: the word shares the mark's line, right after the rail.\n brand: \"flex min-w-0 items-center gap-2 font-display text-sm font-bold tracking-tight text-fg no-underline\",\n mark: \"inline-flex shrink-0 md:hidden\",\n name: \"truncate\",\n chips: \"flex shrink-0 items-center gap-2\",\n // The controls: one row at the right, in the order of the slots. They keep their size; the name gives way.\n actions: \"ml-auto flex shrink-0 items-center gap-1 sm:gap-2\",\n search: \"flex min-w-0 shrink-0\",\n },\n});\nconst s = appHeader();\n\nexport type AppHeaderProps = Omit<React.ComponentProps<\"header\">, \"children\"> & {\n /** The product's name, as text (`Sovkora`): the only brand element on a desktop. */\n name: string;\n /** The product's mark (`<ProductLogo id=\"sovkora\" size={22} />`): shown below `md` only, where the rail (which carries it) is a bottom bar. */\n mark?: React.ReactNode;\n /** Makes the name (and the mark) a link home: pass your router's link as `homeLink` or give a `href`. */\n href?: string;\n /** Your router's link element for the home link; it receives the name and the mark as children. */\n homeLink?: React.ReactElement<{ className?: string; children?: React.ReactNode }>;\n /** Classes added to the home link (from `href` or `homeLink`), e.g. a 44 px floor; the header fills the link itself. */\n homeClassName?: string;\n /** Status chips beside the name (`Badge`): « Local · Sovereign », « Dev », a version. */\n chips?: React.ReactNode;\n /** The search trigger, first of the controls: `AppHeaderSearch` (`@krizaka/ui/app-header/search`) — a field from `md`, an icon below, ⌘K. */\n search?: React.ReactNode;\n /** The language: `LanguageSwitch` (`@krizaka/ui/language-switch`) — a globe and « FR », labelled. */\n language?: React.ReactNode;\n /** The host's own controls, after the language (a theme toggle). Alone, it is the whole right side, as before. */\n actions?: React.ReactNode;\n /** Messages: an `AppHeaderCount` (an icon button or link with its unread count). Empty: hidden. */\n messages?: React.ReactNode;\n /** Notifications: an `AppHeaderCount` (or the trigger of the host's popover). Empty: hidden. */\n notifications?: React.ReactNode;\n /** The one primary action of the app (« New check », #588), before the account. */\n primary?: React.ReactNode;\n /** The account, last: `AccountMenu` with `showName` (the name from `sm`), or the visitor's Sign in. */\n account?: React.ReactNode;\n};\n\n/** The app's top bar: the name next to the rail, the mark on a phone, chips, then search · language · actions · messages · notifications · primary · account. */\nexport function AppHeader({ name, mark, href, homeLink, homeClassName, chips, search, language, actions, messages, notifications, primary, account, className, ...props }: Readonly<AppHeaderProps>) {\n const brand = (\n <>\n {mark && <span data-brand-mark className={s.mark()}>{mark}</span>}\n <span className={s.name()}>{name}</span>\n </>\n );\n const hasControls = [search, language, actions, messages, notifications, primary, account].some(Boolean);\n return (\n <header className={s.root({ className })} {...props}>\n {homeLink ? (\n React.cloneElement(homeLink, { className: s.brand({ className: [homeLink.props.className, homeClassName] }) }, brand)\n ) : href ? (\n <a href={href} className={s.brand({ className: homeClassName })}>{brand}</a>\n ) : (\n <div className={s.brand()}>{brand}</div>\n )}\n {chips && <div className={s.chips()}>{chips}</div>}\n {/* The order is the family's, not the host's: the same bar in every product. */}\n {hasControls && (\n <div className={s.actions()}>\n {search && <div data-slot=\"search\" className={s.search()}>{search}</div>}\n {language}\n {actions}\n {messages}\n {notifications}\n {primary}\n {account}\n </div>\n )}\n </header>\n );\n}\n","// Server-safe: no hook. An icon control of the top bar with an unread count — messages, notifications. A link (`href`, your\n// router's `linkAs`) or a button (the trigger of the host's popover, through `asChild` of Radix: its props and ref are\n// spread here). The count is drawn as a small badge and said in the name: « Notifications, 3 new ».\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { countName, countText } from \"./count-text\";\n\nexport const appHeaderCount = tv({\n slots: {\n root:\n \"relative inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-fg-secondary no-underline transition-colors \" +\n \"hover:bg-surface-2 hover:text-fg aria-expanded:bg-surface-2 aria-expanded:text-fg aria-[current=page]:bg-surface-2 aria-[current=page]:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none\",\n icon: \"inline-flex h-5 w-5 items-center justify-center [&>svg]:h-5 [&>svg]:w-5\",\n count:\n \"pointer-events-none absolute -right-0.5 -top-0.5 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-accent px-1 \" +\n \"font-mono text-[10px] font-bold leading-none tabular-nums text-on-accent ring-2 ring-surface-1\",\n },\n});\nconst s = appHeaderCount();\n\nexport type AppHeaderCountProps = Omit<React.ComponentProps<\"button\">, \"children\"> & {\n /** What it is (« Notifications », « Messages ») — passed translated; its accessible name, with the count. */\n label: string;\n /** The icon (`<NotificationIcon />` of @krizaka/icons): decorative, the name is `label`. */\n icon: React.ReactNode;\n /** The unread count; 0 or absent draws no badge. */\n count?: number;\n /** The count in words, said after the label (« 3 new », « 3 nouvelles ») — passed translated, with its plural. Default: the number. */\n countLabel?: string;\n /**\n * Above it the badge shows `max+`.\n * @default 99\n */\n max?: number;\n /** A link to the page (`/notifications`) instead of a button. */\n href?: string;\n /** Your router's link (Next's `Link`) for `href`; an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The page is the one it leads to (`aria-current=\"page\"`). */\n current?: boolean;\n};\n\n/** An icon button or link of the top bar with an unread count, the count announced in its name. */\nexport function AppHeaderCount({ label, icon, count, countLabel, max = 99, href, linkAs, current, className, type, ...props }: Readonly<AppHeaderCountProps>) {\n const text = countText(count, max);\n const shared = {\n ...props,\n \"aria-label\": countName(label, count, countLabel),\n \"aria-current\": current ? (\"page\" as const) : undefined,\n \"data-unread\": text ? \"\" : undefined,\n className: s.root({ className }),\n };\n const children = (\n <>\n <span aria-hidden className={s.icon()}>{icon}</span>\n {text && <span aria-hidden data-count className={s.count()}>{text}</span>}\n </>\n );\n if (href) {\n const Link = linkAs ?? \"a\";\n return <Link href={href} {...shared}>{children}</Link>;\n }\n return <button type={type ?? \"button\"} {...shared}>{children}</button>;\n}\n","// Pure, no import: shared by the web's AppHeaderCount and the native one (src/native/app-header.tsx).\n\n/** What the badge shows: the count, or `max+` above `max`; nothing at 0. */\nexport function countText(count: number | undefined, max = 99): string | null {\n if (!count || count <= 0 || !Number.isFinite(count)) return null;\n return count > max ? `${max}+` : String(Math.floor(count));\n}\n\n/** The control's accessible name: the label alone, or the label and the count's words (« Notifications, 3 new »). */\nexport function countName(label: string, count: number | undefined, countLabel?: string): string {\n if (!countText(count, Number.POSITIVE_INFINITY)) return label;\n return `${label}, ${countLabel ?? String(Math.floor(count!))}`;\n}\n"],"mappings":";AAKA,YAAY,WAAW;AACvB,SAAS,UAAU;AAiDf,mBACW,KADX;AA/CG,IAAM,YAAY,GAAG;AAAA,EAC1B,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA;AAAA,IAEP,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AACF,CAAC;AACD,IAAM,IAAI,UAAU;AAgCb,SAAS,UAAU,EAAE,MAAM,MAAM,MAAM,UAAU,eAAe,OAAO,QAAQ,UAAU,SAAS,UAAU,eAAe,SAAS,SAAS,WAAW,GAAG,MAAM,GAA6B;AACnM,QAAM,QACJ,iCACG;AAAA,YAAQ,oBAAC,UAAK,mBAAe,MAAC,WAAW,EAAE,KAAK,GAAI,gBAAK;AAAA,IAC1D,oBAAC,UAAK,WAAW,EAAE,KAAK,GAAI,gBAAK;AAAA,KACnC;AAEF,QAAM,cAAc,CAAC,QAAQ,UAAU,SAAS,UAAU,eAAe,SAAS,OAAO,EAAE,KAAK,OAAO;AACvG,SACE,qBAAC,YAAO,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAC3C;AAAA,eACO,mBAAa,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,CAAC,SAAS,MAAM,WAAW,aAAa,EAAE,CAAC,EAAE,GAAG,KAAK,IA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AAO,UAAU;AAAA,IAChD,gBAAgB,UAAW,SAAmB;AAAA,IAC9C,eAAe,OAAO,KAAK;AAAA,IAC3B,WAAWA,GAAE,KAAK,EAAE,UAAU,CAAC;AAAA,EACjC;AACA,QAAM,WACJ,gBAAAF,MAAAF,WAAA,EACE;AAAA,oBAAAC,KAAC,UAAK,eAAW,MAAC,WAAWG,GAAE,KAAK,GAAI,gBAAK;AAAA,IAC5C,QAAQ,gBAAAH,KAAC,UAAK,eAAW,MAAC,cAAU,MAAC,WAAWG,GAAE,MAAM,GAAI,gBAAK;AAAA,KACpE;AAEF,MAAI,MAAM;AACR,UAAM,OAAO,UAAU;AACvB,WAAO,gBAAAH,KAAC,QAAK,MAAa,GAAG,QAAS,UAAS;AAAA,EACjD;AACA,SAAO,gBAAAA,KAAC,YAAO,MAAM,QAAQ,UAAW,GAAG,QAAS,UAAS;AAC/D;","names":["tv","Fragment","jsx","jsxs","tv","s"]}
@@ -187,7 +187,7 @@ type AppShellRootProps = React.ComponentProps<"div"> & {
187
187
  desktop?: boolean;
188
188
  };
189
189
  /** The shell: holds the collapse (desktop) and the drawer (phone) state. Children: Sidebar, then Body. */
190
- declare function AppShellRoot({ defaultCollapsed, collapsed: controlled, onCollapsedChange, skipLabel, collapseShortcut, desktop, className, children, ...props }: AppShellRootProps): React.JSX.Element;
190
+ declare function AppShellRoot({ defaultCollapsed, collapsed: controlled, onCollapsedChange, skipLabel, collapseShortcut, desktop, className, children, ...props }: Readonly<AppShellRootProps>): React.JSX.Element;
191
191
  type AppShellSidebarProps = Omit<React.ComponentProps<"nav">, "children"> & {
192
192
  /** The navigation's accessible name (`Studio`, `Administration`). */
193
193
  label: string;
@@ -203,13 +203,13 @@ type AppShellSidebarProps = Omit<React.ComponentProps<"nav">, "children"> & {
203
203
  closeLabel: string;
204
204
  };
205
205
  /** The sidebar: on a desktop a column that collapses to its icons; on a phone the same content in a drawer. */
206
- declare function AppShellSidebar({ label, brand, children, footer, collapseLabels, closeLabel, className, ...props }: AppShellSidebarProps): React.JSX.Element;
206
+ declare function AppShellSidebar({ label, brand, children, footer, collapseLabels, closeLabel, className, ...props }: Readonly<AppShellSidebarProps>): React.JSX.Element;
207
207
  type AppShellGroupProps = React.ComponentProps<"p"> & {
208
208
  /** The group's name, above its items (hidden when the sidebar is collapsed). */
209
209
  children: React.ReactNode;
210
210
  };
211
211
  /** A heading between groups of items. */
212
- declare function AppShellGroup({ className, ...props }: AppShellGroupProps): React.JSX.Element;
212
+ declare function AppShellGroup({ className, ...props }: Readonly<AppShellGroupProps>): React.JSX.Element;
213
213
  type AppShellItemProps = Omit<React.ComponentProps<"a">, "children"> & {
214
214
  /** The item's icon (a signature icon): it stays when the sidebar collapses. */
215
215
  icon?: React.ReactNode;
@@ -230,9 +230,9 @@ type AppShellItemProps = Omit<React.ComponentProps<"a">, "children"> & {
230
230
  children?: React.ReactElement;
231
231
  };
232
232
  /** A destination of the sidebar: icon, words, a count. */
233
- declare function AppShellItem({ icon, label, current, badge, shortcut, asChild, children, className, ...props }: AppShellItemProps): React.JSX.Element;
233
+ declare function AppShellItem({ icon, label, current, badge, shortcut, asChild, children, className, ...props }: Readonly<AppShellItemProps>): React.JSX.Element;
234
234
  /** The column right of the sidebar: Header, then Main. */
235
- declare function AppShellBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
235
+ declare function AppShellBody({ className, ...props }: Readonly<React.ComponentProps<"div">>): React.JSX.Element;
236
236
  type AppShellHeaderProps = Omit<React.ComponentProps<"header">, "title"> & {
237
237
  /** The screen's title (an `h1`). */
238
238
  title?: React.ReactNode;
@@ -242,7 +242,7 @@ type AppShellHeaderProps = Omit<React.ComponentProps<"header">, "title"> & {
242
242
  actions?: React.ReactNode;
243
243
  };
244
244
  /** The top of the screen: the drawer's button (phone), the title, the actions. Sticky. */
245
- declare function AppShellHeader({ title, menuLabel, actions, className, children, ...props }: AppShellHeaderProps): React.JSX.Element;
245
+ declare function AppShellHeader({ title, menuLabel, actions, className, children, ...props }: Readonly<AppShellHeaderProps>): React.JSX.Element;
246
246
  type AppShellSearchProps = Omit<React.ComponentProps<"button">, "children" | "onClick"> & {
247
247
  /** The words ("Search", "Search creators"): the accessible name, shown beside the keys on a desktop. */
248
248
  label: string;
@@ -255,9 +255,9 @@ type AppShellSearchProps = Omit<React.ComponentProps<"button">, "children" | "on
255
255
  shortcut?: string;
256
256
  };
257
257
  /** The header's search: a button that looks like a field (a magnifier, its words, ⌘K) and opens the app's command palette. */
258
- declare function AppShellSearch({ label, onOpen, shortcut, className, ...props }: AppShellSearchProps): React.JSX.Element;
258
+ declare function AppShellSearch({ label, onOpen, shortcut, className, ...props }: Readonly<AppShellSearchProps>): React.JSX.Element;
259
259
  /** The screen's content. */
260
- declare function AppShellMain({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
260
+ declare function AppShellMain({ className, ...props }: Readonly<React.ComponentProps<"main">>): React.JSX.Element;
261
261
  declare const AppShell: {
262
262
  Root: typeof AppShellRoot;
263
263
  Sidebar: typeof AppShellSidebar;
package/dist/app-shell.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import {
3
3
  SkipLink
4
- } from "./chunk-4QH6CP2Y.js";
4
+ } from "./chunk-BRYRZWLV.js";
5
5
  import {
6
6
  Kbd
7
- } from "./chunk-KID32IRJ.js";
7
+ } from "./chunk-MXHJMTZ5.js";
8
8
  import {
9
9
  useLatest
10
10
  } from "./chunk-2YBG4ZCY.js";
@@ -12,10 +12,10 @@ import {
12
12
  ChevronGlyph,
13
13
  CloseGlyph,
14
14
  SearchGlyph
15
- } from "./chunk-S2O4NSN5.js";
15
+ } from "./chunk-3TCHVNNB.js";
16
16
  import {
17
17
  cn
18
- } from "./chunk-NSLXEDIS.js";
18
+ } from "./chunk-HHBTM4AU.js";
19
19
 
20
20
  // src/app-shell/app-shell.tsx
21
21
  import { Dialog as DialogPrimitive, Slot } from "radix-ui";