@logicplanes/kaeso-ui 0.6.0-rc.8 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/README.md +2 -0
  2. package/ai/component-guides.md +246 -49
  3. package/ai/component-registry.json +984 -172
  4. package/ai/component-registry.md +238 -44
  5. package/ai/icons.md +3 -3
  6. package/ai/tokens.md +23 -1
  7. package/dist/chunks/{app-frame-BQglMYqg.js → app-frame-R1TWy5PY.js} +6 -6
  8. package/dist/chunks/{app-frame-BQglMYqg.js.map → app-frame-R1TWy5PY.js.map} +1 -1
  9. package/dist/chunks/{avatar-BxurPxr-.js → avatar-DVrkoFEg.js} +3 -3
  10. package/dist/chunks/{avatar-BxurPxr-.js.map → avatar-DVrkoFEg.js.map} +1 -1
  11. package/dist/chunks/{badge-D0xd2NJD.js → badge-CTYrfTwc.js} +3 -3
  12. package/dist/chunks/{badge-D0xd2NJD.js.map → badge-CTYrfTwc.js.map} +1 -1
  13. package/dist/chunks/{banner-CDxD8uNX.js → banner-cJ89c-IR.js} +4 -4
  14. package/dist/chunks/{banner-CDxD8uNX.js.map → banner-cJ89c-IR.js.map} +1 -1
  15. package/dist/chunks/{button-CcXKlcXd.js → button-Da8b-8ub.js} +83 -72
  16. package/dist/chunks/button-Da8b-8ub.js.map +1 -0
  17. package/dist/chunks/{button-group-DuDLB-P0.js → button-group-BJxaz0sb.js} +5 -5
  18. package/dist/chunks/{button-group-DuDLB-P0.js.map → button-group-BJxaz0sb.js.map} +1 -1
  19. package/dist/chunks/{calendar-65N4gUmO.js → calendar-CA9mDtwp.js} +2 -2
  20. package/dist/chunks/{calendar-65N4gUmO.js.map → calendar-CA9mDtwp.js.map} +1 -1
  21. package/dist/chunks/{checkbox-BB_tV5ic.js → checkbox-CPL47-us.js} +4 -4
  22. package/dist/chunks/{checkbox-BB_tV5ic.js.map → checkbox-CPL47-us.js.map} +1 -1
  23. package/dist/chunks/{cn-BUMD6lNz.js → cn-CLpm819s.js} +4 -1
  24. package/dist/chunks/cn-CLpm819s.js.map +1 -0
  25. package/dist/chunks/{code-BBeW-m4W.js → code-CpqXogQK.js} +2 -2
  26. package/dist/chunks/{code-BBeW-m4W.js.map → code-CpqXogQK.js.map} +1 -1
  27. package/dist/chunks/code-block-7c_BOBlJ.js +247 -0
  28. package/dist/chunks/code-block-7c_BOBlJ.js.map +1 -0
  29. package/dist/chunks/{code-block-CbVLyIr-.js → code-block-BqFGa1-b.js} +82 -81
  30. package/dist/chunks/code-block-BqFGa1-b.js.map +1 -0
  31. package/dist/chunks/{collapsible-CiDUGq5u.js → collapsible-DmLyF8Ol.js} +3 -3
  32. package/dist/chunks/{collapsible-CiDUGq5u.js.map → collapsible-DmLyF8Ol.js.map} +1 -1
  33. package/dist/chunks/{combobox-BX703kW9.js → combobox-B-xciC2c.js} +6 -6
  34. package/dist/chunks/{combobox-BX703kW9.js.map → combobox-B-xciC2c.js.map} +1 -1
  35. package/dist/chunks/{command-list-BLVmk0z6.js → command-list-GQ3y8on6.js} +4 -4
  36. package/dist/chunks/{command-list-BLVmk0z6.js.map → command-list-GQ3y8on6.js.map} +1 -1
  37. package/dist/chunks/{command-palette-s_qW_RRa.js → command-palette-DEJDRW31.js} +5 -5
  38. package/dist/chunks/{command-palette-s_qW_RRa.js.map → command-palette-DEJDRW31.js.map} +1 -1
  39. package/dist/chunks/{copy-button-CK-ddxCg.js → copy-button-B67MEIu2.js} +6 -5
  40. package/dist/chunks/copy-button-B67MEIu2.js.map +1 -0
  41. package/dist/chunks/core-CQUQdd7y.js +414 -0
  42. package/dist/chunks/core-CQUQdd7y.js.map +1 -0
  43. package/dist/chunks/dashboard-NqG9Wgga.js +132 -0
  44. package/dist/chunks/dashboard-NqG9Wgga.js.map +1 -0
  45. package/dist/chunks/data-table-ByhxIgY2.js +625 -0
  46. package/dist/chunks/data-table-ByhxIgY2.js.map +1 -0
  47. package/dist/chunks/{date-picker-DGM5bXxD.js → date-picker-BmLb22jd.js} +8 -8
  48. package/dist/chunks/{date-picker-DGM5bXxD.js.map → date-picker-BmLb22jd.js.map} +1 -1
  49. package/dist/chunks/{date-popup-C2FLIETP.js → date-popup-7ZzVxhY1.js} +4 -4
  50. package/dist/chunks/{date-popup-C2FLIETP.js.map → date-popup-7ZzVxhY1.js.map} +1 -1
  51. package/dist/chunks/{de-aLc0-E5B.js → de-V_lN_KKk.js} +40 -4
  52. package/dist/chunks/de-V_lN_KKk.js.map +1 -0
  53. package/dist/chunks/delta-BCIXqi3O.js +36 -0
  54. package/dist/chunks/delta-BCIXqi3O.js.map +1 -0
  55. package/dist/chunks/{dialog-DhT0sDr6.js → dialog-C3CMOFxU.js} +4 -4
  56. package/dist/chunks/{dialog-DhT0sDr6.js.map → dialog-C3CMOFxU.js.map} +1 -1
  57. package/dist/chunks/{disclosure-DDSekEH6.js → disclosure-DhMvGSll.js} +2 -2
  58. package/dist/chunks/{disclosure-DDSekEH6.js.map → disclosure-DhMvGSll.js.map} +1 -1
  59. package/dist/chunks/{display-options-CRZO-ODl.js → display-options-BTFqLSJX.js} +9 -9
  60. package/dist/chunks/{display-options-CRZO-ODl.js.map → display-options-BTFqLSJX.js.map} +1 -1
  61. package/dist/chunks/{domain-aTOiqhIX.js → domain-DtP6QrOA.js} +9 -9
  62. package/dist/chunks/{domain-aTOiqhIX.js.map → domain-DtP6QrOA.js.map} +1 -1
  63. package/dist/chunks/{empty-DWXE3-2p.js → empty-BSAHpS5Q.js} +2 -2
  64. package/dist/chunks/{empty-DWXE3-2p.js.map → empty-BSAHpS5Q.js.map} +1 -1
  65. package/dist/chunks/{field-CRbWDIsH.js → field-ng87P1GV.js} +2 -2
  66. package/dist/chunks/{field-CRbWDIsH.js.map → field-ng87P1GV.js.map} +1 -1
  67. package/dist/chunks/{figure-C2WlBeYZ.js → figure-_uZS1Y52.js} +3 -3
  68. package/dist/chunks/{figure-C2WlBeYZ.js.map → figure-_uZS1Y52.js.map} +1 -1
  69. package/dist/chunks/{filter-chip-hGC4Okb0.js → filter-chip-CQO2lHeZ.js} +6 -6
  70. package/dist/chunks/{filter-chip-hGC4Okb0.js.map → filter-chip-CQO2lHeZ.js.map} +1 -1
  71. package/dist/chunks/{filter-row-BcBy7gxN.js → filter-row-Bs2lFT67.js} +2 -2
  72. package/dist/chunks/{filter-row-BcBy7gxN.js.map → filter-row-Bs2lFT67.js.map} +1 -1
  73. package/dist/chunks/{flow-T4mRzmsP.js → flow-BGFXfXgJ.js} +3 -3
  74. package/dist/chunks/{flow-T4mRzmsP.js.map → flow-BGFXfXgJ.js.map} +1 -1
  75. package/dist/chunks/{heading-Dua_i106.js → heading-wBU2QK4s.js} +2 -2
  76. package/dist/chunks/{heading-Dua_i106.js.map → heading-wBU2QK4s.js.map} +1 -1
  77. package/dist/chunks/{icon-DI6L-F9F.js → icon-CPiYZMTw.js} +2 -2
  78. package/dist/chunks/{icon-DI6L-F9F.js.map → icon-CPiYZMTw.js.map} +1 -1
  79. package/dist/chunks/icon-lgMMe3zk.js +108 -0
  80. package/dist/chunks/icon-lgMMe3zk.js.map +1 -0
  81. package/dist/chunks/identity-DCghs4Wp.js +872 -0
  82. package/dist/chunks/identity-DCghs4Wp.js.map +1 -0
  83. package/dist/chunks/{input-DHrCmxvX.js → input-QQR4KS9D.js} +5 -5
  84. package/dist/chunks/{input-DHrCmxvX.js.map → input-QQR4KS9D.js.map} +1 -1
  85. package/dist/chunks/{input-group-6LrjOci-.js → input-group-A2mru3OM.js} +4 -4
  86. package/dist/chunks/{input-group-6LrjOci-.js.map → input-group-A2mru3OM.js.map} +1 -1
  87. package/dist/chunks/{input-Ia8Mqd8q.js → input-iSaRkw-V.js} +5 -5
  88. package/dist/chunks/{input-Ia8Mqd8q.js.map → input-iSaRkw-V.js.map} +1 -1
  89. package/dist/chunks/{iso-field-CKN-M0PC.js → iso-field-D2CISQaB.js} +2 -2
  90. package/dist/chunks/{iso-field-CKN-M0PC.js.map → iso-field-D2CISQaB.js.map} +1 -1
  91. package/dist/chunks/{json-view-B6NjVdYp.js → json-view-DeHSFq-2.js} +9 -12
  92. package/dist/chunks/json-view-DeHSFq-2.js.map +1 -0
  93. package/dist/chunks/{kaeso-CE3QS6Xl.js → kaeso-Bs1aLSTp.js} +128 -124
  94. package/dist/chunks/kaeso-Bs1aLSTp.js.map +1 -0
  95. package/dist/chunks/kaeso-theme-BIgOZi41.js +299 -0
  96. package/dist/chunks/kaeso-theme-BIgOZi41.js.map +1 -0
  97. package/dist/chunks/{kbd-CFkkPtOm.js → kbd-xC3k90CH.js} +2 -2
  98. package/dist/chunks/{kbd-CFkkPtOm.js.map → kbd-xC3k90CH.js.map} +1 -1
  99. package/dist/chunks/{key-value-BsnQl9_-.js → key-value-DKW2q0zt.js} +4 -4
  100. package/dist/chunks/{key-value-BsnQl9_-.js.map → key-value-DKW2q0zt.js.map} +1 -1
  101. package/dist/chunks/{link-jtnw0XQV.js → link-CWYlF_dE.js} +3 -3
  102. package/dist/chunks/{link-jtnw0XQV.js.map → link-CWYlF_dE.js.map} +1 -1
  103. package/dist/chunks/{list-Ch4Y7IZk.js → list-CT7yIoA5.js} +9 -9
  104. package/dist/chunks/{list-Ch4Y7IZk.js.map → list-CT7yIoA5.js.map} +1 -1
  105. package/dist/chunks/{loader-2Tsz3V9j.js → loader-D27YO1c3.js} +3 -3
  106. package/dist/chunks/{loader-2Tsz3V9j.js.map → loader-D27YO1c3.js.map} +1 -1
  107. package/dist/chunks/{loader-C9qbRLAi.js → loader-DtZd9btk.js} +2 -2
  108. package/dist/chunks/{loader-C9qbRLAi.js.map → loader-DtZd9btk.js.map} +1 -1
  109. package/dist/chunks/{logo-DlxX9yDU.js → logo-DTqTs3vV.js} +3 -3
  110. package/dist/chunks/{logo-DlxX9yDU.js.map → logo-DTqTs3vV.js.map} +1 -1
  111. package/dist/chunks/markdown-BlIl3LuV.js +325 -0
  112. package/dist/chunks/markdown-BlIl3LuV.js.map +1 -0
  113. package/dist/chunks/{menu-DxmOaBVN.js → menu-D3tUjkCM.js} +4 -4
  114. package/dist/chunks/{menu-DxmOaBVN.js.map → menu-D3tUjkCM.js.map} +1 -1
  115. package/dist/chunks/{meter-CJqtlPjV.js → meter-wcH0LXva.js} +4 -4
  116. package/dist/chunks/{meter-CJqtlPjV.js.map → meter-wcH0LXva.js.map} +1 -1
  117. package/dist/chunks/{nav-sheet-DwAJdFCD.js → nav-sheet-CteQQuMz.js} +3 -3
  118. package/dist/chunks/{nav-sheet-DwAJdFCD.js.map → nav-sheet-CteQQuMz.js.map} +1 -1
  119. package/dist/chunks/{nav-wordmark-3Bvc2UI6.js → nav-wordmark-DR4Glswt.js} +2 -2
  120. package/dist/chunks/{nav-wordmark-3Bvc2UI6.js.map → nav-wordmark-DR4Glswt.js.map} +1 -1
  121. package/dist/chunks/{page-header-DIZCC9oT.js → page-header-JWk6TQNN.js} +5 -5
  122. package/dist/chunks/{page-header-DIZCC9oT.js.map → page-header-JWk6TQNN.js.map} +1 -1
  123. package/dist/chunks/{pagination-DFxZ2d3u.js → pagination-BT-lQc45.js} +3 -3
  124. package/dist/chunks/{pagination-DFxZ2d3u.js.map → pagination-BT-lQc45.js.map} +1 -1
  125. package/dist/chunks/{picker-popover-tBL7TLJC.js → picker-popover-Bb-2Amjw.js} +8 -7
  126. package/dist/chunks/{picker-popover-tBL7TLJC.js.map → picker-popover-Bb-2Amjw.js.map} +1 -1
  127. package/dist/chunks/{popover-DRvCfHVs.js → popover-CAoo5c59.js} +2 -2
  128. package/dist/chunks/{popover-DRvCfHVs.js.map → popover-CAoo5c59.js.map} +1 -1
  129. package/dist/chunks/provider-marks-BVbDRIv-.js +19 -0
  130. package/dist/chunks/provider-marks-BVbDRIv-.js.map +1 -0
  131. package/dist/chunks/{qr-code-HlCtD0aP.js → qr-code-DOsFDNiz.js} +2 -2
  132. package/dist/chunks/{qr-code-HlCtD0aP.js.map → qr-code-DOsFDNiz.js.map} +1 -1
  133. package/dist/chunks/{radio-BNZqKDn4.js → radio-DfOB6J3Z.js} +3 -3
  134. package/dist/chunks/{radio-BNZqKDn4.js.map → radio-DfOB6J3Z.js.map} +1 -1
  135. package/dist/chunks/{range-popup-H1040MdD.js → range-popup-iBru5bpM.js} +7 -7
  136. package/dist/chunks/{range-popup-H1040MdD.js.map → range-popup-iBru5bpM.js.map} +1 -1
  137. package/dist/chunks/{reasoning-frame-BuhiGUBq.js → reasoning-frame-DBIq2SMT.js} +3 -3
  138. package/dist/chunks/{reasoning-frame-BuhiGUBq.js.map → reasoning-frame-DBIq2SMT.js.map} +1 -1
  139. package/dist/chunks/{release-art-BeseUxSj.js → release-art-D7Iq6Qhv.js} +25 -25
  140. package/dist/chunks/release-art-D7Iq6Qhv.js.map +1 -0
  141. package/dist/chunks/{rights-QyZEMemh.js → rights-DDGgi823.js} +10 -10
  142. package/dist/chunks/{rights-QyZEMemh.js.map → rights-DDGgi823.js.map} +1 -1
  143. package/dist/chunks/rolling-number-ea1iiycC.js +41 -0
  144. package/dist/chunks/rolling-number-ea1iiycC.js.map +1 -0
  145. package/dist/chunks/{scroll-area-BvxoHcHS.js → scroll-area-D-ykAChX.js} +2 -2
  146. package/dist/chunks/{scroll-area-BvxoHcHS.js.map → scroll-area-D-ykAChX.js.map} +1 -1
  147. package/dist/chunks/{section-Dd5vmuR1.js → section-BmR6_Wts.js} +3 -3
  148. package/dist/chunks/{section-Dd5vmuR1.js.map → section-BmR6_Wts.js.map} +1 -1
  149. package/dist/chunks/{segmented-Clv2P1AB.js → segmented-BJJHHn0N.js} +17 -67
  150. package/dist/chunks/segmented-BJJHHn0N.js.map +1 -0
  151. package/dist/chunks/{select-DU6O_iW6.js → select-Ch4u5oIg.js} +4 -4
  152. package/dist/chunks/{select-DU6O_iW6.js.map → select-Ch4u5oIg.js.map} +1 -1
  153. package/dist/chunks/{separator-DMXz46Ge.js → separator-B2CT4qia.js} +2 -2
  154. package/dist/chunks/{separator-DMXz46Ge.js.map → separator-B2CT4qia.js.map} +1 -1
  155. package/dist/chunks/{settings-CWvZ9h4g.js → settings-BnheJGYB.js} +3 -3
  156. package/dist/chunks/{settings-CWvZ9h4g.js.map → settings-BnheJGYB.js.map} +1 -1
  157. package/dist/chunks/{sheet-DrxdaMjN.js → sheet-K6qa1kRf.js} +3 -3
  158. package/dist/chunks/{sheet-DrxdaMjN.js.map → sheet-K6qa1kRf.js.map} +1 -1
  159. package/dist/chunks/shiki-CRJpi_Hd.js +99 -0
  160. package/dist/chunks/shiki-CRJpi_Hd.js.map +1 -0
  161. package/dist/chunks/{sidebar-ZDmAFOVM.js → sidebar-D7eSzz33.js} +8 -8
  162. package/dist/chunks/{sidebar-ZDmAFOVM.js.map → sidebar-D7eSzz33.js.map} +1 -1
  163. package/dist/chunks/{sidebar-menu-Iq_ADCGg.js → sidebar-menu-f5NMgTdE.js} +2 -2
  164. package/dist/chunks/{sidebar-menu-Iq_ADCGg.js.map → sidebar-menu-f5NMgTdE.js.map} +1 -1
  165. package/dist/chunks/{skeleton-E7yXpAaT.js → skeleton-Bx-vRJdy.js} +2 -2
  166. package/dist/chunks/{skeleton-E7yXpAaT.js.map → skeleton-Bx-vRJdy.js.map} +1 -1
  167. package/dist/chunks/{slider-DoJfRjX1.js → slider-BuEZfzNB.js} +2 -2
  168. package/dist/chunks/{slider-DoJfRjX1.js.map → slider-BuEZfzNB.js.map} +1 -1
  169. package/dist/chunks/{stat-7VFJ8QW-.js → stat-gR4hFqO8.js} +68 -81
  170. package/dist/chunks/stat-gR4hFqO8.js.map +1 -0
  171. package/dist/chunks/{status-BvzxKVpT.js → status-CejTEkqR.js} +3 -3
  172. package/dist/chunks/{status-BvzxKVpT.js.map → status-CejTEkqR.js.map} +1 -1
  173. package/dist/chunks/{swap-text-BgdoVD3v.js → swap-text-CxWcVD0a.js} +2 -2
  174. package/dist/chunks/{swap-text-BgdoVD3v.js.map → swap-text-CxWcVD0a.js.map} +1 -1
  175. package/dist/chunks/swap-value-DMEInk8V.js +30 -0
  176. package/dist/chunks/swap-value-DMEInk8V.js.map +1 -0
  177. package/dist/chunks/{switch-lxwwqvbG.js → switch-CklvBjKu.js} +4 -4
  178. package/dist/chunks/{switch-lxwwqvbG.js.map → switch-CklvBjKu.js.map} +1 -1
  179. package/dist/chunks/{table-6rmKwlCw.js → table-BTUUwlXD.js} +2 -2
  180. package/dist/chunks/{table-6rmKwlCw.js.map → table-BTUUwlXD.js.map} +1 -1
  181. package/dist/chunks/{tabs-BZj11L5c.js → tabs-D0I6Jkd4.js} +3 -3
  182. package/dist/chunks/{tabs-BZj11L5c.js.map → tabs-D0I6Jkd4.js.map} +1 -1
  183. package/dist/chunks/{tag-Bnc0j1jP.js → tag-BGvgGsvr.js} +4 -4
  184. package/dist/chunks/{tag-Bnc0j1jP.js.map → tag-BGvgGsvr.js.map} +1 -1
  185. package/dist/chunks/{text-D_rqwSaG.js → text-ChUk0Z46.js} +3 -3
  186. package/dist/chunks/{text-D_rqwSaG.js.map → text-ChUk0Z46.js.map} +1 -1
  187. package/dist/chunks/{textarea-BzMbsYD7.js → textarea-Bmj2Yk79.js} +5 -5
  188. package/dist/chunks/{textarea-BzMbsYD7.js.map → textarea-Bmj2Yk79.js.map} +1 -1
  189. package/dist/chunks/{theme-image-DjI_Zymf.js → theme-image-Bk97CYp8.js} +4 -4
  190. package/dist/chunks/{theme-image-DjI_Zymf.js.map → theme-image-Bk97CYp8.js.map} +1 -1
  191. package/dist/chunks/{theme-menu-BLNYvmuB.js → theme-menu-DvtuCuuN.js} +3 -3
  192. package/dist/chunks/{theme-menu-BLNYvmuB.js.map → theme-menu-DvtuCuuN.js.map} +1 -1
  193. package/dist/chunks/{thumbnail-CRdk7mvC.js → thumbnail-D2hD8aEk.js} +2 -2
  194. package/dist/chunks/{thumbnail-CRdk7mvC.js.map → thumbnail-D2hD8aEk.js.map} +1 -1
  195. package/dist/chunks/thumbnail-DadL1nPU.js +71 -0
  196. package/dist/chunks/thumbnail-DadL1nPU.js.map +1 -0
  197. package/dist/chunks/{timeline-CWQdqBVv.js → timeline-BQm5Q-Ul.js} +3 -3
  198. package/dist/chunks/{timeline-CWQdqBVv.js.map → timeline-BQm5Q-Ul.js.map} +1 -1
  199. package/dist/chunks/timeseries-B_Z3nNn6.js +403 -0
  200. package/dist/chunks/timeseries-B_Z3nNn6.js.map +1 -0
  201. package/dist/chunks/{toast-C78w9ewo.js → toast-CSlvlu-r.js} +5 -5
  202. package/dist/chunks/{toast-C78w9ewo.js.map → toast-CSlvlu-r.js.map} +1 -1
  203. package/dist/chunks/{toc-BHf7IbFL.js → toc-Cu2QJL5A.js} +2 -2
  204. package/dist/chunks/{toc-BHf7IbFL.js.map → toc-Cu2QJL5A.js.map} +1 -1
  205. package/dist/chunks/{toolbar-CjykT3ZP.js → toolbar-DE-R3sjA.js} +2 -2
  206. package/dist/chunks/{toolbar-CjykT3ZP.js.map → toolbar-DE-R3sjA.js.map} +1 -1
  207. package/dist/chunks/tooltip-C8ehtFju.js +104 -0
  208. package/dist/chunks/tooltip-C8ehtFju.js.map +1 -0
  209. package/dist/chunks/{tooltip-F3l2S3Ad.js → tooltip-SZvkUaq9.js} +4 -4
  210. package/dist/chunks/{tooltip-F3l2S3Ad.js.map → tooltip-SZvkUaq9.js.map} +1 -1
  211. package/dist/chunks/{tooltip-root-Co-dVnZj.js → tooltip-root-CrLuOT4j.js} +4 -4
  212. package/dist/chunks/{tooltip-root-Co-dVnZj.js.map → tooltip-root-CrLuOT4j.js.map} +1 -1
  213. package/dist/chunks/{truncated-CzAJxfAD.js → truncated-C0A4AU-U.js} +3 -3
  214. package/dist/chunks/{truncated-CzAJxfAD.js.map → truncated-C0A4AU-U.js.map} +1 -1
  215. package/dist/chunks/use-indicator-C1ovED2B.js +57 -0
  216. package/dist/chunks/use-indicator-C1ovED2B.js.map +1 -0
  217. package/dist/chunks/{visually-hidden-UprFAwfn.js → visually-hidden-CLTH1HKD.js} +2 -2
  218. package/dist/chunks/{visually-hidden-UprFAwfn.js.map → visually-hidden-CLTH1HKD.js.map} +1 -1
  219. package/dist/chunks/{zh-CN-RCSVKiQh.js → zh-CN-Dv7n5mAr.js} +40 -4
  220. package/dist/chunks/zh-CN-Dv7n5mAr.js.map +1 -0
  221. package/dist/components/app-frame.js +1 -1
  222. package/dist/components/avatar.js +1 -1
  223. package/dist/components/badge.js +1 -1
  224. package/dist/components/banner.js +1 -1
  225. package/dist/components/button-group.js +1 -1
  226. package/dist/components/button.js +1 -1
  227. package/dist/components/calendar.js +1 -1
  228. package/dist/components/charts/bar.js +20 -19
  229. package/dist/components/charts/bar.js.map +1 -1
  230. package/dist/components/charts/donut.js +16 -15
  231. package/dist/components/charts/donut.js.map +1 -1
  232. package/dist/components/charts/heatmap.js +3 -2
  233. package/dist/components/charts/heatmap.js.map +1 -1
  234. package/dist/components/charts/sankey.js +11 -10
  235. package/dist/components/charts/sankey.js.map +1 -1
  236. package/dist/components/charts/sparkline.js +114 -42
  237. package/dist/components/charts/sparkline.js.map +1 -1
  238. package/dist/components/charts/timeseries.js +1 -1
  239. package/dist/components/charts.js +3 -3
  240. package/dist/components/checkbox.js +1 -1
  241. package/dist/components/code-block.js +5 -4
  242. package/dist/components/code.js +1 -1
  243. package/dist/components/collapsible.js +1 -1
  244. package/dist/components/combobox.js +1 -1
  245. package/dist/components/command-palette.js +1 -1
  246. package/dist/components/copy-button.js +1 -1
  247. package/dist/components/dashboard/legend.js +43 -0
  248. package/dist/components/dashboard/legend.js.map +1 -0
  249. package/dist/components/dashboard/metric-tabs.js +140 -0
  250. package/dist/components/dashboard/metric-tabs.js.map +1 -0
  251. package/dist/components/dashboard/model-card.js +82 -0
  252. package/dist/components/dashboard/model-card.js.map +1 -0
  253. package/dist/components/dashboard/rank-list.js +107 -0
  254. package/dist/components/dashboard/rank-list.js.map +1 -0
  255. package/dist/components/dashboard.js +7 -0
  256. package/dist/components/data-table.js +1 -1
  257. package/dist/components/date-picker.js +1 -1
  258. package/dist/components/dialog.js +1 -1
  259. package/dist/components/display-options.js +1 -1
  260. package/dist/components/empty.js +1 -1
  261. package/dist/components/field.js +1 -1
  262. package/dist/components/figure.js +1 -1
  263. package/dist/components/filter-chip.js +1 -1
  264. package/dist/components/filter-row.js +1 -1
  265. package/dist/components/flow-canvas.js +4 -4
  266. package/dist/components/flow.js +1 -1
  267. package/dist/components/heading.js +1 -1
  268. package/dist/components/icon.js +2 -2
  269. package/dist/components/input.js +3 -3
  270. package/dist/components/kaeso/conversation.js +37 -8
  271. package/dist/components/kaeso/conversation.js.map +1 -1
  272. package/dist/components/kaeso/identity.js +1 -1
  273. package/dist/components/kaeso/moments.js +5 -5
  274. package/dist/components/kaeso/moments.js.map +1 -1
  275. package/dist/components/kaeso/rights.js +1 -1
  276. package/dist/components/kaeso/usage.js +17 -16
  277. package/dist/components/kaeso/usage.js.map +1 -1
  278. package/dist/components/kaeso.js +3 -3
  279. package/dist/components/kbd.js +1 -1
  280. package/dist/components/key-value.js +1 -1
  281. package/dist/components/link.js +1 -1
  282. package/dist/components/list.js +1 -1
  283. package/dist/components/loader.js +2 -2
  284. package/dist/components/logo.js +1 -1
  285. package/dist/components/markdown.js +2 -2
  286. package/dist/components/menu.js +1 -1
  287. package/dist/components/meter.js +1 -1
  288. package/dist/components/page-header.js +1 -1
  289. package/dist/components/pagination.js +1 -1
  290. package/dist/components/playground.js +911 -545
  291. package/dist/components/playground.js.map +1 -1
  292. package/dist/components/popover.js +1 -1
  293. package/dist/components/qr-code.js +1 -1
  294. package/dist/components/radio.js +1 -1
  295. package/dist/components/release-art.js +1 -1
  296. package/dist/components/scroll-area.js +1 -1
  297. package/dist/components/section.js +1 -1
  298. package/dist/components/segmented.js +1 -1
  299. package/dist/components/select.js +1 -1
  300. package/dist/components/separator.js +1 -1
  301. package/dist/components/settings.js +1 -1
  302. package/dist/components/sheet.js +1 -1
  303. package/dist/components/sidebar.js +1 -1
  304. package/dist/components/skeleton.js +1 -1
  305. package/dist/components/slider.js +1 -1
  306. package/dist/components/stat.js +4 -1
  307. package/dist/components/status.js +1 -1
  308. package/dist/components/swap-text.js +1 -1
  309. package/dist/components/switch.js +1 -1
  310. package/dist/components/table.js +1 -1
  311. package/dist/components/tabs.js +1 -1
  312. package/dist/components/tag.js +1 -1
  313. package/dist/components/text.js +1 -1
  314. package/dist/components/theme-image.js +1 -1
  315. package/dist/components/theme-menu.js +1 -1
  316. package/dist/components/thumbnail.js +3 -1
  317. package/dist/components/timeline.js +1 -1
  318. package/dist/components/toast.js +1 -1
  319. package/dist/components/toc.js +1 -1
  320. package/dist/components/toolbar.js +1 -1
  321. package/dist/components/tooltip.js +1 -1
  322. package/dist/components/visually-hidden.js +1 -1
  323. package/dist/i18n-provider.js +1 -1
  324. package/dist/index.js +112 -102
  325. package/dist/kaeso.css +97 -10
  326. package/dist/styles.css +1 -1
  327. package/dist/types/components/button/button.d.ts +1 -0
  328. package/dist/types/components/button/docs.d.ts +1 -0
  329. package/dist/types/components/charts/core.d.ts +3 -27
  330. package/dist/types/components/charts/docs.d.ts +4 -0
  331. package/dist/types/components/charts/sparkline.d.ts +4 -0
  332. package/dist/types/components/charts/timeseries.d.ts +2 -0
  333. package/dist/types/components/charts/tooltip.d.ts +28 -0
  334. package/dist/types/components/code-block/highlighter.d.ts +9 -18
  335. package/dist/types/components/code-block/index.d.ts +1 -1
  336. package/dist/types/components/code-block/kaeso-theme.d.ts +74 -8
  337. package/dist/types/components/code-block/shiki.d.ts +18 -0
  338. package/dist/types/components/code-block/tones.d.ts +64 -0
  339. package/dist/types/components/copy-button/copy-button.d.ts +4 -0
  340. package/dist/types/components/dashboard/dashboard.d.ts +61 -0
  341. package/dist/types/components/dashboard/docs.d.ts +92 -0
  342. package/dist/types/components/dashboard/index.d.ts +6 -0
  343. package/dist/types/components/dashboard/legend.d.ts +11 -0
  344. package/dist/types/components/dashboard/metric-tabs.d.ts +22 -0
  345. package/dist/types/components/dashboard/model-card.d.ts +23 -0
  346. package/dist/types/components/dashboard/rank-list.d.ts +21 -0
  347. package/dist/types/components/dashboard/swap-value.d.ts +7 -0
  348. package/dist/types/components/field/field.d.ts +1 -1
  349. package/dist/types/components/kaeso/conversation.d.ts +8 -0
  350. package/dist/types/components/kaeso/docs.d.ts +3 -0
  351. package/dist/types/components/kaeso/identity.d.ts +3 -0
  352. package/dist/types/components/kaeso/provider-picker.d.ts +4 -1
  353. package/dist/types/components/markdown/index.d.ts +1 -1
  354. package/dist/types/components/markdown/markdown.d.ts +9 -2
  355. package/dist/types/components/playground/attachments.d.ts +32 -0
  356. package/dist/types/components/playground/compare-grid.d.ts +1 -0
  357. package/dist/types/components/playground/composer.d.ts +8 -2
  358. package/dist/types/components/playground/docs.d.ts +36 -10
  359. package/dist/types/components/playground/index.d.ts +5 -3
  360. package/dist/types/components/playground/media-response.d.ts +46 -0
  361. package/dist/types/components/playground/parameter-panel.d.ts +17 -0
  362. package/dist/types/components/playground/response-metrics.d.ts +3 -3
  363. package/dist/types/components/playground/response-view.d.ts +2 -0
  364. package/dist/types/components/release-art/docs.d.ts +1 -0
  365. package/dist/types/components/release-art/release-art.d.ts +1 -0
  366. package/dist/types/components/stat/delta.d.ts +28 -0
  367. package/dist/types/components/stat/docs.d.ts +13 -0
  368. package/dist/types/components/stat/index.d.ts +4 -0
  369. package/dist/types/components/stat/rolling-number.d.ts +7 -0
  370. package/dist/types/components/stat/stat.d.ts +1 -1
  371. package/dist/types/components/thumbnail/docs.d.ts +11 -0
  372. package/dist/types/components/thumbnail/index.d.ts +2 -0
  373. package/dist/types/components/thumbnail/media-view.d.ts +33 -0
  374. package/dist/types/hooks/use-sticky-top.d.ts +2 -0
  375. package/dist/types/icons/groups.d.ts +2 -2
  376. package/dist/types/icons/vocabulary.d.ts +30 -0
  377. package/dist/types/index.d.ts +1 -0
  378. package/dist/types/utils/index.d.ts +1 -0
  379. package/dist/types/utils/provider-marks.d.ts +11 -0
  380. package/dist/utils.js +7 -6
  381. package/foundations/color.md +24 -2
  382. package/foundations/motion.md +1 -0
  383. package/package.json +2 -2
  384. package/dist/chunks/button-CcXKlcXd.js.map +0 -1
  385. package/dist/chunks/cn-BUMD6lNz.js.map +0 -1
  386. package/dist/chunks/code-block-8rW57rUV.js +0 -345
  387. package/dist/chunks/code-block-8rW57rUV.js.map +0 -1
  388. package/dist/chunks/code-block-CbVLyIr-.js.map +0 -1
  389. package/dist/chunks/copy-button-CK-ddxCg.js.map +0 -1
  390. package/dist/chunks/core-nqsBmktJ.js +0 -496
  391. package/dist/chunks/core-nqsBmktJ.js.map +0 -1
  392. package/dist/chunks/data-table-FQlJ_Ae4.js +0 -605
  393. package/dist/chunks/data-table-FQlJ_Ae4.js.map +0 -1
  394. package/dist/chunks/de-aLc0-E5B.js.map +0 -1
  395. package/dist/chunks/icon-CPNoEw5s.js +0 -102
  396. package/dist/chunks/icon-CPNoEw5s.js.map +0 -1
  397. package/dist/chunks/identity-CpM7nAZ3.js +0 -494
  398. package/dist/chunks/identity-CpM7nAZ3.js.map +0 -1
  399. package/dist/chunks/json-view-B6NjVdYp.js.map +0 -1
  400. package/dist/chunks/kaeso-CE3QS6Xl.js.map +0 -1
  401. package/dist/chunks/markdown-8YRbGHeS.js +0 -338
  402. package/dist/chunks/markdown-8YRbGHeS.js.map +0 -1
  403. package/dist/chunks/release-art-BeseUxSj.js.map +0 -1
  404. package/dist/chunks/segmented-Clv2P1AB.js.map +0 -1
  405. package/dist/chunks/stat-7VFJ8QW-.js.map +0 -1
  406. package/dist/chunks/timeseries-Cj50XALJ.js +0 -381
  407. package/dist/chunks/timeseries-Cj50XALJ.js.map +0 -1
  408. package/dist/chunks/zh-CN-RCSVKiQh.js.map +0 -1
  409. package/dist/types/components/playground/prompt-suggestions.d.ts +0 -24
@@ -0,0 +1,625 @@
1
+ "use client";
2
+ import { t as e } from "./cn-CLpm819s.js";
3
+ import { a as t, i as n, o as r } from "./inset-BUzyXLK4.js";
4
+ import { i } from "./context-BELWW79w.js";
5
+ import { formatDate as a, formatDuration as o, formatNumber as s, formatRelative as c, formatTokens as l, formatUSD as ee } from "../format.js";
6
+ import { t as u } from "./icon-CPiYZMTw.js";
7
+ import { r as d } from "./tooltip-SZvkUaq9.js";
8
+ import { t as f } from "./observe-resize-DhxhmoyB.js";
9
+ import { r as p } from "./text-ChUk0Z46.js";
10
+ import { n as te } from "./button-Da8b-8ub.js";
11
+ import { n as ne } from "./checkbox-CPL47-us.js";
12
+ import { t as m } from "./menu-D3tUjkCM.js";
13
+ import { r as re } from "./skeleton-Bx-vRJdy.js";
14
+ import { r as ie } from "./pagination-BT-lQc45.js";
15
+ import { t as ae } from "./empty-BSAHpS5Q.js";
16
+ import { t as oe } from "./use-scroll-fade-uc8mWSDX.js";
17
+ import { t as se } from "./tone-CWpsHPb6.js";
18
+ import { t as h } from "./truncated-C0A4AU-U.js";
19
+ import { r as g } from "./status-CejTEkqR.js";
20
+ import { t as _ } from "./avatar-DVrkoFEg.js";
21
+ import { n as ce, r as le, t as ue } from "./selects-text-R1lZHLKm.js";
22
+ import { t as de } from "./use-scroll-margin-atRtf0v_.js";
23
+ import { forwardRef as fe, useLayoutEffect as v, useMemo as pe, useRef as y, useState as b } from "react";
24
+ import { Fragment as me, jsx as x, jsxs as S } from "react/jsx-runtime";
25
+ import { ArrowDown01Icon as he, ArrowUp01Icon as ge } from "@hugeicons/core-free-icons";
26
+ import { useVirtualizer as _e } from "@tanstack/react-virtual";
27
+ import { flexRender as ve, getCoreRowModel as ye, getSortedRowModel as be, useReactTable as xe } from "@tanstack/react-table";
28
+ //#region src/hooks/use-sticky-top.ts
29
+ var C = /(auto|scroll|hidden|overlay)/;
30
+ function Se(e) {
31
+ for (let t = e.parentElement; t; t = t.parentElement) {
32
+ let e = getComputedStyle(t);
33
+ if (C.test(e.overflowY) || C.test(e.overflowX)) return t;
34
+ }
35
+ return null;
36
+ }
37
+ function Ce(e) {
38
+ let [t, n] = b(0);
39
+ return v(() => {
40
+ let t = e.current, r = t && Se(t);
41
+ if (!r) return;
42
+ let i = () => n(-(Number.parseFloat(getComputedStyle(r).paddingTop) || 0));
43
+ return i(), window.addEventListener("resize", i), () => window.removeEventListener("resize", i);
44
+ }, [e]), t;
45
+ }
46
+ //#endregion
47
+ //#region src/components/data-table/time-columns.ts
48
+ var w = /* @__PURE__ */ new WeakSet(), T = { density: {
49
+ compact: { classes: "h-36 coarse:h-44" },
50
+ default: { classes: "h-40 coarse:h-44" },
51
+ comfortable: { classes: "h-48" }
52
+ } }, E = { density: "default" }, we = {
53
+ compact: 36,
54
+ default: 40,
55
+ comfortable: 48
56
+ };
57
+ function Te(e, t, n = 48) {
58
+ if (!t) return {
59
+ hidden: [],
60
+ tight: !1,
61
+ overflow: !1
62
+ };
63
+ let r = [...e].sort((e, t) => e.priority - t.priority), i = n, a = /* @__PURE__ */ new Set();
64
+ for (let e of r) i += e.size, (i <= t || e.priority <= 1 || e.fixed) && a.add(e.id);
65
+ let o = e.filter((e) => a.has(e.id)), s = o.reduce((e, t) => e + t.size, n), c = o.reduce((e, t) => e + (t.grow ? Me(t) : t.size), 0);
66
+ if (c > t && o.some((e) => e.grow)) {
67
+ let e = o[o.length - 1];
68
+ for (let n of [...o].reverse()) {
69
+ if (c <= t) break;
70
+ n.grow || n.fixed || n === e || (a.delete(n.id), c -= n.size);
71
+ }
72
+ }
73
+ return {
74
+ hidden: e.filter((e) => !a.has(e.id)).map((e) => e.id),
75
+ tight: s > t,
76
+ overflow: c > t
77
+ };
78
+ }
79
+ function Ee(e) {
80
+ let t = getComputedStyle(e);
81
+ return e.getBoundingClientRect().width - (parseFloat(t.paddingLeft) || 0) - (parseFloat(t.paddingRight) || 0);
82
+ }
83
+ function De(e) {
84
+ let t = e.filter((e) => e.id && e.meta?.text && e.meta.align !== "end");
85
+ return t.find((e) => !w.has(e)) ?? t[0] ?? e[0];
86
+ }
87
+ function Oe(e, t) {
88
+ if (!e?.id) return;
89
+ let n = e.meta?.text?.(t.original);
90
+ if (n) return n;
91
+ let r = t.getValue(e.id);
92
+ return typeof r == "string" && r ? r : void 0;
93
+ }
94
+ var D = "a[href], button, input, select, textarea, [tabindex], [contenteditable=true]", ke = "input:not([type=checkbox]):not([type=radio]), textarea, select, [contenteditable=true]";
95
+ function Ae(e) {
96
+ return [...e.querySelectorAll(D)].filter((e) => !e.closest("[role=checkbox], [aria-hidden=true], [hidden]") && !e.matches(":disabled, input[type=checkbox]"));
97
+ }
98
+ function O(e) {
99
+ return e ? [...e.querySelectorAll("[role=columnheader]")].flatMap((e) => {
100
+ let t = e.querySelector("[role=checkbox], button") ?? e.querySelector("[role=separator]");
101
+ return t ? [t] : [];
102
+ }) : [];
103
+ }
104
+ function je(t, n) {
105
+ return n ? e("controls-on-fill", t ? "bg-raised-pressed hover:raised-selected-hover active:raised-selected-hover" : "bg-fill-2 hover:bg-fill-3 active:bg-fill-3") : t ? "hover:bg-raised-hover active:bg-raised-pressed hover:controls-on-fill" : "hover:bg-fill-1 active:bg-fill-2 hover:controls-on-fill";
106
+ }
107
+ var Me = (e) => Math.min(e.size, e.minWidth ?? 136);
108
+ function k({ data: a, columns: o, getRowId: s, density: c = "default", onRowClick: l, rowMenu: ee, selectable: d, canSelectRow: g, selection: _, onSelectionChange: fe, sorting: C, onSortingChange: Se, manualSorting: w, loading: E, error: k, onRetry: A, empty: Ne, hasMore: j, loadingMore: M, onLoadMore: Pe, stickyFirstColumn: N, virtualizeAbove: Fe = 100, className: Ie, activeRowId: Le, freshRowIds: Re, onHiddenColumnsChange: ze, "aria-label": Be, "data-force-row": Ve }, P) {
109
+ let F = t(), He = r(), Ue = n(), I = i(), [We, Ge] = b([]), [Ke, qe] = b({}), [Je, Ye] = b(0), [Xe, L] = b("body"), [Ze, Qe] = b(0), R = y(null), $e = C ?? We, z = _ ?? Ke, et = pe(() => d ? [{
110
+ id: "__select",
111
+ size: 44,
112
+ enableSorting: !1,
113
+ enableResizing: !1,
114
+ meta: { priority: 1 },
115
+ header: ({ table: e }) => /* @__PURE__ */ x(ne, {
116
+ "aria-label": I("dataTable.selectAllRows", "Select all rows"),
117
+ checked: e.getIsAllRowsSelected(),
118
+ indeterminate: e.getIsSomeRowsSelected() && !e.getIsAllRowsSelected(),
119
+ onCheckedChange: (t) => e.toggleAllRowsSelected(t)
120
+ }),
121
+ cell: ({ row: e }) => {
122
+ let t = Oe(De(o), e);
123
+ return /* @__PURE__ */ x(ne, {
124
+ "aria-label": t ? I("dataTable.selectNamed", "Select {name}", { name: t }) : I("dataTable.selectRow", "Select row"),
125
+ checked: e.getIsSelected(),
126
+ disabled: !e.getCanSelect(),
127
+ onCheckedChange: (t) => e.toggleSelected(t)
128
+ });
129
+ }
130
+ }, ...o] : o, [
131
+ o,
132
+ d,
133
+ I
134
+ ]), B = xe({
135
+ data: a,
136
+ columns: et,
137
+ state: {
138
+ sorting: $e,
139
+ rowSelection: z
140
+ },
141
+ onSortingChange: (e) => {
142
+ let t = typeof e == "function" ? e($e) : e;
143
+ R.current = null, C || Ge(t), Se?.(t);
144
+ },
145
+ onRowSelectionChange: (e) => {
146
+ let t = typeof e == "function" ? e(z) : e;
147
+ _ || qe(t), fe?.(t);
148
+ },
149
+ getCoreRowModel: ye(),
150
+ getSortedRowModel: be(),
151
+ manualSorting: !!w,
152
+ enableRowSelection: d ? g ? (e) => g(e.original) : !0 : !1,
153
+ columnResizeMode: "onChange",
154
+ ...s ? { getRowId: (e) => s(e) } : {},
155
+ defaultColumn: {
156
+ size: 140,
157
+ minSize: 64,
158
+ maxSize: 640
159
+ }
160
+ }), V = y(null), H = y(null), U = y(null), tt = B.getVisibleLeafColumns(), nt = tt.map((e) => ({
161
+ id: e.id,
162
+ size: e.getSize(),
163
+ priority: e.columnDef.meta?.priority ?? 2,
164
+ grow: !!e.columnDef.meta?.grow,
165
+ minWidth: e.columnDef.meta?.minWidth,
166
+ fixed: e.id === "__select"
167
+ })), rt = JSON.stringify(nt), it = (e) => {
168
+ let t = Te(nt, e, F ? 48 : 0);
169
+ return `${t.tight ? "!" : ""}${t.overflow ? ">" : ""}|${t.hidden.join(" ")}`;
170
+ }, at = y(it);
171
+ at.current = it;
172
+ let [ot, st] = b("|");
173
+ v(() => {
174
+ let e = V.current;
175
+ if (e) return f([e], ([e]) => st(at.current(Math.round(e?.contentRect.width ?? 0))));
176
+ }, []), v(() => {
177
+ V.current && st(at.current(Math.round(Ee(V.current))));
178
+ }, [rt]);
179
+ let [ct = "", lt = ""] = ot.split("|"), ut = ct.includes("!"), dt = ct.includes(">"), W = pe(() => new Set(lt.split(" ").filter(Boolean)), [lt]), ft = y(ze);
180
+ ft.current = ze, v(() => {
181
+ ft.current?.([...W]);
182
+ }, [W]);
183
+ let G = tt.filter((e) => !W.has(e.id)), pt = (e) => e.columnDef.meta?.grow && ut ? Me({
184
+ size: e.getSize(),
185
+ minWidth: e.columnDef.meta.minWidth
186
+ }) : e.getSize(), mt = {
187
+ gridTemplateColumns: G.map((e) => e.columnDef.meta?.grow ? `minmax(${pt(e)}px, 1fr)` : `${e.getSize()}px`).join(" "),
188
+ minWidth: G.reduce((e, t) => e + pt(t), 0)
189
+ }, ht = dt && G.length > 1 && !G[G.length - 1]?.columnDef.meta?.grow, K = B.getRowModel().rows, gt = dt && K.length === 0 && !E && !k, q = K.length > Fe, _t = Math.max(we[c], ce() ? 44 : 0), vt = () => le(V.current), yt = de(U, vt, K.length, q), bt = Ce(H), xt = _e({
190
+ count: K.length,
191
+ getScrollElement: vt,
192
+ estimateSize: () => _t,
193
+ overscan: 16,
194
+ enabled: q,
195
+ scrollMargin: yt
196
+ }), St = (t) => e("flex min-w-0 items-center px-12", F && t === 0 && "pl-20", F && t === G.length - 1 && "pr-20"), J = F || He, Ct = (t, n = !1, r = !1) => (N && t === 0 || ht && t === G.length - 1) && e("sticky z-10", n ? J ? "bg-raised" : "bg-panel" : r ? "bg-inherit" : J ? "bg-raised group-hover/tr:bg-raised-hover group-active/tr:bg-raised-pressed" : "bg-panel group-hover/tr:bg-fill-1 group-active/tr:bg-fill-2", t === 0 ? "left-0" : "right-0", !F && !n && (t === 0 ? "rounded-l-item" : "rounded-r-item")), Y = !!l || !!d, X = Y ? "gridcell" : "cell", wt = Y && K.length > 0 && Xe === "body", Tt = Math.min(Je, Math.max(K.length - 1, 0)), Et = (e) => {
197
+ let t = Math.max(0, Math.min(K.length - 1, e));
198
+ L("body"), Ye(t), q && xt.scrollToIndex(t, { align: "auto" });
199
+ let n = () => U.current?.querySelector(`[data-row-index="${t}"]`), r = n();
200
+ r ? r.focus() : requestAnimationFrame(() => n()?.focus());
201
+ }, Dt = (e) => {
202
+ let t = O(H.current), n = t[Math.max(0, Math.min(t.length - 1, e))];
203
+ return n ? (L("head"), Qe(t.indexOf(n)), n.focus(), !0) : !1;
204
+ }, Z = y(() => {});
205
+ Z.current = () => {
206
+ let e = O(H.current), t = Math.min(Ze, e.length - 1);
207
+ for (let n of H.current?.querySelectorAll(D) ?? []) {
208
+ let r = e.indexOf(n) === t && !wt ? "0" : "-1";
209
+ n.getAttribute("tabindex") !== r && n.setAttribute("tabindex", r);
210
+ }
211
+ }, v(() => Z.current()), v(() => {
212
+ let e = H.current;
213
+ if (!e) return;
214
+ let t = new MutationObserver(() => Z.current());
215
+ return t.observe(e, {
216
+ subtree: !0,
217
+ childList: !0,
218
+ attributes: !0,
219
+ attributeFilter: ["tabindex"]
220
+ }), () => t.disconnect();
221
+ }, []), v(() => {
222
+ let e = U.current;
223
+ if (!e || !Y) return;
224
+ let t = () => {
225
+ for (let t of e.querySelectorAll("[data-row-index]")) for (let e of t.querySelectorAll(D)) e.getAttribute("tabindex") !== "-1" && e.setAttribute("tabindex", "-1");
226
+ };
227
+ t();
228
+ let n = new MutationObserver(t);
229
+ return n.observe(e, {
230
+ subtree: !0,
231
+ childList: !0,
232
+ attributes: !0,
233
+ attributeFilter: ["tabindex"]
234
+ }), () => n.disconnect();
235
+ }, [Y]), oe(U, "[role=row]");
236
+ let Q = (e, t) => {
237
+ let n = e ? B.getColumn(e) : void 0;
238
+ if (!n?.getCanResize()) return !1;
239
+ let r = n.columnDef.minSize ?? 64, i = n.columnDef.maxSize ?? 640;
240
+ return B.setColumnSizing((e) => ({
241
+ ...e,
242
+ [n.id]: Math.max(r, Math.min(i, n.getSize() + t))
243
+ })), !0;
244
+ }, Ot = (e) => {
245
+ if (e.altKey || e.metaKey || e.ctrlKey) return;
246
+ let t = O(H.current), n = t.indexOf(e.target);
247
+ if (n < 0) return;
248
+ let r = {
249
+ ArrowLeft: -16,
250
+ ArrowRight: 16
251
+ }[e.key];
252
+ if (e.shiftKey) {
253
+ r !== void 0 && Q(e.target.closest("[role=columnheader]")?.dataset.col, r) && e.preventDefault();
254
+ return;
255
+ }
256
+ let i = {
257
+ ArrowLeft: n - 1,
258
+ ArrowRight: n + 1,
259
+ Home: 0,
260
+ End: t.length - 1
261
+ }[e.key];
262
+ i === void 0 ? e.key === "ArrowDown" && Y && K.length && (e.preventDefault(), Et(Tt)) : (e.preventDefault(), i >= 0 && i < t.length && Dt(i));
263
+ }, kt = () => Math.max(1, Math.floor((vt()?.clientHeight ?? 400) / _t) - 1), At = (e, t) => {
264
+ let n = R.current ? K.findIndex((e) => e.id === R.current?.id) : -1;
265
+ n < 0 && (R.current = {
266
+ id: K[e].id,
267
+ base: z
268
+ });
269
+ let r = n < 0 ? e : n, i = { ...R.current?.base };
270
+ for (let e of K.slice(Math.min(r, t), Math.max(r, t) + 1)) e.getCanSelect() && (i[e.id] = !0);
271
+ B.setRowSelection(i);
272
+ }, jt = (e, t, n) => {
273
+ let r = e.currentTarget, i = e.target;
274
+ if (i !== r) {
275
+ if (e.altKey || e.metaKey || e.ctrlKey || i.closest(ke)) return;
276
+ let t = Ae(r), n = t.indexOf(i);
277
+ if (n < 0) return;
278
+ if (e.key === "Escape" && !i.closest("[data-popup-open], [aria-expanded=true]")) e.preventDefault(), r.focus();
279
+ else if (e.defaultPrevented) return;
280
+ else e.key === "ArrowRight" && t[n + 1] ? (e.preventDefault(), t[n + 1]?.focus()) : e.key === "ArrowLeft" && (e.preventDefault(), (t[n - 1] ?? r).focus());
281
+ return;
282
+ }
283
+ if (e.altKey) return;
284
+ if (e.metaKey || e.ctrlKey) {
285
+ e.key.toLowerCase() === "a" && d && !e.shiftKey && (e.preventDefault(), R.current = null, B.toggleAllRowsSelected(!0));
286
+ return;
287
+ }
288
+ let a = {
289
+ ArrowDown: n + 1,
290
+ ArrowUp: n - 1,
291
+ Home: 0,
292
+ End: K.length - 1,
293
+ PageDown: n + kt(),
294
+ PageUp: n - kt()
295
+ }[e.key];
296
+ if (a !== void 0) {
297
+ if (e.preventDefault(), e.key === "ArrowUp" && !e.shiftKey && a < 0 && Dt(Ze)) return;
298
+ let t = Math.max(0, Math.min(K.length - 1, a));
299
+ e.shiftKey && d ? At(n, t) : R.current = null, Et(t);
300
+ } else if (e.shiftKey) return;
301
+ else if (e.key === "ArrowRight") {
302
+ let t = Ae(r)[0];
303
+ if (!t) return;
304
+ e.preventDefault(), t.focus();
305
+ } else e.key === "Enter" ? (e.preventDefault(), l?.(t.original)) : (e.key === " " || e.key === "x") && d ? (e.preventDefault(), R.current = null, t.getCanSelect() && t.toggleSelected()) : e.key === "Escape" && d && Object.keys(z).length && (e.preventDefault(), R.current = null, B.toggleAllRowsSelected(!1));
306
+ }, Mt = [
307
+ et,
308
+ G.map((e) => e.id).join(" "),
309
+ F,
310
+ ht,
311
+ N,
312
+ J,
313
+ X
314
+ ], $ = y(null);
315
+ (!$.current || Mt.some((e, t) => e !== $.current?.deps[t])) && ($.current = {
316
+ deps: Mt,
317
+ rows: /* @__PURE__ */ new WeakMap()
318
+ });
319
+ let Nt = $.current.rows, Pt = (t, n, r) => {
320
+ let i = t.id === Le, a = !!d && t.getIsSelected(), o = i || a, s = `${i} ${a}`, u = Nt.get(t), f = u?.state === s ? u.cells : Ft(t, o);
321
+ u?.state !== s && Nt.set(t, {
322
+ state: s,
323
+ cells: f
324
+ });
325
+ let p = /* @__PURE__ */ x("div", {
326
+ role: "row",
327
+ "aria-rowindex": n + 2,
328
+ "aria-selected": d ? t.getIsSelected() : void 0,
329
+ "aria-current": i || void 0,
330
+ "data-active": i || void 0,
331
+ "data-fresh": Re?.has(t.id) || void 0,
332
+ "data-row-index": n,
333
+ ...Ve && n === 0 ? { "data-force": Ve } : {},
334
+ tabIndex: Y ? wt && n === Tt ? 0 : -1 : void 0,
335
+ onFocus: (e) => {
336
+ e.target === e.currentTarget && (L("body"), n !== Je && Ye(n));
337
+ },
338
+ onClick: (e) => {
339
+ R.current = null, !(e.target.closest("button, a, [role=checkbox]") || ue(e.currentTarget)) && l?.(t.original);
340
+ },
341
+ onKeyDown: (e) => jt(e, t, n),
342
+ style: {
343
+ ...mt,
344
+ ...r
345
+ },
346
+ className: e("group/tr grid w-full text-body text-fg transition-control focus-ring-inset", !F && "rounded-item", T.density[c].classes, l && "cursor-pointer", je(J, o), "data-fresh:animate-row-fresh", r?.transform !== void 0 && "[transition-property:background-color,color,box-shadow,opacity]", "forced-colors:data-active:outline-2 forced-colors:data-active:-outline-offset-2 forced-colors:data-active:outline-solid"),
347
+ children: f
348
+ });
349
+ return ee ? /* @__PURE__ */ S(m, { children: [/* @__PURE__ */ x(m.Trigger, { children: p }), /* @__PURE__ */ x(m.Content, { children: ee(t.original) })] }, t.id) : /* @__PURE__ */ x("div", { children: p }, t.id);
350
+ };
351
+ function Ft(t, n) {
352
+ return t.getVisibleCells().filter((e) => !W.has(e.column.id)).map((r, i) => {
353
+ let a = r.column.columnDef.meta, o = ve(r.column.columnDef.cell, r.getContext()), s = r.getValue(), c = a?.text ? a.text(t.original) : typeof s == "string" ? s : void 0, l = a?.tone?.(t.original);
354
+ return /* @__PURE__ */ x("div", {
355
+ role: X,
356
+ className: e(St(i), a?.align === "end" && "justify-end text-right tabular", a?.mono && "mono text-small", l && se[l], Ct(i, !1, n)),
357
+ children: c !== void 0 && typeof o != "object" ? /* @__PURE__ */ x(p, {
358
+ truncate: !0,
359
+ tone: l ?? "default",
360
+ className: e("min-w-0", a?.mono && "text-small"),
361
+ mono: !!a?.mono,
362
+ children: c
363
+ }) : r.column.id === "__select" ? /* @__PURE__ */ x("span", {
364
+ className: "flex",
365
+ children: o
366
+ }) : /* @__PURE__ */ x(h, {
367
+ className: e("min-w-0 cell-fit", a?.grow && "flex-1"),
368
+ children: o
369
+ })
370
+ }, r.id);
371
+ });
372
+ }
373
+ let It = (t, n) => {
374
+ let r = t.column.columnDef.meta, i = t.column.getCanSort(), a = t.column.getCanResize(), o = t.column.getIsSorted(), s = ve(t.column.columnDef.header, t.getContext()), c = /* @__PURE__ */ S(me, { children: [i ? /* @__PURE__ */ S("button", {
375
+ type: "button",
376
+ onClick: t.column.getToggleSortingHandler(),
377
+ className: e("relative -mx-6 inline-flex h-28 min-w-0 cursor-pointer items-center gap-4 rounded-pill px-6 text-caption font-medium transition-control focus-ring tap-target", J ? "hover:bg-raised-hover active:bg-raised-pressed" : "hover:bg-fill-1 active:bg-fill-2", "hover:text-fg", o ? "text-fg" : "text-fg-secondary", r?.align === "end" && "flex-row-reverse"),
378
+ children: [/* @__PURE__ */ x(h, { children: s }), /* @__PURE__ */ x(u, {
379
+ icon: o === "desc" ? he : ge,
380
+ size: "xs",
381
+ className: e("shrink-0 transition-control", o ? "opacity-100" : "opacity-0 group-hover/th:opacity-60")
382
+ })]
383
+ }) : /* @__PURE__ */ x(h, {
384
+ className: "text-caption font-medium text-fg-secondary",
385
+ children: s
386
+ }), a && /* @__PURE__ */ x("div", {
387
+ role: "separator",
388
+ "aria-orientation": "vertical",
389
+ "aria-label": I("dataTable.resizeColumn", "Resize column"),
390
+ "aria-valuenow": t.column.getSize(),
391
+ "aria-valuemin": t.column.columnDef.minSize ?? 64,
392
+ "aria-valuemax": t.column.columnDef.maxSize ?? 640,
393
+ tabIndex: -1,
394
+ onMouseDown: t.getResizeHandler(),
395
+ onTouchStart: t.getResizeHandler(),
396
+ onDoubleClick: () => t.column.resetSize(),
397
+ className: "absolute inset-y-0 -right-8 z-10 w-16 cursor-col-resize after:absolute after:inset-y-8 after:right-8 after:w-1 after:bg-transparent after:transition-control group-hover/th:after:bg-line-strong coarse:after:bg-line focus-ring-inset"
398
+ })] });
399
+ return /* @__PURE__ */ x("div", {
400
+ role: "columnheader",
401
+ "data-col": t.column.id,
402
+ "aria-sort": o === "asc" ? "ascending" : o === "desc" ? "descending" : i ? "none" : void 0,
403
+ className: e("group/th relative", St(n), r?.align === "end" && "justify-end", Ct(n, !0), Ct(n, !0) && "hairline-b-strong"),
404
+ children: a ? /* @__PURE__ */ S(m, { children: [/* @__PURE__ */ x(m.Trigger, {
405
+ className: e("flex min-w-0 flex-1 items-center self-stretch", r?.align === "end" && "justify-end"),
406
+ children: c
407
+ }), /* @__PURE__ */ S(m.Content, { children: [
408
+ /* @__PURE__ */ x(m.Item, {
409
+ onClick: () => Q(t.column.id, 32),
410
+ children: I("dataTable.widenColumn", "Widen column")
411
+ }),
412
+ /* @__PURE__ */ x(m.Item, {
413
+ onClick: () => Q(t.column.id, -32),
414
+ children: I("dataTable.narrowColumn", "Narrow column")
415
+ }),
416
+ /* @__PURE__ */ x(m.Item, {
417
+ onClick: () => t.column.resetSize(),
418
+ children: I("dataTable.resetWidth", "Reset width")
419
+ })
420
+ ] })] }) : c
421
+ }, t.id);
422
+ };
423
+ return /* @__PURE__ */ S("div", {
424
+ ref: (e) => {
425
+ V.current = e, typeof P == "function" ? P(e) : P && (P.current = e);
426
+ },
427
+ className: e("relative w-full min-w-0", !F && !Ue && "px-24", Ie),
428
+ children: [/* @__PURE__ */ S("div", {
429
+ role: Y ? "grid" : "table",
430
+ "aria-label": Be,
431
+ "aria-rowcount": K.length + +!gt,
432
+ "aria-multiselectable": d || void 0,
433
+ "aria-busy": E || void 0,
434
+ className: e("w-full overflow-clip", F && "rounded-group bg-raised shadow-xs"),
435
+ children: [/* @__PURE__ */ x("div", {
436
+ ref: H,
437
+ role: "rowgroup",
438
+ hidden: gt,
439
+ className: e("sticky top-0 z-20 overflow-hidden", J ? "bg-raised" : "bg-panel"),
440
+ ...bt ? { style: { top: bt } } : {},
441
+ onKeyDown: Ot,
442
+ onFocus: (e) => {
443
+ let t = O(H.current).indexOf(e.target);
444
+ t < 0 || (R.current = null, L("head"), Qe(t));
445
+ },
446
+ onScroll: (e) => {
447
+ U.current && U.current.scrollLeft !== e.currentTarget.scrollLeft && (U.current.scrollLeft = e.currentTarget.scrollLeft);
448
+ },
449
+ children: B.getHeaderGroups().map((e) => /* @__PURE__ */ x("div", {
450
+ role: "row",
451
+ "aria-rowindex": 1,
452
+ className: "grid h-36 hairline-b-strong",
453
+ style: mt,
454
+ children: e.headers.filter((e) => !W.has(e.column.id)).map(It)
455
+ }, e.id))
456
+ }), /* @__PURE__ */ x("div", {
457
+ ref: U,
458
+ role: "rowgroup",
459
+ className: "overflow-x-auto scrollbar-quiet scroll-fade-x",
460
+ onScroll: (e) => {
461
+ H.current && H.current.scrollLeft !== e.currentTarget.scrollLeft && (H.current.scrollLeft = e.currentTarget.scrollLeft);
462
+ },
463
+ children: k ? /* @__PURE__ */ x("div", {
464
+ role: "row",
465
+ children: /* @__PURE__ */ x("div", {
466
+ role: X,
467
+ "aria-colspan": G.length,
468
+ className: "block",
469
+ children: /* @__PURE__ */ x("div", {
470
+ role: "alert",
471
+ children: /* @__PURE__ */ x(ae, {
472
+ size: "compact",
473
+ title: I("dataTable.loadFailed", "Couldn't load these rows"),
474
+ ...A ? {} : { description: I("dataTable.reloadToRetry", "Reload the page to try again.") },
475
+ actions: A && /* @__PURE__ */ x(te, {
476
+ size: "sm",
477
+ onClick: A,
478
+ children: I("dataTable.tryAgain", "Try again")
479
+ })
480
+ })
481
+ })
482
+ })
483
+ }) : E && K.length === 0 ? Array.from({ length: 8 }, (t, n) => /* @__PURE__ */ x("div", {
484
+ role: "row",
485
+ className: e("grid", T.density[c].classes),
486
+ style: mt,
487
+ children: G.map((t, r) => /* @__PURE__ */ x("div", {
488
+ role: X,
489
+ className: e(St(r), t.columnDef.meta?.align === "end" && "justify-end"),
490
+ children: /* @__PURE__ */ x(re, {
491
+ shape: "line",
492
+ style: { width: `${40 + (n * 7 + r * 13) % 45}%` }
493
+ })
494
+ }, t.id))
495
+ }, n)) : K.length === 0 ? /* @__PURE__ */ x("div", {
496
+ role: "row",
497
+ children: /* @__PURE__ */ x("div", {
498
+ role: X,
499
+ "aria-colspan": G.length,
500
+ className: "block",
501
+ children: Ne ?? /* @__PURE__ */ x(ae, {
502
+ size: "compact",
503
+ title: I("dataTable.noRows", "No rows")
504
+ })
505
+ })
506
+ }) : q ? /* @__PURE__ */ x("div", {
507
+ className: "relative",
508
+ style: { height: xt.getTotalSize() },
509
+ children: xt.getVirtualItems().map((e) => Pt(K[e.index], e.index, {
510
+ position: "absolute",
511
+ top: 0,
512
+ left: 0,
513
+ transform: `translateY(${Math.round(e.start - yt)}px)`
514
+ }))
515
+ }) : K.map((e, t) => Pt(e, t))
516
+ })]
517
+ }), /* @__PURE__ */ x(ie, {
518
+ variant: "load-more",
519
+ hasMore: !!j,
520
+ loading: M,
521
+ onLoadMore: Pe
522
+ })]
523
+ });
524
+ }
525
+ var A = /* @__PURE__ */ fe(k);
526
+ process.env.NODE_ENV !== "production" && (A.displayName = "DataTable");
527
+ var Ne = A;
528
+ //#endregion
529
+ //#region src/components/data-table/columns.tsx
530
+ function j(e) {
531
+ return w.add(e), e;
532
+ }
533
+ function M(e, t, n, r = {}, i) {
534
+ return {
535
+ id: e.id,
536
+ header: () => e.header,
537
+ accessorFn: t,
538
+ cell: (e) => n(e.getValue(), e.row.original),
539
+ ...e.size ? { size: e.size } : {},
540
+ ...i ? { sortingFn: i } : {},
541
+ meta: {
542
+ ...e.priority === void 0 ? {} : { priority: e.priority },
543
+ ...e.grow ? { grow: !0 } : {},
544
+ ...e.minWidth === void 0 ? {} : { minWidth: e.minWidth },
545
+ ...e.tone ? { tone: e.tone } : {},
546
+ ...r
547
+ }
548
+ };
549
+ }
550
+ function Pe({ value: e }) {
551
+ let t = i()("dataTable.tokenCount", "{count} tokens", { count: s(e) });
552
+ return /* @__PURE__ */ x(d, {
553
+ content: t,
554
+ children: /* @__PURE__ */ S("span", { children: [/* @__PURE__ */ x("span", {
555
+ "aria-hidden": !0,
556
+ children: l(e)
557
+ }), /* @__PURE__ */ x("span", {
558
+ className: "sr-only",
559
+ children: t
560
+ })] })
561
+ });
562
+ }
563
+ function N({ value: e, now: t }) {
564
+ let n = a(e, {
565
+ time: !0,
566
+ seconds: !0
567
+ });
568
+ return /* @__PURE__ */ x(d, {
569
+ content: `${n} · ${a(e, {
570
+ time: !0,
571
+ utc: !0
572
+ })}`,
573
+ shape: "multiline",
574
+ children: /* @__PURE__ */ S("span", {
575
+ className: "text-fg-secondary",
576
+ children: [/* @__PURE__ */ x("time", {
577
+ dateTime: new Date(e).toISOString(),
578
+ children: c(e, t)
579
+ }), /* @__PURE__ */ S("span", {
580
+ className: "sr-only",
581
+ children: [" ", n]
582
+ })]
583
+ })
584
+ });
585
+ }
586
+ var Fe = {
587
+ text: (e, t) => M(e, t, (e) => e, { text: (e) => t(e) }),
588
+ mono: (e, t) => M(e, t, (e) => e, {
589
+ mono: !0,
590
+ text: (e) => t(e)
591
+ }),
592
+ number: (e, t) => M(e, t, (e) => s(e), { align: "end" }),
593
+ money: (e, t, n = {}) => M(e, t, (e) => ee(e, n.decimals === void 0 ? {} : { decimals: n.decimals }), {
594
+ align: "end",
595
+ mono: !1
596
+ }, (e, t, n) => Number(e.getValue(n)) - Number(t.getValue(n))),
597
+ tokens: (e, t) => M(e, t, (e) => /* @__PURE__ */ x(Pe, { value: e }), { align: "end" }),
598
+ duration: (e, t) => M(e, t, (e) => o(e), { align: "end" }),
599
+ date: (e, t) => j(M(e, t, (e) => /* @__PURE__ */ x("time", {
600
+ dateTime: new Date(e).toISOString(),
601
+ children: a(e, { time: !0 })
602
+ }), { text: (e) => a(t(e), { time: !0 }) }, "datetime")),
603
+ relative: (e, t, n = {}) => j(M(e, t, (e) => /* @__PURE__ */ x(N, {
604
+ value: e,
605
+ now: n.now ?? Date.now()
606
+ }), { text: (e) => a(t(e), { time: !0 }) }, (e, t, n) => new Date(e.getValue(n)).getTime() - new Date(t.getValue(n)).getTime())),
607
+ status: (e, t) => M(e, t, (e) => /* @__PURE__ */ x(g, {
608
+ tone: e.tone,
609
+ children: e.label
610
+ }), { text: void 0 }),
611
+ avatar: (e, t) => M(e, t, (e) => /* @__PURE__ */ S("span", {
612
+ className: "inline-flex min-w-0 items-center gap-8",
613
+ children: [/* @__PURE__ */ x(_, {
614
+ name: e.name,
615
+ ...e.src ? { src: e.src } : {},
616
+ size: 24,
617
+ decorative: !0
618
+ }), /* @__PURE__ */ x(h, { children: e.name })]
619
+ }), { text: (e) => t(e).name }),
620
+ custom: (e, t, n, r = {}) => M(e, t, n, r)
621
+ };
622
+ //#endregion
623
+ export { T as i, Ne as n, E as r, Fe as t };
624
+
625
+ //# sourceMappingURL=data-table-ByhxIgY2.js.map