@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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/code-block/code-block.tsx","../src/tabs/tabs.tsx","../src/sliding-indicator.ts","../src/code-block/tokens.tsx","../src/code-block/highlighter.ts"],"sourcesContent":["// Client (the copy button, the tabs). A sample of code (blocks.css): its language and its file name, the code\n// highlighted by TanStack Highlight (it scrolls sideways, never shrinks, and takes the keyboard's focus to scroll),\n// lines numbered or set apart (highlighted, added, removed, in focus), a copy button that says it copied in a polite\n// live region. CodeTabs puts several ways to write the same thing (Maven · Gradle · npm) under\n// the tabs of @krizaka/ui.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph, CopyGlyph } from \"../glyphs\";\nimport { TabsContent, TabsList, TabsRoot, TabsTrigger } from \"../tabs/tabs\";\nimport { type CodeAnnotation, highlight } from \"./tokens\";\n\nexport type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The code, as it is copied. */\n code: string;\n /**\n * Its language, shown as a tag and used by the highlighter: `ts`, `tsx`, `js`, `jsx`, `json`, `yaml`, `bash`, `html`\n * (`xml`), `css`, `java`, `kotlin`, `diff`, `properties`. Another one is shown as plain text.\n */\n language?: string;\n /** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */\n file?: React.ReactNode;\n /** The copy button's words, passed translated. Without them there is no copy button (a sample inside a text, say). */\n copyLabel?: string;\n /** What the button says once the code is copied (announced politely). */\n copiedLabel?: string;\n /**\n * Colours comments, strings, keywords, types, tags and numbers (the tokens' roles).\n * @default true\n */\n highlight?: boolean;\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: `highlight`, `added`, `removed`, `error`, `warning`, `dim`, or `focus` (all the others are dimmed). */\n annotations?: readonly CodeAnnotation[];\n /** Called after the code is copied. */\n onCopy?: () => void;\n};\n\n/** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */\nexport function CodeBlock({ code, language = \"text\", file, copyLabel, copiedLabel, highlight: colour = true, lineNumbers, annotations, onCopy, className, ...props }: CodeBlockProps) {\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1800);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = () =>\n navigator.clipboard?.writeText(code).then(() => {\n setCopied(true);\n onCopy?.();\n });\n return (\n <figure className={cn(\"kz-code\", className)} {...props}>\n {file || language !== \"text\" || copyLabel ? (\n <figcaption className=\"kz-code-bar\">\n <span className=\"kz-code-file\">\n {language !== \"text\" && <span className=\"kz-code-lang\">{language}</span>}\n {file}\n </span>\n {copyLabel ? (\n <button type=\"button\" className=\"kz-code-copy\" onClick={copy} data-copied={copied ? \"\" : undefined}>\n {copied ? <CheckGlyph className=\"h-3.5 w-3.5\" /> : <CopyGlyph className=\"h-3.5 w-3.5\" />}\n <span aria-live=\"polite\">{copied ? (copiedLabel ?? copyLabel) : copyLabel}</span>\n </button>\n ) : null}\n </figcaption>\n ) : null}\n <pre tabIndex={0} className={lineNumbers ? \"th-code--line-numbers\" : undefined} data-focus={annotations?.some((a) => a.kind === \"focus\") ? \"\" : undefined}>\n <code data-language={language}>{colour ? highlight(code, language, { lineNumbers, annotations }) : code}</code>\n </pre>\n </figure>\n );\n}\n\nexport type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"dir\" | \"defaultValue\"> & {\n /** What the tabs choose between (`Build tool`): the tab list's accessible name. */\n label: string;\n /** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */\n tabs: readonly { id: string; label: React.ReactNode; content: React.ReactNode }[];\n /** The tab open at first. Defaults to the first one. */\n defaultValue?: string;\n};\n\n/** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */\nexport function CodeTabs({ label, tabs, defaultValue, className, ...props }: CodeTabsProps) {\n return (\n <TabsRoot defaultValue={defaultValue ?? tabs[0]?.id} variant=\"segmented\" className={cn(\"kz-code-tabs\", className)} {...props}>\n <TabsList aria-label={label}>\n {tabs.map((t) => (\n <TabsTrigger key={t.id} value={t.id}>\n {t.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.id} value={t.id}>\n {t.content}\n </TabsContent>\n ))}\n </TabsRoot>\n );\n}\n","// Client (a context). Radix Tabs does the roles (tablist, tab, tabpanel), the aria-selected / aria-controls wiring,\n// the roving focus (arrows, Home, End) and automatic activation: this file only holds the three looks.\nimport { Slot, Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { useRouteBinding } from \"../router\";\nimport { useSlidingIndicator } from \"../sliding-indicator\";\n\nexport const tabs = tv({\n slots: {\n root: \"flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row\",\n // One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed\n // (server render), each trigger carries its own active style.\n list:\n \"group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col \" +\n \"before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 \" +\n \"motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100\",\n trigger:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40\",\n content: \"kz-tabs-panel min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring data-[state=inactive]:hidden\",\n },\n variants: {\n variant: {\n /* The section of a page: a line under the list, the active tab underlined in the accent. */\n underline: {\n list:\n \"gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-sm before:bg-accent \" +\n \"data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 \" +\n \"data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) \" +\n \"data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 \" +\n \"data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)\",\n trigger:\n \"relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg \" +\n \"after:absolute after:rounded-sm after:bg-transparent data-[state=active]:after:bg-accent \" +\n \"data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 \" +\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent\",\n },\n /* A view switch: equal segments in a track, the active one filled. */\n segmented: {\n list:\n \"inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm\",\n trigger:\n \"min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg \" +\n \"data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent \" +\n \"transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none\",\n },\n /* Pills that scroll sideways on a phone: a feed's sections. */\n pills: {\n list:\n \"gap-1.5 overflow-x-auto overflow-y-hidden overscroll-x-contain pt-1 -mt-1 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) \" +\n \"before:rounded-sm before:border before:border-accent before:bg-accent-soft\",\n trigger:\n \"h-9 rounded-sm border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent\",\n },\n /*\n * Binder dividers (intercalaires, #648): organise collections, tags and statuses. Each tab is a divider with a\n * coloured top edge (`hue`), its words and a count; the active one is the page's colour and joins the content\n * under the list's line. Too many dividers scroll sideways, the edges fading. No paper texture: organisation only.\n */\n binder: {\n list:\n \"items-end gap-1 overflow-x-auto overflow-y-hidden overscroll-x-contain border-b border-border-default px-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"[mask-image:linear-gradient(to_right,transparent,black_12px,black_calc(100%-12px),transparent)]\",\n trigger:\n \"relative -mb-px min-h-10 rounded-t-lg border border-b-0 border-border-default bg-surface-2 px-3.5 pb-2 pt-2.5 text-sm text-fg-secondary \" +\n \"before:absolute before:inset-x-0 before:-top-px before:h-1 before:rounded-t-lg before:bg-(--kz-hue,var(--kz-accent)) \" +\n \"hover:bg-surface-3 hover:text-fg data-[state=active]:z-[1] data-[state=active]:bg-surface-1 data-[state=active]:pb-2.5 data-[state=active]:text-fg \" +\n \"data-[state=active]:shadow-[0_1px_0_0_var(--kz-surface-1)] motion-reduce:transition-none\",\n },\n },\n },\n defaultVariants: { variant: \"underline\" },\n});\n\n/**\n * A divider's colour (`variant=\"binder\"`): the brand's accent by default, or a role of the theme — every one reads at 3:1 or\n * more on both themes. The colour is never the only signal: the words and the count say it.\n */\nexport type TabsHue = \"accent\" | \"success\" | \"warning\" | \"danger\" | \"neutral\";\n// The text roles where the fill role is too light on a light page (success, warning: 2:1): every edge reaches 3:1, tested.\nconst HUE: Record<TabsHue, string> = {\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success-text)\",\n warning: \"var(--kz-warning-text)\",\n danger: \"var(--kz-danger-text)\",\n neutral: \"var(--kz-text-muted)\",\n};\n/** The style that paints a divider's edge (`--kz-hue`), merged with the host's. */\nconst hueStyle = (hue: TabsHue | undefined, style: React.CSSProperties | undefined) =>\n hue ? { ...style, [\"--kz-hue\" as string]: HUE[hue] } : style;\n\n/** The count after a tab's words: part of its name (« Clients 12 »), muted, tabular. */\nfunction TabCount({ count }: Readonly<{ count: number | undefined }>) {\n if (count === undefined) return null;\n return <span data-tab-count=\"\" className=\"font-mono text-xs font-medium tabular-nums text-fg-secondary\">{count}</span>;\n}\n\n/** « + Intercalaire »: a button after the dividers (outside the tab list: a tablist holds only tabs). */\nfunction AddButton({ add }: Readonly<{ add: TabsAdd }>) {\n return (\n <button\n type=\"button\"\n onClick={add.onAdd}\n className=\"mb-1 ml-1 inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-lg px-2.5 text-sm font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden focusable=\"false\">\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n {add.label}\n </button>\n );\n}\n\nexport type TabsAdd = {\n /** Its words (« Intercalaire », « New tag ») — passed translated. */\n label: string;\n /** Adds a divider (opens the host's form). */\n onAdd: () => void;\n};\n\nexport type TabsVariants = VariantProps<typeof tabs>;\ntype Variant = NonNullable<TabsVariants[\"variant\"]>;\n\nconst VariantContext = React.createContext<Variant>(\"underline\");\n\nexport type TabsRootProps = React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections) · binder (dividers that organise collections, tags, statuses). */\n variant?: TabsVariants[\"variant\"];\n /** Binds the active tab to this search parameter of the URL (`?tab=…`): the URL is the state. Without it the state is local — only for an ephemeral choice. */\n routeKey?: string;\n /** The values the parameter may hold (the tabs' `value`s); the first is the default unless `defaultValue` says otherwise. */\n routeValues?: readonly string[];\n};\n\n/** `value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list. */\nexport function TabsRoot({ variant = \"underline\", className, routeKey, routeValues, ...rest }: TabsRootProps) {\n const props = useRouteBinding(routeKey, routeValues, rest);\n return (\n <VariantContext.Provider value={variant}>\n <TabsPrimitive.Root data-variant={variant} className={tabs({ variant }).root({ className })} {...props} />\n </VariantContext.Provider>\n );\n}\n\nexport type TabsListProps = React.ComponentProps<typeof TabsPrimitive.List> & {\n /** A « + » button after the tabs (`variant=\"binder\"`: « + Intercalaire »): its words and what it does. */\n add?: TabsAdd;\n};\n\n/** The tabs. Name it (`aria-label`) when no heading says what it switches. One light glides to the active tab. */\nexport function TabsList({ className, add, ...props }: TabsListProps) {\n const variant = React.useContext(VariantContext);\n const { ref } = useSlidingIndicator<HTMLDivElement>({ item: \"[role=tab]\", active: \"[role=tab][data-state=active]\" });\n const list = <TabsPrimitive.List ref={ref} data-variant={variant} className={tabs({ variant }).list({ className: cn(add && \"min-w-0 flex-1 border-b-0\", className) })} {...props} />;\n if (!add) return list;\n return (\n <div data-tabs-row=\"\" className={cn(\"flex min-w-0 items-end\", variant === \"binder\" && \"border-b border-border-default\")}>\n {list}\n <AddButton add={add} />\n </div>\n );\n}\n\nexport type TabsTriggerProps = React.ComponentProps<typeof TabsPrimitive.Trigger> & {\n /** A count after the words (clients in a collection, unread): part of the tab's name. */\n count?: number;\n /** `variant=\"binder\"`: the divider's colour (the accent by default). */\n hue?: TabsHue;\n};\n\nexport function TabsTrigger({ className, count, hue, style, children, ...props }: TabsTriggerProps) {\n const variant = React.useContext(VariantContext);\n return (\n <TabsPrimitive.Trigger className={tabs({ variant }).trigger({ className })} style={hueStyle(hue, style)} data-hue={hue} {...props}>\n {children}\n <TabCount count={count} />\n </TabsPrimitive.Trigger>\n );\n}\n\nexport function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content className={tabs().content({ className })} {...props} />;\n}\n\n// ── Route mode: tabs that are links; the URL is the state (Oussama, 2026-10-22) ──────────────────────────────────────\n\n/**\n * Is the link `href` the tab of the route `current` (a path, with its search: `/docs/api?tab=x`)? The path must equal the\n * link's (a trailing slash, a locale-free comparison and the hash do not count); with `exact` false (the default) a deeper\n * path of the same section counts too (`/docs/api/x` is in `/docs/api`); every search parameter of the link must be in\n * `current`. The hub link (`/`) is only ever active on `/` itself.\n */\nexport function isTabActive(current: string, href: string, exact = false): boolean {\n const split = (value: string) => {\n const url = new URL(value.split(\"#\")[0]!, \"https://tabs.invalid\");\n return { path: url.pathname.replace(/\\/+$/, \"\") || \"/\", search: url.searchParams };\n };\n const here = split(current);\n const target = split(href);\n const samePath = here.path === target.path;\n const deeper = !exact && target.path !== \"/\" && here.path.startsWith(`${target.path}/`);\n if (!samePath && !deeper) return false;\n for (const [key, value] of target.search) if (here.search.get(key) !== value) return false;\n return true;\n}\n\ninterface NavState {\n current: string;\n variant: Variant;\n}\nconst NavContext = React.createContext<NavState | null>(null);\n\nexport type TabsNavProps = Omit<React.ComponentProps<\"nav\">, \"children\"> & {\n /** A « + » button after the tabs (`variant=\"binder\"`: « + Intercalaire »). */\n add?: TabsAdd;\n /** The navigation's accessible name (« Sections »). */\n label: string;\n /** The current route, passed in: the path with its search (`usePathname()` + `useSearchParams()`, `/docs?tab=api`). The active tab comes from it; no local state. */\n current: string;\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections) · binder (dividers). */\n variant?: TabsVariants[\"variant\"];\n /** The tabs: `Tabs.NavLink`. */\n children: React.ReactNode;\n};\n\n/**\n * Tabs as routes: a `nav` of links, the URL is the state. Per WAI-ARIA these are links, not a tablist: each tab is an\n * anchor, the active one carries `aria-current=\"page\"`, the keyboard is the page's own (Tab walks the links, Enter\n * follows one) and there is no panel — the page is the panel. The same looks and the same gliding light as `Tabs.List`.\n */\nexport function TabsNav({ label, current, variant = \"underline\", add, className, children, ...props }: TabsNavProps) {\n const { ref } = useSlidingIndicator<HTMLElement>({ item: \"[data-tabs-link]\", active: \"[data-tabs-link][data-state=active]\" });\n const value = React.useMemo(() => ({ current, variant }), [current, variant]);\n const nav = (\n <nav ref={ref} aria-label={label} data-variant={variant} data-orientation=\"horizontal\" className={tabs({ variant }).list({ className: cn(add && \"min-w-0 flex-1 border-b-0\", className) })} {...props}>\n {children}\n </nav>\n );\n return (\n <NavContext.Provider value={value}>\n {add ? (\n <div data-tabs-row=\"\" className={cn(\"flex min-w-0 items-end\", variant === \"binder\" && \"border-b border-border-default\")}>\n {nav}\n <AddButton add={add} />\n </div>\n ) : (\n nav\n )}\n </NavContext.Provider>\n );\n}\n\nexport type TabsNavLinkProps = React.ComponentProps<\"a\"> & {\n /** Where the tab goes (`/docs/api`, `/docs?tab=api`). */\n href: string;\n /** Match this path only, not the pages below it. */\n exact?: boolean;\n /** Renders your router's `<Link>` (pass it as the only child; the `href` goes on this part and on the link). */\n asChild?: boolean;\n /** A count after the words (not with `asChild`: put it in your link). */\n count?: number;\n /** `variant=\"binder\"`: the divider's colour (the accent by default). */\n hue?: TabsHue;\n};\n\n/** One tab of `Tabs.Nav`: an anchor that is active when the current route is its `href`. */\nexport function TabsNavLink({ href, exact, asChild, count, hue, style, className, children, ...props }: TabsNavLinkProps) {\n const ctx = React.useContext(NavContext);\n if (!ctx) throw new Error(\"Tabs.NavLink must be inside <Tabs.Nav>\");\n const active = isTabActive(ctx.current, href, exact);\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-tabs-link=\"\"\n data-state={active ? \"active\" : \"inactive\"}\n data-orientation=\"horizontal\"\n aria-current={active ? \"page\" : undefined}\n {...(asChild ? {} : { href })}\n data-hue={hue}\n style={hueStyle(hue, style)}\n className={cn(tabs({ variant: ctx.variant }).trigger(), \"no-underline\", className)}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <TabCount count={count} />\n </>\n )}\n </Comp>\n );\n}\n\n/** `Tabs.Root/List/Trigger/Content` — `variant` underline · segmented · pills · binder on the root. `Tabs.Nav` + `Tabs.NavLink`: the same tabs as routes. */\nexport const Tabs = { Root: TabsRoot, List: TabsList, Trigger: TabsTrigger, Content: TabsContent, Nav: TabsNav, NavLink: TabsNavLink };\n","// The shared sliding indicator (NavBar, Tabs): one element that glides from item to item instead of each item lighting\n// up on its own. It writes the target's box as CSS variables on the list (`--kz-ind-x/y/w/h`) and `data-indicator=\"on\"`\n// — no re-render, no animation frame: the glide is a CSS transition (none under reduced motion). Before hydration the\n// items keep their own active style, so nothing flashes.\nimport * as React from \"react\";\n\nconst useIsoLayoutEffect = typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\n/**\n * `item`: the selector of an item; `active`: of the current one, where the light rests; `prefer`: an item that, when\n * present, holds the light before the current one (the NavBar's open menu); `follow`: the light follows the pointer\n * and the focus — over anything that is not an item (an open menu's panel) it goes back to rest.\n */\nexport function useSlidingIndicator<T extends HTMLElement>({ item, active, prefer, follow = false }: { item: string; active: string; prefer?: string; follow?: boolean }) {\n const ref = React.useRef<T>(null);\n const place = React.useCallback((target: Element | null) => {\n const list = ref.current;\n if (!list) return;\n if (!(target instanceof HTMLElement) || !list.contains(target)) {\n list.removeAttribute(\"data-indicator\");\n return;\n }\n const a = target.getBoundingClientRect();\n const b = list.getBoundingClientRect();\n list.style.setProperty(\"--kz-ind-x\", `${a.left - b.left + list.scrollLeft}px`);\n list.style.setProperty(\"--kz-ind-y\", `${a.top - b.top + list.scrollTop}px`);\n list.style.setProperty(\"--kz-ind-w\", `${a.width}px`);\n list.style.setProperty(\"--kz-ind-h\", `${a.height}px`);\n list.setAttribute(\"data-indicator\", \"on\");\n }, []);\n const rest = React.useCallback(\n () => {\n const list = ref.current;\n // An item re-rendered under a resting pointer (a menu closing) keeps the light the pointer gave it.\n const hovered = follow ? list?.querySelector(`${item}:hover`) : null;\n place((prefer ? list?.querySelector(prefer) : null) ?? hovered ?? list?.querySelector(active) ?? null);\n },\n [place, active, prefer, item, follow],\n );\n const follow_ = React.useCallback((target: EventTarget) => {\n const hit = target instanceof Element ? target.closest(item) : null;\n if (hit && ref.current?.contains(hit)) place(hit);\n else rest();\n }, [item, place, rest]);\n\n useIsoLayoutEffect(() => {\n const list = ref.current;\n if (!list) return;\n rest();\n const resize = new ResizeObserver(rest);\n resize.observe(list);\n const changes = new MutationObserver(rest);\n changes.observe(list, { subtree: true, attributes: true, attributeFilter: [\"data-state\", \"aria-current\", \"data-active\"] });\n return () => {\n resize.disconnect();\n changes.disconnect();\n };\n }, [rest]);\n\n const handlers = follow\n ? {\n onPointerOver: (e: React.PointerEvent) => follow_(e.target),\n onPointerLeave: rest,\n onFocus: (e: React.FocusEvent) => follow_(e.target),\n onBlur: rest,\n }\n : {};\n return { ref, handlers };\n}\n","// Code → React nodes, from TanStack Highlight's tokens: spans with the `th-*` classes that blocks.css paints with the\n// tokens' text roles (≥ 4.5:1 on the code surface, both themes). No raw HTML: the nodes are elements and text.\nimport { type HighlightDecoration, type HighlightRenderNode, renderTokens } from \"@tanstack/highlight/core\";\nimport * as React from \"react\";\n\nimport { codeHighlighter } from \"./highlighter\";\n\n/** What an annotation says about its lines. */\nexport type AnnotationKind = \"highlight\" | \"added\" | \"removed\" | \"focus\" | \"dim\" | \"error\" | \"warning\";\n\n/** Lines of a sample set apart: one line (`3`) or a range (`[3, 5]`), counted from 1. */\nexport type CodeAnnotation = {\n lines: number | readonly [number, number];\n kind: AnnotationKind;\n};\n\nexport type HighlightOptions = {\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: highlighted, added, removed, in focus (the others are dimmed), dimmed, error, warning. */\n annotations?: readonly CodeAnnotation[];\n};\n\nconst toReact = (node: HighlightRenderNode, key: number): React.ReactNode => {\n if (node.type === \"text\") return node.value;\n const data = Object.fromEntries(Object.entries(node.data ?? {}).map(([name, value]) => [`data-${name}`, value]));\n return React.createElement(\"span\", { key, className: node.classNames.join(\" \"), ...data }, node.children.map(toReact));\n};\n\n/** Splits `code` into text and coloured spans (`th-keyword`, `th-string`…), and into lines when numbered or annotated. */\nexport function highlight(code: string, language = \"text\", { lineNumbers, annotations }: HighlightOptions = {}): React.ReactNode[] {\n const { tokens } = codeHighlighter.tokenize(code, { lang: language });\n const decorations: HighlightDecoration[] = (annotations ?? []).map(({ lines, kind }) => ({ lines, className: `kz-line kz-line-${kind}`, data: { kind } }));\n return renderTokens(tokens, { lineNumbers, decorations }).map(toReact);\n}\n\n/** The language a sample is tokenized in (`bash` → `shell`, `xml` → `html`, unknown → `plaintext`). */\nexport function normalizeCodeLanguage(language?: string): string {\n return codeHighlighter.normalizeLanguage(language);\n}\n","// The highlighter of every code sample: TanStack Highlight (a deterministic, synchronous tokenizer — the same markup on\n// the server and on the client) with the grammars a Krizaka page shows. Each grammar is registered by hand: nothing\n// else is bundled. An unknown language is plain text, never an error.\nimport { createHighlighter } from \"@tanstack/highlight/core\";\nimport { css } from \"@tanstack/highlight/languages/css\";\nimport { diff } from \"@tanstack/highlight/languages/diff\";\nimport { env } from \"@tanstack/highlight/languages/env\";\nimport { html } from \"@tanstack/highlight/languages/html\";\nimport { java } from \"@tanstack/highlight/languages/java\";\nimport { js } from \"@tanstack/highlight/languages/js\";\nimport { json } from \"@tanstack/highlight/languages/json\";\nimport { jsx } from \"@tanstack/highlight/languages/jsx\";\nimport { kotlin } from \"@tanstack/highlight/languages/kotlin\";\nimport { plaintext } from \"@tanstack/highlight/languages/plaintext\";\nimport { shell } from \"@tanstack/highlight/languages/shell\";\nimport { ts } from \"@tanstack/highlight/languages/ts\";\nimport { tsx } from \"@tanstack/highlight/languages/tsx\";\nimport { yaml } from \"@tanstack/highlight/languages/yaml\";\n\n/** The languages a sample can be written in, with the names they answer to (`bash`, `xml`, `yml`, `kt`, `properties`…). */\nexport const codeHighlighter = createHighlighter({\n languages: [css, diff, { ...env, aliases: [...(env.aliases ?? []), \"properties\"] }, html, java, js, json, jsx, kotlin, plaintext, shell, ts, tsx, yaml],\n fallbackLanguage: \"plaintext\",\n});\n"],"mappings":";;;;;;;;;;AAKA,YAAYA,YAAW;;;ACHvB,SAAS,MAAM,QAAQ,qBAAqB;AAC5C,YAAYC,YAAW;AACvB,SAAS,UAA6B;AAGtC,SAAS,uBAAuB;;;ACHhC,YAAY,WAAW;AAEvB,IAAM,qBAAqB,OAAO,WAAW,cAAoB,kBAAkB;AAO5E,SAAS,oBAA2C,EAAE,MAAM,QAAQ,QAAQ,SAAS,MAAM,GAAwE;AACxK,QAAM,MAAY,aAAU,IAAI;AAChC,QAAM,QAAc,kBAAY,CAAC,WAA2B;AAC1D,UAAM,OAAO,IAAI;AACjB,QAAI,CAAC,KAAM;AACX,QAAI,EAAE,kBAAkB,gBAAgB,CAAC,KAAK,SAAS,MAAM,GAAG;AAC9D,WAAK,gBAAgB,gBAAgB;AACrC;AAAA,IACF;AACA,UAAM,IAAI,OAAO,sBAAsB;AACvC,UAAM,IAAI,KAAK,sBAAsB;AACrC,SAAK,MAAM,YAAY,cAAc,GAAG,EAAE,OAAO,EAAE,OAAO,KAAK,UAAU,IAAI;AAC7E,SAAK,MAAM,YAAY,cAAc,GAAG,EAAE,MAAM,EAAE,MAAM,KAAK,SAAS,IAAI;AA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AA,iBAAS,gBAAAD,KAAC,cAAW,WAAU,eAAc,IAAK,gBAAAA,KAAC,aAAU,WAAU,eAAc;AAAA,QACtF,gBAAAA,KAAC,UAAK,aAAU,UAAU,mBAAU,eAAe,YAAa,WAAU;AAAA,SAC5E,IACE;AAAA,OACN,IACE;AAAA,IACJ,gBAAAA,KAAC,SAAI,UAAU,GAAG,WAAW,cAAc,0BAA0B,QAAW,cAAY,aAAa,KAAK,CAAC,MAAM,EAAE,SAAS,OAAO,IAAI,KAAK,QAC9I,0BAAAA,KAAC,UAAK,iBAAe,UAAW,mBAAS,UAAU,MAAM,UAAU,EAAE,aAAa,YAAY,CAAC,IAAI,MAAK,GAC1G;AAAA,KACF;AAEJ;AAYO,SAAS,SAAS,EAAE,OAAO,MAAAE,OAAM,cAAc,WAAW,GAAG,MAAM,GAAkB;AAC1F,SACE,gBAAAD,MAAC,YAAS,cAAc,gBAAgBC,MAAK,CAAC,GAAG,IAAI,SAAQ,aAAY,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OACrH;AAAA,oBAAAF,KAAC,YAAS,cAAY,OACnB,UAAAE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,SADa,EAAE,EAEpB,CACD,GACH;AAAA,IACCE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,WADa,EAAE,EAEpB,CACD;AAAA,KACH;AAEJ;","names":["React","React","React","jsx","jsx","jsxs","tabs"]}
1
+ {"version":3,"sources":["../src/code-block/code-block.tsx","../src/tabs/tabs.tsx","../src/sliding-indicator.ts","../src/code-block/tokens.tsx","../src/code-block/highlighter.ts"],"sourcesContent":["// Client (the copy button, the tabs). A sample of code (blocks.css): its language and its file name, the code\n// highlighted by TanStack Highlight (it scrolls sideways, never shrinks, and takes the keyboard's focus to scroll),\n// lines numbered or set apart (highlighted, added, removed, in focus), a copy button that says it copied in a polite\n// live region. CodeTabs puts several ways to write the same thing (Maven · Gradle · npm) under\n// the tabs of @krizaka/ui.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { CheckGlyph, CopyGlyph } from \"../glyphs\";\nimport { TabsContent, TabsList, TabsRoot, TabsTrigger } from \"../tabs/tabs\";\nimport { type CodeAnnotation, highlight } from \"./tokens\";\n\nexport type CodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, \"children\"> & {\n /** The code, as it is copied. */\n code: string;\n /**\n * Its language, shown as a tag and used by the highlighter: `ts`, `tsx`, `js`, `jsx`, `json`, `yaml`, `bash`, `html`\n * (`xml`), `css`, `java`, `kotlin`, `diff`, `properties`. Another one is shown as plain text.\n */\n language?: string;\n /** The file it belongs in (`pom.xml`, `application.yml`), or what it is (`Terminal`). */\n file?: React.ReactNode;\n /** The copy button's words, passed translated. Without them there is no copy button (a sample inside a text, say). */\n copyLabel?: string;\n /** What the button says once the code is copied (announced politely). */\n copiedLabel?: string;\n /**\n * Colours comments, strings, keywords, types, tags and numbers (the tokens' roles).\n * @default true\n */\n highlight?: boolean;\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: `highlight`, `added`, `removed`, `error`, `warning`, `dim`, or `focus` (all the others are dimmed). */\n annotations?: readonly CodeAnnotation[];\n /** Called after the code is copied. */\n onCopy?: () => void;\n};\n\n/** A code sample: language and file name, highlighted code that scrolls sideways, a copy button. */\nexport function CodeBlock({ code, language = \"text\", file, copyLabel, copiedLabel, highlight: colour = true, lineNumbers, annotations, onCopy, className, ...props }: Readonly<CodeBlockProps>) {\n const [copied, setCopied] = React.useState(false);\n React.useEffect(() => {\n if (!copied) return;\n const t = setTimeout(() => setCopied(false), 1800);\n return () => clearTimeout(t);\n }, [copied]);\n const copy = () =>\n navigator.clipboard?.writeText(code).then(() => {\n setCopied(true);\n onCopy?.();\n });\n return (\n <figure className={cn(\"kz-code\", className)} {...props}>\n {file || language !== \"text\" || copyLabel ? (\n <figcaption className=\"kz-code-bar\">\n <span className=\"kz-code-file\">\n {language !== \"text\" && <span className=\"kz-code-lang\">{language}</span>}\n {file}\n </span>\n {copyLabel ? (\n <button type=\"button\" className=\"kz-code-copy\" onClick={copy} data-copied={copied ? \"\" : undefined}>\n {copied ? <CheckGlyph className=\"h-3.5 w-3.5\" /> : <CopyGlyph className=\"h-3.5 w-3.5\" />}\n <span aria-live=\"polite\">{copied ? (copiedLabel ?? copyLabel) : copyLabel}</span>\n </button>\n ) : null}\n </figcaption>\n ) : null}\n <pre tabIndex={0} className={lineNumbers ? \"th-code--line-numbers\" : undefined} data-focus={annotations?.some((a) => a.kind === \"focus\") ? \"\" : undefined}>\n <code data-language={language}>{colour ? highlight(code, language, { lineNumbers, annotations }) : code}</code>\n </pre>\n </figure>\n );\n}\n\nexport type CodeTabsProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"dir\" | \"defaultValue\"> & {\n /** What the tabs choose between (`Build tool`): the tab list's accessible name. */\n label: string;\n /** The ways to write it: an id, the tab's words, its sample (a `CodeBlock`). */\n tabs: readonly { id: string; label: React.ReactNode; content: React.ReactNode }[];\n /** The tab open at first. Defaults to the first one. */\n defaultValue?: string;\n};\n\n/** Several ways to write the same thing (Maven · Gradle · npm): segmented tabs above code samples. */\nexport function CodeTabs({ label, tabs, defaultValue, className, ...props }: Readonly<CodeTabsProps>) {\n return (\n <TabsRoot defaultValue={defaultValue ?? tabs[0]?.id} variant=\"segmented\" className={cn(\"kz-code-tabs\", className)} {...props}>\n <TabsList aria-label={label}>\n {tabs.map((t) => (\n <TabsTrigger key={t.id} value={t.id}>\n {t.label}\n </TabsTrigger>\n ))}\n </TabsList>\n {tabs.map((t) => (\n <TabsContent key={t.id} value={t.id}>\n {t.content}\n </TabsContent>\n ))}\n </TabsRoot>\n );\n}\n","// Client (a context). Radix Tabs does the roles (tablist, tab, tabpanel), the aria-selected / aria-controls wiring,\n// the roving focus (arrows, Home, End) and automatic activation: this file only holds the three looks.\nimport { Slot, Tabs as TabsPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { useRouteBinding } from \"../router\";\nimport { useSlidingIndicator } from \"../sliding-indicator\";\n\nexport const tabs = tv({\n slots: {\n root: \"flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:flex-row\",\n // One light glides from the active tab to the next (`before:`, placed by useSlidingIndicator); until it is placed\n // (server render), each trigger carries its own active style.\n list:\n \"group/tabs relative isolate flex shrink-0 data-[orientation=vertical]:flex-col \" +\n \"before:pointer-events-none before:absolute before:-z-10 before:opacity-0 before:transition-[translate,width,height,opacity] before:duration-300 \" +\n \"motion-reduce:before:transition-none data-[indicator=on]:before:opacity-100\",\n trigger:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40\",\n content: \"kz-tabs-panel min-w-0 flex-1 rounded-lg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring data-[state=inactive]:hidden\",\n },\n variants: {\n variant: {\n /* The section of a page: a line under the list, the active tab underlined in the accent. */\n underline: {\n list:\n \"gap-1 border-border-default data-[orientation=horizontal]:border-b data-[orientation=vertical]:border-r before:rounded-sm before:bg-accent \" +\n \"data-[orientation=horizontal]:before:-bottom-px data-[orientation=horizontal]:before:left-0 data-[orientation=horizontal]:before:h-0.5 \" +\n \"data-[orientation=horizontal]:before:w-(--kz-ind-w) data-[orientation=horizontal]:before:translate-x-(--kz-ind-x) \" +\n \"data-[orientation=vertical]:before:-right-px data-[orientation=vertical]:before:top-0 data-[orientation=vertical]:before:w-0.5 \" +\n \"data-[orientation=vertical]:before:h-(--kz-ind-h) data-[orientation=vertical]:before:translate-y-(--kz-ind-y)\",\n trigger:\n \"relative rounded-md px-3 py-2.5 text-sm text-fg-secondary hover:text-fg data-[state=active]:text-fg \" +\n \"after:absolute after:rounded-sm after:bg-transparent data-[state=active]:after:bg-accent \" +\n \"data-[orientation=horizontal]:after:inset-x-2 data-[orientation=horizontal]:after:-bottom-px data-[orientation=horizontal]:after:h-0.5 \" +\n \"data-[orientation=vertical]:justify-start data-[orientation=vertical]:after:inset-y-1.5 data-[orientation=vertical]:after:-right-px data-[orientation=vertical]:after:w-0.5 \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:after:bg-transparent\",\n },\n /* A view switch: equal segments in a track, the active one filled. */\n segmented: {\n list:\n \"inline-grid auto-cols-fr grid-flow-col gap-1 self-start rounded-xl border border-border-default bg-surface-1 p-1 data-[orientation=vertical]:grid-flow-row \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) before:rounded-lg before:bg-accent before:shadow-sm\",\n trigger:\n \"min-h-8 rounded-lg px-3 py-1.5 text-xs text-fg-secondary hover:bg-surface-2 hover:text-fg \" +\n \"data-[state=active]:bg-accent data-[state=active]:text-on-accent data-[state=active]:shadow-sm data-[state=active]:hover:bg-accent \" +\n \"transition-colors group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent group-data-[indicator=on]/tabs:data-[state=active]:shadow-none\",\n },\n /* Pills that scroll sideways on a phone: a feed's sections. */\n pills: {\n list:\n \"gap-1.5 overflow-x-auto overflow-y-hidden overscroll-x-contain pt-1 -mt-1 pb-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"before:left-0 before:top-0 before:h-(--kz-ind-h) before:w-(--kz-ind-w) before:translate-x-(--kz-ind-x) before:translate-y-(--kz-ind-y) \" +\n \"before:rounded-sm before:border before:border-accent before:bg-accent-soft\",\n trigger:\n \"h-9 rounded-sm border border-border-default bg-surface-1 px-4 text-xs text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=active]:border-accent data-[state=active]:bg-accent-soft data-[state=active]:text-fg \" +\n \"group-data-[indicator=on]/tabs:data-[state=active]:border-transparent group-data-[indicator=on]/tabs:data-[state=active]:bg-transparent\",\n },\n /*\n * Binder dividers (intercalaires, #648): organise collections, tags and statuses. Each tab is a divider with a\n * coloured top edge (`hue`), its words and a count; the active one is the page's colour and joins the content\n * under the list's line. Too many dividers scroll sideways, the edges fading. No paper texture: organisation only.\n */\n binder: {\n list:\n \"items-end gap-1 overflow-x-auto overflow-y-hidden overscroll-x-contain border-b border-border-default px-3 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden \" +\n \"[mask-image:linear-gradient(to_right,transparent,black_12px,black_calc(100%-12px),transparent)]\",\n trigger:\n \"relative -mb-px min-h-10 rounded-t-lg border border-b-0 border-border-default bg-surface-2 px-3.5 pb-2 pt-2.5 text-sm text-fg-secondary \" +\n \"before:absolute before:inset-x-0 before:-top-px before:h-1 before:rounded-t-lg before:bg-(--kz-hue,var(--kz-accent)) \" +\n \"hover:bg-surface-3 hover:text-fg data-[state=active]:z-[1] data-[state=active]:bg-surface-1 data-[state=active]:pb-2.5 data-[state=active]:text-fg \" +\n \"data-[state=active]:shadow-[0_1px_0_0_var(--kz-surface-1)] motion-reduce:transition-none\",\n },\n },\n },\n defaultVariants: { variant: \"underline\" },\n});\n\n/**\n * A divider's colour (`variant=\"binder\"`): the brand's accent by default, or a role of the theme — every one reads at 3:1 or\n * more on both themes. The colour is never the only signal: the words and the count say it.\n */\nexport type TabsHue = \"accent\" | \"success\" | \"warning\" | \"danger\" | \"neutral\";\n// The text roles where the fill role is too light on a light page (success, warning: 2:1): every edge reaches 3:1, tested.\nconst HUE: Record<TabsHue, string> = {\n accent: \"var(--kz-accent)\",\n success: \"var(--kz-success-text)\",\n warning: \"var(--kz-warning-text)\",\n danger: \"var(--kz-danger-text)\",\n neutral: \"var(--kz-text-muted)\",\n};\n/** The style that paints a divider's edge (`--kz-hue`), merged with the host's. */\nconst hueStyle = (hue: TabsHue | undefined, style: React.CSSProperties | undefined) =>\n hue ? { ...style, [\"--kz-hue\" as string]: HUE[hue] } : style;\n\n/** The count after a tab's words: part of its name (« Clients 12 »), muted, tabular. */\nfunction TabCount({ count }: Readonly<{ count: number | undefined }>) {\n if (count === undefined) return null;\n return <span data-tab-count=\"\" className=\"font-mono text-xs font-medium tabular-nums text-fg-secondary\">{count}</span>;\n}\n\n/** « + Intercalaire »: a button after the dividers (outside the tab list: a tablist holds only tabs). */\nfunction AddButton({ add }: Readonly<{ add: TabsAdd }>) {\n return (\n <button\n type=\"button\"\n onClick={add.onAdd}\n className=\"mb-1 ml-1 inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-lg px-2.5 text-sm font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden focusable=\"false\">\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n {add.label}\n </button>\n );\n}\n\nexport type TabsAdd = {\n /** Its words (« Intercalaire », « New tag ») — passed translated. */\n label: string;\n /** Adds a divider (opens the host's form). */\n onAdd: () => void;\n};\n\nexport type TabsVariants = VariantProps<typeof tabs>;\ntype Variant = NonNullable<TabsVariants[\"variant\"]>;\n\nconst VariantContext = React.createContext<Variant>(\"underline\");\n\nexport type TabsRootProps = React.ComponentProps<typeof TabsPrimitive.Root> & {\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections) · binder (dividers that organise collections, tags, statuses). */\n variant?: TabsVariants[\"variant\"];\n /** Binds the active tab to this search parameter of the URL (`?tab=…`): the URL is the state. Without it the state is local — only for an ephemeral choice. */\n routeKey?: string;\n /** The values the parameter may hold (the tabs' `value`s); the first is the default unless `defaultValue` says otherwise. */\n routeValues?: readonly string[];\n};\n\n/** `value`/`defaultValue` + `onValueChange`, `orientation` (horizontal by default), `variant` for the list. */\nexport function TabsRoot({ variant = \"underline\", className, routeKey, routeValues, ...rest }: Readonly<TabsRootProps>) {\n const props = useRouteBinding(routeKey, routeValues, rest);\n return (\n <VariantContext.Provider value={variant}>\n <TabsPrimitive.Root data-variant={variant} className={tabs({ variant }).root({ className })} {...props} />\n </VariantContext.Provider>\n );\n}\n\nexport type TabsListProps = React.ComponentProps<typeof TabsPrimitive.List> & {\n /** A « + » button after the tabs (`variant=\"binder\"`: « + Intercalaire »): its words and what it does. */\n add?: TabsAdd;\n};\n\n/** The tabs. Name it (`aria-label`) when no heading says what it switches. One light glides to the active tab. */\nexport function TabsList({ className, add, ...props }: Readonly<TabsListProps>) {\n const variant = React.useContext(VariantContext);\n const { ref } = useSlidingIndicator<HTMLDivElement>({ item: \"[role=tab]\", active: \"[role=tab][data-state=active]\" });\n const list = <TabsPrimitive.List ref={ref} data-variant={variant} className={tabs({ variant }).list({ className: cn(add && \"min-w-0 flex-1 border-b-0\", className) })} {...props} />;\n if (!add) return list;\n return (\n <div data-tabs-row=\"\" className={cn(\"flex min-w-0 items-end\", variant === \"binder\" && \"border-b border-border-default\")}>\n {list}\n <AddButton add={add} />\n </div>\n );\n}\n\nexport type TabsTriggerProps = React.ComponentProps<typeof TabsPrimitive.Trigger> & {\n /** A count after the words (clients in a collection, unread): part of the tab's name. */\n count?: number;\n /** `variant=\"binder\"`: the divider's colour (the accent by default). */\n hue?: TabsHue;\n};\n\nexport function TabsTrigger({ className, count, hue, style, children, ...props }: Readonly<TabsTriggerProps>) {\n const variant = React.useContext(VariantContext);\n return (\n <TabsPrimitive.Trigger className={tabs({ variant }).trigger({ className })} style={hueStyle(hue, style)} data-hue={hue} {...props}>\n {children}\n <TabCount count={count} />\n </TabsPrimitive.Trigger>\n );\n}\n\nexport function TabsContent({ className, ...props }: Readonly<React.ComponentProps<typeof TabsPrimitive.Content>>) {\n return <TabsPrimitive.Content className={tabs().content({ className })} {...props} />;\n}\n\n// ── Route mode: tabs that are links; the URL is the state (Oussama, 2026-10-22) ──────────────────────────────────────\n\n/**\n * Is the link `href` the tab of the route `current` (a path, with its search: `/docs/api?tab=x`)? The path must equal the\n * link's (a trailing slash, a locale-free comparison and the hash do not count); with `exact` false (the default) a deeper\n * path of the same section counts too (`/docs/api/x` is in `/docs/api`); every search parameter of the link must be in\n * `current`. The hub link (`/`) is only ever active on `/` itself.\n */\nexport function isTabActive(current: string, href: string, exact = false): boolean {\n const split = (value: string) => {\n const url = new URL(value.split(\"#\")[0]!, \"https://tabs.invalid\");\n return { path: url.pathname.replace(/\\/+$/, \"\") || \"/\", search: url.searchParams };\n };\n const here = split(current);\n const target = split(href);\n const samePath = here.path === target.path;\n const deeper = !exact && target.path !== \"/\" && here.path.startsWith(`${target.path}/`);\n if (!samePath && !deeper) return false;\n for (const [key, value] of target.search) if (here.search.get(key) !== value) return false;\n return true;\n}\n\ninterface NavState {\n current: string;\n variant: Variant;\n}\nconst NavContext = React.createContext<NavState | null>(null);\n\nexport type TabsNavProps = Omit<React.ComponentProps<\"nav\">, \"children\"> & {\n /** A « + » button after the tabs (`variant=\"binder\"`: « + Intercalaire »). */\n add?: TabsAdd;\n /** The navigation's accessible name (« Sections »). */\n label: string;\n /** The current route, passed in: the path with its search (`usePathname()` + `useSearchParams()`, `/docs?tab=api`). The active tab comes from it; no local state. */\n current: string;\n /** underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections) · binder (dividers). */\n variant?: TabsVariants[\"variant\"];\n /** The tabs: `Tabs.NavLink`. */\n children: React.ReactNode;\n};\n\n/**\n * Tabs as routes: a `nav` of links, the URL is the state. Per WAI-ARIA these are links, not a tablist: each tab is an\n * anchor, the active one carries `aria-current=\"page\"`, the keyboard is the page's own (Tab walks the links, Enter\n * follows one) and there is no panel — the page is the panel. The same looks and the same gliding light as `Tabs.List`.\n */\nexport function TabsNav({ label, current, variant = \"underline\", add, className, children, ...props }: Readonly<TabsNavProps>) {\n const { ref } = useSlidingIndicator<HTMLElement>({ item: \"[data-tabs-link]\", active: \"[data-tabs-link][data-state=active]\" });\n const value = React.useMemo(() => ({ current, variant }), [current, variant]);\n const nav = (\n <nav ref={ref} aria-label={label} data-variant={variant} data-orientation=\"horizontal\" className={tabs({ variant }).list({ className: cn(add && \"min-w-0 flex-1 border-b-0\", className) })} {...props}>\n {children}\n </nav>\n );\n return (\n <NavContext.Provider value={value}>\n {add ? (\n <div data-tabs-row=\"\" className={cn(\"flex min-w-0 items-end\", variant === \"binder\" && \"border-b border-border-default\")}>\n {nav}\n <AddButton add={add} />\n </div>\n ) : (\n nav\n )}\n </NavContext.Provider>\n );\n}\n\nexport type TabsNavLinkProps = React.ComponentProps<\"a\"> & {\n /** Where the tab goes (`/docs/api`, `/docs?tab=api`). */\n href: string;\n /** Match this path only, not the pages below it. */\n exact?: boolean;\n /** Renders your router's `<Link>` (pass it as the only child; the `href` goes on this part and on the link). */\n asChild?: boolean;\n /** A count after the words (not with `asChild`: put it in your link). */\n count?: number;\n /** `variant=\"binder\"`: the divider's colour (the accent by default). */\n hue?: TabsHue;\n};\n\n/** One tab of `Tabs.Nav`: an anchor that is active when the current route is its `href`. */\nexport function TabsNavLink({ href, exact, asChild, count, hue, style, className, children, ...props }: Readonly<TabsNavLinkProps>) {\n const ctx = React.useContext(NavContext);\n if (!ctx) throw new Error(\"Tabs.NavLink must be inside <Tabs.Nav>\");\n const active = isTabActive(ctx.current, href, exact);\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-tabs-link=\"\"\n data-state={active ? \"active\" : \"inactive\"}\n data-orientation=\"horizontal\"\n aria-current={active ? \"page\" : undefined}\n {...(asChild ? {} : { href })}\n data-hue={hue}\n style={hueStyle(hue, style)}\n className={cn(tabs({ variant: ctx.variant }).trigger(), \"no-underline\", className)}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n <TabCount count={count} />\n </>\n )}\n </Comp>\n );\n}\n\n/** `Tabs.Root/List/Trigger/Content` — `variant` underline · segmented · pills · binder on the root. `Tabs.Nav` + `Tabs.NavLink`: the same tabs as routes. */\nexport const Tabs = { Root: TabsRoot, List: TabsList, Trigger: TabsTrigger, Content: TabsContent, Nav: TabsNav, NavLink: TabsNavLink };\n","// The shared sliding indicator (NavBar, Tabs): one element that glides from item to item instead of each item lighting\n// up on its own. It writes the target's box as CSS variables on the list (`--kz-ind-x/y/w/h`) and `data-indicator=\"on\"`\n// — no re-render, no animation frame: the glide is a CSS transition (none under reduced motion). Before hydration the\n// items keep their own active style, so nothing flashes.\nimport * as React from \"react\";\n\nconst useIsoLayoutEffect = typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\n/**\n * `item`: the selector of an item; `active`: of the current one, where the light rests; `prefer`: an item that, when\n * present, holds the light before the current one (the NavBar's open menu); `follow`: the light follows the pointer\n * and the focus — over anything that is not an item (an open menu's panel) it goes back to rest.\n */\nexport function useSlidingIndicator<T extends HTMLElement>({ item, active, prefer, follow = false }: { item: string; active: string; prefer?: string; follow?: boolean }) {\n const ref = React.useRef<T>(null);\n const place = React.useCallback((target: Element | null) => {\n const list = ref.current;\n if (!list) return;\n if (!(target instanceof HTMLElement) || !list.contains(target)) {\n list.removeAttribute(\"data-indicator\");\n return;\n }\n const a = target.getBoundingClientRect();\n const b = list.getBoundingClientRect();\n list.style.setProperty(\"--kz-ind-x\", `${a.left - b.left + list.scrollLeft}px`);\n list.style.setProperty(\"--kz-ind-y\", `${a.top - b.top + list.scrollTop}px`);\n list.style.setProperty(\"--kz-ind-w\", `${a.width}px`);\n list.style.setProperty(\"--kz-ind-h\", `${a.height}px`);\n list.setAttribute(\"data-indicator\", \"on\");\n }, []);\n const rest = React.useCallback(\n () => {\n const list = ref.current;\n // An item re-rendered under a resting pointer (a menu closing) keeps the light the pointer gave it.\n const hovered = follow ? list?.querySelector(`${item}:hover`) : null;\n place((prefer ? list?.querySelector(prefer) : null) ?? hovered ?? list?.querySelector(active) ?? null);\n },\n [place, active, prefer, item, follow],\n );\n const follow_ = React.useCallback((target: EventTarget) => {\n const hit = target instanceof Element ? target.closest(item) : null;\n if (hit && ref.current?.contains(hit)) place(hit);\n else rest();\n }, [item, place, rest]);\n\n useIsoLayoutEffect(() => {\n const list = ref.current;\n if (!list) return;\n rest();\n const resize = new ResizeObserver(rest);\n resize.observe(list);\n const changes = new MutationObserver(rest);\n changes.observe(list, { subtree: true, attributes: true, attributeFilter: [\"data-state\", \"aria-current\", \"data-active\"] });\n return () => {\n resize.disconnect();\n changes.disconnect();\n };\n }, [rest]);\n\n const handlers = follow\n ? {\n onPointerOver: (e: React.PointerEvent) => follow_(e.target),\n onPointerLeave: rest,\n onFocus: (e: React.FocusEvent) => follow_(e.target),\n onBlur: rest,\n }\n : {};\n return { ref, handlers };\n}\n","// Code → React nodes, from TanStack Highlight's tokens: spans with the `th-*` classes that blocks.css paints with the\n// tokens' text roles (≥ 4.5:1 on the code surface, both themes). No raw HTML: the nodes are elements and text.\nimport { type HighlightDecoration, type HighlightRenderNode, renderTokens } from \"@tanstack/highlight/core\";\nimport * as React from \"react\";\n\nimport { codeHighlighter } from \"./highlighter\";\n\n/** What an annotation says about its lines. */\nexport type AnnotationKind = \"highlight\" | \"added\" | \"removed\" | \"focus\" | \"dim\" | \"error\" | \"warning\";\n\n/** Lines of a sample set apart: one line (`3`) or a range (`[3, 5]`), counted from 1. */\nexport type CodeAnnotation = {\n lines: number | readonly [number, number];\n kind: AnnotationKind;\n};\n\nexport type HighlightOptions = {\n /** A number before every line. */\n lineNumbers?: boolean;\n /** Lines set apart: highlighted, added, removed, in focus (the others are dimmed), dimmed, error, warning. */\n annotations?: readonly CodeAnnotation[];\n};\n\nconst toReact = (node: HighlightRenderNode, key: number): React.ReactNode => {\n if (node.type === \"text\") return node.value;\n const data = Object.fromEntries(Object.entries(node.data ?? {}).map(([name, value]) => [`data-${name}`, value]));\n return React.createElement(\"span\", { key, className: node.classNames.join(\" \"), ...data }, node.children.map(toReact));\n};\n\n/** Splits `code` into text and coloured spans (`th-keyword`, `th-string`…), and into lines when numbered or annotated. */\nexport function highlight(code: string, language = \"text\", { lineNumbers, annotations }: HighlightOptions = {}): React.ReactNode[] {\n const { tokens } = codeHighlighter.tokenize(code, { lang: language });\n const decorations: HighlightDecoration[] = (annotations ?? []).map(({ lines, kind }) => ({ lines, className: `kz-line kz-line-${kind}`, data: { kind } }));\n return renderTokens(tokens, { lineNumbers, decorations }).map(toReact);\n}\n\n/** The language a sample is tokenized in (`bash` → `shell`, `xml` → `html`, unknown → `plaintext`). */\nexport function normalizeCodeLanguage(language?: string): string {\n return codeHighlighter.normalizeLanguage(language);\n}\n","// The highlighter of every code sample: TanStack Highlight (a deterministic, synchronous tokenizer — the same markup on\n// the server and on the client) with the grammars a Krizaka page shows. Each grammar is registered by hand: nothing\n// else is bundled. An unknown language is plain text, never an error.\nimport { createHighlighter } from \"@tanstack/highlight/core\";\nimport { css } from \"@tanstack/highlight/languages/css\";\nimport { diff } from \"@tanstack/highlight/languages/diff\";\nimport { env } from \"@tanstack/highlight/languages/env\";\nimport { html } from \"@tanstack/highlight/languages/html\";\nimport { java } from \"@tanstack/highlight/languages/java\";\nimport { js } from \"@tanstack/highlight/languages/js\";\nimport { json } from \"@tanstack/highlight/languages/json\";\nimport { jsx } from \"@tanstack/highlight/languages/jsx\";\nimport { kotlin } from \"@tanstack/highlight/languages/kotlin\";\nimport { plaintext } from \"@tanstack/highlight/languages/plaintext\";\nimport { shell } from \"@tanstack/highlight/languages/shell\";\nimport { ts } from \"@tanstack/highlight/languages/ts\";\nimport { tsx } from \"@tanstack/highlight/languages/tsx\";\nimport { yaml } from \"@tanstack/highlight/languages/yaml\";\n\n/** The languages a sample can be written in, with the names they answer to (`bash`, `xml`, `yml`, `kt`, `properties`…). */\nexport const codeHighlighter = createHighlighter({\n languages: [css, diff, { ...env, aliases: [...(env.aliases ?? []), \"properties\"] }, html, java, js, json, jsx, kotlin, plaintext, shell, ts, tsx, yaml],\n fallbackLanguage: \"plaintext\",\n});\n"],"mappings":";;;;;;;;;;AAKA,YAAYA,YAAW;;;ACHvB,SAAS,MAAM,QAAQ,qBAAqB;AAC5C,YAAYC,YAA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,aAAY,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OACrH;AAAA,oBAAAF,KAAC,YAAS,cAAY,OACnB,UAAAE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,SADa,EAAE,EAEpB,CACD,GACH;AAAA,IACCE,MAAK,IAAI,CAAC,MACT,gBAAAF,KAAC,eAAuB,OAAO,EAAE,IAC9B,YAAE,WADa,EAAE,EAEpB,CACD;AAAA,KACH;AAEJ;","names":["React","React","React","jsx","jsx","jsxs","tabs"]}
@@ -62,7 +62,7 @@ type CollectionSwitcherProps = {
62
62
  className?: string;
63
63
  };
64
64
  /** The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable. */
65
- declare function CollectionSwitcher(props: CollectionSwitcherProps): React.JSX.Element;
65
+ declare function CollectionSwitcher(props: Readonly<CollectionSwitcherProps>): React.JSX.Element;
66
66
 
67
67
  export { CollectionSwitcher, collectionTree, isRemovable };
68
68
  export type { CollectionBranch, CollectionItem, CollectionSwitcherProps };
@@ -3,7 +3,7 @@ import {
3
3
  ChevronGlyph,
4
4
  CloseGlyph,
5
5
  PlusGlyph
6
- } from "./chunk-NG6G6V5E.js";
6
+ } from "./chunk-LFH3LEWR.js";
7
7
 
8
8
  // src/collection-switcher/collection-switcher.tsx
9
9
  import { Avatar } from "@krizaka/ui/avatar";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/collection-switcher/collection-switcher.tsx","../src/collection-switcher/tree.ts"],"sourcesContent":["// Client (the open state of the entity popover, the tree's keyboard). Moves between the collections of a workspace — or,\n// in `entity` mode, between the shops or studios of an account. The current one is held by the URL: the product passes\n// `value` from it and navigates in `onValueChange` (or gives `href`, and each row is a real link).\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport { cn } from \"@krizaka/ui/cn\";\nimport { Popover } from \"@krizaka/ui/popover\";\nimport * as React from \"react\";\n\nimport { ChevronGlyph, CloseGlyph, PlusGlyph } from \"../glyphs\";\nimport { type CollectionBranch, type CollectionItem, collectionTree, isRemovable } from \"./tree\";\n\nexport type CollectionSwitcherProps = {\n /** The collections, flat; `parentId` nests them in the `tree` layout. */\n collections: readonly CollectionItem[];\n /** The current one (read from the URL), or `null`. */\n value: string | null;\n /** The viewer chooses a collection: navigate (push the URL). */\n onValueChange?: (id: string) => void;\n /** Gives each row of the `list` layout a real address (open in a new tab, SSR); a click still calls `onValueChange`. */\n href?: (id: string) => string;\n /** The accessible name (“Collections”) — passed translated. */\n label: string;\n /**\n * `list`: a flat list. `tree`: the nesting by `parentId`, as nested lists (every row stays a link or a button, in the tab order).\n * @default \"list\"\n */\n layout?: \"list\" | \"tree\";\n /**\n * `collection`: the list or the tree itself. `entity`: a compact button showing the current one that opens it, to switch shop or studio from the shell.\n * @default \"collection\"\n */\n mode?: \"collection\" | \"entity\";\n /** The mark on the default collection (“Default”), passed translated. */\n defaultLabel: string;\n /** Removes a collection — never offered on the default one. Without it there is no remove action. */\n onRemove?: (id: string) => void;\n /** The remove button's accessible name for a collection (“Remove Archive”), passed translated. */\n removeLabel?: (name: string) => string;\n /** Adds a collection: a row at the end. Without it there is none. */\n onCreate?: () => void;\n /** The create row's words (“New collection”), passed translated. */\n createLabel?: string;\n /** Classes merged last, on the switcher. */\n className?: string;\n};\n\nfunction Row({ branch, value, props }: { branch: CollectionBranch; value: string | null; props: CollectionSwitcherProps & { close?: () => void } }) {\n const { item, children } = branch;\n const current = item.id === value;\n const { href, onValueChange, defaultLabel, onRemove, removeLabel, close } = props;\n const content = (\n <>\n {item.avatar ? <Avatar size=\"xs\" alt=\"\" {...item.avatar} /> : null}\n <span className=\"min-w-0 flex-1 truncate\">{item.name}</span>\n {item.isDefault ? <span className=\"shrink-0 rounded-full border border-border-default px-1.5 text-[11px] text-fg-secondary\">{defaultLabel}</span> : null}\n {item.count !== undefined ? <span className=\"shrink-0 text-xs tabular-nums text-fg-muted\">{item.count}</span> : null}\n </>\n );\n const shared = {\n \"aria-current\": current ? (\"page\" as const) : undefined,\n className: cn(\n \"flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm text-fg hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-ring\",\n current && \"bg-surface-2 font-medium\",\n ),\n onClick: () => {\n onValueChange?.(item.id);\n close?.();\n },\n };\n return (\n <li data-collection={item.id}>\n <div className=\"flex items-center gap-1\">\n {href ? (\n <a href={href(item.id)} {...shared}>\n {content}\n </a>\n ) : (\n <button type=\"button\" {...shared}>\n {content}\n </button>\n )}\n {onRemove && isRemovable(item) ? (\n <button\n type=\"button\"\n aria-label={removeLabel?.(item.name) ?? item.name}\n onClick={() => onRemove(item.id)}\n className=\"shrink-0 rounded-md p-1.5 text-fg-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-ring\"\n >\n <CloseGlyph aria-hidden className=\"h-3.5 w-3.5\" />\n </button>\n ) : null}\n </div>\n {children.length ? (\n <ul className=\"m-0 ms-4 flex list-none flex-col gap-0.5 border-s border-border-subtle p-0 ps-1\">\n {children.map((child) => (\n <Row key={child.item.id} branch={child} value={value} props={props} />\n ))}\n </ul>\n ) : null}\n </li>\n );\n}\n\nfunction Body(props: CollectionSwitcherProps & { close?: () => void }) {\n const { collections, value, label, layout = \"list\", onCreate, createLabel, close } = props;\n const branches = React.useMemo(() => (layout === \"tree\" ? collectionTree(collections) : collections.map((item) => ({ item, children: [] }))), [collections, layout]);\n const create = onCreate ? (\n <button\n type=\"button\"\n onClick={() => {\n onCreate();\n close?.();\n }}\n className=\"mt-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-ring\"\n >\n <PlusGlyph aria-hidden className=\"h-3.5 w-3.5\" />\n {createLabel}\n </button>\n ) : null;\n return (\n <nav aria-label={label}>\n <ul className=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {branches.map((branch) => (\n <Row key={branch.item.id} branch={branch} value={value} props={props} />\n ))}\n </ul>\n {create}\n </nav>\n );\n}\n\n/** The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable. */\nexport function CollectionSwitcher(props: CollectionSwitcherProps) {\n const { mode = \"collection\", collections, value, label, className } = props;\n const [open, setOpen] = React.useState(false);\n if (mode === \"collection\") {\n return (\n <div className={className} data-collection-switcher>\n <Body {...props} />\n </div>\n );\n }\n const current = collections.find((c) => c.id === value);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n aria-label={current ? `${current.name}, ${label}` : label}\n className={cn(\n \"inline-flex max-w-full items-center gap-2 rounded-md border border-border-control bg-surface-1 px-2.5 py-1.5 text-sm text-fg hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\",\n className,\n )}\n data-collection-switcher\n >\n {current?.avatar ? <Avatar size=\"xs\" alt=\"\" {...current.avatar} /> : null}\n <span className=\"min-w-0 truncate\">{current?.name ?? label}</span>\n <ChevronGlyph aria-hidden className=\"h-3.5 w-3.5 shrink-0 text-fg-muted\" />\n </button>\n </Popover.Trigger>\n <Popover.Content align=\"start\" className=\"w-72 p-2\">\n <Body {...props} close={() => setOpen(false)} />\n </Popover.Content>\n </Popover.Root>\n );\n}\n","// Pure helpers of the collection switcher: the nesting of a flat list, and what may be removed. No React and no web\n// component: the native switcher imports this file.\nimport type { DefaultAvatar } from \"../avatar/default-avatar\";\n\nexport type CollectionItem = {\n /** A stable id. */\n id: string;\n /** Its name — it is the user's own text, never translated. */\n name: string;\n /** The collection it is nested in; `null`/missing for a root. An unknown parent makes it a root (nothing is lost). */\n parentId?: string | null;\n /** The default collection: marked, and never removable. */\n isDefault?: boolean;\n /** How many items it holds. */\n count?: number;\n /** Its picture (a shop or studio in `entity` mode). */\n avatar?: { src?: string | null; defaultAvatar?: DefaultAvatar };\n};\n\nexport type CollectionBranch = { item: CollectionItem; children: CollectionBranch[] };\n\n/** The forest of a flat list, in the order given; a cycle or an unknown parent never hides a collection. */\nexport function collectionTree(items: readonly CollectionItem[]): CollectionBranch[] {\n const byId = new Map(items.map((item) => [item.id, item]));\n const branches = new Map<string, CollectionBranch>(items.map((item) => [item.id, { item, children: [] }]));\n const roots: CollectionBranch[] = [];\n const reaches = (start: string, target: string): boolean => {\n const seen = new Set<string>();\n for (let id: string | null | undefined = start; id && !seen.has(id); id = byId.get(id)?.parentId) {\n if (id === target) return true;\n seen.add(id);\n }\n return false;\n };\n for (const item of items) {\n const parent = item.parentId && item.parentId !== item.id && byId.has(item.parentId) && !reaches(item.parentId, item.id) ? branches.get(item.parentId) : undefined;\n (parent ? parent.children : roots).push(branches.get(item.id)!);\n }\n return roots;\n}\n\n/** The default collection is never removable. */\nexport const isRemovable = (item: CollectionItem): boolean => !item.isDefault;\n"],"mappings":";;;;;;;;AAGA,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,eAAe;AACxB,YAAY,WAAW;;;ACgBhB,SAAS,eAAe,OAAsD;AACnF,QAAM,OAAO,IAAI,IAAI,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AACzD,QAAM,WAAW,IAAI,IAA8B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,MAAM,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AACzG,QAAM,QAA4B,CAAC;AACnC,QAAM,UAAU,CAAC,OAAe,WAA4B;AAC1D,UAAM,OAAO,oBAAI,IAAY;AAC7B,aAAS,KAAgC,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,KAAK,KAAK,IAAI,EAAE,GAAG,UAAU;AAChG,UAAI,OAAO,OAAQ,QAAO;AAC1B,WAAK,IAAI,EAAE;AAAA,IACb;AACA,WAAO;AAAA,EACT;AACA,aAAW,QAAQ,OAAO;AACxB,UAAM,SAAS,KAAK,YAAY,KAAK,aAAa,KAAK,MAAM,KAAK,IAAI,KAAK,QAAQ,KAAK,C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;AACA,QAAM,UAAU,YAAY,KAAK,CAAC,MAAM,EAAE,OAAO,KAAK;AACtD,SACE,qBAAC,QAAQ,MAAR,EAAa,MAAY,cAAc,SACtC;AAAA,wBAAC,QAAQ,SAAR,EAAgB,SAAO,MACtB;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY,UAAU,GAAG,QAAQ,IAAI,KAAK,KAAK,KAAK;AAAA,QACpD,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA,4BAAwB;AAAA,QAEvB;AAAA,mBAAS,SAAS,oBAAC,UAAO,MAAK,MAAK,KAAI,IAAI,GAAG,QAAQ,QAAQ,IAAK;AAAA,UACrE,oBAAC,UAAK,WAAU,oBAAoB,mBAAS,QAAQ,OAAM;AAAA,UAC3D,oBAAC,gBAAa,eAAW,MAAC,WAAU,sCAAqC;AAAA;AAAA;AAAA,IAC3E,GACF;AAAA,IACA,oBAAC,QAAQ,SAAR,EAAgB,OAAM,SAAQ,WAAU,YACvC,8BAAC,QAAM,GAAG,OAAO,OAAO,MAAM,QAAQ,KAAK,GAAG,GAChD;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/collection-switcher/collection-switcher.tsx","../src/collection-switcher/tree.ts"],"sourcesContent":["// Client (the open state of the entity popover, the tree's keyboard). Moves between the collections of a workspace — or,\n// in `entity` mode, between the shops or studios of an account. The current one is held by the URL: the product passes\n// `value` from it and navigates in `onValueChange` (or gives `href`, and each row is a real link).\nimport { Avatar } from \"@krizaka/ui/avatar\";\nimport { cn } from \"@krizaka/ui/cn\";\nimport { Popover } from \"@krizaka/ui/popover\";\nimport * as React from \"react\";\n\nimport { ChevronGlyph, CloseGlyph, PlusGlyph } from \"../glyphs\";\nimport { type CollectionBranch, type CollectionItem, collectionTree, isRemovable } from \"./tree\";\n\nexport type CollectionSwitcherProps = {\n /** The collections, flat; `parentId` nests them in the `tree` layout. */\n collections: readonly CollectionItem[];\n /** The current one (read from the URL), or `null`. */\n value: string | null;\n /** The viewer chooses a collection: navigate (push the URL). */\n onValueChange?: (id: string) => void;\n /** Gives each row of the `list` layout a real address (open in a new tab, SSR); a click still calls `onValueChange`. */\n href?: (id: string) => string;\n /** The accessible name (“Collections”) — passed translated. */\n label: string;\n /**\n * `list`: a flat list. `tree`: the nesting by `parentId`, as nested lists (every row stays a link or a button, in the tab order).\n * @default \"list\"\n */\n layout?: \"list\" | \"tree\";\n /**\n * `collection`: the list or the tree itself. `entity`: a compact button showing the current one that opens it, to switch shop or studio from the shell.\n * @default \"collection\"\n */\n mode?: \"collection\" | \"entity\";\n /** The mark on the default collection (“Default”), passed translated. */\n defaultLabel: string;\n /** Removes a collection — never offered on the default one. Without it there is no remove action. */\n onRemove?: (id: string) => void;\n /** The remove button's accessible name for a collection (“Remove Archive”), passed translated. */\n removeLabel?: (name: string) => string;\n /** Adds a collection: a row at the end. Without it there is none. */\n onCreate?: () => void;\n /** The create row's words (“New collection”), passed translated. */\n createLabel?: string;\n /** Classes merged last, on the switcher. */\n className?: string;\n};\n\nfunction Row({ branch, value, props }: Readonly<{ branch: CollectionBranch; value: string | null; props: CollectionSwitcherProps & { close?: () => void } }>) {\n const { item, children } = branch;\n const current = item.id === value;\n const { href, onValueChange, defaultLabel, onRemove, removeLabel, close } = props;\n const content = (\n <>\n {item.avatar ? <Avatar size=\"xs\" alt=\"\" {...item.avatar} /> : null}\n <span className=\"min-w-0 flex-1 truncate\">{item.name}</span>\n {item.isDefault ? <span className=\"shrink-0 rounded-full border border-border-default px-1.5 text-[11px] text-fg-secondary\">{defaultLabel}</span> : null}\n {item.count !== undefined ? <span className=\"shrink-0 text-xs tabular-nums text-fg-muted\">{item.count}</span> : null}\n </>\n );\n const shared = {\n \"aria-current\": current ? (\"page\" as const) : undefined,\n className: cn(\n \"flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm text-fg hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-ring\",\n current && \"bg-surface-2 font-medium\",\n ),\n onClick: () => {\n onValueChange?.(item.id);\n close?.();\n },\n };\n return (\n <li data-collection={item.id}>\n <div className=\"flex items-center gap-1\">\n {href ? (\n <a href={href(item.id)} {...shared}>\n {content}\n </a>\n ) : (\n <button type=\"button\" {...shared}>\n {content}\n </button>\n )}\n {onRemove && isRemovable(item) ? (\n <button\n type=\"button\"\n aria-label={removeLabel?.(item.name) ?? item.name}\n onClick={() => onRemove(item.id)}\n className=\"shrink-0 rounded-md p-1.5 text-fg-muted hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-ring\"\n >\n <CloseGlyph aria-hidden className=\"h-3.5 w-3.5\" />\n </button>\n ) : null}\n </div>\n {children.length ? (\n <ul className=\"m-0 ms-4 flex list-none flex-col gap-0.5 border-s border-border-subtle p-0 ps-1\">\n {children.map((child) => (\n <Row key={child.item.id} branch={child} value={value} props={props} />\n ))}\n </ul>\n ) : null}\n </li>\n );\n}\n\nfunction Body(props: Readonly<CollectionSwitcherProps & { close?: () => void }>) {\n const { collections, value, label, layout = \"list\", onCreate, createLabel, close } = props;\n const branches = React.useMemo(() => (layout === \"tree\" ? collectionTree(collections) : collections.map((item) => ({ item, children: [] }))), [collections, layout]);\n const create = onCreate ? (\n <button\n type=\"button\"\n onClick={() => {\n onCreate();\n close?.();\n }}\n className=\"mt-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-sm text-fg-secondary hover:bg-surface-2 hover:text-fg focus-visible:outline-2 focus-visible:outline-ring\"\n >\n <PlusGlyph aria-hidden className=\"h-3.5 w-3.5\" />\n {createLabel}\n </button>\n ) : null;\n return (\n <nav aria-label={label}>\n <ul className=\"m-0 flex list-none flex-col gap-0.5 p-0\">\n {branches.map((branch) => (\n <Row key={branch.item.id} branch={branch} value={value} props={props} />\n ))}\n </ul>\n {create}\n </nav>\n );\n}\n\n/** The collections of a workspace — or the shops of an account — to move between; the default one marked and never removable. */\nexport function CollectionSwitcher(props: Readonly<CollectionSwitcherProps>) {\n const { mode = \"collection\", collections, value, label, className } = props;\n const [open, setOpen] = React.useState(false);\n if (mode === \"collection\") {\n return (\n <div className={className} data-collection-switcher>\n <Body {...props} />\n </div>\n );\n }\n const current = collections.find((c) => c.id === value);\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger asChild>\n <button\n type=\"button\"\n aria-label={current ? `${current.name}, ${label}` : label}\n className={cn(\n \"inline-flex max-w-full items-center gap-2 rounded-md border border-border-control bg-surface-1 px-2.5 py-1.5 text-sm text-fg hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring\",\n className,\n )}\n data-collection-switcher\n >\n {current?.avatar ? <Avatar size=\"xs\" alt=\"\" {...current.avatar} /> : null}\n <span className=\"min-w-0 truncate\">{current?.name ?? label}</span>\n <ChevronGlyph aria-hidden className=\"h-3.5 w-3.5 shrink-0 text-fg-muted\" />\n </button>\n </Popover.Trigger>\n <Popover.Content align=\"start\" className=\"w-72 p-2\">\n <Body {...props} close={() => setOpen(false)} />\n </Popover.Content>\n </Popover.Root>\n );\n}\n","// Pure helpers of the collection switcher: the nesting of a flat list, and what may be removed. No React and no web\n// component: the native switcher imports this file.\nimport type { DefaultAvatar } from \"../avatar/default-avatar\";\n\nexport type CollectionItem = {\n /** A stable id. */\n id: string;\n /** Its name — it is the user's own text, never translated. */\n name: string;\n /** The collection it is nested in; `null`/missing for a root. An unknown parent makes it a root (nothing is lost). */\n parentId?: string | null;\n /** The default collection: marked, and never removable. */\n isDefault?: boolean;\n /** How many items it holds. */\n count?: number;\n /** Its picture (a shop or studio in `entity` mode). */\n avatar?: { src?: string | null; defaultAvatar?: DefaultAvatar };\n};\n\nexport type CollectionBranch = { item: CollectionItem; children: CollectionBranch[] };\n\n/** The forest of a flat list, in the order given; a cycle or an unknown parent never hides a collection. */\nexport function collectionTree(items: readonly CollectionItem[]): CollectionBranch[] {\n const byId = new Map(items.map((item) => [item.id, item]));\n const branches = new Map<string, CollectionBranch>(items.map((item) => [item.id, { item, children: [] }]));\n const roots: CollectionBranch[] = [];\n const reaches = (start: string, target: string): boolean => {\n const seen = new Set<string>();\n for (let id: string | null | undefined = start; id && !seen.has(id); id = byId.get(id)?.parentId) {\n if (id === target) return true;\n seen.add(id);\n }\n return false;\n };\n for (const item of items) {\n const parent = item.parentId && item.parentId !== item.id && byId.has(item.parentId) && !reaches(item.parentId, item.id) ? branches.get(item.parentId) : undefined;\n (parent ? parent.children : roots).push(branches.get(item.id)!);\n }\n return roots;\n}\n\n/** The default collection is never removable. */\nexport const isRemovable = (item: CollectionItem): boolean => !item.isDefault;\n"],"mappings":";;;;;;;;AAGA,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,eAAe;AACxB,YAAY,WAAW;;;ACgBhB,SAAS,eAAe,OAAsD;AACnF,QAAM,OAAO,IAAI,IAAI,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AACzD,QAAM,WAAW,IAAI,IAA8B,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE,MAAM,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AACzG,QAAM,QAA4B,CAAC;AACnC,QAAM,UAAU,CAAC,OAAe,WAA4B;AAC1D,UAAM,OAAO,oBAAI,IAAY;AAC7B,aAAS,KAAgC,OAAO,MAAM,CAAC,KAAK,IAAI,EAAE,GAAG,KAAK,KAAK,IAAI,EAAE,GAAG,UAAU;AAChG,UAAI,OAAO,OAAQ,QAAO;AAC1B,WAAK,IAAI,EAAE;AAAA,IACb;AACA,WAAO;AAAA,EACT;AACA,aAAW,QAAQ,OAAO;AACxB,UAAM,SAAS,KAAK,YAAY,KAAK,aAAa,KAAK,MAAM,KAAK,IAAI,KAAK,QAAQ,KAAK,CAAC,QAAQ,KAAK,UAAU,KAAK,EAAE,IAAI,SAAS,IAAI,KAAK,QAAQ,IAAI;AACzJ,KAAC,SAAS,OAAO,WAAW,OAAO,KAAK,SAAS,I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,wBAAC,QAAQ,SAAR,EAAgB,SAAO,MACtB;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY,UAAU,GAAG,QAAQ,IAAI,KAAK,KAAK,KAAK;AAAA,QACpD,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA,4BAAwB;AAAA,QAEvB;AAAA,mBAAS,SAAS,oBAAC,UAAO,MAAK,MAAK,KAAI,IAAI,GAAG,QAAQ,QAAQ,IAAK;AAAA,UACrE,oBAAC,UAAK,WAAU,oBAAoB,mBAAS,QAAQ,OAAM;AAAA,UAC3D,oBAAC,gBAAa,eAAW,MAAC,WAAU,sCAAqC;AAAA;AAAA;AAAA,IAC3E,GACF;AAAA,IACA,oBAAC,QAAQ,SAAR,EAAgB,OAAM,SAAQ,WAAU,YACvC,8BAAC,QAAM,GAAG,OAAO,OAAO,MAAM,QAAQ,KAAK,GAAG,GAChD;AAAA,KACF;AAEJ;","names":[]}
package/dist/columns.d.ts CHANGED
@@ -107,7 +107,7 @@ type GridProps = Omit<React.ComponentProps<"div">, "children"> & {
107
107
  * A grid that fits its container: the columns come from the size class of the container's width, and no cell is narrower
108
108
  * than `minItemWidth`, so nothing overflows in a page, a side panel or a split. The order mirrors in right-to-left.
109
109
  */
110
- declare function Grid({ children, columns, minItemWidth, gap, maxColumns, equalHeight, fontScale, "aria-label": label, className, style, ...props }: GridProps): React.JSX.Element;
110
+ declare function Grid({ children, columns, minItemWidth, gap, maxColumns, equalHeight, fontScale, "aria-label": label, className, style, ...props }: Readonly<GridProps>): React.JSX.Element;
111
111
  type ColumnsProps = Omit<React.ComponentProps<"div">, "children"> & {
112
112
  /** The columns, in reading order (the first is at the start edge, on the right in right-to-left). */
113
113
  children: React.ReactNode;
@@ -126,7 +126,7 @@ declare function columnsNeed(count: number, minColumnWidth: number, gapPx: numbe
126
126
  * A few columns that sit side by side when their container holds them and stack when it does not — the master and the
127
127
  * detail, a form and its summary. Stacked, they keep their order and each takes the full width.
128
128
  */
129
- declare function Columns({ children, weights, minColumnWidth, gap, fontScale, className, style, ...props }: ColumnsProps): React.JSX.Element;
129
+ declare function Columns({ children, weights, minColumnWidth, gap, fontScale, className, style, ...props }: Readonly<ColumnsProps>): React.JSX.Element;
130
130
 
131
131
  export { Columns, DEFAULT_COLUMNS, GRID_GAPS, Grid, SIZE_CLASS_FROM, columnsFor, columnsLayout, columnsNeed };
132
132
  export type { ColumnsProps, GridColumns, GridGap, GridProps };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/columns/columns.tsx"],"sourcesContent":["// Server-safe. Layouts that decide on the width of the room they sit in — their container, never the viewport or a device —\n// like the native `Grid` and `Columns` (src/native/grid.tsx), with the same props and the same size classes\n// (compact < 600 px, regular < 840 px, expanded from there). No JS measures anything: `Grid` is a CSS container\n// (`@container`) whose columns come from the size class of that container, and `Columns` stacks by container-relative\n// sizing (a `flex-basis` that is huge below the width the columns need and zero above it). Every width is in `rem`, so a\n// larger text size grows the room an item needs: at 200 % a card that held two per row stacks into one. The order is the\n// reading order and it mirrors in `rtl`: no physical edge is used.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\n/** The size class of a container: where each one begins, in px of the room (Material's window size classes, as on native). */\nexport const SIZE_CLASS_FROM = { regular: 600, expanded: 840 } as const;\n\n/** The gap tokens, in px — the spacing scale (`gap-1` … `gap-6`), the same numbers as native. */\nexport const GRID_GAPS = { none: 0, xs: 4, sm: 8, md: 12, lg: 16, xl: 24 } as const;\nexport type GridGap = keyof typeof GRID_GAPS;\n\n/** How many columns per size class, or one number for all. A size class left out takes the one before it (compact → regular → expanded). */\nexport type GridColumns = number | Partial<Record<\"compact\" | \"regular\" | \"expanded\", number>>;\n\n/** One column on a compact room, two on a regular one, three on an expanded one. */\nexport const DEFAULT_COLUMNS = { compact: 1, regular: 2, expanded: 3 } as const;\n\nconst PX_PER_REM = 16;\nconst rem = (px: number) => `${px / PX_PER_REM}rem`;\n\nexport const columnsLayout = tv({\n slots: {\n // `@container`: the grid reads the width of this element. The track inside switches its columns at its widths.\n grid: \"@container w-full min-w-0\",\n track:\n \"grid [--kz-grid-cols:var(--kz-grid-compact)] @min-[600px]:[--kz-grid-cols:var(--kz-grid-regular)] @min-[840px]:[--kz-grid-cols:var(--kz-grid-expanded)]\",\n cell: \"flex min-w-0 flex-col\",\n columns: \"flex w-full min-w-0 flex-wrap\",\n column: \"min-w-0\",\n },\n variants: {\n gap: Object.fromEntries(\n Object.entries({ none: \"gap-0\", xs: \"gap-1\", sm: \"gap-2\", md: \"gap-3\", lg: \"gap-4\", xl: \"gap-6\" }).map(([name, cls]) => [name, { track: cls, columns: cls }]),\n ) as Record<GridGap, { track: string; columns: string }>,\n equalHeight: { true: { track: \"items-stretch\", cell: \"*:flex-1\" }, false: { track: \"items-start\" } },\n },\n});\n\n/** The columns of a size class: a size class left out takes the one before it. */\nexport function columnsFor(columns: GridColumns | undefined, sizeClass: keyof typeof DEFAULT_COLUMNS): number {\n const asked = columns ?? DEFAULT_COLUMNS;\n if (typeof asked === \"number\") return Math.max(1, Math.floor(asked));\n const order = [\"compact\", \"regular\", \"expanded\"] as const;\n for (let i = order.indexOf(sizeClass); i >= 0; i--) {\n const value = asked[order[i] as (typeof order)[number]];\n if (value) return Math.max(1, Math.floor(value));\n }\n return 1;\n}\n\nexport type GridProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The items. Each is one cell. */\n children: React.ReactNode;\n /** Columns per size class of the container the grid is in (default 1 · 2 · 3), or one number. A ceiling: it drops when `minItemWidth` does not fit. */\n columns?: GridColumns;\n /** No cell is narrower than this, in px (default 160); it grows with the text scale. */\n minItemWidth?: number;\n /** The space between cells (default `md`). */\n gap?: GridGap;\n /** The most columns, whatever the container (default 6). */\n maxColumns?: number;\n /** The cells of a row are as tall as the tallest (default true); `false` lets each keep its own height. */\n equalHeight?: boolean;\n /** The text scale to lay out for, on top of the browser's (widths are in `rem`, so a larger text size is followed already). Pass 2 to see 200 % text. */\n fontScale?: number;\n};\n\n/**\n * A grid that fits its container: the columns come from the size class of the container's width, and no cell is narrower\n * than `minItemWidth`, so nothing overflows in a page, a side panel or a split. The order mirrors in right-to-left.\n */\nexport function Grid({ children, columns, minItemWidth = 160, gap = \"md\", maxColumns = 6, equalHeight = true, fontScale = 1, \"aria-label\": label, className, style, ...props }: GridProps) {\n const s = columnsLayout({ gap, equalHeight });\n const items = React.Children.toArray(children);\n const cap = Math.max(1, Math.floor(maxColumns));\n const at = (sizeClass: keyof typeof DEFAULT_COLUMNS) => Math.min(columnsFor(columns, sizeClass), cap);\n const vars = {\n \"--kz-grid-compact\": at(\"compact\"),\n \"--kz-grid-regular\": at(\"regular\"),\n \"--kz-grid-expanded\": at(\"expanded\"),\n \"--kz-grid-min\": rem(minItemWidth * Math.max(1, fontScale)),\n \"--kz-grid-gap\": rem(GRID_GAPS[gap]),\n // As many tracks as `--kz-grid-cols` allows, none narrower than the minimum: the ceiling drops on its own.\n gridTemplateColumns:\n \"repeat(auto-fill, minmax(max(var(--kz-grid-min), calc((100% - (var(--kz-grid-cols) - 1) * var(--kz-grid-gap)) / var(--kz-grid-cols))), 1fr))\",\n } as React.CSSProperties;\n // A labelled grid is a list: real <ul>/<li> (native semantics on every device), never a div with an ARIA role.\n const Track = label ? \"ul\" : \"div\";\n const Cell = label ? \"li\" : \"div\";\n return (\n <div className={s.grid({ className })} style={style} {...props}>\n <Track className={s.track({ className: label ? \"m-0 list-none p-0\" : undefined })} style={vars} aria-label={label}>\n {items.map((child, index) => (\n <Cell key={React.isValidElement(child) && child.key != null ? child.key : index} className={s.cell()}>\n {child}\n </Cell>\n ))}\n </Track>\n </div>\n );\n}\n\nexport type ColumnsProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The columns, in reading order (the first is at the start edge, on the right in right-to-left). */\n children: React.ReactNode;\n /** The share of each column (default equal); `[1, 2]` is a third and two thirds. */\n weights?: readonly number[];\n /** Below this width per column, in px, the columns stack top to bottom (default 280); it grows with the text scale. */\n minColumnWidth?: number;\n /** The space between columns, and between stacked ones (default `lg`). */\n gap?: GridGap;\n /** The text scale to lay out for, on top of the browser's. Pass 2 to see 200 % text. */\n fontScale?: number;\n};\n\n/** The width, in px, that `count` columns need to sit side by side. */\nexport function columnsNeed(count: number, minColumnWidth: number, gapPx: number, fontScale = 1): number {\n return count * minColumnWidth * Math.max(1, fontScale) + gapPx * (count - 1);\n}\n\n/**\n * A few columns that sit side by side when their container holds them and stack when it does not — the master and the\n * detail, a form and its summary. Stacked, they keep their order and each takes the full width.\n */\nexport function Columns({ children, weights, minColumnWidth = 280, gap = \"lg\", fontScale = 1, className, style, ...props }: ColumnsProps) {\n const s = columnsLayout({ gap });\n const items = React.Children.toArray(children);\n const need = columnsNeed(items.length, minColumnWidth, GRID_GAPS[gap], fontScale);\n const side = items.length > 1;\n return (\n <div\n className={s.columns({ className })}\n style={{ \"--kz-columns-need\": rem(need), ...style } as React.CSSProperties}\n data-layout=\"columns\"\n {...props}\n >\n {items.map((child, index) => (\n <div\n key={React.isValidElement(child) && child.key != null ? child.key : index}\n className={s.column()}\n // Container-relative: a basis above the row's width wraps the column onto its own line (stacked, full width);\n // below it the basis is 0 and the free space is shared by weight.\n style={{ flexGrow: weights?.[index] ?? 1, flexBasis: side ? \"calc((var(--kz-columns-need) - 100%) * 999)\" : \"100%\" }}\n >\n {child}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";AAOA,YAAY,WAAW;AACvB,SAAS,UAAU;AA2FT;AAxFH,IAAM,kBAAkB,EAAE,SAAS,KAAK,UAAU,IAAI;AAGtD,IAAM,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG;AAOlE,IAAM,kBAAkB,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,EAAE;AAErE,IAAM,aAAa;AACnB,IAAM,MAAM,CAAC,OAAe,GAAG,KAAK,UAAU;AAEvC,IAAM,gBAAgB,GAAG;AAAA,EAC9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A,MAClD,eAAY;AAAA,MACX,GAAG;AAAA,MAEH,gBAAM,IAAI,CAAC,OAAO,UACjB;AAAA,QAAC;AAAA;AAAA,UAEC,WAAW,EAAE,OAAO;AAAA,UAGpB,OAAO,EAAE,UAAU,UAAU,KAAK,KAAK,GAAG,WAAW,OAAO,gDAAgD,OAAO;AAAA,UAElH;AAAA;AAAA,QANU,qBAAe,KAAK,KAAK,MAAM,OAAO,OAAO,MAAM,MAAM;AAAA,MAOtE,CACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/columns/columns.tsx"],"sourcesContent":["// Server-safe. Layouts that decide on the width of the room they sit in — their container, never the viewport or a device —\n// like the native `Grid` and `Columns` (src/native/grid.tsx), with the same props and the same size classes\n// (compact < 600 px, regular < 840 px, expanded from there). No JS measures anything: `Grid` is a CSS container\n// (`@container`) whose columns come from the size class of that container, and `Columns` stacks by container-relative\n// sizing (a `flex-basis` that is huge below the width the columns need and zero above it). Every width is in `rem`, so a\n// larger text size grows the room an item needs: at 200 % a card that held two per row stacks into one. The order is the\n// reading order and it mirrors in `rtl`: no physical edge is used.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\n/** The size class of a container: where each one begins, in px of the room (Material's window size classes, as on native). */\nexport const SIZE_CLASS_FROM = { regular: 600, expanded: 840 } as const;\n\n/** The gap tokens, in px — the spacing scale (`gap-1` … `gap-6`), the same numbers as native. */\nexport const GRID_GAPS = { none: 0, xs: 4, sm: 8, md: 12, lg: 16, xl: 24 } as const;\nexport type GridGap = keyof typeof GRID_GAPS;\n\n/** How many columns per size class, or one number for all. A size class left out takes the one before it (compact → regular → expanded). */\nexport type GridColumns = number | Partial<Record<\"compact\" | \"regular\" | \"expanded\", number>>;\n\n/** One column on a compact room, two on a regular one, three on an expanded one. */\nexport const DEFAULT_COLUMNS = { compact: 1, regular: 2, expanded: 3 } as const;\n\nconst PX_PER_REM = 16;\nconst rem = (px: number) => `${px / PX_PER_REM}rem`;\n\nexport const columnsLayout = tv({\n slots: {\n // `@container`: the grid reads the width of this element. The track inside switches its columns at its widths.\n grid: \"@container w-full min-w-0\",\n track:\n \"grid [--kz-grid-cols:var(--kz-grid-compact)] @min-[600px]:[--kz-grid-cols:var(--kz-grid-regular)] @min-[840px]:[--kz-grid-cols:var(--kz-grid-expanded)]\",\n cell: \"flex min-w-0 flex-col\",\n columns: \"flex w-full min-w-0 flex-wrap\",\n column: \"min-w-0\",\n },\n variants: {\n gap: Object.fromEntries(\n Object.entries({ none: \"gap-0\", xs: \"gap-1\", sm: \"gap-2\", md: \"gap-3\", lg: \"gap-4\", xl: \"gap-6\" }).map(([name, cls]) => [name, { track: cls, columns: cls }]),\n ) as Record<GridGap, { track: string; columns: string }>,\n equalHeight: { true: { track: \"items-stretch\", cell: \"*:flex-1\" }, false: { track: \"items-start\" } },\n },\n});\n\n/** The columns of a size class: a size class left out takes the one before it. */\nexport function columnsFor(columns: GridColumns | undefined, sizeClass: keyof typeof DEFAULT_COLUMNS): number {\n const asked = columns ?? DEFAULT_COLUMNS;\n if (typeof asked === \"number\") return Math.max(1, Math.floor(asked));\n const order = [\"compact\", \"regular\", \"expanded\"] as const;\n for (let i = order.indexOf(sizeClass); i >= 0; i--) {\n const value = asked[order[i] as (typeof order)[number]];\n if (value) return Math.max(1, Math.floor(value));\n }\n return 1;\n}\n\nexport type GridProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The items. Each is one cell. */\n children: React.ReactNode;\n /** Columns per size class of the container the grid is in (default 1 · 2 · 3), or one number. A ceiling: it drops when `minItemWidth` does not fit. */\n columns?: GridColumns;\n /** No cell is narrower than this, in px (default 160); it grows with the text scale. */\n minItemWidth?: number;\n /** The space between cells (default `md`). */\n gap?: GridGap;\n /** The most columns, whatever the container (default 6). */\n maxColumns?: number;\n /** The cells of a row are as tall as the tallest (default true); `false` lets each keep its own height. */\n equalHeight?: boolean;\n /** The text scale to lay out for, on top of the browser's (widths are in `rem`, so a larger text size is followed already). Pass 2 to see 200 % text. */\n fontScale?: number;\n};\n\n/**\n * A grid that fits its container: the columns come from the size class of the container's width, and no cell is narrower\n * than `minItemWidth`, so nothing overflows in a page, a side panel or a split. The order mirrors in right-to-left.\n */\nexport function Grid({ children, columns, minItemWidth = 160, gap = \"md\", maxColumns = 6, equalHeight = true, fontScale = 1, \"aria-label\": label, className, style, ...props }: Readonly<GridProps>) {\n const s = columnsLayout({ gap, equalHeight });\n const items = React.Children.toArray(children);\n const cap = Math.max(1, Math.floor(maxColumns));\n const at = (sizeClass: keyof typeof DEFAULT_COLUMNS) => Math.min(columnsFor(columns, sizeClass), cap);\n const vars = {\n \"--kz-grid-compact\": at(\"compact\"),\n \"--kz-grid-regular\": at(\"regular\"),\n \"--kz-grid-expanded\": at(\"expanded\"),\n \"--kz-grid-min\": rem(minItemWidth * Math.max(1, fontScale)),\n \"--kz-grid-gap\": rem(GRID_GAPS[gap]),\n // As many tracks as `--kz-grid-cols` allows, none narrower than the minimum: the ceiling drops on its own.\n gridTemplateColumns:\n \"repeat(auto-fill, minmax(max(var(--kz-grid-min), calc((100% - (var(--kz-grid-cols) - 1) * var(--kz-grid-gap)) / var(--kz-grid-cols))), 1fr))\",\n } as React.CSSProperties;\n // A labelled grid is a list: real <ul>/<li> (native semantics on every device), never a div with an ARIA role.\n const Track = label ? \"ul\" : \"div\";\n const Cell = label ? \"li\" : \"div\";\n return (\n <div className={s.grid({ className })} style={style} {...props}>\n <Track className={s.track({ className: label ? \"m-0 list-none p-0\" : undefined })} style={vars} aria-label={label}>\n {items.map((child, index) => (\n <Cell key={React.isValidElement(child) && child.key != null ? child.key : index} className={s.cell()}>\n {child}\n </Cell>\n ))}\n </Track>\n </div>\n );\n}\n\nexport type ColumnsProps = Omit<React.ComponentProps<\"div\">, \"children\"> & {\n /** The columns, in reading order (the first is at the start edge, on the right in right-to-left). */\n children: React.ReactNode;\n /** The share of each column (default equal); `[1, 2]` is a third and two thirds. */\n weights?: readonly number[];\n /** Below this width per column, in px, the columns stack top to bottom (default 280); it grows with the text scale. */\n minColumnWidth?: number;\n /** The space between columns, and between stacked ones (default `lg`). */\n gap?: GridGap;\n /** The text scale to lay out for, on top of the browser's. Pass 2 to see 200 % text. */\n fontScale?: number;\n};\n\n/** The width, in px, that `count` columns need to sit side by side. */\nexport function columnsNeed(count: number, minColumnWidth: number, gapPx: number, fontScale = 1): number {\n return count * minColumnWidth * Math.max(1, fontScale) + gapPx * (count - 1);\n}\n\n/**\n * A few columns that sit side by side when their container holds them and stack when it does not — the master and the\n * detail, a form and its summary. Stacked, they keep their order and each takes the full width.\n */\nexport function Columns({ children, weights, minColumnWidth = 280, gap = \"lg\", fontScale = 1, className, style, ...props }: Readonly<ColumnsProps>) {\n const s = columnsLayout({ gap });\n const items = React.Children.toArray(children);\n const need = columnsNeed(items.length, minColumnWidth, GRID_GAPS[gap], fontScale);\n const side = items.length > 1;\n return (\n <div\n className={s.columns({ className })}\n style={{ \"--kz-columns-need\": rem(need), ...style } as React.CSSProperties}\n data-layout=\"columns\"\n {...props}\n >\n {items.map((child, index) => (\n <div\n key={React.isValidElement(child) && child.key != null ? child.key : index}\n className={s.column()}\n // Container-relative: a basis above the row's width wraps the column onto its own line (stacked, full width);\n // below it the basis is 0 and the free space is shared by weight.\n style={{ flexGrow: weights?.[index] ?? 1, flexBasis: side ? \"calc((var(--kz-columns-need) - 100%) * 999)\" : \"100%\" }}\n >\n {child}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";AAOA,YAAY,WAAW;AACvB,SAAS,UAAU;AA2FT;AAxFH,IAAM,kBAAkB,EAAE,SAAS,KAAK,UAAU,IAAI;AAGtD,IAAM,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG;AAOlE,IAAM,kBAAkB,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,EAAE;AAErE,IAAM,aAAa;AACnB,IAAM,MAAM,CAAC,OAAe,GAAG,KAAK,UA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E,qBAAqB,IAAI,IAAI,GAAG,GAAG,MAAM;AAAA,MAClD,eAAY;AAAA,MACX,GAAG;AAAA,MAEH,gBAAM,IAAI,CAAC,OAAO,UACjB;AAAA,QAAC;AAAA;AAAA,UAEC,WAAW,EAAE,OAAO;AAAA,UAGpB,OAAO,EAAE,UAAU,UAAU,KAAK,KAAK,GAAG,WAAW,OAAO,gDAAgD,OAAO;AAAA,UAElH;AAAA;AAAA,QANU,qBAAe,KAAK,KAAK,MAAM,OAAO,OAAO,MAAM,MAAM;AAAA,MAOtE,CACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
package/dist/combobox.js CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  Combobox,
4
4
  combobox,
5
5
  comboboxLabels
6
- } from "./chunk-SG2RKUVJ.js";
7
- import "./chunk-5VZ37TY3.js";
6
+ } from "./chunk-WTZUMVJI.js";
7
+ import "./chunk-NFJWD5BT.js";
8
8
  import "./chunk-D3T54RSL.js";
9
- import "./chunk-NSLXEDIS.js";
9
+ import "./chunk-HHBTM4AU.js";
10
10
  import "./chunk-ZIXB33X7.js";
11
11
  import "./chunk-ZSCNMFE6.js";
12
- import "./chunk-PGBF3UBX.js";
12
+ import "./chunk-QKL5TECH.js";
13
13
  export {
14
14
  Combobox,
15
15
  combobox,
package/dist/command.d.ts CHANGED
@@ -94,7 +94,7 @@ type CommandRootProps = React.ComponentProps<typeof Command$1> & {
94
94
  label: string;
95
95
  };
96
96
  /** The palette: `value` / `onValueChange` (the active item), `shouldFilter`, `filter`, `loop`. */
97
- declare function CommandRoot({ className, ...props }: CommandRootProps): React.JSX.Element;
97
+ declare function CommandRoot({ className, ...props }: Readonly<CommandRootProps>): React.JSX.Element;
98
98
  type CommandInputProps = Omit<React.ComponentProps<typeof Command$1.Input>, "placeholder"> & {
99
99
  /** What to type — passed translated. The input is named by the palette's `label`. */
100
100
  placeholder: string;
@@ -102,7 +102,7 @@ type CommandInputProps = Omit<React.ComponentProps<typeof Command$1.Input>, "pla
102
102
  trailing?: React.ReactNode;
103
103
  };
104
104
  /** The search field (`value` / `onValueChange` for the query), with a magnifier. */
105
- declare function CommandInput({ className, placeholder, trailing, ...props }: CommandInputProps): React.JSX.Element;
105
+ declare function CommandInput({ className, placeholder, trailing, ...props }: Readonly<CommandInputProps>): React.JSX.Element;
106
106
  type CommandListProps = React.ComponentProps<typeof Command$1.List> & {
107
107
  /** The accessible name of the list of results — passed translated ("Suggestions", "Results"). */
108
108
  label: string;
@@ -112,7 +112,7 @@ type CommandListProps = React.ComponentProps<typeof Command$1.List> & {
112
112
  */
113
113
  emptyLabel?: React.ReactNode;
114
114
  };
115
- declare function CommandList({ className, emptyLabel, children, ...props }: CommandListProps): React.JSX.Element;
115
+ declare function CommandList({ className, emptyLabel, children, ...props }: Readonly<CommandListProps>): React.JSX.Element;
116
116
  type CommandEmptyProps = Omit<React.ComponentProps<typeof Command$1.Empty>, "children"> & {
117
117
  /** Shown when nothing matches — passed translated. */
118
118
  emptyLabel: React.ReactNode;
@@ -122,17 +122,17 @@ type CommandEmptyProps = Omit<React.ComponentProps<typeof Command$1.Empty>, "chi
122
122
  * inside it: inside, it is rendered as before but warns in development — the listbox then holds text, which axe
123
123
  * refuses (`aria-required-children`).
124
124
  */
125
- declare function CommandEmpty({ className, emptyLabel, ...props }: CommandEmptyProps): React.JSX.Element;
125
+ declare function CommandEmpty({ className, emptyLabel, ...props }: Readonly<CommandEmptyProps>): React.JSX.Element;
126
126
  /** While results load (`label` is announced). */
127
- declare function CommandLoading({ className, ...props }: React.ComponentProps<typeof Command$1.Loading>): React.JSX.Element;
127
+ declare function CommandLoading({ className, ...props }: Readonly<React.ComponentProps<typeof Command$1.Loading>>): React.JSX.Element;
128
128
  /** A group of items under a `heading`. */
129
- declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof Command$1.Group>): React.JSX.Element;
129
+ declare function CommandGroup({ className, ...props }: Readonly<React.ComponentProps<typeof Command$1.Group>>): React.JSX.Element;
130
130
  /** An option: `onSelect` on Enter or click, `value` and `keywords` for the filter, `disabled`. */
131
- declare function CommandItem({ className, ...props }: React.ComponentProps<typeof Command$1.Item>): React.JSX.Element;
131
+ declare function CommandItem({ className, ...props }: Readonly<React.ComponentProps<typeof Command$1.Item>>): React.JSX.Element;
132
132
  /** A line between groups. Decorative (`role="none"`): cmdk's own separator is a role a listbox may not hold (axe). */
133
- declare function CommandSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
133
+ declare function CommandSeparator({ className, ...props }: Readonly<React.ComponentProps<"div">>): React.JSX.Element;
134
134
  /** A keyboard hint at the end of an item. */
135
- declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
135
+ declare function CommandShortcut({ className, ...props }: Readonly<React.ComponentProps<"span">>): React.JSX.Element;
136
136
  /** `Command.Root/Input/List/Empty/Loading/Group/Item/Separator/Shortcut`. */
137
137
  declare const Command: {
138
138
  Root: typeof CommandRoot;
@@ -163,7 +163,7 @@ type CommandDialogProps = Omit<CommandRootProps, "title"> & {
163
163
  * The palette in a dialog (Radix: focus trap, Escape, focus return). The dialog is named by `label`; it has no close
164
164
  * button — Escape and a click outside close it — and the input takes the focus when it opens.
165
165
  */
166
- declare function CommandDialog({ open, defaultOpen, onOpenChange, footer, contentProps, label, className, children, ...props }: CommandDialogProps): React.JSX.Element;
166
+ declare function CommandDialog({ open, defaultOpen, onOpenChange, footer, contentProps, label, className, children, ...props }: Readonly<CommandDialogProps>): React.JSX.Element;
167
167
 
168
168
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandRoot, CommandSeparator, CommandShortcut, command };
169
169
  export type { CommandDialogProps, CommandEmptyProps, CommandInputProps, CommandListProps, CommandRootProps };
package/dist/command.js CHANGED
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import {
3
3
  DialogContent
4
- } from "./chunk-GHAN7OOE.js";
5
- import "./chunk-V7W4RLRW.js";
4
+ } from "./chunk-N6LAWI4F.js";
5
+ import "./chunk-HWIDTLLO.js";
6
6
  import "./chunk-D3T54RSL.js";
7
- import "./chunk-WEVYKZIF.js";
7
+ import "./chunk-EAXIDRMB.js";
8
8
  import {
9
9
  cn
10
- } from "./chunk-NSLXEDIS.js";
10
+ } from "./chunk-HHBTM4AU.js";
11
11
 
12
12
  // src/command/command.tsx
13
13
  import { Command as CommandPrimitive } from "cmdk";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/command/command.tsx"],"sourcesContent":["// Client. A command palette on cmdk: the combobox / listbox roles, the active option (aria-activedescendant), the\n// arrows, Home / End, Enter, and the filtering (turn it off with `shouldFilter={false}` when the server searches).\n// `CommandDialog` puts it in the platform's Dialog. Words arrive as props.\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { DialogContent, type DialogContentProps } from \"../dialog/dialog\";\n\nexport const command = tv({\n slots: {\n root: \"flex h-full w-full flex-col overflow-hidden bg-surface-1 text-fg\",\n inputWrap: \"flex items-center gap-3 border-b border-border-default px-4\",\n icon: \"h-5 w-5 shrink-0 text-fg-secondary\",\n input:\n \"h-13 w-full min-w-0 flex-1 bg-transparent text-sm text-fg outline-hidden placeholder:text-fg-muted disabled:cursor-not-allowed disabled:opacity-50 sm:text-base\",\n list: \"max-h-[min(60dvh,26rem)] scroll-py-2 overflow-y-auto overscroll-contain p-2 [&:not(:has([cmdk-item]))]:p-0\",\n empty: \"px-3 py-8 text-center text-sm text-fg-secondary\",\n loading: \"px-3 py-6 text-center text-sm text-fg-secondary\",\n group:\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-group-heading]]:text-xs \" +\n \"[&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:[&_[cmdk-group-heading]]:[&_[cmdk-group-heading]]:text-fg-secondary\",\n item:\n \"relative flex cursor-pointer select-none items-center gap-3 rounded-lg px-3 py-2.5 text-sm text-fg outline-hidden transition-colors \" +\n \"before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-transparent \" +\n \"data-[selected=true]:bg-surface-2 data-[selected=true]:before:bg-accent data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-40\",\n separator: \"-mx-2 my-1 h-px bg-border-subtle\",\n shortcut: \"ml-auto text-xs text-fg-secondary\",\n },\n});\nconst s = command();\n\nfunction SearchIcon({ className }: { className?: string }) {\n return (\n <svg viewBox=\"0 0 24 24\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n );\n}\n\nexport type CommandRootProps = React.ComponentProps<typeof CommandPrimitive> & {\n /** The accessible name of the palette — passed translated (\"Search\", \"Commands\"). */\n label: string;\n};\n\n/** The palette: `value` / `onValueChange` (the active item), `shouldFilter`, `filter`, `loop`. */\nexport function CommandRoot({ className, ...props }: CommandRootProps) {\n return <CommandPrimitive className={s.root({ className })} {...props} />;\n}\n\nexport type CommandInputProps = Omit<React.ComponentProps<typeof CommandPrimitive.Input>, \"placeholder\"> & {\n /** What to type — passed translated. The input is named by the palette's `label`. */\n placeholder: string;\n /** After the input, inside the bar: a spinner, a clear button. */\n trailing?: React.ReactNode;\n};\n\n/** The search field (`value` / `onValueChange` for the query), with a magnifier. */\nexport function CommandInput({ className, placeholder, trailing, ...props }: CommandInputProps) {\n return (\n <div className={s.inputWrap()} cmdk-input-wrapper=\"\">\n <SearchIcon className={s.icon()} />\n <CommandPrimitive.Input placeholder={placeholder} className={s.input({ className })} {...props} />\n {trailing}\n </div>\n );\n}\n\n// Set inside `Command.List`: a listbox may only hold options and groups (axe `aria-required-children`), so the empty\n// message must live beside it, not in it.\nconst InsideList = React.createContext(false);\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List> & {\n /** The accessible name of the list of results — passed translated (\"Suggestions\", \"Results\"). */\n label: string;\n /**\n * Shown when nothing matches — passed translated. Rendered after the listbox, never inside it: an empty listbox is\n * valid, a listbox holding text is not.\n */\n emptyLabel?: React.ReactNode;\n};\n\nexport function CommandList({ className, emptyLabel, children, ...props }: CommandListProps) {\n return (\n <>\n <CommandPrimitive.List className={s.list({ className })} {...props}>\n <InsideList.Provider value>{children}</InsideList.Provider>\n </CommandPrimitive.List>\n {emptyLabel === undefined ? null : <CommandEmpty emptyLabel={emptyLabel} />}\n </>\n );\n}\n\nexport type CommandEmptyProps = Omit<React.ComponentProps<typeof CommandPrimitive.Empty>, \"children\"> & {\n /** Shown when nothing matches — passed translated. */\n emptyLabel: React.ReactNode;\n};\n\n/**\n * Shown by cmdk only when no item matches. Place it beside `Command.List` (or pass `emptyLabel` to the list), never\n * inside it: inside, it is rendered as before but warns in development — the listbox then holds text, which axe\n * refuses (`aria-required-children`).\n */\nexport function CommandEmpty({ className, emptyLabel, ...props }: CommandEmptyProps) {\n const inside = React.useContext(InsideList);\n React.useEffect(() => {\n if (inside && typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\n console.warn(\"@krizaka/ui/command: <Command.Empty> inside <Command.List> breaks the listbox (axe aria-required-children). Pass `emptyLabel` to <Command.List> instead.\");\n }\n }, [inside]);\n return (\n <CommandPrimitive.Empty className={s.empty({ className })} {...props}>\n {emptyLabel}\n </CommandPrimitive.Empty>\n );\n}\n\n/** While results load (`label` is announced). */\nexport function CommandLoading({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Loading>) {\n return <CommandPrimitive.Loading className={s.loading({ className })} {...props} />;\n}\n\n/** A group of items under a `heading`. */\nexport function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return <CommandPrimitive.Group className={s.group({ className })} {...props} />;\n}\n\n/** An option: `onSelect` on Enter or click, `value` and `keywords` for the filter, `disabled`. */\nexport function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return <CommandPrimitive.Item className={s.item({ className })} {...props} />;\n}\n\n/** A line between groups. Decorative (`role=\"none\"`): cmdk's own separator is a role a listbox may not hold (axe). */\nexport function CommandSeparator({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div role=\"none\" className={s.separator({ className })} {...props} />;\n}\n\n/** A keyboard hint at the end of an item. */\nexport function CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span className={s.shortcut({ className })} {...props} />;\n}\n\n/** `Command.Root/Input/List/Empty/Loading/Group/Item/Separator/Shortcut`. */\nexport const Command = {\n Root: CommandRoot,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Loading: CommandLoading,\n Group: CommandGroup,\n Item: CommandItem,\n Separator: CommandSeparator,\n Shortcut: CommandShortcut,\n};\n\nexport type CommandDialogProps = Omit<CommandRootProps, \"title\"> & {\n /** Open or closed (controlled), with `onOpenChange`. */\n open?: boolean;\n /** Open at first, uncontrolled. */\n defaultOpen?: boolean;\n /** Called when it opens or closes (Escape, a click outside, a shortcut of the product). */\n onOpenChange?: (open: boolean) => void;\n /** Under the palette, inside the dialog: shortcuts, a \"see all results\" link. */\n footer?: React.ReactNode;\n /** Passed to `Dialog.Content`: `size`, `container`, `className` of the dialog. */\n contentProps?: Omit<Extract<DialogContentProps, { hideClose: true }>, \"hideClose\" | \"children\" | \"placement\">;\n};\n\n/**\n * The palette in a dialog (Radix: focus trap, Escape, focus return). The dialog is named by `label`; it has no close\n * button — Escape and a click outside close it — and the input takes the focus when it opens.\n */\nexport function CommandDialog({ open, defaultOpen, onOpenChange, footer, contentProps, label, className, children, ...props }: CommandDialogProps) {\n const { className: contentClassName, ...content } = contentProps ?? {};\n return (\n <DialogPrimitive.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <DialogContent\n hideClose\n size=\"lg\"\n aria-describedby={undefined}\n className={cn(\"top-[12dvh] translate-y-0 sm:top-[14dvh]\", contentClassName)}\n {...content}\n >\n <DialogPrimitive.Title className=\"sr-only\">{label}</DialogPrimitive.Title>\n <CommandRoot label={label} className={className} {...props}>\n {children}\n </CommandRoot>\n {footer}\n </DialogContent>\n </DialogPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,UAAU,uBAAuB;AAC1C,YAAY,WAAW;AACvB,SAAS,UAAU;AA8Bf,SAmDA,UAlDE,KADF;AAzBG,IAAM,UAAU,GAAG;AAAA,EACxB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,OACE;AAAA,IACF,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SAAS;AAAA,IACT,OACE;AAAA,IAEF,MACE;AAAA,IAGF,WAAW;AAAA,IACX,UAAU;AAAA,EACZ;AACF,CAAC;AACD,IAAM,IAAI,QAAQ;AAElB,SAAS,WAAW,EAAE,UAAU,GAA2B;AACzD,SACE,qBAAC,SAAI,SAAQ,aAAY,WAAsB,MAAK,QAAO,QAAO,gBAAe,aAAY,KAAI,eAAc,SAAQ,gBAAe,SAAQ,eAAW,MACvJ;AAAA,wBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,IAC9B,oBAAC,UAAK,GAAE,kBAAiB;AAAA,KAC3B;AAEJ;AAQO,SAAS,YAAY,EAAE,WAAW,GAAG,MAAM,GAAqB;AACrE,SAAO,oBAAC,oBAAiB,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACxE;AAUO,SAAS,aAAa,EAAE,WAAW,aAAa,UAAU,GAAG,MAAM,GAAsB;AAC9F,SACE,qBAAC,SAAI,WAAW,EAAE,UAAU,GAAG,sBAAmB,IAChD;AAAA,wBAAC,cAAW,WAAW,EAAE,KAAK,GAAG;AAAA,IACjC,oBAAC,iBAAiB,OAAjB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AAO;AAC7E;AAGO,SAAS,iBAAiB,EAAE,WAAW,GAAG,MAAM,GAAgC;AACrF,SAAO,oBAAC,SAAI,MAAK,QAAO,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC5E;AAGO,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAiC;AACrF,SAAO,oBAAC,UAAK,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAChE;AAGO,IAAM,UAAU;AAAA,EACrB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AACZ;AAmBO,SAAS,cAAc,EAAE,MAAM,aAAa,cAAc,QAAQ,cAAc,OAAO,WAAW,UAAU,GAAG,MAAM,GAAuB;AACjJ,QAAM,EAAE,WAAW,kBAAkB,GAAG,QAAQ,IAAI,gBAAgB,CAAC;AACrE,SACE,oBAAC,gBAAgB,MAAhB,EAAqB,MAAY,aAA0B,cAC1D;AAAA,IAAC;AAAA;AAAA,MACC,WAAS;AAAA,MACT,MAAK;AAAA,MACL,oBAAkB;AAAA,MAClB,WAAW,GAAG,4CAA4C,gBAAgB;AAAA,MACzE,GAAG;AAAA,MAEJ;AAAA,4BAAC,gBAAgB,OAAhB,EAAsB,WAAU,WAAW,iBAAM;AAAA,QAClD,oBAAC,eAAY,OAAc,WAAuB,GAAG,OAClD,UACH;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/command/command.tsx"],"sourcesContent":["// Client. A command palette on cmdk: the combobox / listbox roles, the active option (aria-activedescendant), the\n// arrows, Home / End, Enter, and the filtering (turn it off with `shouldFilter={false}` when the server searches).\n// `CommandDialog` puts it in the platform's Dialog. Words arrive as props.\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Dialog as DialogPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { DialogContent, type DialogContentProps } from \"../dialog/dialog\";\n\nexport const command = tv({\n slots: {\n root: \"flex h-full w-full flex-col overflow-hidden bg-surface-1 text-fg\",\n inputWrap: \"flex items-center gap-3 border-b border-border-default px-4\",\n icon: \"h-5 w-5 shrink-0 text-fg-secondary\",\n input:\n \"h-13 w-full min-w-0 flex-1 bg-transparent text-sm text-fg outline-hidden placeholder:text-fg-muted disabled:cursor-not-allowed disabled:opacity-50 sm:text-base\",\n list: \"max-h-[min(60dvh,26rem)] scroll-py-2 overflow-y-auto overscroll-contain p-2 [&:not(:has([cmdk-item]))]:p-0\",\n empty: \"px-3 py-8 text-center text-sm text-fg-secondary\",\n loading: \"px-3 py-6 text-center text-sm text-fg-secondary\",\n group:\n \"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-group-heading]]:text-xs \" +\n \"[&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:[&_[cmdk-group-heading]]:[&_[cmdk-group-heading]]:text-fg-secondary\",\n item:\n \"relative flex cursor-pointer select-none items-center gap-3 rounded-lg px-3 py-2.5 text-sm text-fg outline-hidden transition-colors \" +\n \"before:absolute before:inset-y-2 before:left-0 before:w-0.5 before:rounded-full before:bg-transparent \" +\n \"data-[selected=true]:bg-surface-2 data-[selected=true]:before:bg-accent data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-40\",\n separator: \"-mx-2 my-1 h-px bg-border-subtle\",\n shortcut: \"ml-auto text-xs text-fg-secondary\",\n },\n});\nconst s = command();\n\nfunction SearchIcon({ className }: Readonly<{ className?: string }>) {\n return (\n <svg viewBox=\"0 0 24 24\" className={className} fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <circle cx=\"11\" cy=\"11\" r=\"7\" />\n <path d=\"m20 20-3.5-3.5\" />\n </svg>\n );\n}\n\nexport type CommandRootProps = React.ComponentProps<typeof CommandPrimitive> & {\n /** The accessible name of the palette — passed translated (\"Search\", \"Commands\"). */\n label: string;\n};\n\n/** The palette: `value` / `onValueChange` (the active item), `shouldFilter`, `filter`, `loop`. */\nexport function CommandRoot({ className, ...props }: Readonly<CommandRootProps>) {\n return <CommandPrimitive className={s.root({ className })} {...props} />;\n}\n\nexport type CommandInputProps = Omit<React.ComponentProps<typeof CommandPrimitive.Input>, \"placeholder\"> & {\n /** What to type — passed translated. The input is named by the palette's `label`. */\n placeholder: string;\n /** After the input, inside the bar: a spinner, a clear button. */\n trailing?: React.ReactNode;\n};\n\n/** The search field (`value` / `onValueChange` for the query), with a magnifier. */\nexport function CommandInput({ className, placeholder, trailing, ...props }: Readonly<CommandInputProps>) {\n return (\n <div className={s.inputWrap()} cmdk-input-wrapper=\"\">\n <SearchIcon className={s.icon()} />\n <CommandPrimitive.Input placeholder={placeholder} className={s.input({ className })} {...props} />\n {trailing}\n </div>\n );\n}\n\n// Set inside `Command.List`: a listbox may only hold options and groups (axe `aria-required-children`), so the empty\n// message must live beside it, not in it.\nconst InsideList = React.createContext(false);\n\nexport type CommandListProps = React.ComponentProps<typeof CommandPrimitive.List> & {\n /** The accessible name of the list of results — passed translated (\"Suggestions\", \"Results\"). */\n label: string;\n /**\n * Shown when nothing matches — passed translated. Rendered after the listbox, never inside it: an empty listbox is\n * valid, a listbox holding text is not.\n */\n emptyLabel?: React.ReactNode;\n};\n\nexport function CommandList({ className, emptyLabel, children, ...props }: Readonly<CommandListProps>) {\n return (\n <>\n <CommandPrimitive.List className={s.list({ className })} {...props}>\n <InsideList.Provider value>{children}</InsideList.Provider>\n </CommandPrimitive.List>\n {emptyLabel === undefined ? null : <CommandEmpty emptyLabel={emptyLabel} />}\n </>\n );\n}\n\nexport type CommandEmptyProps = Omit<React.ComponentProps<typeof CommandPrimitive.Empty>, \"children\"> & {\n /** Shown when nothing matches — passed translated. */\n emptyLabel: React.ReactNode;\n};\n\n/**\n * Shown by cmdk only when no item matches. Place it beside `Command.List` (or pass `emptyLabel` to the list), never\n * inside it: inside, it is rendered as before but warns in development — the listbox then holds text, which axe\n * refuses (`aria-required-children`).\n */\nexport function CommandEmpty({ className, emptyLabel, ...props }: Readonly<CommandEmptyProps>) {\n const inside = React.useContext(InsideList);\n React.useEffect(() => {\n if (inside && typeof process !== \"undefined\" && process.env.NODE_ENV !== \"production\") {\n console.warn(\"@krizaka/ui/command: <Command.Empty> inside <Command.List> breaks the listbox (axe aria-required-children). Pass `emptyLabel` to <Command.List> instead.\");\n }\n }, [inside]);\n return (\n <CommandPrimitive.Empty className={s.empty({ className })} {...props}>\n {emptyLabel}\n </CommandPrimitive.Empty>\n );\n}\n\n/** While results load (`label` is announced). */\nexport function CommandLoading({ className, ...props }: Readonly<React.ComponentProps<typeof CommandPrimitive.Loading>>) {\n return <CommandPrimitive.Loading className={s.loading({ className })} {...props} />;\n}\n\n/** A group of items under a `heading`. */\nexport function CommandGroup({ className, ...props }: Readonly<React.ComponentProps<typeof CommandPrimitive.Group>>) {\n return <CommandPrimitive.Group className={s.group({ className })} {...props} />;\n}\n\n/** An option: `onSelect` on Enter or click, `value` and `keywords` for the filter, `disabled`. */\nexport function CommandItem({ className, ...props }: Readonly<React.ComponentProps<typeof CommandPrimitive.Item>>) {\n return <CommandPrimitive.Item className={s.item({ className })} {...props} />;\n}\n\n/** A line between groups. Decorative (`role=\"none\"`): cmdk's own separator is a role a listbox may not hold (axe). */\nexport function CommandSeparator({ className, ...props }: Readonly<React.ComponentProps<\"div\">>) {\n return <div role=\"none\" className={s.separator({ className })} {...props} />;\n}\n\n/** A keyboard hint at the end of an item. */\nexport function CommandShortcut({ className, ...props }: Readonly<React.ComponentProps<\"span\">>) {\n return <span className={s.shortcut({ className })} {...props} />;\n}\n\n/** `Command.Root/Input/List/Empty/Loading/Group/Item/Separator/Shortcut`. */\nexport const Command = {\n Root: CommandRoot,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Loading: CommandLoading,\n Group: CommandGroup,\n Item: CommandItem,\n Separator: CommandSeparator,\n Shortcut: CommandShortcut,\n};\n\nexport type CommandDialogProps = Omit<CommandRootProps, \"title\"> & {\n /** Open or closed (controlled), with `onOpenChange`. */\n open?: boolean;\n /** Open at first, uncontrolled. */\n defaultOpen?: boolean;\n /** Called when it opens or closes (Escape, a click outside, a shortcut of the product). */\n onOpenChange?: (open: boolean) => void;\n /** Under the palette, inside the dialog: shortcuts, a \"see all results\" link. */\n footer?: React.ReactNode;\n /** Passed to `Dialog.Content`: `size`, `container`, `className` of the dialog. */\n contentProps?: Omit<Extract<DialogContentProps, { hideClose: true }>, \"hideClose\" | \"children\" | \"placement\">;\n};\n\n/**\n * The palette in a dialog (Radix: focus trap, Escape, focus return). The dialog is named by `label`; it has no close\n * button — Escape and a click outside close it — and the input takes the focus when it opens.\n */\nexport function CommandDialog({ open, defaultOpen, onOpenChange, footer, contentProps, label, className, children, ...props }: Readonly<CommandDialogProps>) {\n const { className: contentClassName, ...content } = contentProps ?? {};\n return (\n <DialogPrimitive.Root open={open} defaultOpen={defaultOpen} onOpenChange={onOpenChange}>\n <DialogContent\n hideClose\n size=\"lg\"\n aria-describedby={undefined}\n className={cn(\"top-[12dvh] translate-y-0 sm:top-[14dvh]\", contentClassName)}\n {...content}\n >\n <DialogPrimitive.Title className=\"sr-only\">{label}</DialogPrimitive.Title>\n <CommandRoot label={label} className={className} {...props}>\n {children}\n </CommandRoot>\n {footer}\n </DialogContent>\n </DialogPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAGA,SAAS,WAAW,wBAAwB;AAC5C,SAAS,UAAU,uBAAuB;AAC1C,YAAY,WAAW;AACvB,SAAS,UAAU;AA8Bf,SAmDA,UAlDE,KADF;AAzBG,IAAM,UAAU,GAAG;AAAA,EACxB,OAAO;AAAA,IACL,MAAM;AAAA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AA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,UAAU;AACZ;AAmBO,SAAS,cAAc,EAAE,MAAM,aAAa,cAAc,QAAQ,cAAc,OAAO,WAAW,UAAU,GAAG,MAAM,GAAiC;AAC3J,QAAM,EAAE,WAAW,kBAAkB,GAAG,QAAQ,IAAI,gBAAgB,CAAC;AACrE,SACE,oBAAC,gBAAgB,MAAhB,EAAqB,MAAY,aAA0B,cAC1D;AAAA,IAAC;AAAA;AAAA,MACC,WAAS;AAAA,MACT,MAAK;AAAA,MACL,oBAAkB;AAAA,MAClB,WAAW,GAAG,4CAA4C,gBAAgB;AAAA,MACzE,GAAG;AAAA,MAEJ;AAAA,4BAAC,gBAAgB,OAAhB,EAAsB,WAAU,WAAW,iBAAM;AAAA,QAClD,oBAAC,eAAY,OAAc,WAAuB,GAAG,OAClD,UACH;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
@@ -39,7 +39,7 @@ interface ComparisonTableProps extends Omit<React.ComponentProps<"div">, "childr
39
39
  reveal?: boolean;
40
40
  }
41
41
  /** A comparison where your column is a highlighted band of the same grid — aligned rows, fair neutral answers, cards on a phone. */
42
- declare function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal, className, ...props }: ComparisonTableProps): React.JSX.Element;
42
+ declare function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal, className, ...props }: Readonly<ComparisonTableProps>): React.JSX.Element;
43
43
 
44
44
  export { ComparisonTable };
45
45
  export type { ComparisonAnswer, ComparisonColumn, ComparisonRow, ComparisonTableProps };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  cn
4
- } from "./chunk-NSLXEDIS.js";
4
+ } from "./chunk-HHBTM4AU.js";
5
5
 
6
6
  // src/comparison-table/comparison-table.tsx
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/comparison-table/comparison-table.tsx"],"sourcesContent":["// Server-safe (no state). A fair \"versus\" block: one grid where every row lines up across the columns, the column you\n// argue for drawn AS a column of the grid (a tinted band with the brand's light, its header part of the band), a small icon per question, each answer as its key phrase in bold then its detail. The other columns stay\n// neutral — never crossed out. Below `md` each question is a card: the question, then the answers stacked, the\n// highlighted one tinted. Rows arrive one after the other (`[data-reveal]`, staggered) when a MotionObserver runs.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface ComparisonColumn {\n /** A stable id: the key of the rows' `answers`. */\n id: string;\n /** The column's name (“A cloud assistant”), passed translated. */\n label: string;\n /** A small icon beside the name. */\n icon?: React.ReactNode;\n}\n\nexport interface ComparisonAnswer {\n /** The key phrase, in bold (“On your machines.”). */\n key: string;\n /** The detail after it (“A cloud model only if you connect one.”). */\n detail?: string;\n}\n\nexport interface ComparisonRow {\n /** A stable key. */\n id: string;\n /** The question (“Where do your prompts go?”). */\n topic: string;\n /** A small icon for the question. */\n icon?: React.ReactNode;\n /** One answer per column id. */\n answers: Readonly<Record<string, ComparisonAnswer>>;\n}\n\nexport interface ComparisonTableProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** The table's accessible name (the section's title), passed translated. */\n label: string;\n /** The first column's header (“Question”). */\n topicLabel: string;\n /** The answer columns, in order. */\n columns: readonly ComparisonColumn[];\n /** The column drawn as the highlighted band (yours). */\n highlight: string;\n /** The questions, in order (three to six). */\n rows: readonly ComparisonRow[];\n /** Stagger the rows' entrance with `[data-reveal]` (needs MotionObserver). @default true */\n reveal?: boolean;\n}\n\nfunction Answer({ answer }: { answer?: ComparisonAnswer }) {\n if (!answer) return null;\n return (\n <>\n <strong className=\"font-semibold text-fg\">{answer.key}</strong>\n {answer.detail && <span className=\"text-fg-secondary\"> {answer.detail}</span>}\n </>\n );\n}\n\n/** The rows' stagger: 70 ms apart, through the motion system's `--kz-delay` (reduced motion: no movement at all). */\nconst stagger = (i: number): React.CSSProperties => ({ \"--kz-delay\": `${i * 70}ms` }) as React.CSSProperties;\n\n/** A comparison where your column is a highlighted band of the same grid — aligned rows, fair neutral answers, cards on a phone. */\nexport function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal = true, className, ...props }: ComparisonTableProps) {\n const at = Math.max(columns.findIndex((c) => c.id === highlight), 0);\n const grid = { gridTemplateColumns: `minmax(10rem, 0.9fr) repeat(${columns.length}, minmax(0, 1fr))` };\n const band = (i: number) => i === at;\n return (\n <div data-kz-comparison className={cn(\"w-full\", className)} {...props}>\n {/* Wide: one grid, the band is a grid item spanning every row of its column — the rows cannot drift. */}\n <div role=\"table\" aria-label={label} className=\"relative hidden md:grid\" style={grid}>\n <div\n aria-hidden\n data-band\n className=\"pointer-events-none rounded-none border border-accent bg-accent-soft\"\n style={{ gridColumn: at + 2, gridRow: `1 / span ${rows.length + 1}` }}\n />\n <div role=\"row\" className=\"contents\">\n <span role=\"columnheader\" className=\"row-start-1 self-end px-4 pb-4 pt-5 font-mono text-xs font-semibold text-fg-secondary\" style={{ gridColumn: 1 }}>\n {topicLabel}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"columnheader\"\n data-highlight={band(i) ? \"\" : undefined}\n className={cn(\"row-start-1 flex items-center gap-2 self-stretch px-5 pb-4 pt-5 text-sm font-semibold\", band(i) ? \"text-fg [&_svg]:text-fg-accent\" : \"text-fg-secondary\")}\n style={{ gridColumn: i + 2 }}\n >\n {c.icon}\n {c.label}\n </span>\n ))}\n </div>\n {rows.map((row, r) => (\n <div key={row.id} role=\"row\" className=\"contents\">\n <span role=\"rowheader\" data-reveal={reveal ? \"soft\" : undefined} style={{ ...stagger(r), gridColumn: 1, gridRow: r + 2 }} className=\"flex items-start gap-3 border-t border-border-subtle px-4 py-5 text-base font-semibold text-fg\">\n {row.icon && <span className=\"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"cell\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={{ ...stagger(r), gridColumn: i + 2, gridRow: r + 2 }}\n className={cn(\"border-t px-5 py-5 text-sm leading-relaxed\", band(i) ? \"border-accent/20\" : \"border-border-subtle\")}\n >\n <Answer answer={row.answers[c.id]} />\n </span>\n ))}\n </div>\n ))}\n </div>\n\n {/* Phone: one card per question, the answers stacked, the highlighted one tinted. */}\n <ul aria-label={label} className=\"grid gap-4 md:hidden\">\n {rows.map((row, r) => (\n <li key={row.id} data-reveal={reveal ? \"soft\" : undefined} style={stagger(r)} className=\"rounded-none border border-border-subtle bg-surface-1/80 p-4\">\n <p className=\"flex items-center gap-3 text-base font-semibold text-fg\">\n {row.icon && <span className=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </p>\n <dl className=\"mt-3 grid gap-2\">\n {columns.map((c, i) => (\n <div key={c.id} data-highlight={band(i) ? \"\" : undefined} className={cn(\"rounded-none p-3 text-sm leading-relaxed\", band(i) ? \"border border-accent bg-accent-soft\" : \"bg-surface-2/60\")}>\n <dt className={cn(\"mb-1 flex items-center gap-1.5 font-mono text-[11px] \", band(i) ? \"text-fg-accent\" : \"text-fg-secondary\")}>\n {c.label}\n </dt>\n <dd>\n <Answer answer={row.answers[c.id]} />\n </dd>\n </div>\n ))}\n </dl>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;AAqDI,mBACE,KACkB,YAFpB;AAHJ,SAAS,OAAO,EAAE,OAAO,GAAkC;AACzD,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE,iCACE;AAAA,wBAAC,YAAO,WAAU,yBAAyB,iBAAO,KAAI;AAAA,IACrD,OAAO,UAAU,qBAAC,UAAK,WAAU,qBAAoB;AAAA;AAAA,MAAE,OAAO;AAAA,OAAO;AAAA,KACxE;AAEJ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AE,EAAE,GAAG,GACrC;AAAA,WANQ,EAAE,EAOZ,CACD,GACH;AAAA,SAhBO,IAAI,EAiBb,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/comparison-table/comparison-table.tsx"],"sourcesContent":["// Server-safe (no state). A fair \"versus\" block: one grid where every row lines up across the columns, the column you\n// argue for drawn AS a column of the grid (a tinted band with the brand's light, its header part of the band), a small icon per question, each answer as its key phrase in bold then its detail. The other columns stay\n// neutral — never crossed out. Below `md` each question is a card: the question, then the answers stacked, the\n// highlighted one tinted. Rows arrive one after the other (`[data-reveal]`, staggered) when a MotionObserver runs.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface ComparisonColumn {\n /** A stable id: the key of the rows' `answers`. */\n id: string;\n /** The column's name (“A cloud assistant”), passed translated. */\n label: string;\n /** A small icon beside the name. */\n icon?: React.ReactNode;\n}\n\nexport interface ComparisonAnswer {\n /** The key phrase, in bold (“On your machines.”). */\n key: string;\n /** The detail after it (“A cloud model only if you connect one.”). */\n detail?: string;\n}\n\nexport interface ComparisonRow {\n /** A stable key. */\n id: string;\n /** The question (“Where do your prompts go?”). */\n topic: string;\n /** A small icon for the question. */\n icon?: React.ReactNode;\n /** One answer per column id. */\n answers: Readonly<Record<string, ComparisonAnswer>>;\n}\n\nexport interface ComparisonTableProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** The table's accessible name (the section's title), passed translated. */\n label: string;\n /** The first column's header (“Question”). */\n topicLabel: string;\n /** The answer columns, in order. */\n columns: readonly ComparisonColumn[];\n /** The column drawn as the highlighted band (yours). */\n highlight: string;\n /** The questions, in order (three to six). */\n rows: readonly ComparisonRow[];\n /** Stagger the rows' entrance with `[data-reveal]` (needs MotionObserver). @default true */\n reveal?: boolean;\n}\n\nfunction Answer({ answer }: Readonly<{ answer?: ComparisonAnswer }>) {\n if (!answer) return null;\n return (\n <>\n <strong className=\"font-semibold text-fg\">{answer.key}</strong>\n {answer.detail && <span className=\"text-fg-secondary\"> {answer.detail}</span>}\n </>\n );\n}\n\n/** The rows' stagger: 70 ms apart, through the motion system's `--kz-delay` (reduced motion: no movement at all). */\nconst stagger = (i: number): React.CSSProperties => ({ \"--kz-delay\": `${i * 70}ms` }) as React.CSSProperties;\n\n/** A comparison where your column is a highlighted band of the same grid — aligned rows, fair neutral answers, cards on a phone. */\nexport function ComparisonTable({ label, topicLabel, columns, highlight, rows, reveal = true, className, ...props }: Readonly<ComparisonTableProps>) {\n const at = Math.max(columns.findIndex((c) => c.id === highlight), 0);\n const grid = { gridTemplateColumns: `minmax(10rem, 0.9fr) repeat(${columns.length}, minmax(0, 1fr))` };\n const band = (i: number) => i === at;\n return (\n <div data-kz-comparison className={cn(\"w-full\", className)} {...props}>\n {/* Wide: one grid, the band is a grid item spanning every row of its column — the rows cannot drift. */}\n <div role=\"table\" aria-label={label} className=\"relative hidden md:grid\" style={grid}>\n <div\n aria-hidden\n data-band\n className=\"pointer-events-none rounded-none border border-accent bg-accent-soft\"\n style={{ gridColumn: at + 2, gridRow: `1 / span ${rows.length + 1}` }}\n />\n <div role=\"row\" className=\"contents\">\n <span role=\"columnheader\" className=\"row-start-1 self-end px-4 pb-4 pt-5 font-mono text-xs font-semibold text-fg-secondary\" style={{ gridColumn: 1 }}>\n {topicLabel}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"columnheader\"\n data-highlight={band(i) ? \"\" : undefined}\n className={cn(\"row-start-1 flex items-center gap-2 self-stretch px-5 pb-4 pt-5 text-sm font-semibold\", band(i) ? \"text-fg [&_svg]:text-fg-accent\" : \"text-fg-secondary\")}\n style={{ gridColumn: i + 2 }}\n >\n {c.icon}\n {c.label}\n </span>\n ))}\n </div>\n {rows.map((row, r) => (\n <div key={row.id} role=\"row\" className=\"contents\">\n <span role=\"rowheader\" data-reveal={reveal ? \"soft\" : undefined} style={{ ...stagger(r), gridColumn: 1, gridRow: r + 2 }} className=\"flex items-start gap-3 border-t border-border-subtle px-4 py-5 text-base font-semibold text-fg\">\n {row.icon && <span className=\"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </span>\n {columns.map((c, i) => (\n <span\n key={c.id}\n role=\"cell\"\n data-reveal={reveal ? \"soft\" : undefined}\n style={{ ...stagger(r), gridColumn: i + 2, gridRow: r + 2 }}\n className={cn(\"border-t px-5 py-5 text-sm leading-relaxed\", band(i) ? \"border-accent/20\" : \"border-border-subtle\")}\n >\n <Answer answer={row.answers[c.id]} />\n </span>\n ))}\n </div>\n ))}\n </div>\n\n {/* Phone: one card per question, the answers stacked, the highlighted one tinted. */}\n <ul aria-label={label} className=\"grid gap-4 md:hidden\">\n {rows.map((row, r) => (\n <li key={row.id} data-reveal={reveal ? \"soft\" : undefined} style={stagger(r)} className=\"rounded-none border border-border-subtle bg-surface-1/80 p-4\">\n <p className=\"flex items-center gap-3 text-base font-semibold text-fg\">\n {row.icon && <span className=\"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-border-default bg-surface-2 text-fg-accent [&>svg]:h-4 [&>svg]:w-4\">{row.icon}</span>}\n {row.topic}\n </p>\n <dl className=\"mt-3 grid gap-2\">\n {columns.map((c, i) => (\n <div key={c.id} data-highlight={band(i) ? \"\" : undefined} className={cn(\"rounded-none p-3 text-sm leading-relaxed\", band(i) ? \"border border-accent bg-accent-soft\" : \"bg-surface-2/60\")}>\n <dt className={cn(\"mb-1 flex items-center gap-1.5 font-mono text-[11px] \", band(i) ? \"text-fg-accent\" : \"text-fg-secondary\")}>\n {c.label}\n </dt>\n <dd>\n <Answer answer={row.answers[c.id]} />\n </dd>\n </div>\n ))}\n </dl>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n"],"mappings":";;;;;;AAqDI,mBACE,KACkB,YAFpB;AAHJ,SAAS,OAAO,EAAE,OAAO,GAA4C;AACnE,MAAI,CAAC,OAAQ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