@logicplanes/kaeso-ui 0.7.5-rc.9 → 0.7.5

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 (279) hide show
  1. package/AGENTS.md +2 -2
  2. package/ai/component-guides.md +37 -8
  3. package/ai/component-registry.json +19 -12
  4. package/ai/component-registry.md +10 -9
  5. package/ai/icons.md +1 -1
  6. package/ai/tokens.md +1 -1
  7. package/dist/chunks/{app-frame-DPIr7C6C.js → app-frame-COfWg7wS.js} +3 -3
  8. package/dist/chunks/app-frame-COfWg7wS.js.map +1 -0
  9. package/dist/chunks/arrow-focus-D9q8rMct.js.map +1 -1
  10. package/dist/chunks/avatar-C4r7x_uJ.js.map +1 -1
  11. package/dist/chunks/avatar-CQNbSj8X.js.map +1 -1
  12. package/dist/chunks/badge-CU9K-wA1.js.map +1 -1
  13. package/dist/chunks/banner-R5GIFExf.js.map +1 -1
  14. package/dist/chunks/button-CXdEDVSI.js.map +1 -1
  15. package/dist/chunks/button-group-CbzjByVu.js.map +1 -1
  16. package/dist/chunks/calendar-BpY2J5Qf.js.map +1 -1
  17. package/dist/chunks/{checkbox-6GPT3xkr.js → checkbox-D2MWvFlH.js} +2 -2
  18. package/dist/chunks/checkbox-D2MWvFlH.js.map +1 -0
  19. package/dist/chunks/cn-Cim5WXyu.js.map +1 -1
  20. package/dist/chunks/code-CGPiBqzu.js.map +1 -1
  21. package/dist/chunks/code-block-Dkedqh94.js.map +1 -1
  22. package/dist/chunks/{code-block-DYODgIka.js → code-block-RYsP7P22.js} +2 -2
  23. package/dist/chunks/code-block-RYsP7P22.js.map +1 -0
  24. package/dist/chunks/collapsible-BwQBF1wX.js.map +1 -1
  25. package/dist/chunks/{combobox-DkWaZ-v_.js → combobox-DlIGL6fh.js} +3 -3
  26. package/dist/chunks/combobox-DlIGL6fh.js.map +1 -0
  27. package/dist/chunks/{command-list-98lB5cP5.js → command-list-D7wBlyDt.js} +3 -3
  28. package/dist/chunks/command-list-D7wBlyDt.js.map +1 -0
  29. package/dist/chunks/{command-palette-BoL0MoxB.js → command-palette-DhHS-XXz.js} +3 -3
  30. package/dist/chunks/command-palette-DhHS-XXz.js.map +1 -0
  31. package/dist/chunks/context-B2nNL7Im.js.map +1 -1
  32. package/dist/chunks/copy-button-BjfGRgZi.js.map +1 -1
  33. package/dist/chunks/{core-Dtlb6S1k.js → core-DZ_ZGFjd.js} +6 -6
  34. package/dist/chunks/core-DZ_ZGFjd.js.map +1 -0
  35. package/dist/chunks/dashboard-BOeVNKwA.js.map +1 -1
  36. package/dist/chunks/{data-table-CoiHkxAQ.js → data-table-DLqzrTF8.js} +254 -222
  37. package/dist/chunks/data-table-DLqzrTF8.js.map +1 -0
  38. package/dist/chunks/date-picker-CiLNpsSh.js.map +1 -1
  39. package/dist/chunks/date-popup-Bp0d8U6H.js.map +1 -1
  40. package/dist/chunks/{de-CdlagGzS.js → de-BsTWV__5.js} +5 -4
  41. package/dist/chunks/de-BsTWV__5.js.map +1 -0
  42. package/dist/chunks/delta-Dspg6LP2.js.map +1 -1
  43. package/dist/chunks/dev-CRNODF1J.js.map +1 -1
  44. package/dist/chunks/dialog-wy5nNxfE.js.map +1 -1
  45. package/dist/chunks/disclosure-CmuBms1J.js.map +1 -1
  46. package/dist/chunks/{display-options-DSUfHF5n.js → display-options-CPo4Pn5F.js} +2 -2
  47. package/dist/chunks/display-options-CPo4Pn5F.js.map +1 -0
  48. package/dist/chunks/{domain-CyQb3nHF.js → domain-Cfyk1vCK.js} +3 -3
  49. package/dist/chunks/{domain-CyQb3nHF.js.map → domain-Cfyk1vCK.js.map} +1 -1
  50. package/dist/chunks/empty-JZwT3C6e.js +81 -0
  51. package/dist/chunks/empty-JZwT3C6e.js.map +1 -0
  52. package/dist/chunks/field-DG61eK8Z.js.map +1 -1
  53. package/dist/chunks/figure-BI0eP7S-.js.map +1 -1
  54. package/dist/chunks/figures-D_Tsrwwj.js.map +1 -1
  55. package/dist/chunks/{filter-chip-DE2j5Vyj.js → filter-chip-DY-gZVYb.js} +4 -4
  56. package/dist/chunks/filter-chip-DY-gZVYb.js.map +1 -0
  57. package/dist/chunks/filter-row-CPO_SEYy.js.map +1 -1
  58. package/dist/chunks/flow-B8DRLw6-.js.map +1 -1
  59. package/dist/chunks/formatters-Be5AdLB2.js.map +1 -1
  60. package/dist/chunks/heading-CkCOztRO.js.map +1 -1
  61. package/dist/chunks/icon-B9UXhFTF.js.map +1 -1
  62. package/dist/chunks/icon-DOwC1bbC.js.map +1 -1
  63. package/dist/chunks/identity-CAvHnogN.js.map +1 -1
  64. package/dist/chunks/input-6tVIiN3-.js.map +1 -1
  65. package/dist/chunks/input-BVheeeEI.js.map +1 -1
  66. package/dist/chunks/input-group-ClNtr_Gm.js.map +1 -1
  67. package/dist/chunks/inset-BTAjcK6a.js.map +1 -1
  68. package/dist/chunks/iso-field-C29xji-V.js.map +1 -1
  69. package/dist/chunks/json-view-BVTEkhgz.js.map +1 -1
  70. package/dist/chunks/{kaeso-MWzqLOiV.js → kaeso-CaMYkbqJ.js} +5 -5
  71. package/dist/chunks/kaeso-CaMYkbqJ.js.map +1 -0
  72. package/dist/chunks/kaeso-theme-C9rnRKq2.js.map +1 -1
  73. package/dist/chunks/kbd-CmhJfU_8.js.map +1 -1
  74. package/dist/chunks/key-value-tPKtCSOn.js.map +1 -1
  75. package/dist/chunks/labelled-DJa09XRF.js.map +1 -1
  76. package/dist/chunks/linear-scale-B5A7yNr7.js.map +1 -1
  77. package/dist/chunks/link-CZ1h1ksk.js.map +1 -1
  78. package/dist/chunks/link-provider-DSF9bbO3.js.map +1 -1
  79. package/dist/chunks/list-zQrK77Dx.js +698 -0
  80. package/dist/chunks/list-zQrK77Dx.js.map +1 -0
  81. package/dist/chunks/loader-BbKL8cW_.js.map +1 -1
  82. package/dist/chunks/loader-DBk2HCOh.js.map +1 -1
  83. package/dist/chunks/logo-DqjYySTX.js.map +1 -1
  84. package/dist/chunks/{markdown-BCG1Kkph.js → markdown-Ds1mSbGa.js} +2 -2
  85. package/dist/chunks/markdown-Ds1mSbGa.js.map +1 -0
  86. package/dist/chunks/{menu-DT4G6X7s.js → menu-CKlz_Dp4.js} +2 -2
  87. package/dist/chunks/menu-CKlz_Dp4.js.map +1 -0
  88. package/dist/chunks/merge-refs-SiVVoQsO.js.map +1 -1
  89. package/dist/chunks/message-DpD9D1Dj.js.map +1 -1
  90. package/dist/chunks/{meter-D_c3jawb.js → meter-d2wMKjVU.js} +2 -2
  91. package/dist/chunks/meter-d2wMKjVU.js.map +1 -0
  92. package/dist/chunks/{nav-sheet-DuqCp7cS.js → nav-sheet--ycVeOvo.js} +2 -2
  93. package/dist/chunks/nav-sheet--ycVeOvo.js.map +1 -0
  94. package/dist/chunks/nav-wordmark-CPDxGU5t.js.map +1 -1
  95. package/dist/chunks/observe-resize-Bubv5_wX.js.map +1 -1
  96. package/dist/chunks/option-checkbox-wA9L8Nxo.js.map +1 -1
  97. package/dist/chunks/over-sheet-CMUXcIMV.js.map +1 -1
  98. package/dist/chunks/{page-header-B6lKcMlr.js → page-header-DRi-hKtt.js} +4 -4
  99. package/dist/chunks/page-header-DRi-hKtt.js.map +1 -0
  100. package/dist/chunks/pagination-DvPIXuoj.js.map +1 -1
  101. package/dist/chunks/{picker-popover-6ISVxMYv.js → picker-popover-B-zhsNiS.js} +3 -3
  102. package/dist/chunks/picker-popover-B-zhsNiS.js.map +1 -0
  103. package/dist/chunks/popover-Dw7iTUNg.js.map +1 -1
  104. package/dist/chunks/popover-root-BI54wuLi.js.map +1 -1
  105. package/dist/chunks/portal-context-Z2xSIPsc.js.map +1 -1
  106. package/dist/chunks/provider-marks-DmonWRb5.js.map +1 -1
  107. package/dist/chunks/qr-code-ClT_2Xa9.js.map +1 -1
  108. package/dist/chunks/radio-DJES13fj.js.map +1 -1
  109. package/dist/chunks/range-popup-CiCBpRfH.js.map +1 -1
  110. package/dist/chunks/reasoning-frame-DnTFGrD_.js.map +1 -1
  111. package/dist/chunks/{release-art-CgszffGH.js → release-art-CQjO2Ewv.js} +2 -2
  112. package/dist/chunks/release-art-CQjO2Ewv.js.map +1 -0
  113. package/dist/chunks/resize-motion-CMR1x5Kw.js.map +1 -1
  114. package/dist/chunks/{rights-BKkbkESE.js → rights-B0LWKkB2.js} +117 -111
  115. package/dist/chunks/rights-B0LWKkB2.js.map +1 -0
  116. package/dist/chunks/{rolldown-runtime-CGnMp29N.js → rolldown-runtime-BMBA7GOT.js} +2 -2
  117. package/dist/chunks/rolling-number-uNjki3hn.js.map +1 -1
  118. package/dist/chunks/row-control-DlHLdthx.js.map +1 -1
  119. package/dist/chunks/safe-href-CWHpspUx.js.map +1 -1
  120. package/dist/chunks/scroll-area-CjokFhH6.js.map +1 -1
  121. package/dist/chunks/section-DJgejMMh.js.map +1 -1
  122. package/dist/chunks/segmented-UnR1L-kk.js.map +1 -1
  123. package/dist/chunks/{select-CvpwZaeF.js → select-BDwDI8L3.js} +2 -2
  124. package/dist/chunks/select-BDwDI8L3.js.map +1 -0
  125. package/dist/chunks/selects-text-CYQ11JVI.js +46 -0
  126. package/dist/chunks/selects-text-CYQ11JVI.js.map +1 -0
  127. package/dist/chunks/separator-3RcDNFzM.js.map +1 -1
  128. package/dist/chunks/settings-CcNjQm1D.js.map +1 -1
  129. package/dist/chunks/sheet-CsN1uy5N.js.map +1 -1
  130. package/dist/chunks/shiki-Drii10ai.js.map +1 -1
  131. package/dist/chunks/{sidebar-5-2Nqm-H.js → sidebar-Cz0KdApZ.js} +2 -2
  132. package/dist/chunks/sidebar-Cz0KdApZ.js.map +1 -0
  133. package/dist/chunks/{sidebar-menu-D0y3wpvD.js → sidebar-menu-CTaQhVTv.js} +2 -2
  134. package/dist/chunks/sidebar-menu-CTaQhVTv.js.map +1 -0
  135. package/dist/chunks/skeleton-GuivuiOP.js.map +1 -1
  136. package/dist/chunks/slider-XvStaacJ.js.map +1 -1
  137. package/dist/chunks/stat-BJ4otTGc.js.map +1 -1
  138. package/dist/chunks/status-BkW_rVAX.js.map +1 -1
  139. package/dist/chunks/{styles-CN0ovMB2.js → styles-BsZZml1H.js} +2 -2
  140. package/dist/chunks/{styles-CN0ovMB2.js.map → styles-BsZZml1H.js.map} +1 -1
  141. package/dist/chunks/swap-text-Crb3uzrK.js.map +1 -1
  142. package/dist/chunks/swap-value-BKrH58Iv.js.map +1 -1
  143. package/dist/chunks/switch-CzmZ6gLD.js.map +1 -1
  144. package/dist/chunks/table-ppZE7fYt.js.map +1 -1
  145. package/dist/chunks/tabs-DPA2zGfY.js.map +1 -1
  146. package/dist/chunks/tag-CnULig9p.js.map +1 -1
  147. package/dist/chunks/text-BC4rusw7.js.map +1 -1
  148. package/dist/chunks/textarea-K4ojoshs.js.map +1 -1
  149. package/dist/chunks/theme-image-C9p959Kv.js.map +1 -1
  150. package/dist/chunks/{theme-menu-CanR1L9T.js → theme-menu-Bm8d9ooS.js} +2 -2
  151. package/dist/chunks/theme-menu-Bm8d9ooS.js.map +1 -0
  152. package/dist/chunks/theme-provider-DaD8hlXu.js.map +1 -1
  153. package/dist/chunks/thumbnail-CUa0JXLG.js.map +1 -1
  154. package/dist/chunks/thumbnail-KtBHleQk.js.map +1 -1
  155. package/dist/chunks/timeline-hMJEN3ZB.js.map +1 -1
  156. package/dist/chunks/{timeseries-B1h0RRhx.js → timeseries-BUL9zITH.js} +5 -5
  157. package/dist/chunks/timeseries-BUL9zITH.js.map +1 -0
  158. package/dist/chunks/toast-4PyK7GS1.js.map +1 -1
  159. package/dist/chunks/toc-CUh8jCiJ.js.map +1 -1
  160. package/dist/chunks/toolbar-w3ZPxEoW.js.map +1 -1
  161. package/dist/chunks/tooltip-D0jdTWyX.js.map +1 -1
  162. package/dist/chunks/{tooltip-iKeKjr7J.js → tooltip-DpUVorD8.js} +3 -3
  163. package/dist/chunks/tooltip-DpUVorD8.js.map +1 -0
  164. package/dist/chunks/tooltip-root-Ka27-TrV.js.map +1 -1
  165. package/dist/chunks/tooltip-uRgNOzW_.js.map +1 -1
  166. package/dist/chunks/truncated-CcpJk_3e.js.map +1 -1
  167. package/dist/chunks/use-controllable-rN5Fg5EJ.js.map +1 -1
  168. package/dist/chunks/use-copy-DtUCUOlR.js.map +1 -1
  169. package/dist/chunks/use-cut-off-Cx1Nn5uF.js.map +1 -1
  170. package/dist/chunks/use-delayed-loading-Chh5dI7E.js.map +1 -1
  171. package/dist/chunks/use-hydrating-Dth8POSk.js.map +1 -1
  172. package/dist/chunks/use-indicator-C1pEv290.js.map +1 -1
  173. package/dist/chunks/use-layout-width-DbMAv4mR.js.map +1 -1
  174. package/dist/chunks/use-scroll-fade-BwpKEWY0.js.map +1 -1
  175. package/dist/chunks/use-scroll-margin-LcRbT78-.js.map +1 -1
  176. package/dist/chunks/use-truncated-Dn60-ubK.js.map +1 -1
  177. package/dist/chunks/use-utc-while-hydrating-PP48Tcfz.js.map +1 -1
  178. package/dist/chunks/virtual-rows-D-ZT6V6B.js.map +1 -1
  179. package/dist/chunks/visually-hidden-Di2pLhE3.js.map +1 -1
  180. package/dist/chunks/when-idle-DXKwyOLB.js.map +1 -1
  181. package/dist/chunks/{zh-CN-BjoJbfdJ.js → zh-CN-C4aFUWpC.js} +2 -1
  182. package/dist/chunks/{zh-CN-BjoJbfdJ.js.map → zh-CN-C4aFUWpC.js.map} +1 -1
  183. package/dist/components/app-frame.js +1 -1
  184. package/dist/components/charts/bar.js +5 -5
  185. package/dist/components/charts/bar.js.map +1 -1
  186. package/dist/components/charts/donut.js +2 -2
  187. package/dist/components/charts/donut.js.map +1 -1
  188. package/dist/components/charts/heatmap.js +2 -2
  189. package/dist/components/charts/heatmap.js.map +1 -1
  190. package/dist/components/charts/sankey.js +3 -3
  191. package/dist/components/charts/sankey.js.map +1 -1
  192. package/dist/components/charts/sparkline.js +1 -1
  193. package/dist/components/charts/sparkline.js.map +1 -1
  194. package/dist/components/charts/swatches.js.map +1 -1
  195. package/dist/components/charts/timeseries.js +1 -1
  196. package/dist/components/charts.js +2 -2
  197. package/dist/components/checkbox.js +1 -1
  198. package/dist/components/code-block.js +1 -1
  199. package/dist/components/combobox.js +1 -1
  200. package/dist/components/command-palette.js +1 -1
  201. package/dist/components/dashboard/about-header.js.map +1 -1
  202. package/dist/components/dashboard/legend.js.map +1 -1
  203. package/dist/components/dashboard/metric-tabs.js.map +1 -1
  204. package/dist/components/dashboard/model-card.js.map +1 -1
  205. package/dist/components/dashboard/rank-list.js +13 -5
  206. package/dist/components/dashboard/rank-list.js.map +1 -1
  207. package/dist/components/data-table.js +1 -1
  208. package/dist/components/display-options.js +1 -1
  209. package/dist/components/empty.js +1 -1
  210. package/dist/components/filter-chip.js +1 -1
  211. package/dist/components/flow-canvas.js +4 -4
  212. package/dist/components/flow-canvas.js.map +1 -1
  213. package/dist/components/kaeso/conversation.js +1 -1
  214. package/dist/components/kaeso/conversation.js.map +1 -1
  215. package/dist/components/kaeso/moments.js.map +1 -1
  216. package/dist/components/kaeso/rights.js +1 -1
  217. package/dist/components/kaeso/usage.js +3 -3
  218. package/dist/components/kaeso/usage.js.map +1 -1
  219. package/dist/components/kaeso.js +2 -2
  220. package/dist/components/list.js +1 -1
  221. package/dist/components/markdown.js +1 -1
  222. package/dist/components/menu.js +2 -2
  223. package/dist/components/meter.js +1 -1
  224. package/dist/components/page-header.js +1 -1
  225. package/dist/components/playground.js +6 -6
  226. package/dist/components/playground.js.map +1 -1
  227. package/dist/components/release-art.js +1 -1
  228. package/dist/components/select.js +1 -1
  229. package/dist/components/sidebar.js +1 -1
  230. package/dist/components/theme-menu.js +1 -1
  231. package/dist/format.js.map +1 -1
  232. package/dist/i18n-locales.js.map +1 -1
  233. package/dist/i18n-provider.js +1 -1
  234. package/dist/i18n-provider.js.map +1 -1
  235. package/dist/index.js +23 -23
  236. package/dist/kaeso.css +36 -4
  237. package/dist/styles.css +1 -1
  238. package/dist/types/components/empty/empty.d.ts +10 -8
  239. package/dist/types/components/empty/ghost.d.ts +9 -0
  240. package/dist/types/components/list/docs.d.ts +1 -0
  241. package/dist/types/components/list/index.d.ts +1 -1
  242. package/dist/types/components/list/list.d.ts +12 -0
  243. package/foundations/icons.md +1 -1
  244. package/foundations/motion.md +2 -2
  245. package/foundations/psychology.md +1 -1
  246. package/foundations/writing.md +2 -2
  247. package/package.json +10 -10
  248. package/dist/chunks/app-frame-DPIr7C6C.js.map +0 -1
  249. package/dist/chunks/checkbox-6GPT3xkr.js.map +0 -1
  250. package/dist/chunks/code-block-DYODgIka.js.map +0 -1
  251. package/dist/chunks/combobox-DkWaZ-v_.js.map +0 -1
  252. package/dist/chunks/command-list-98lB5cP5.js.map +0 -1
  253. package/dist/chunks/command-palette-BoL0MoxB.js.map +0 -1
  254. package/dist/chunks/core-Dtlb6S1k.js.map +0 -1
  255. package/dist/chunks/data-table-CoiHkxAQ.js.map +0 -1
  256. package/dist/chunks/de-CdlagGzS.js.map +0 -1
  257. package/dist/chunks/display-options-DSUfHF5n.js.map +0 -1
  258. package/dist/chunks/empty-DsN9jTVb.js +0 -83
  259. package/dist/chunks/empty-DsN9jTVb.js.map +0 -1
  260. package/dist/chunks/filter-chip-DE2j5Vyj.js.map +0 -1
  261. package/dist/chunks/kaeso-MWzqLOiV.js.map +0 -1
  262. package/dist/chunks/list-Bq7vGhxI.js +0 -643
  263. package/dist/chunks/list-Bq7vGhxI.js.map +0 -1
  264. package/dist/chunks/markdown-BCG1Kkph.js.map +0 -1
  265. package/dist/chunks/menu-DT4G6X7s.js.map +0 -1
  266. package/dist/chunks/meter-D_c3jawb.js.map +0 -1
  267. package/dist/chunks/nav-sheet-DuqCp7cS.js.map +0 -1
  268. package/dist/chunks/page-header-B6lKcMlr.js.map +0 -1
  269. package/dist/chunks/picker-popover-6ISVxMYv.js.map +0 -1
  270. package/dist/chunks/release-art-CgszffGH.js.map +0 -1
  271. package/dist/chunks/rights-BKkbkESE.js.map +0 -1
  272. package/dist/chunks/select-CvpwZaeF.js.map +0 -1
  273. package/dist/chunks/selects-text-kRMTsm4s.js +0 -32
  274. package/dist/chunks/selects-text-kRMTsm4s.js.map +0 -1
  275. package/dist/chunks/sidebar-5-2Nqm-H.js.map +0 -1
  276. package/dist/chunks/sidebar-menu-D0y3wpvD.js.map +0 -1
  277. package/dist/chunks/theme-menu-CanR1L9T.js.map +0 -1
  278. package/dist/chunks/timeseries-B1h0RRhx.js.map +0 -1
  279. package/dist/chunks/tooltip-iKeKjr7J.js.map +0 -1
package/AGENTS.md CHANGED
@@ -78,7 +78,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
78
78
  3. **Only token values exist.** `bg-panel`, `text-fg-secondary`, `h-36`, `rounded-pill`. There is no `bg-blue-500`, no `p-7`, no arbitrary values, no `dark:`.
79
79
  4. **Wrap inputs in `Field`** (or give them `label`) for the label, hint and error. A bare input without a label or an `aria-label` is a bug.
80
80
  5. **One primary button per view.** Everything else is secondary or ghost.
81
- 6. **No decorative cards and no decorative icons.** Content sits on the panel; empty states and dialogs carry words. An empty page or section may show its place's own icon above them (`Empty icon`), never another.
81
+ 6. **No decorative cards and no decorative icons.** Content sits on the panel; empty states and dialogs carry words. An empty page, sheet or section may show its place's own icon above them, small (`Empty icon`), never another; an empty list or table draws faint rows of its own shape instead (`List`/`DataTable` with `empty`).
82
82
  7. **Color only for data and status**, and a status always has a word.
83
83
  8. **Use the formatters** for money, tokens, durations and dates: `useFormatters()` in components, so they follow the nearest `LocaleProvider` on the server too; `@logicplanes/kaeso-ui/format` outside React. Money stays an exact decimal string.
84
84
  9. **Use the icon vocabulary**: `icons.key`, `icons.model`, never an icon picked by look.
@@ -103,7 +103,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
103
103
  | Feedback after an action | `toast()`, with Undo for reversible actions |
104
104
  | A secret shown once | `SecretReveal` |
105
105
  | Numbers at a glance | `StatGroup` with `Stat variant="tile"`; over time: `TimeseriesChart` |
106
- | Nothing to show yet | `Empty` with one action |
106
+ | Nothing to show yet | `Empty` with one action; as `List`/`DataTable` `empty` where the list would be |
107
107
 
108
108
  ## A screen
109
109
 
@@ -1,6 +1,6 @@
1
1
  # @logicplanes/kaeso-ui component guides
2
2
 
3
- Version 0.7.5-rc.9. Generated from the showcase's demo modules (apps/showcase/src/demos); do not edit. For each component: what it is for, its import, keyboard, accessibility, do and don't, and every example's code. Props and variants: `component-registry.md`.
3
+ Version 0.7.5. Generated from the showcase's demo modules (apps/showcase/src/demos); do not edit. For each component: what it is for, its import, keyboard, accessibility, do and don't, and every example's code. Props and variants: `component-registry.md`.
4
4
 
5
5
  ## AlertDialog
6
6
 
@@ -1954,8 +1954,38 @@ Every state of a place with nothing to show: a title, one sentence, one action.
1954
1954
 
1955
1955
  ### Examples
1956
1956
 
1957
+ #### Where a list would be
1958
+
1959
+ Given to the list as its empty state: faint rows of the list's own shape, the words between them.
1960
+
1961
+ ```tsx
1962
+ <List
1963
+ aria-label="Keys"
1964
+ items={[]}
1965
+ ghost={{ meta: 1 }}
1966
+ empty={
1967
+ <Empty
1968
+ title="No keys yet"
1969
+ description="Keys let apps call the gateway; each request names one."
1970
+ actions={
1971
+ <>
1972
+ <Button variant="primary" leadingIcon={icons.add}>
1973
+ Create key
1974
+ </Button>
1975
+ <Link variant="action" href="https://docs.kaeso.app/console/api-keys" external>
1976
+ Read about keys
1977
+ </Link>
1978
+ </>
1979
+ }
1980
+ />
1981
+ }
1982
+ />
1983
+ ```
1984
+
1957
1985
  #### In a page
1958
1986
 
1987
+ Centred, two fifths of the way down, under the place's own icon.
1988
+
1959
1989
  ```tsx
1960
1990
  <Empty
1961
1991
  icon={icons.key}
@@ -1979,12 +2009,11 @@ Every state of a place with nothing to show: a title, one sentence, one action.
1979
2009
  The filter is the reason, so the action clears it.
1980
2010
 
1981
2011
  ```tsx
1982
- <Empty
1983
- size="md"
1984
- icon={icons.search}
1985
- title="No keys match “ci-runner”"
1986
- description="Search names and key prefixes, or clear the search."
1987
- actions={<Button>Clear search</Button>}
2012
+ <List
2013
+ aria-label="Keys"
2014
+ items={[]}
2015
+ ghost={{ meta: 1 }}
2016
+ empty={<Empty title="No keys match “ci-runner”" description="Search by another name or the start of a key." actions={<Button>Clear search</Button>} />}
1988
2017
  />
1989
2018
  ```
1990
2019
 
@@ -2009,7 +2038,7 @@ What failed, the gateway's reason and a way to try again.
2009
2038
 
2010
2039
  #### In a card
2011
2040
 
2012
- At the top of the card, on its text edge, never centered in a tall box.
2041
+ Centred in the card, small, without an icon.
2013
2042
 
2014
2043
  ```tsx
2015
2044
  <div className="w-320 rounded-group bg-raised shadow-xs">
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@logicplanes/kaeso-ui",
3
- "version": "0.7.5-rc.9",
3
+ "version": "0.7.5",
4
4
  "components": [
5
5
  {
6
6
  "entry": "app-frame",
@@ -3095,7 +3095,7 @@
3095
3095
  "type": "ReactNode",
3096
3096
  "required": false,
3097
3097
  "default": null,
3098
- "description": "What an empty list says: \"Nothing in this period\"."
3098
+ "description": "What an empty list says, in the middle of faint, still rows that keep the list's room: \"Nothing in this period\"."
3099
3099
  },
3100
3100
  {
3101
3101
  "name": "error",
@@ -3130,7 +3130,7 @@
3130
3130
  "type": "number",
3131
3131
  "required": false,
3132
3132
  "default": "5",
3133
- "description": "How many lines the list holds room for: the loading state shows that many, and while it can load (`loading` is passed) an empty or short list keeps that room, so nothing under it moves."
3133
+ "description": "How many lines the list holds room for: the loading state shows that many, an empty list draws that many faintly, and while it can load (`loading` is passed) a short list keeps that room, so nothing under it moves."
3134
3134
  }
3135
3135
  ],
3136
3136
  "file": "src/components/dashboard/rank-list.tsx"
@@ -3286,7 +3286,7 @@
3286
3286
  "type": "ReactNode",
3287
3287
  "required": false,
3288
3288
  "default": null,
3289
- "description": "What to show when there are no rows: an `Empty` with the page's own sentence, such as \"No requests yet\" or, behind filters, \"No requests match\". Without it the table says \"No rows\"."
3289
+ "description": "What to show when there are no rows: an `Empty` with the page's own sentence, such as \"No requests yet\" or, behind filters, \"No requests match\" with Clear filters. On a page and in a card the table keeps its head and draws faint, still rows in its own columns around it, so the first real row lands where the first faint one was. Without it the table says \"No rows\"."
3290
3290
  },
3291
3291
  {
3292
3292
  "name": "error",
@@ -4522,7 +4522,7 @@
4522
4522
  "components": [
4523
4523
  {
4524
4524
  "name": "Empty",
4525
- "description": "Every state of a place that has nothing to show: nothing yet, nothing that matches, nothing the person may see, or something that couldn't load. A strong title, one sentence and at most one primary action, with a link to read more beside it where that helps. On a page (`lg`) and in a section (`md`) it hangs from the gutter the page's title and rows start on, under an optional icon of the place in a quiet tile; in a card, a dashboard cell or a sheet (`sm`) it sits at the top on the card's text edge; in a table or list row (`compact`) it is one short statement, centered. An error (`tone=\"error\"`) is announced as an alert and colours only its icon. On an edge-to-edge page body it keeps the gutter itself; on a padded surface it uses the surface's padding; inside a card it keeps 20px off the card's edges, like the card's rows. The title is a heading (h2) at every size.",
4525
+ "description": "Every state of a place that has nothing to show: nothing yet, nothing that matches, nothing the person may see, or something that couldn't load. A strong title, one sentence and at most one primary action, with a link to read more beside it where that helps, centred. On a page (`lg`) and in a sheet (`md`) it fills the room under the header and sits two fifths of the way down, under the place's icon, small and without a tile; in a section or a dialog step (`md`) and in a card, a dashboard cell or a sheet's tab (`sm`) it is centred in its room; in a table or list row (`compact`) it is one short statement. Given to a List or a DataTable as `empty`, it stands between faint rows of the list it replaces, without an icon. An error (`tone=\"error\"`) is announced as an alert and colours only its icon. On an edge-to-edge page body it keeps the gutter itself; on a padded surface it uses the surface's padding; inside a card it keeps 20px off the card's edges, like the card's rows. The title is a heading (h2) at every size.",
4526
4526
  "props": [
4527
4527
  {
4528
4528
  "name": "title",
@@ -4564,7 +4564,7 @@
4564
4564
  "type": "IconData",
4565
4565
  "required": false,
4566
4566
  "default": null,
4567
- "description": "The place's own icon, as in the navigation, so the empty page reads as that place. Shown on pages and sections only; never decoration."
4567
+ "description": "The place's own icon, as in the navigation, so the empty page reads as that place: small, above the words, on pages, sheets and sections only. Never decoration, and left out between a list's faint rows."
4568
4568
  },
4569
4569
  {
4570
4570
  "name": "size",
@@ -4588,10 +4588,10 @@
4588
4588
  "EMPTY": {
4589
4589
  "axes": {
4590
4590
  "size": {
4591
- "lg": "A page with nothing in it: hung from the page's gutter, under its header (default)",
4592
- "md": "A section of a page or a dialog step: hung from the section's gutter",
4593
- "sm": "A card, a dashboard cell or a sheet: at the top, on the card's text edge",
4594
- "compact": "Inside tables and lists: one short statement, centered in the row"
4591
+ "lg": "A page with nothing in it: centred, two fifths of the way down the page under its header (default)",
4592
+ "md": "A section, a sheet or a dialog step: centred, two fifths of the way down a sheet",
4593
+ "sm": "A card, a dashboard cell or a sheet's tab: centred in it",
4594
+ "compact": "Inside tables and lists: one short statement, centred in the row"
4595
4595
  },
4596
4596
  "tone": {
4597
4597
  "neutral": "Something is absent: nothing yet, nothing matches, nothing to see (default)",
@@ -7386,7 +7386,14 @@
7386
7386
  "type": "ReactNode",
7387
7387
  "required": false,
7388
7388
  "default": null,
7389
- "description": "Shown when there are no rows and the list isn't loading: usually an `Empty` (`size=\"md\"` in a settings column, where it sits inside the list's card; `size=\"compact\"` on an edge-to-edge page)."
7389
+ "description": "Shown when there are no rows and the list isn't loading, usually an `Empty` with the page's sentence. On a page and in a card the list draws faint, still rows of its own shape around it (ten on a page, three in a card), so the place reads as itself and the first real row lands where the first faint one was; in a sheet or a dialog it stands alone."
7390
+ },
7391
+ {
7392
+ "name": "ghost",
7393
+ "type": "false | ListGhost",
7394
+ "required": false,
7395
+ "default": "{}",
7396
+ "description": "The shape of the faint rows behind `empty`, like the real rows: a second line of text (`subtitle`, on by default), how many badges (`meta`), a date (on by default) and a picture before the title (`leading`). `false` leaves them out."
7390
7397
  },
7391
7398
  {
7392
7399
  "name": "groups",
@@ -8063,7 +8070,7 @@
8063
8070
  "components": [
8064
8071
  {
8065
8072
  "name": "PageHeader",
8066
- "description": "The 52px header of a page: its title, pill tabs, actions. Beside the tabs, a long title is cut short first, down to nothing if need be; only then do the tabs scroll. Whatever sits right above AppFrame.Body (this header, or a toolbar under it) shows a hairline at its foot while the content is scrolled under it, so the line separates only where something passes beneath. On a phone the tabs move to a row of their own under the title and actions, and actions that don't fit beside the whole title move to a row of their own too, wrapping onto another line when they are wider than the page, so the title isn't cut short, the tabs aren't squeezed beside a button and no action runs off the edge.",
8073
+ "description": "The 52px header of a page: its title, pill tabs, actions. Beside the tabs, the title keeps its whole width and the tabs take the room that's left, scrolling when they need more; only a title that would leave them less than 160px is cut short. Whatever sits right above AppFrame.Body (this header, or a toolbar under it) shows a hairline at its foot while the content is scrolled under it, so the line separates only where something passes beneath. On a phone the tabs move to a row of their own under the title and actions, and actions that don't fit beside the whole title move to a row of their own too, wrapping onto another line when they are wider than the page, so the title isn't cut short, the tabs aren't squeezed beside a button and no action runs off the edge.",
8067
8074
  "props": [
8068
8075
  {
8069
8076
  "name": "actions",
@@ -1,6 +1,6 @@
1
1
  # @logicplanes/kaeso-ui component registry
2
2
 
3
- Version 0.7.5-rc.9. Generated from the component types, their descriptions and variants; do not edit.
3
+ Version 0.7.5. Generated from the component types, their descriptions and variants; do not edit.
4
4
 
5
5
  ## app-frame
6
6
 
@@ -697,12 +697,12 @@ The top rows of a breakdown, largest first: the label, the share and the number
697
697
  | `aria-label` * | `string` | | The list's accessible name. |
698
698
  | `items` * | `RankItem[]` | | The rows: `id`, `label`, `value`, `secondary` (the share or a time), `change` against the previous period (a fraction with its `better` side, or a word such as "New"; on a phone it takes the place of `secondary`, so the label keeps its room) and `share` for the bar; leave `share` out for plain rows. |
699
699
  | `className` | `string` | | Classes for the layout of the outer element: margin, width and placement, never its look. |
700
- | `empty` | `ReactNode` | | What an empty list says: "Nothing in this period". |
700
+ | `empty` | `ReactNode` | | What an empty list says, in the middle of faint, still rows that keep the list's room: "Nothing in this period". |
701
701
  | `error` | `ReactNode` | | Set when the rows couldn't load. With no rows yet it takes the place of the list, so a failure never reads as nothing in this period; rows already shown stay after a failed refresh. A string becomes its title. |
702
702
  | `loading` | `boolean` | | While the rows load: `rows` lines of their shape. |
703
703
  | `onOpen` | `((id: string) => void)` | | Called with a row's id when it is chosen; without it, rows are plain text. Rows that open something grow to 44px on a touch screen. |
704
704
  | `onRetry` | `(() => void)` | | Loads the rows again; shows Try again under a failure. |
705
- | `rows` | `number` | `5` | How many lines the list holds room for: the loading state shows that many, and while it can load (`loading` is passed) an empty or short list keeps that room, so nothing under it moves. |
705
+ | `rows` | `number` | `5` | How many lines the list holds room for: the loading state shows that many, an empty list draws that many faintly, and while it can load (`loading` is passed) a short list keeps that room, so nothing under it moves. |
706
706
 
707
707
  ### Readout
708
708
 
@@ -738,7 +738,7 @@ A table for many rows: sorting, selection, loading and empty states, more rows o
738
738
  | `className` | `string` | | Classes for the layout of the outer element: margin, width and placement, never its look. |
739
739
  | `data-force-row` | `string` | | Force a state on the first row for state matrices: hover, pressed, focus. |
740
740
  | `density` | `"default" \| "compact" \| "comfortable"` | | How much room each row gets. |
741
- | `empty` | `ReactNode` | | What to show when there are no rows: an `Empty` with the page's own sentence, such as "No requests yet" or, behind filters, "No requests match". Without it the table says "No rows". |
741
+ | `empty` | `ReactNode` | | What to show when there are no rows: an `Empty` with the page's own sentence, such as "No requests yet" or, behind filters, "No requests match" with Clear filters. On a page and in a card the table keeps its head and draws faint, still rows in its own columns around it, so the first real row lands where the first faint one was. Without it the table says "No rows". |
742
742
  | `error` | `ReactNode` | | The rows failed to load: the table says so where its rows would be and offers Try again (`onRetry`), or, without it, says to reload the page. A string names what failed ("Requests couldn't load") and becomes the title; the gateway's message stays in the toast where the request fails. |
743
743
  | `freshRowIds` | `ReadonlySet<string>` | | Rows that just arrived (a live list): each shows a fill that fades out over a second. |
744
744
  | `getRowId` | `((row: T) => string)` | | Returns a row's stable id, for selection and keys. |
@@ -977,12 +977,12 @@ Display options: view, grouping and ordering, toggles, properties.
977
977
 
978
978
  `import { Empty } from "@logicplanes/kaeso-ui/empty";`
979
979
 
980
- - **size** (empty): `lg` (default) — A page with nothing in it: hung from the page's gutter, under its header (default); `md` — A section of a page or a dialog step: hung from the section's gutter; `sm` — A card, a dashboard cell or a sheet: at the top, on the card's text edge; `compact` — Inside tables and lists: one short statement, centered in the row
980
+ - **size** (empty): `lg` (default) — A page with nothing in it: centred, two fifths of the way down the page under its header (default); `md` — A section, a sheet or a dialog step: centred, two fifths of the way down a sheet; `sm` — A card, a dashboard cell or a sheet's tab: centred in it; `compact` — Inside tables and lists: one short statement, centred in the row
981
981
  - **tone** (empty): `neutral` (default) — Something is absent: nothing yet, nothing matches, nothing to see (default); `error` — Something couldn't load: what happened and a way to try again, announced as an alert
982
982
 
983
983
  ### Empty
984
984
 
985
- Every state of a place that has nothing to show: nothing yet, nothing that matches, nothing the person may see, or something that couldn't load. A strong title, one sentence and at most one primary action, with a link to read more beside it where that helps. On a page (`lg`) and in a section (`md`) it hangs from the gutter the page's title and rows start on, under an optional icon of the place in a quiet tile; in a card, a dashboard cell or a sheet (`sm`) it sits at the top on the card's text edge; in a table or list row (`compact`) it is one short statement, centered. An error (`tone="error"`) is announced as an alert and colours only its icon. On an edge-to-edge page body it keeps the gutter itself; on a padded surface it uses the surface's padding; inside a card it keeps 20px off the card's edges, like the card's rows. The title is a heading (h2) at every size.
985
+ Every state of a place that has nothing to show: nothing yet, nothing that matches, nothing the person may see, or something that couldn't load. A strong title, one sentence and at most one primary action, with a link to read more beside it where that helps, centred. On a page (`lg`) and in a sheet (`md`) it fills the room under the header and sits two fifths of the way down, under the place's icon, small and without a tile; in a section or a dialog step (`md`) and in a card, a dashboard cell or a sheet's tab (`sm`) it is centred in its room; in a table or list row (`compact`) it is one short statement. Given to a List or a DataTable as `empty`, it stands between faint rows of the list it replaces, without an icon. An error (`tone="error"`) is announced as an alert and colours only its icon. On an edge-to-edge page body it keeps the gutter itself; on a padded surface it uses the surface's padding; inside a card it keeps 20px off the card's edges, like the card's rows. The title is a heading (h2) at every size.
986
986
 
987
987
  | Prop | Type | Default | Description |
988
988
  |---|---|---|---|
@@ -991,7 +991,7 @@ Every state of a place that has nothing to show: nothing yet, nothing that match
991
991
  | `children` | `ReactNode` | | Anything that belongs under the actions, such as a short list of what will show here. |
992
992
  | `className` | `string` | | Classes for the layout of the outer element: margin, width and placement, never its look. |
993
993
  | `description` | `ReactNode` | | One sentence: what this place holds and the next step, or what happened. |
994
- | `icon` | `IconData` | | The place's own icon, as in the navigation, so the empty page reads as that place. Shown on pages and sections only; never decoration. |
994
+ | `icon` | `IconData` | | The place's own icon, as in the navigation, so the empty page reads as that place: small, above the words, on pages, sheets and sections only. Never decoration, and left out between a list's faint rows. |
995
995
  | `size` | `"md" \| "sm" \| "lg" \| "compact"` | `lg` | How much room it takes: a whole page (`lg`), a section (`md`), a card, cell or sheet (`sm`) or a row (`compact`). |
996
996
  | `tone` | `"neutral" \| "error"` | `neutral` | `error` when something couldn't load: an alert, with the icon in the danger colour. |
997
997
 
@@ -1647,7 +1647,8 @@ The console list: 44px rows on the panel (48px in a card, 56px with a second lin
1647
1647
  | `className` | `string` | | Classes for the layout of the outer element: margin, width and placement, never its look. |
1648
1648
  | `data-force-row` | `string` | | Force a state on the first row for state matrices: hover, pressed, focus. |
1649
1649
  | `density` | `"default" \| "compact"` | `default` | How much room each row gets. |
1650
- | `empty` | `ReactNode` | | Shown when there are no rows and the list isn't loading: usually an `Empty` (`size="md"` in a settings column, where it sits inside the list's card; `size="compact"` on an edge-to-edge page). |
1650
+ | `empty` | `ReactNode` | | Shown when there are no rows and the list isn't loading, usually an `Empty` with the page's sentence. On a page and in a card the list draws faint, still rows of its own shape around it (ten on a page, three in a card), so the place reads as itself and the first real row lands where the first faint one was; in a sheet or a dialog it stands alone. |
1651
+ | `ghost` | `false \| ListGhost` | `{}` | The shape of the faint rows behind `empty`, like the real rows: a second line of text (`subtitle`, on by default), how many badges (`meta`), a date (on by default) and a picture before the title (`leading`). `false` leaves them out. |
1651
1652
  | `groups` | `ListGroup[]` | | …rows under group headers. |
1652
1653
  | `headings` | `ListHeadings` | | A quiet row of column headings above the rows, for a list whose metadata is bare figures (a context window, a price, a month): one for the title, one laid out like a row's `meta`, one for the date. Left out on a phone, where the metadata moves under the title. |
1653
1654
  | `idWidth` | `48 \| 64 \| 80 \| 96 \| 120` | | A fixed width for the id column when ids differ in length, so titles align. By default the id takes its own width. |
@@ -1818,7 +1819,7 @@ Progress for work over a second: a determinate 6px bar, or an indeterminate 2px
1818
1819
 
1819
1820
  ### PageHeader
1820
1821
 
1821
- The 52px header of a page: its title, pill tabs, actions. Beside the tabs, a long title is cut short first, down to nothing if need be; only then do the tabs scroll. Whatever sits right above AppFrame.Body (this header, or a toolbar under it) shows a hairline at its foot while the content is scrolled under it, so the line separates only where something passes beneath. On a phone the tabs move to a row of their own under the title and actions, and actions that don't fit beside the whole title move to a row of their own too, wrapping onto another line when they are wider than the page, so the title isn't cut short, the tabs aren't squeezed beside a button and no action runs off the edge.
1822
+ The 52px header of a page: its title, pill tabs, actions. Beside the tabs, the title keeps its whole width and the tabs take the room that's left, scrolling when they need more; only a title that would leave them less than 160px is cut short. Whatever sits right above AppFrame.Body (this header, or a toolbar under it) shows a hairline at its foot while the content is scrolled under it, so the line separates only where something passes beneath. On a phone the tabs move to a row of their own under the title and actions, and actions that don't fit beside the whole title move to a row of their own too, wrapping onto another line when they are wider than the page, so the title isn't cut short, the tabs aren't squeezed beside a button and no action runs off the edge.
1822
1823
 
1823
1824
  | Prop | Type | Default | Description |
1824
1825
  |---|---|---|---|
package/ai/icons.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Icon vocabulary
2
2
 
3
- Version 0.7.5-rc.9. Generated from `src/icons/vocabulary.ts`; do not edit. Use the name, never an icon picked by look: `icons.key` always means a key. Octicons. Rules: `foundations/icons.md`.
3
+ Version 0.7.5. Generated from `src/icons/vocabulary.ts`; do not edit. Use the name, never an icon picked by look: `icons.key` always means a key. Octicons. Rules: `foundations/icons.md`.
4
4
 
5
5
  ## Kaeso objects
6
6
 
package/ai/tokens.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @logicplanes/kaeso-ui tokens
2
2
 
3
- Version 0.7.5-rc.9. Generated from `@logicplanes/kaeso-tokens`; do not edit. Components use these through role names (`bg-panel`, `text-fg-secondary`, `h-36`, `rounded-pill`); a raw value never appears in a component. How to use them: `foundations/*.md`.
3
+ Version 0.7.5. Generated from `@logicplanes/kaeso-tokens`; do not edit. Components use these through role names (`bg-panel`, `text-fg-secondary`, `h-36`, `rounded-pill`); a raw value never appears in a component. How to use them: `foundations/*.md`.
4
4
 
5
5
  ## Neutrals
6
6
 
@@ -3,7 +3,7 @@ import { n as e, t } from "./inset-BTAjcK6a.js";
3
3
  import { t as n } from "./cn-Cim5WXyu.js";
4
4
  import { SidebarLeft as r } from "../icons/sidebar-left.js";
5
5
  import { a as i, n as a } from "./button-CXdEDVSI.js";
6
- import { a as o, t as s } from "./sidebar-5-2Nqm-H.js";
6
+ import { a as o, t as s } from "./sidebar-Cz0KdApZ.js";
7
7
  import { t as c } from "./portal-context-Z2xSIPsc.js";
8
8
  import { c as l, o as u } from "./tooltip-uRgNOzW_.js";
9
9
  import { t as d } from "./when-idle-DXKwyOLB.js";
@@ -112,7 +112,7 @@ function M({ banner: e, href: t, label: n, actions: i, open: o, onToggle: c, tog
112
112
  });
113
113
  }
114
114
  process.env.NODE_ENV !== "production" && (M.displayName = "AppFrame.PhoneBar");
115
- var N = 160, P = /* @__PURE__ */ u(() => import("./nav-sheet-DuqCp7cS.js"), { base: () => import.meta.url });
115
+ var N = 160, P = /* @__PURE__ */ u(() => import("./nav-sheet--ycVeOvo.js"), { base: () => import.meta.url });
116
116
  function F({ navOpen: e, setNavOpen: t, toggle: n, ready: r, children: i }) {
117
117
  let { peeking: a, setPeeking: s } = o(), [c, u] = C(!1);
118
118
  v(() => d(() => u(!0)), []);
@@ -245,4 +245,4 @@ var H = /* @__PURE__ */ Object.assign(A, {
245
245
  });
246
246
  export { E as a, D as i, z as n, k as o, R as r, H as t };
247
247
 
248
- //# sourceMappingURL=app-frame-DPIr7C6C.js.map
248
+ //# sourceMappingURL=app-frame-COfWg7wS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-frame-COfWg7wS.js","names":["_jsx","_jsxs","__icon_SidebarLeft","InsetContent","cn","SidebarLeft","buttonClasses","Button","useSidebar","BrandWordmark","PortalContainer","useLazyModule","lazyModule","whenIdle","useUiText","mergeRefs","createContext","forwardRef","useCallback","useContext","useEffect","useId","useLayoutEffect","useMemo","useRef","useState","jsx","jsxs","KAESO_APP_FRAME_VARIANTS","KAESO_APP_FRAME_DEFAULT_VARIANTS","Ctx","useAppFrame","Root","sidebar","children","corner","fill","brandHref","brandLabel","phoneActions","className","ref","navOpen","setNavOpen","toggle","sheetReady","mainId","Main","frame","sheet","FrameSheet","SkipLink","PhoneBar","o","target","e","main","banner","href","label","actions","open","onToggle","toggleRef","Bar","t","PEEK_LEAVE","navSheet","ready","peeking","setPeeking","idle","setIdle","dismiss","NavSheet","pending","usePendingDismiss","doc","onKeyDown","onPointerDown","MenuButton","openNav","collapsed","setCollapsed","shortcut","intent","wide","KAESO_APP_FRAME_BODY_VARIANTS","KAESO_APP_FRAME_BODY_DEFAULT_VARIANTS","Body","padding","props","own","refs","el","band","mark","next","GutterContent","Settings","title","description","AppFrame"],"sources":["../../src/components/app-frame/app-frame.tsx"],"sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n type RefObject,\n} from \"react\";\nimport { GutterContent, InsetContent } from \"../../utils/inset.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport { SidebarLeft as __icon_SidebarLeft } from \"../../icons/octicons/sidebar-left.js\";\nimport { Button, buttonClasses } from \"../button/button.js\";\nimport { useSidebar, BrandWordmark } from \"../sidebar/sidebar.js\";\nimport { PortalContainer } from \"../../utils/portal-context.js\";\nimport { lazyModule, useLazyModule } from \"../../utils/lazy-module.js\";\nimport { whenIdle } from \"../../utils/when-idle.js\";\nimport { useUiText } from \"../../i18n/context.js\";\nimport { mergeRefs } from \"../../utils/merge-refs.js\";\n\nexport const KAESO_APP_FRAME_VARIANTS = {\n fill: {\n screen: { classes: \"h-dvh\" },\n parent: { classes: \"h-full\" },\n },\n} as const;\nexport const KAESO_APP_FRAME_DEFAULT_VARIANTS = { fill: \"screen\" } as const;\n\nconst Ctx = /* @__PURE__ */ createContext<{ openNav: () => void; embedded: boolean; sheetReady: RefObject<boolean> }>({\n openNav: () => undefined,\n embedded: false,\n sheetReady: { current: false },\n});\nexport const useAppFrame = () => useContext(Ctx);\n\nexport interface AppFrameProps {\n sidebar: ReactNode;\n children: ReactNode;\n corner?: ReactNode | undefined;\n fill?: keyof typeof KAESO_APP_FRAME_VARIANTS.fill | undefined;\n brandHref?: string | undefined;\n brandLabel?: string | undefined;\n phoneActions?: ReactNode | undefined;\n className?: string | undefined;\n}\n\nconst Root = /* @__PURE__ */ forwardRef<HTMLDivElement, AppFrameProps>(function AppFrame(\n { sidebar, children, corner, fill = \"screen\", brandHref, brandLabel, phoneActions, className },\n ref,\n) {\n const [navOpen, setNavOpen] = useState(false);\n const toggle = useRef<HTMLButtonElement | null>(null);\n const sheetReady = useRef(false);\n const mainId = `k-main-${useId().replace(/[^\\w-]/g, \"\")}`;\n const Main = fill === \"screen\" ? \"main\" : \"div\";\n const frame = useMemo(() => ({ openNav: () => setNavOpen(true), embedded: fill === \"parent\", sheetReady }), [fill]);\n const sheet = (\n <FrameSheet navOpen={navOpen} setNavOpen={setNavOpen} toggle={toggle} ready={sheetReady}>\n {sidebar}\n </FrameSheet>\n );\n return (\n <Ctx.Provider value={frame}>\n <div\n ref={ref}\n data-app-frame={fill}\n className={cn(\n \"relative isolate flex w-full flex-col overflow-hidden bg-panel text-fg lg:flex-row\",\n KAESO_APP_FRAME_VARIANTS.fill[fill].classes,\n className,\n )}\n >\n <SkipLink target={mainId} />\n <div className=\"hidden h-full lg:flex\">{sidebar}</div>\n <PhoneBar\n banner={fill === \"screen\"}\n href={brandHref}\n label={brandLabel}\n actions={phoneActions}\n open={navOpen}\n onToggle={() => setNavOpen((o) => !o)}\n toggleRef={toggle}\n />\n <Main\n id={mainId}\n data-sidebar-follows=\"\"\n className=\"relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-panel outline-none safe-area-panel frame-main-top\"\n >\n {children}\n </Main>\n {corner && <div className={cn(fill === \"parent\" ? \"absolute\" : \"fixed\", \"right-16 bottom-16 z-10 flex items-center gap-8\")}>{corner}</div>}\n {fill === \"parent\" ? <PortalContainer className=\"contents\">{sheet}</PortalContainer> : sheet}\n </div>\n </Ctx.Provider>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Root.displayName = \"AppFrame\";\n\nfunction SkipLink({ target }: { target: string }) {\n const t = useUiText();\n return (\n <a\n href={`#${target}`}\n onClick={(e) => {\n const main = document.getElementById(target);\n if (!main) return;\n e.preventDefault();\n main.setAttribute(\"tabindex\", \"-1\");\n main.addEventListener(\"blur\", () => main.removeAttribute(\"tabindex\"), { once: true });\n main.focus();\n }}\n className={cn(buttonClasses({ size: \"sm\" }), \"absolute top-16 left-16 z-50 not-focus:sr-only\")}\n >\n {t(\"appFrame.skipToContent\", \"Skip to content\")}\n </a>\n );\n}\nif (process.env.NODE_ENV !== \"production\") SkipLink.displayName = \"AppFrame.SkipLink\";\n\nfunction PhoneBar({\n banner,\n href,\n label,\n actions,\n open,\n onToggle,\n toggleRef,\n}: {\n banner: boolean;\n href: string | undefined;\n label: string | undefined;\n actions: ReactNode;\n open: boolean;\n onToggle: () => void;\n toggleRef: RefObject<HTMLButtonElement | null>;\n}) {\n const Bar = banner ? \"header\" : \"div\";\n const t = useUiText();\n return (\n <Bar data-phone-bar=\"\" className=\"shrink-0 bg-panel safe-area-bar lg:hidden\">\n <div className=\"mt-8 flex h-52 items-center justify-between px-gutter\">\n <BrandWordmark href={href} label={label} />\n <span className=\"flex items-center\">\n {actions}\n <Button\n variant=\"ghost\"\n size=\"sm\"\n ref={toggleRef}\n icon={__icon_SidebarLeft}\n aria-label={t(\"appFrame.openNavigation\", \"Open navigation\")}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n tooltip={false}\n onClick={onToggle}\n />\n </span>\n </div>\n </Bar>\n );\n}\nif (process.env.NODE_ENV !== \"production\") PhoneBar.displayName = \"AppFrame.PhoneBar\";\n\nexport const PEEK_DELAY = 750;\nconst PEEK_LEAVE = 160;\n\nconst navSheet = /* @__PURE__ */ lazyModule(() => import(\"./nav-sheet.js\"), { base: () => import.meta.url });\n\nfunction FrameSheet({\n navOpen,\n setNavOpen,\n toggle,\n ready,\n children,\n}: {\n navOpen: boolean;\n setNavOpen: (o: boolean) => void;\n toggle: RefObject<HTMLElement | null>;\n ready: RefObject<boolean>;\n children: ReactNode;\n}) {\n const { peeking, setPeeking } = useSidebar();\n const [idle, setIdle] = useState(false);\n useEffect(() => whenIdle(() => setIdle(true)), []);\n const dismiss = useCallback(() => {\n setNavOpen(false);\n setPeeking(false);\n }, [setNavOpen, setPeeking]);\n const NavSheet = useLazyModule(navSheet, idle || navOpen || peeking, () => {\n setIdle(false);\n dismiss();\n })?.NavSheet;\n const pending = (navOpen || peeking) && !NavSheet;\n useLayoutEffect(() => {\n ready.current = !!NavSheet;\n });\n usePendingDismiss(pending, toggle, dismiss);\n if (!NavSheet) return null;\n return (\n <NavSheet\n open={navOpen || peeking}\n peek={peeking && !navOpen}\n {...(navOpen ? { returnFocus: toggle } : {})}\n onOpenChange={(o) => {\n if (!o) dismiss();\n }}\n >\n {children}\n </NavSheet>\n );\n}\n\nfunction usePendingDismiss(pending: boolean, toggle: RefObject<HTMLElement | null>, dismiss: () => void) {\n useEffect(() => {\n if (!pending) return;\n const doc = toggle.current?.ownerDocument ?? document;\n const onKeyDown = (e: KeyboardEvent) => {\n if (e.key !== \"Escape\") return;\n e.stopPropagation();\n dismiss();\n };\n const onPointerDown = (e: PointerEvent) => {\n if (!toggle.current?.contains(e.target as Node)) dismiss();\n };\n doc.addEventListener(\"keydown\", onKeyDown, true);\n doc.addEventListener(\"pointerdown\", onPointerDown, true);\n return () => {\n doc.removeEventListener(\"keydown\", onKeyDown, true);\n doc.removeEventListener(\"pointerdown\", onPointerDown, true);\n };\n }, [pending, toggle, dismiss]);\n}\n\nconst MenuButton = /* @__PURE__ */ forwardRef<HTMLButtonElement, { className?: string | undefined }>(function AppFrameMenuButton({ className }, ref) {\n const { openNav, sheetReady } = useAppFrame();\n const { collapsed, setCollapsed, peeking, setPeeking, shortcut } = useSidebar();\n const intent = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n useEffect(() => () => clearTimeout(intent.current), []);\n const t = useUiText();\n const wide = () => typeof window !== \"undefined\" && window.matchMedia(\"(min-width: 1024px)\").matches;\n return (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n ref={ref}\n onPointerEnter={() => {\n clearTimeout(intent.current);\n if (collapsed && wide() && !peeking) intent.current = setTimeout(() => setPeeking(true), PEEK_DELAY);\n }}\n onPointerLeave={(e) => {\n clearTimeout(intent.current);\n if (!sheetReady.current || !peeking) return setPeeking(false);\n const doc = e.currentTarget.ownerDocument;\n intent.current = setTimeout(() => {\n if (!doc.querySelector(\"[data-nav-sheet]\")?.matches(\":hover\")) setPeeking(false);\n }, PEEK_LEAVE);\n }}\n icon={__icon_SidebarLeft}\n data-sidebar-expand=\"\"\n aria-label={collapsed ? t(\"appFrame.expandSidebar\", \"Expand sidebar\") : t(\"appFrame.openNavigation\", \"Open navigation\")}\n shortcut={collapsed && shortcut ? [\"[\"] : undefined}\n onClick={(e) => {\n clearTimeout(intent.current);\n if (collapsed && wide()) setCollapsed(false, { animate: e.detail > 0 });\n else openNav();\n }}\n className={cn(\"hidden\", collapsed && \"lg:inline-flex\", className)}\n />\n );\n});\nif (process.env.NODE_ENV !== \"production\") MenuButton.displayName = \"AppFrame.MenuButton\";\n\nexport const KAESO_APP_FRAME_BODY_VARIANTS = {\n padding: {\n none: { classes: \"\" },\n list: { classes: \"pt-8 pb-24\" },\n page: {\n classes: \"px-gutter pt-16 pb-48\",\n },\n },\n} as const;\nexport const KAESO_APP_FRAME_BODY_DEFAULT_VARIANTS = { padding: \"none\" } as const;\n\nexport interface AppFrameBodyProps extends HTMLAttributes<HTMLDivElement> {\n padding?: keyof typeof KAESO_APP_FRAME_BODY_VARIANTS.padding | undefined;\n}\n\nconst Body = /* @__PURE__ */ forwardRef<HTMLDivElement, AppFrameBodyProps>(function AppFrameBody({ className, padding = \"none\", children, ...props }, ref) {\n const own = useRef<HTMLDivElement | null>(null);\n const refs = useMemo(() => mergeRefs(own, ref), [ref]);\n useEffect(() => {\n const el = own.current;\n if (!el) return;\n let band: Element | null = null;\n const mark = () => {\n const next = el.scrollTop > 0 ? el.previousElementSibling : null;\n if (next === band) return;\n band?.removeAttribute(\"data-k-content-under\");\n next?.setAttribute(\"data-k-content-under\", \"\");\n band = next;\n };\n mark();\n el.addEventListener(\"scroll\", mark, { passive: true });\n return () => {\n el.removeEventListener(\"scroll\", mark);\n band?.removeAttribute(\"data-k-content-under\");\n };\n }, []);\n return (\n <div\n ref={refs}\n data-frame-body=\"\"\n className={cn(\"min-h-0 flex-1 overflow-y-auto overscroll-contain scrollbar-quiet\", KAESO_APP_FRAME_BODY_VARIANTS.padding[padding].classes, className)}\n {...props}\n >\n <GutterContent padded={padding === \"page\"}>{children}</GutterContent>\n </div>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Body.displayName = \"AppFrame.Body\";\n\nexport interface SettingsPageProps extends Omit<HTMLAttributes<HTMLDivElement>, \"title\"> {\n title: ReactNode;\n description?: ReactNode | undefined;\n actions?: ReactNode | undefined;\n}\n\nconst Settings = /* @__PURE__ */ forwardRef<HTMLDivElement, SettingsPageProps>(function AppFrameSettings({ title, description, actions, className, children, ...props }, ref) {\n return (\n <Body ref={ref} className=\"relative\">\n <MenuButton className=\"absolute top-10 left-gutter z-10\" />\n <div className={cn(\"w-full px-gutter pt-16 pb-96 lg:mx-auto lg:max-w-settings lg:pt-64\", className)} {...props}>\n <header className=\"flex flex-wrap items-start justify-between gap-x-16 gap-y-8 pb-24 rule-b\">\n <h1 className=\"min-w-0 text-title-lg font-semibold text-fg text-balance sm:flex-1\">{title}</h1>\n {actions && <div className=\"order-last flex min-h-32 shrink-0 items-center gap-8 sm:order-none sm:ml-auto\">{actions}</div>}\n {description && <p className=\"basis-full text-body-lg font-regular text-fg-secondary\">{description}</p>}\n </header>\n <div className=\"mt-8\">\n <InsetContent>\n <GutterContent>{children}</GutterContent>\n </InsetContent>\n </div>\n </div>\n </Body>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Settings.displayName = \"AppFrame.Settings\";\n\nexport const AppFrame = /* @__PURE__ */ Object.assign(Root, { MenuButton, Body, Settings });\n"],"mappings":";;;;;;;;;;;;;;AA0BA,IAAa4B,IAA2B,EACtC,MAAM;CACJ,QAAQ,EAAE,SAAS,QAAQ;CAC3B,QAAQ,EAAE,SAAS,SAAS;AAC9B,EACF,GACaC,IAAmC,EAAE,MAAM,SAAS,GAE3DC,IAAsBd,kBAA0F;CACpH,eAAe,KAAA;CACf,UAAU;CACV,YAAY,EAAE,SAAS,GAAM;AAC/B,CAAC,GACYe,UAAoBZ,EAAWW,CAAG,GAazCE,IAAuBf,kBAA0C,SACrE,EAAEgB,YAASC,aAAUC,WAAQC,UAAO,UAAUC,cAAWC,eAAYC,iBAAcC,gBACnFC,GACA;CACA,IAAM,CAACC,GAASC,KAAclB,EAAS,EAAK,GACtCmB,IAASpB,EAAiC,IAAI,GAC9CqB,IAAarB,EAAO,EAAK,GACzBsB,IAAS,UAAUzB,EAAM,CAAC,CAAC,QAAQ,WAAW,EAAE,KAChD0B,IAAOX,MAAS,WAAW,SAAS,OACpCY,IAAQzB,SAAe;EAAE,eAAeoB,EAAW,EAAI;EAAG,UAAUP,MAAS;EAAUS;CAAW,IAAI,CAACT,CAAI,CAAC,GAC5Ga,IACJjD,kBAACkD,GAAD;EAAqBR;EAAqBC;EAAoBC;EAAQ,OAAOC;EAC1E,UAAAZ;CACS,CAAA;CAEd,OACEjC,kBAAC8B,EAAI,UAAL;EAAc,OAAOkB;EACnB,UAAA/C,kBAAC,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A,CACF;EACD,CAAA,CAAA;;AAEV,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAciE,EAAS,cAAc;AAElE,IAAaG,IAA2B,uBAAO,OAAOtE,GAAM;CAAEgD;CAAYS;CAAMU;AAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"arrow-focus-D9q8rMct.js","names":["focusables","container","el","rowItems","group","arrowFocus","e","target","all","items","groups","byItem","child","g","i","step","n","next"],"sources":["../../src/utils/arrow-focus.ts"],"sourcesContent":["import type { KeyboardEvent } from \"react\";\n\nconst CANDIDATES = 'button, input, select, textarea, a[href], [tabindex], [contenteditable]:not([contenteditable=\"false\"])';\n\nexport function focusables(container: HTMLElement): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(CANDIDATES)].filter(\n (el) =>\n !el.matches(\":disabled\") &&\n (el.getAttribute(\"tabindex\") !== \"-1\" || el.dataset.roving !== undefined) &&\n !el.closest(\"[inert], [hidden], [aria-hidden='true']\") &&\n (typeof el.checkVisibility !== \"function\" || el.checkVisibility()),\n );\n}\n\n// Groups that move their own focus with the arrow keys and keep their own tab stop, such as a Segmented.\nconst OWN_ARROWS = \"[role=radiogroup], [role=tablist]\";\n\n/** The controls a roving row moves between, leaving out those inside a group that roves by itself. */\nexport function rowItems(container: HTMLElement): HTMLElement[] {\n return focusables(container).filter((el) => {\n const group = el.closest(OWN_ARROWS);\n return !group || !container.contains(group);\n });\n}\n\nexport function arrowFocus(\n e: KeyboardEvent<HTMLElement>,\n { byItem = false, items = focusables }: { byItem?: boolean | undefined; items?: ((container: HTMLElement) => HTMLElement[]) | undefined } = {},\n) {\n if (e.defaultPrevented || (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\")) return;\n const target = e.target as HTMLElement;\n if (target.tagName === \"INPUT\" && (target as HTMLInputElement).value) return;\n const all = items(e.currentTarget);\n const groups = byItem ? [...e.currentTarget.children].map((child) => all.filter((el) => child.contains(el))).filter((g) => g.length) : all.map((el) => [el]);\n const i = groups.findIndex((g) => g.includes(target));\n if (i < 0) return;\n e.preventDefault();\n const step = e.key === \"ArrowRight\" ? 1 : -1;\n for (let n = 1; n < groups.length; n++) {\n const next = groups[(((i + step * n) % groups.length) + groups.length) % groups.length]?.[0];\n next?.focus();\n if (next && document.activeElement === next) return;\n }\n}\n"],"mappings":"AAIA,SAAgBA,EAAW,GAAuC;CAChE,OAAO,CAAC,GAAGC,EAAU,iBAA8B,0GAAU,CAAC,CAAC,CAAC,QAC7D,MACC,CAACC,EAAG,QAAQ,WAAW,MACtBA,EAAG,aAAa,UAAU,MAAM,QAAQA,EAAG,QAAQ,WAAW,KAAA,MAC/D,CAACA,EAAG,QAAQ,yCAAyC,MACpD,OAAOA,EAAG,mBAAoB,cAAcA,EAAG,gBAAgB,EACpE;AACF;AAMA,SAAgBC,EAAS,GAAuC;CAC9D,OAAOH,EAAWC,CAAS,CAAC,CAAC,QAAQ,MAAO;EAC1C,IAAMG,IAAQF,EAAG,QAAQ,mCAAU;EACnC,OAAO,CAACE,KAAS,CAACH,EAAU,SAASG,CAAK;CAC5C,CAAC;AACH;AAEA,SAAgBC,EACd,GACA,EAAE,YAAS,IAAO,WAAQL,MAAkH,CAAC,GAC7I;CACA,IAAIM,EAAE,oBAAqBA,EAAE,QAAQ,eAAeA,EAAE,QAAQ,cAAe;CAC7E,IAAMC,IAASD,EAAE;CACjB,IAAIC,EAAO,YAAY,WAAYA,EAA4B,OAAO;CACtE,IAAMC,IAAMC,EAAMH,EAAE,aAAa,GAC3BI,IAASC,IAAS,CAAC,GAAGL,EAAE,cAAc,QAAQ,CAAC,CAAC,KAAK,MAAUE,EAAI,QAAQ,MAAOI,EAAM,SAASV,CAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,MAAMW,EAAE,MAAM,IAAIL,EAAI,KAAK,MAAO,CAACN,CAAE,CAAC,GACrJY,IAAIJ,EAAO,WAAW,MAAMG,EAAE,SAASN,CAAM,CAAC;CACpD,IAAIO,IAAI,GAAG;CACX,EAAE,eAAe;CACjB,IAAMC,IAAOT,EAAE,QAAQ,eAAe,IAAI;CAC1C,KAAK,IAAIU,IAAI,GAAGA,IAAIN,EAAO,QAAQ,KAAK;EACtC,IAAMO,IAAOP,IAAUI,IAAIC,IAAOC,KAAKN,EAAO,SAAUA,EAAO,UAAUA,EAAO,OAAO,GAAG;EAE1F,IADAO,GAAM,MAAM,GACRA,KAAQ,SAAS,kBAAkBA,GAAM;CAC/C;AACF"}
1
+ {"version":3,"file":"arrow-focus-D9q8rMct.js","names":["focusables","container","el","rowItems","group","arrowFocus","e","byItem","items","target","all","groups","child","g","i","step","n","next"],"sources":["../../src/utils/arrow-focus.ts"],"sourcesContent":["import type { KeyboardEvent } from \"react\";\n\nconst CANDIDATES = 'button, input, select, textarea, a[href], [tabindex], [contenteditable]:not([contenteditable=\"false\"])';\n\nexport function focusables(container: HTMLElement): HTMLElement[] {\n return [...container.querySelectorAll<HTMLElement>(CANDIDATES)].filter(\n (el) =>\n !el.matches(\":disabled\") &&\n (el.getAttribute(\"tabindex\") !== \"-1\" || el.dataset.roving !== undefined) &&\n !el.closest(\"[inert], [hidden], [aria-hidden='true']\") &&\n (typeof el.checkVisibility !== \"function\" || el.checkVisibility()),\n );\n}\n\n// Groups that move their own focus with the arrow keys and keep their own tab stop, such as a Segmented.\nconst OWN_ARROWS = \"[role=radiogroup], [role=tablist]\";\n\n/** The controls a roving row moves between, leaving out those inside a group that roves by itself. */\nexport function rowItems(container: HTMLElement): HTMLElement[] {\n return focusables(container).filter((el) => {\n const group = el.closest(OWN_ARROWS);\n return !group || !container.contains(group);\n });\n}\n\nexport function arrowFocus(\n e: KeyboardEvent<HTMLElement>,\n { byItem = false, items = focusables }: { byItem?: boolean | undefined; items?: ((container: HTMLElement) => HTMLElement[]) | undefined } = {},\n) {\n if (e.defaultPrevented || (e.key !== \"ArrowLeft\" && e.key !== \"ArrowRight\")) return;\n const target = e.target as HTMLElement;\n if (target.tagName === \"INPUT\" && (target as HTMLInputElement).value) return;\n const all = items(e.currentTarget);\n const groups = byItem ? [...e.currentTarget.children].map((child) => all.filter((el) => child.contains(el))).filter((g) => g.length) : all.map((el) => [el]);\n const i = groups.findIndex((g) => g.includes(target));\n if (i < 0) return;\n e.preventDefault();\n const step = e.key === \"ArrowRight\" ? 1 : -1;\n for (let n = 1; n < groups.length; n++) {\n const next = groups[(((i + step * n) % groups.length) + groups.length) % groups.length]?.[0];\n next?.focus();\n if (next && document.activeElement === next) return;\n }\n}\n"],"mappings":"AAIA,SAAgBA,EAAWC,GAAuC;CAChE,OAAO,CAAC,GAAGA,EAAU,iBAA8B,0GAAU,CAAC,CAAC,CAAC,QAC7DC,MACC,CAACA,EAAG,QAAQ,WAAW,MACtBA,EAAG,aAAa,UAAU,MAAM,QAAQA,EAAG,QAAQ,WAAW,KAAA,MAC/D,CAACA,EAAG,QAAQ,yCAAyC,MACpD,OAAOA,EAAG,mBAAoB,cAAcA,EAAG,gBAAgB,EACpE;AACF;AAMA,SAAgBC,EAASF,GAAuC;CAC9D,OAAOD,EAAWC,CAAS,CAAC,CAAC,QAAQC,MAAO;EAC1C,IAAME,IAAQF,EAAG,QAAQ,mCAAU;EACnC,OAAO,CAACE,KAAS,CAACH,EAAU,SAASG,CAAK;CAC5C,CAAC;AACH;AAEA,SAAgBC,EACdC,GACA,EAAEC,YAAS,IAAOC,WAAQR,MAAkH,CAAC,GAC7I;CACA,IAAIM,EAAE,oBAAqBA,EAAE,QAAQ,eAAeA,EAAE,QAAQ,cAAe;CAC7E,IAAMG,IAASH,EAAE;CACjB,IAAIG,EAAO,YAAY,WAAYA,EAA4B,OAAO;CACtE,IAAMC,IAAMF,EAAMF,EAAE,aAAa,GAC3BK,IAASJ,IAAS,CAAC,GAAGD,EAAE,cAAc,QAAQ,CAAC,CAAC,KAAKM,MAAUF,EAAI,QAAQR,MAAOU,EAAM,SAASV,CAAE,CAAC,CAAC,CAAC,CAAC,QAAQW,MAAMA,EAAE,MAAM,IAAIH,EAAI,KAAKR,MAAO,CAACA,CAAE,CAAC,GACrJY,IAAIH,EAAO,WAAWE,MAAMA,EAAE,SAASJ,CAAM,CAAC;CACpD,IAAIK,IAAI,GAAG;CACXR,EAAE,eAAe;CACjB,IAAMS,IAAOT,EAAE,QAAQ,eAAe,IAAI;CAC1C,KAAK,IAAIU,IAAI,GAAGA,IAAIL,EAAO,QAAQK,KAAK;EACtC,IAAMC,IAAON,IAAUG,IAAIC,IAAOC,KAAKL,EAAO,SAAUA,EAAO,UAAUA,EAAO,OAAO,GAAG;EAE1F,IADAM,GAAM,MAAM,GACRA,KAAQ,SAAS,kBAAkBA,GAAM;CAC/C;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"avatar-C4r7x_uJ.js","names":["_Fragment","cn","useUiText","Tooltip","Fragment$1","AGENT_TILE","AGENT_BADGE","BADGE_BOT","BOT","botGlyph","tile","paths","d","AgentGlyph","size","AgentBadge","badge","centre","label","className","AGENT_MODELS","agentModel","model","PRODUCT_NAMES","modelName","englishText","known","useModelName","t","useMemo","KAESO_AVATAR_VARIANTS","KAESO_AVATAR_DEFAULT_VARIANTS","initials","parts","name","first","max","BADGE_NUDGE","GROUP_NUDGE","Root","props","kind","decorative","agent","Face","failedSrc","setFailedSrc","useState","hydrating","useHydrating","pictured","src","color","img","nudge","GROUP_OVERLAP","OVERLAP_CLASS","GAP","cutFor","overlap","Group","shown","people","rest","items","slot","i","child","key","p","children","Avatar"],"sources":["../../src/components/avatar/agent.tsx","../../src/components/avatar/models.ts","../../src/components/avatar/model-name.ts","../../src/components/avatar/avatar.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport const AGENT_TILE = {\n 20: { classes: \"size-20 rounded-avatar\", glyph: \"size-14\", stroke: 2.25 },\n 24: { classes: \"size-24 rounded-avatar\", glyph: \"size-16\", stroke: 2 },\n 28: { classes: \"size-28 rounded-org\", glyph: \"size-18\", stroke: 2 },\n 32: { classes: \"size-32 rounded-org\", glyph: \"size-20\", stroke: 1.75 },\n 40: { classes: \"size-40 rounded-org\", glyph: \"size-28\", stroke: 1.5 },\n} as const;\n\nconst AGENT_BADGE = {\n 20: { classes: \"size-8\", px: 8, glyph: \"size-6\", stroke: 3.5 },\n 24: { classes: \"size-10\", px: 10, glyph: \"size-8\", stroke: 3 },\n 28: { classes: \"size-12\", px: 12, glyph: \"size-10\", stroke: 2.75 },\n 32: { classes: \"size-12\", px: 12, glyph: \"size-10\", stroke: 2.75 },\n 40: { classes: \"size-16\", px: 16, glyph: \"size-12\", stroke: 2.5 },\n} as const;\n\ntype AvatarSize = keyof typeof AGENT_TILE;\n\n// Below 14px the ears merge with the head, so the badge drops them and widens the head instead.\nconst BADGE_BOT = [\n \"M6.5 7h11A3.5 3.5 0 0 1 21 10.5v6a3.5 3.5 0 0 1-3.5 3.5h-11A3.5 3.5 0 0 1 3 16.5v-6A3.5 3.5 0 0 1 6.5 7z\",\n \"M12 7V3.5\",\n \"M9 13v1.5\",\n \"M15 13v1.5\",\n];\nconst BOT = [\n \"M7.5 8h9A3.5 3.5 0 0 1 20 11.5v5a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-5A3.5 3.5 0 0 1 7.5 8z\",\n \"M12 8V4.5\",\n \"M9.5 13.5v1\",\n \"M14.5 13.5v1\",\n \"M2 13v2\",\n \"M22 13v2\",\n];\n\nfunction botGlyph(tile: { glyph: string; stroke: number }, paths: readonly string[] = BOT) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={tile.stroke}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n className={tile.glyph}\n >\n {paths.map((d) => (\n <path key={d} d={d} />\n ))}\n </svg>\n );\n}\n\nexport function AgentGlyph({ size }: { size: AvatarSize }) {\n return botGlyph(AGENT_TILE[size]);\n}\n\nexport const AgentBadge = /* @__PURE__ */ forwardRef<HTMLSpanElement, { size: AvatarSize; label: string; className?: string | undefined; children: ReactNode }>(\n function AgentBadge({ size, label, className, children }, ref) {\n const badge = AGENT_BADGE[size];\n const centre = `${size - badge.px / 2}px`;\n return (\n <span ref={ref} role=\"img\" aria-label={label} className={cn(\"relative inline-flex shrink-0\", className)}>\n <span\n className=\"flex cutout rounded-pill\"\n style={{ \"--k-cut-x-ltr\": centre, \"--k-cut-y\": centre, \"--k-cut-r\": `${badge.px / 2 + 2}px` } as CSSProperties}\n >\n {children}\n </span>\n <span\n aria-hidden\n data-agent-badge=\"\"\n className={cn(\n \"absolute right-0 bottom-0 inline-flex items-center justify-center rounded-pill bg-ink text-on-ink data-mark forced-colors:outline forced-colors:-outline-offset-1\",\n badge.classes,\n )}\n >\n {botGlyph(badge, BADGE_BOT)}\n </span>\n </span>\n );\n },\n);\nif (process.env.NODE_ENV !== \"production\") AgentBadge.displayName = \"Avatar\";\n","export const AGENT_MODELS = [\n \"claude\",\n \"gpt\",\n \"gemini\",\n \"gemma\",\n \"grok\",\n \"llama\",\n \"mistral\",\n \"deepseek\",\n \"qwen\",\n \"kimi\",\n \"glm\",\n \"minimax\",\n \"command\",\n \"nova\",\n \"phi\",\n \"granite\",\n \"jamba\",\n \"ernie\",\n \"hunyuan\",\n \"doubao\",\n \"yi\",\n \"nemotron\",\n \"olmo\",\n \"sonar\",\n \"reka\",\n \"unknown\",\n] as const;\n\nexport type AgentModel = (typeof AGENT_MODELS)[number];\n\n/** The model family an API string names, or `unknown` for anything the library doesn't know. */\nexport function agentModel(model: string): AgentModel {\n return (AGENT_MODELS as readonly string[]).includes(model) ? (model as AgentModel) : \"unknown\";\n}\n","import { useMemo } from \"react\";\nimport { englishText, useUiText, type UiText } from \"../../i18n/context.js\";\nimport { agentModel, type AgentModel } from \"./models.js\";\n\nconst PRODUCT_NAMES: Readonly<Record<Exclude<AgentModel, \"unknown\">, string>> = {\n claude: \"Claude\",\n gpt: \"GPT\",\n gemini: \"Gemini\",\n gemma: \"Gemma\",\n grok: \"Grok\",\n llama: \"Llama\",\n mistral: \"Mistral\",\n deepseek: \"DeepSeek\",\n qwen: \"Qwen\",\n kimi: \"Kimi\",\n glm: \"GLM\",\n minimax: \"MiniMax\",\n command: \"Command\",\n nova: \"Nova\",\n phi: \"Phi\",\n granite: \"Granite\",\n jamba: \"Jamba\",\n ernie: \"ERNIE\",\n hunyuan: \"Hunyuan\",\n doubao: \"Doubao\",\n yi: \"Yi\",\n nemotron: \"Nemotron\",\n olmo: \"OLMo\",\n sonar: \"Sonar\",\n reka: \"Reka\",\n};\n\n/**\n * The display name of a model family from the API, such as `deepseek` → \"DeepSeek\". Product names are never\n * translated; `unknown` and ids the library doesn't know are \"Unknown\", translated through `t` (English without it).\n * In a component, prefer `useModelName()`, which translates into the page's language.\n */\nexport function modelName(model: string, t: UiText = englishText): string {\n const known = agentModel(model);\n return known === \"unknown\" ? t(\"agentAvatar.unknownModel\", \"Unknown\") : PRODUCT_NAMES[known];\n}\n\n/** `modelName` in the language of the nearest `LocaleProvider`. */\nexport function useModelName(): (model: string) => string {\n const t = useUiText();\n return useMemo(() => (model: string) => modelName(model, t), [t]);\n}\n","import { forwardRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { useHydrating } from \"../../hooks/use-hydrating.js\";\nimport { useUiText } from \"../../i18n/context.js\";\nimport { Tooltip } from \"../tooltip/tooltip.js\";\nimport { AGENT_TILE, AgentBadge, AgentGlyph } from \"./agent.js\";\nimport { modelName } from \"./model-name.js\";\n\nexport const KAESO_AVATAR_VARIANTS = {\n size: {\n 20: { classes: \"size-20 text-micro\" },\n 24: { classes: \"size-24 text-micro\" },\n 28: { classes: \"size-28 text-caption\" },\n 32: { classes: \"size-32 text-caption\" },\n 40: { classes: \"size-40 text-body\" },\n },\n kind: {\n person: { classes: \"rounded-pill\" },\n org: { classes: \"rounded-org\" },\n agent: { classes: \"bg-fill-3\" },\n },\n} as const;\nexport const KAESO_AVATAR_DEFAULT_VARIANTS = { size: 24, kind: \"person\" } as const;\n\nexport function initials(name: string, max: 1 | 2 = 2): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length === 0) return \"?\";\n const first = parts[0]?.[0] ?? \"\";\n return (max === 1 || parts.length < 2 ? first : first + (parts[parts.length - 1]?.[0] ?? \"\")).toUpperCase();\n}\n\n// Initials move toward the part of the face a cut leaves whole, so the cut never takes a letter.\nconst BADGE_NUDGE = { 20: \"me-2 mb-2\", 24: \"me-4 mb-4\", 28: \"me-4 mb-4\", 32: \"me-4 mb-4\", 40: \"me-6 mb-6\" } as const;\nconst GROUP_NUDGE = { 20: \"me-6\", 24: \"me-6\", 28: \"me-6\", 32: \"me-8\", 40: \"me-10\" } as const;\n\nexport interface AvatarProps {\n name: string;\n src?: string | undefined;\n color?: string | undefined;\n size?: keyof typeof KAESO_AVATAR_VARIANTS.size | undefined;\n kind?: keyof typeof KAESO_AVATAR_VARIANTS.kind | undefined;\n agent?: { name: string; model: string } | undefined;\n decorative?: boolean | undefined;\n className?: string | undefined;\n}\n\nconst Root = /* @__PURE__ */ forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(props, ref) {\n const { name, size = 24, kind = \"person\", agent, decorative, className } = props;\n const t = useUiText();\n if (kind === \"agent\") {\n return (\n <span\n ref={ref}\n {...(decorative ? { \"aria-hidden\": true } : { role: \"img\", \"aria-label\": name })}\n className={cn(\n \"inline-flex shrink-0 items-center justify-center bg-fill-3 text-fg select-none forced-colors:outline forced-colors:-outline-offset-1\",\n AGENT_TILE[size].classes,\n className,\n )}\n >\n <AgentGlyph size={size} />\n </span>\n );\n }\n if (agent) {\n const label = t(\"agentAttribution.label\", \"{name} via {agent} ({model})\", { name, agent: agent.name, model: modelName(agent.model, t) });\n return (\n <Tooltip content={label}>\n <AgentBadge ref={ref} size={size} label={label} className={className}>\n <Face {...props} agent={undefined} className={undefined} decorative nudge={BADGE_NUDGE[size]} />\n </AgentBadge>\n </Tooltip>\n );\n }\n return <Face ref={ref} {...props} />;\n});\nif (process.env.NODE_ENV !== \"production\") Root.displayName = \"Avatar\";\n\nconst Face = /* @__PURE__ */ forwardRef<HTMLSpanElement, AvatarProps & { nudge?: string | undefined }>(function Face(\n { name, src, color, size = 24, kind = \"person\", decorative, className, nudge },\n ref,\n) {\n const [failedSrc, setFailedSrc] = useState<string | undefined>(undefined);\n const hydrating = useHydrating();\n const pictured = !!src && src !== failedSrc;\n return (\n <span\n ref={ref}\n {...(color && !pictured ? { style: { backgroundColor: color } } : {})}\n {...(decorative ? { \"aria-hidden\": true } : { role: \"img\", \"aria-label\": name })}\n className={cn(\n \"relative inline-flex shrink-0 items-center justify-center overflow-hidden mark-fill font-semibold text-fg select-none forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_AVATAR_VARIANTS.size[size].classes,\n KAESO_AVATAR_VARIANTS.kind[kind].classes,\n size <= 24 && kind === \"org\" && \"rounded-avatar\",\n className,\n )}\n >\n {pictured ? (\n <>\n <img\n ref={(img) => {\n // A server-rendered picture that failed before hydration fired its error event before React listened for it.\n if (hydrating && img?.complete && img.naturalWidth === 0) setFailedSrc(src);\n }}\n src={src}\n alt=\"\"\n className=\"size-full object-cover image-outline\"\n onError={() => setFailedSrc(src)}\n />\n </>\n ) : color ? null : nudge ? (\n <span className={nudge}>{initials(name, size === 20 ? 1 : 2)}</span>\n ) : (\n initials(name, size === 20 ? 1 : 2)\n )}\n </span>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Face.displayName = \"Avatar\";\n\nexport interface AvatarGroupProps {\n people: { name: string; src?: string | undefined }[];\n size?: keyof typeof KAESO_AVATAR_VARIANTS.size | undefined;\n max?: number | undefined;\n className?: string | undefined;\n children?: ReactNode | undefined;\n}\n\nconst GROUP_OVERLAP = { 20: 4, 24: 4, 28: 4, 32: 6, 40: 8 } as const;\nconst OVERLAP_CLASS = { 4: \"-ms-4\", 6: \"-ms-6\", 8: \"-ms-8\" } as const;\nconst GAP = 2;\n\nfunction cutFor(size: number, overlap: number): CSSProperties {\n return {\n \"--k-cut-x-ltr\": `${1.5 * size - overlap}px`,\n \"--k-cut-x-rtl\": `${overlap - 0.5 * size}px`,\n \"--k-cut-r\": `${size / 2 + GAP}px`,\n } as CSSProperties;\n}\n\nexport const Group = /* @__PURE__ */ forwardRef<HTMLDivElement, AvatarGroupProps>(function AvatarGroup({ people, size = 24, max = 4, className, children }, ref) {\n const t = useUiText();\n const shown = people.slice(0, max);\n const rest = people.length - shown.length;\n const overlap = GROUP_OVERLAP[size];\n const items = shown.length + (rest > 0 ? 1 : 0);\n const slot = (i: number, child: ReactNode, key: string) => (\n <span\n key={key}\n className={cn(\"flex shrink-0 rounded-pill\", i > 0 && OVERLAP_CLASS[overlap], i < items - 1 && \"cutout\")}\n style={i < items - 1 ? cutFor(size, overlap) : undefined}\n >\n {child}\n </span>\n );\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={people.map((p) => p.name).join(t(\"avatarGroup.listSeparator\", \", \"))}\n className={cn(\"flex items-center\", className)}\n >\n {shown.map((p, i) =>\n slot(\n i,\n <Face name={p.name} {...(p.src ? { src: p.src } : {})} size={size} decorative {...(i < items - 1 ? { nudge: GROUP_NUDGE[size] } : {})} />,\n p.name + i,\n ),\n )}\n {rest > 0 &&\n slot(\n shown.length,\n <Tooltip\n content={people\n .slice(max)\n .map((p) => p.name)\n .join(t(\"avatarGroup.listSeparator\", \", \"))}\n shape=\"multiline\"\n >\n <span\n className={cn(\n \"inline-flex shrink-0 items-center justify-center rounded-pill mark-fill font-medium text-fg-secondary tabular forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_AVATAR_VARIANTS.size[size].classes,\n )}\n >\n +{rest}\n </span>\n </Tooltip>,\n \"rest\",\n )}\n {children && <span className=\"ms-8 inline-flex items-center\">{children}</span>}\n </div>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Group.displayName = \"Avatar.Group\";\n\nexport const Avatar = /* @__PURE__ */ Object.assign(Root, { Group });\n"],"mappings":";;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ACEC,GACA,kBAACtB,GAAD;IAAM,MAAMyB,EAAE;IAAM,GAAKA,EAAE,MAAM,EAAE,KAAKA,EAAE,IAAI,IAAI,CAAC;IAAU;IAAM,YAAA;IAAW,GAAKH,IAAIF,IAAQ,IAAI,EAAE,OAAO1B,EAAYxB,GAAM,IAAI,CAAC;GAAK,CAAA,GACxIuD,EAAE,OAAOH,CACX,CACF;GACCH,IAAO,KACNE,EACEJ,EAAM,QACN,kBAAC1D,GAAD;IACE,SAAS2D,EACN,MAAM1B,CAAG,CAAC,CACV,KAAK,MAAMiC,EAAE,IAAI,CAAC,CAClB,KAAKzC,EAAE,6BAA6B,IAAI,CAAC;IAC5C,OAAM;IAEN,UAAA,kBAAC,QAAD;KACE,WAAW3B,EACT,uKACA6B,EAAsB,KAAKhB,EAAK,CAAC,OACnC;KAJF,UAAA,CAKC,KACGiD,CACE;;GACC,CAAA,GACT,MACF;GACDO,KAAY,kBAAC,QAAD;IAAM,WAAU;IAAiC;GAAe,CAAA;EAC1E;;AAET,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAM,cAAc;AAE/D,IAAaC,IAAyB,uBAAO,OAAOhC,GAAM,EAAE,SAAM,CAAC"}
1
+ {"version":3,"file":"avatar-C4r7x_uJ.js","names":["_jsx","_jsxs","_jsx","_Fragment","_jsxs","cn","useUiText","Tooltip","forwardRef","useMemo","useState","Fragment$1","jsx","jsxs","AGENT_TILE","AGENT_BADGE","BADGE_BOT","BOT","botGlyph","tile","paths","d","AgentGlyph","size","AgentBadge","label","className","children","ref","badge","centre","AGENT_MODELS","[\n\t\"claude\",\n\t\"gpt\",\n\t\"gemini\",\n\t\"gemma\",\n\t\"grok\",\n\t\"llama\",\n\t\"mistral\",\n\t\"deepseek\",\n\t\"qwen\",\n\t\"kimi\",\n\t\"glm\",\n\t\"minimax\",\n\t\"command\",\n\t\"nova\",\n\t\"phi\",\n\t\"granite\",\n\t\"jamba\",\n\t\"ernie\",\n\t\"hunyuan\",\n\t\"doubao\",\n\t\"yi\",\n\t\"nemotron\",\n\t\"olmo\",\n\t\"sonar\",\n\t\"reka\",\n\t\"unknown\"\n]","agentModel","model","PRODUCT_NAMES","modelName","englishText","known","useModelName","t","KAESO_AVATAR_VARIANTS","KAESO_AVATAR_DEFAULT_VARIANTS","initials","name","max","parts","first","BADGE_NUDGE","GROUP_NUDGE","Root","props","kind","agent","decorative","Face","src","color","nudge","failedSrc","setFailedSrc","hydrating","useHydrating","pictured","img","GROUP_OVERLAP","OVERLAP_CLASS","GAP","cutFor","overlap","Group","people","shown","rest","items","slot","i","child","key","p","Avatar"],"sources":["../../src/components/avatar/agent.tsx","../../src/components/avatar/models.ts","../../src/components/avatar/model-name.ts","../../src/components/avatar/avatar.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport const AGENT_TILE = {\n 20: { classes: \"size-20 rounded-avatar\", glyph: \"size-14\", stroke: 2.25 },\n 24: { classes: \"size-24 rounded-avatar\", glyph: \"size-16\", stroke: 2 },\n 28: { classes: \"size-28 rounded-org\", glyph: \"size-18\", stroke: 2 },\n 32: { classes: \"size-32 rounded-org\", glyph: \"size-20\", stroke: 1.75 },\n 40: { classes: \"size-40 rounded-org\", glyph: \"size-28\", stroke: 1.5 },\n} as const;\n\nconst AGENT_BADGE = {\n 20: { classes: \"size-8\", px: 8, glyph: \"size-6\", stroke: 3.5 },\n 24: { classes: \"size-10\", px: 10, glyph: \"size-8\", stroke: 3 },\n 28: { classes: \"size-12\", px: 12, glyph: \"size-10\", stroke: 2.75 },\n 32: { classes: \"size-12\", px: 12, glyph: \"size-10\", stroke: 2.75 },\n 40: { classes: \"size-16\", px: 16, glyph: \"size-12\", stroke: 2.5 },\n} as const;\n\ntype AvatarSize = keyof typeof AGENT_TILE;\n\n// Below 14px the ears merge with the head, so the badge drops them and widens the head instead.\nconst BADGE_BOT = [\n \"M6.5 7h11A3.5 3.5 0 0 1 21 10.5v6a3.5 3.5 0 0 1-3.5 3.5h-11A3.5 3.5 0 0 1 3 16.5v-6A3.5 3.5 0 0 1 6.5 7z\",\n \"M12 7V3.5\",\n \"M9 13v1.5\",\n \"M15 13v1.5\",\n];\nconst BOT = [\n \"M7.5 8h9A3.5 3.5 0 0 1 20 11.5v5a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-5A3.5 3.5 0 0 1 7.5 8z\",\n \"M12 8V4.5\",\n \"M9.5 13.5v1\",\n \"M14.5 13.5v1\",\n \"M2 13v2\",\n \"M22 13v2\",\n];\n\nfunction botGlyph(tile: { glyph: string; stroke: number }, paths: readonly string[] = BOT) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={tile.stroke}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n className={tile.glyph}\n >\n {paths.map((d) => (\n <path key={d} d={d} />\n ))}\n </svg>\n );\n}\n\nexport function AgentGlyph({ size }: { size: AvatarSize }) {\n return botGlyph(AGENT_TILE[size]);\n}\n\nexport const AgentBadge = /* @__PURE__ */ forwardRef<HTMLSpanElement, { size: AvatarSize; label: string; className?: string | undefined; children: ReactNode }>(\n function AgentBadge({ size, label, className, children }, ref) {\n const badge = AGENT_BADGE[size];\n const centre = `${size - badge.px / 2}px`;\n return (\n <span ref={ref} role=\"img\" aria-label={label} className={cn(\"relative inline-flex shrink-0\", className)}>\n <span\n className=\"flex cutout rounded-pill\"\n style={{ \"--k-cut-x-ltr\": centre, \"--k-cut-y\": centre, \"--k-cut-r\": `${badge.px / 2 + 2}px` } as CSSProperties}\n >\n {children}\n </span>\n <span\n aria-hidden\n data-agent-badge=\"\"\n className={cn(\n \"absolute right-0 bottom-0 inline-flex items-center justify-center rounded-pill bg-ink text-on-ink data-mark forced-colors:outline forced-colors:-outline-offset-1\",\n badge.classes,\n )}\n >\n {botGlyph(badge, BADGE_BOT)}\n </span>\n </span>\n );\n },\n);\nif (process.env.NODE_ENV !== \"production\") AgentBadge.displayName = \"Avatar\";\n","export const AGENT_MODELS = [\n \"claude\",\n \"gpt\",\n \"gemini\",\n \"gemma\",\n \"grok\",\n \"llama\",\n \"mistral\",\n \"deepseek\",\n \"qwen\",\n \"kimi\",\n \"glm\",\n \"minimax\",\n \"command\",\n \"nova\",\n \"phi\",\n \"granite\",\n \"jamba\",\n \"ernie\",\n \"hunyuan\",\n \"doubao\",\n \"yi\",\n \"nemotron\",\n \"olmo\",\n \"sonar\",\n \"reka\",\n \"unknown\",\n] as const;\n\nexport type AgentModel = (typeof AGENT_MODELS)[number];\n\n/** The model family an API string names, or `unknown` for anything the library doesn't know. */\nexport function agentModel(model: string): AgentModel {\n return (AGENT_MODELS as readonly string[]).includes(model) ? (model as AgentModel) : \"unknown\";\n}\n","import { useMemo } from \"react\";\nimport { englishText, useUiText, type UiText } from \"../../i18n/context.js\";\nimport { agentModel, type AgentModel } from \"./models.js\";\n\nconst PRODUCT_NAMES: Readonly<Record<Exclude<AgentModel, \"unknown\">, string>> = {\n claude: \"Claude\",\n gpt: \"GPT\",\n gemini: \"Gemini\",\n gemma: \"Gemma\",\n grok: \"Grok\",\n llama: \"Llama\",\n mistral: \"Mistral\",\n deepseek: \"DeepSeek\",\n qwen: \"Qwen\",\n kimi: \"Kimi\",\n glm: \"GLM\",\n minimax: \"MiniMax\",\n command: \"Command\",\n nova: \"Nova\",\n phi: \"Phi\",\n granite: \"Granite\",\n jamba: \"Jamba\",\n ernie: \"ERNIE\",\n hunyuan: \"Hunyuan\",\n doubao: \"Doubao\",\n yi: \"Yi\",\n nemotron: \"Nemotron\",\n olmo: \"OLMo\",\n sonar: \"Sonar\",\n reka: \"Reka\",\n};\n\n/**\n * The display name of a model family from the API, such as `deepseek` → \"DeepSeek\". Product names are never\n * translated; `unknown` and ids the library doesn't know are \"Unknown\", translated through `t` (English without it).\n * In a component, prefer `useModelName()`, which translates into the page's language.\n */\nexport function modelName(model: string, t: UiText = englishText): string {\n const known = agentModel(model);\n return known === \"unknown\" ? t(\"agentAvatar.unknownModel\", \"Unknown\") : PRODUCT_NAMES[known];\n}\n\n/** `modelName` in the language of the nearest `LocaleProvider`. */\nexport function useModelName(): (model: string) => string {\n const t = useUiText();\n return useMemo(() => (model: string) => modelName(model, t), [t]);\n}\n","import { forwardRef, useState, type CSSProperties, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { useHydrating } from \"../../hooks/use-hydrating.js\";\nimport { useUiText } from \"../../i18n/context.js\";\nimport { Tooltip } from \"../tooltip/tooltip.js\";\nimport { AGENT_TILE, AgentBadge, AgentGlyph } from \"./agent.js\";\nimport { modelName } from \"./model-name.js\";\n\nexport const KAESO_AVATAR_VARIANTS = {\n size: {\n 20: { classes: \"size-20 text-micro\" },\n 24: { classes: \"size-24 text-micro\" },\n 28: { classes: \"size-28 text-caption\" },\n 32: { classes: \"size-32 text-caption\" },\n 40: { classes: \"size-40 text-body\" },\n },\n kind: {\n person: { classes: \"rounded-pill\" },\n org: { classes: \"rounded-org\" },\n agent: { classes: \"bg-fill-3\" },\n },\n} as const;\nexport const KAESO_AVATAR_DEFAULT_VARIANTS = { size: 24, kind: \"person\" } as const;\n\nexport function initials(name: string, max: 1 | 2 = 2): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length === 0) return \"?\";\n const first = parts[0]?.[0] ?? \"\";\n return (max === 1 || parts.length < 2 ? first : first + (parts[parts.length - 1]?.[0] ?? \"\")).toUpperCase();\n}\n\n// Initials move toward the part of the face a cut leaves whole, so the cut never takes a letter.\nconst BADGE_NUDGE = { 20: \"me-2 mb-2\", 24: \"me-4 mb-4\", 28: \"me-4 mb-4\", 32: \"me-4 mb-4\", 40: \"me-6 mb-6\" } as const;\nconst GROUP_NUDGE = { 20: \"me-6\", 24: \"me-6\", 28: \"me-6\", 32: \"me-8\", 40: \"me-10\" } as const;\n\nexport interface AvatarProps {\n name: string;\n src?: string | undefined;\n color?: string | undefined;\n size?: keyof typeof KAESO_AVATAR_VARIANTS.size | undefined;\n kind?: keyof typeof KAESO_AVATAR_VARIANTS.kind | undefined;\n agent?: { name: string; model: string } | undefined;\n decorative?: boolean | undefined;\n className?: string | undefined;\n}\n\nconst Root = /* @__PURE__ */ forwardRef<HTMLSpanElement, AvatarProps>(function Avatar(props, ref) {\n const { name, size = 24, kind = \"person\", agent, decorative, className } = props;\n const t = useUiText();\n if (kind === \"agent\") {\n return (\n <span\n ref={ref}\n {...(decorative ? { \"aria-hidden\": true } : { role: \"img\", \"aria-label\": name })}\n className={cn(\n \"inline-flex shrink-0 items-center justify-center bg-fill-3 text-fg select-none forced-colors:outline forced-colors:-outline-offset-1\",\n AGENT_TILE[size].classes,\n className,\n )}\n >\n <AgentGlyph size={size} />\n </span>\n );\n }\n if (agent) {\n const label = t(\"agentAttribution.label\", \"{name} via {agent} ({model})\", { name, agent: agent.name, model: modelName(agent.model, t) });\n return (\n <Tooltip content={label}>\n <AgentBadge ref={ref} size={size} label={label} className={className}>\n <Face {...props} agent={undefined} className={undefined} decorative nudge={BADGE_NUDGE[size]} />\n </AgentBadge>\n </Tooltip>\n );\n }\n return <Face ref={ref} {...props} />;\n});\nif (process.env.NODE_ENV !== \"production\") Root.displayName = \"Avatar\";\n\nconst Face = /* @__PURE__ */ forwardRef<HTMLSpanElement, AvatarProps & { nudge?: string | undefined }>(function Face(\n { name, src, color, size = 24, kind = \"person\", decorative, className, nudge },\n ref,\n) {\n const [failedSrc, setFailedSrc] = useState<string | undefined>(undefined);\n const hydrating = useHydrating();\n const pictured = !!src && src !== failedSrc;\n return (\n <span\n ref={ref}\n {...(color && !pictured ? { style: { backgroundColor: color } } : {})}\n {...(decorative ? { \"aria-hidden\": true } : { role: \"img\", \"aria-label\": name })}\n className={cn(\n \"relative inline-flex shrink-0 items-center justify-center overflow-hidden mark-fill font-semibold text-fg select-none forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_AVATAR_VARIANTS.size[size].classes,\n KAESO_AVATAR_VARIANTS.kind[kind].classes,\n size <= 24 && kind === \"org\" && \"rounded-avatar\",\n className,\n )}\n >\n {pictured ? (\n <>\n <img\n ref={(img) => {\n // A server-rendered picture that failed before hydration fired its error event before React listened for it.\n if (hydrating && img?.complete && img.naturalWidth === 0) setFailedSrc(src);\n }}\n src={src}\n alt=\"\"\n className=\"size-full object-cover image-outline\"\n onError={() => setFailedSrc(src)}\n />\n </>\n ) : color ? null : nudge ? (\n <span className={nudge}>{initials(name, size === 20 ? 1 : 2)}</span>\n ) : (\n initials(name, size === 20 ? 1 : 2)\n )}\n </span>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Face.displayName = \"Avatar\";\n\nexport interface AvatarGroupProps {\n people: { name: string; src?: string | undefined }[];\n size?: keyof typeof KAESO_AVATAR_VARIANTS.size | undefined;\n max?: number | undefined;\n className?: string | undefined;\n children?: ReactNode | undefined;\n}\n\nconst GROUP_OVERLAP = { 20: 4, 24: 4, 28: 4, 32: 6, 40: 8 } as const;\nconst OVERLAP_CLASS = { 4: \"-ms-4\", 6: \"-ms-6\", 8: \"-ms-8\" } as const;\nconst GAP = 2;\n\nfunction cutFor(size: number, overlap: number): CSSProperties {\n return {\n \"--k-cut-x-ltr\": `${1.5 * size - overlap}px`,\n \"--k-cut-x-rtl\": `${overlap - 0.5 * size}px`,\n \"--k-cut-r\": `${size / 2 + GAP}px`,\n } as CSSProperties;\n}\n\nexport const Group = /* @__PURE__ */ forwardRef<HTMLDivElement, AvatarGroupProps>(function AvatarGroup({ people, size = 24, max = 4, className, children }, ref) {\n const t = useUiText();\n const shown = people.slice(0, max);\n const rest = people.length - shown.length;\n const overlap = GROUP_OVERLAP[size];\n const items = shown.length + (rest > 0 ? 1 : 0);\n const slot = (i: number, child: ReactNode, key: string) => (\n <span\n key={key}\n className={cn(\"flex shrink-0 rounded-pill\", i > 0 && OVERLAP_CLASS[overlap], i < items - 1 && \"cutout\")}\n style={i < items - 1 ? cutFor(size, overlap) : undefined}\n >\n {child}\n </span>\n );\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={people.map((p) => p.name).join(t(\"avatarGroup.listSeparator\", \", \"))}\n className={cn(\"flex items-center\", className)}\n >\n {shown.map((p, i) =>\n slot(\n i,\n <Face name={p.name} {...(p.src ? { src: p.src } : {})} size={size} decorative {...(i < items - 1 ? { nudge: GROUP_NUDGE[size] } : {})} />,\n p.name + i,\n ),\n )}\n {rest > 0 &&\n slot(\n shown.length,\n <Tooltip\n content={people\n .slice(max)\n .map((p) => p.name)\n .join(t(\"avatarGroup.listSeparator\", \", \"))}\n shape=\"multiline\"\n >\n <span\n className={cn(\n \"inline-flex shrink-0 items-center justify-center rounded-pill mark-fill font-medium text-fg-secondary tabular forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_AVATAR_VARIANTS.size[size].classes,\n )}\n >\n +{rest}\n </span>\n </Tooltip>,\n \"rest\",\n )}\n {children && <span className=\"ms-8 inline-flex items-center\">{children}</span>}\n </div>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Group.displayName = \"Avatar.Group\";\n\nexport const Avatar = /* @__PURE__ */ Object.assign(Root, { Group });\n"],"mappings":";;;;;;;;AAGA,IAAac,IAAa;CACxB,IAAI;EAAE,SAAS;EAA0B,OAAO;EAAW,QAAQ;CAAK;CACxE,IAAI;EAAE,SAAS;EAA0B,OAAO;EAAW,QAAQ;CAAE;CACrE,IAAI;EAAE,SAAS;EAAuB,OAAO;EAAW,QAAQ;CAAE;CAClE,IAAI;EAAE,SAAS;EAAuB,OAAO;EAAW,QAAQ;CAAK;CACrE,IAAI;EAAE,SAAS;EAAuB,OAAO;EAAW,QAAQ;CAAI;AACtE,GAEMC,IAAc;CAClB,IAAI;EAAE,SAAS;EAAU,IAAI;EAAG,OAAO;EAAU,QAAQ;CAAI;CAC7D,IAAI;EAAE,SAAS;EAAW,IAAI;EAAI,OAAO;EAAU,QAAQ;CAAE;CAC7D,IAAI;EAAE,SAAS;EAAW,IAAI;E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,MAAMA,EAAE,IAAI,CAAC,CAClB,KAAKvC,EAAE,6BAA6B,IAAI,CAAC;IAC5C,OAAM;IAEN,UAAApC,kBAAC,QAAD;KACE,WAAWC,EACT,uKACAoC,EAAsB,KAAKlB,EAAK,CAAC,OACnC;KAJF,UAAA,CAKC,KACGkD,CACE;;GACC,CAAA,GACT,MACF;GACD9C,KAAYzB,kBAAC,QAAD;IAAM,WAAU;IAAiCyB;GAAe,CAAA;EAC1E;;AAET,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc2C,EAAM,cAAc;AAE/D,IAAaU,IAAyB,uBAAO,OAAO9B,GAAM,EAAEoB,SAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"avatar-CQNbSj8X.js","names":["SWATCHES","i"],"sources":["../../src/components/avatar/swatches.ts"],"sourcesContent":["/**\n * The swatches of things people name, such as projects, as CSS colours, in the order they are given out\n * (`--k-swatch-1` to `--k-swatch-10`). Written out rather than read from the tokens, so a page that only paints them\n * doesn't load the token tables.\n */\nexport const SWATCHES: readonly string[] = /* @__PURE__ */ Array.from({ length: 10 }, (_, i) => `var(--k-swatch-${i + 1})`);\n"],"mappings":";AAKA,IAAaA,IAA8C,sBAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,kBAAkBC,IAAI,EAAE,EAAE"}
1
+ {"version":3,"file":"avatar-CQNbSj8X.js","names":["SWATCHES","_","i"],"sources":["../../src/components/avatar/swatches.ts"],"sourcesContent":["/**\n * The swatches of things people name, such as projects, as CSS colours, in the order they are given out\n * (`--k-swatch-1` to `--k-swatch-10`). Written out rather than read from the tokens, so a page that only paints them\n * doesn't load the token tables.\n */\nexport const SWATCHES: readonly string[] = /* @__PURE__ */ Array.from({ length: 10 }, (_, i) => `var(--k-swatch-${i + 1})`);\n"],"mappings":";AAKA,IAAaA,IAA8C,sBAAM,KAAK,EAAE,QAAQ,GAAG,IAAIC,GAAGC,MAAM,kBAAkBA,IAAI,EAAE,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"badge-CU9K-wA1.js","names":["cn","TruncatedText","KAESO_BADGE_VARIANTS","KAESO_BADGE_DEFAULT_VARIANTS","Badge","props","figures","children","tone","className"],"sources":["../../src/components/badge/badge.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { figures } from \"../../utils/figures.js\";\nimport { TruncatedText } from \"../text/truncated.js\";\n\nexport const KAESO_BADGE_VARIANTS = {\n tone: {\n neutral: { classes: \"bg-fill-2 mark-fill text-fg-secondary\" },\n success: { classes: \"bg-success-tint text-success-text\" },\n warning: { classes: \"bg-warning-tint text-warning-text\" },\n danger: { classes: \"bg-danger-tint text-danger-text\" },\n info: { classes: \"bg-info-tint text-info-text\" },\n outline: { classes: \"bg-transparent text-fg-secondary shadow-ring\" },\n ink: { classes: \"bg-ink text-on-ink\" },\n },\n} as const;\nexport const KAESO_BADGE_DEFAULT_VARIANTS = { tone: \"neutral\" } as const;\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n tone?: keyof typeof KAESO_BADGE_VARIANTS.tone | undefined;\n children: ReactNode;\n}\n\nexport const Badge = /* @__PURE__ */ forwardRef<HTMLSpanElement, BadgeProps>(function Badge({ tone = \"neutral\", className, children, ...props }, ref) {\n return (\n <TruncatedText\n ref={ref}\n className={cn(\n \"inline-block h-22 max-w-full min-w-0 shrink-0 rounded-code px-8 py-3 align-middle text-caption font-medium\",\n figures(children),\n \"forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_BADGE_VARIANTS.tone[tone].classes,\n className,\n )}\n {...props}\n >\n {children}\n </TruncatedText>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Badge.displayName = \"Badge\";\n"],"mappings":";;;;;;;AAKA,IAAaE,IAAuB,EAClC,MAAM;CACJ,SAAS,EAAE,SAAS,wCAAwC;CAC5D,SAAS,EAAE,SAAS,oCAAoC;CACxD,SAAS,EAAE,SAAS,oCAAoC;CACxD,QAAQ,EAAE,SAAS,kCAAkC;CACrD,MAAM,EAAE,SAAS,8BAA8B;CAC/C,SAAS,EAAE,SAAS,+CAA+C;CACnE,KAAK,EAAE,SAAS,qBAAqB;AACvC,EACF,GACaC,IAA+B,EAAE,MAAM,UAAU,GAOjDC,IAAwB,kBAAwC,SAAe,EAAE,UAAO,WAAW,cAAW,aAAU,GAAGC,KAAS,GAAK;CACpJ,OACE,kBAACJ,GAAD;EACO;EACL,WAAWD,EACT,8GACAM,EAAQC,CAAQ,GAChB,yDACAL,EAAqB,KAAKM,EAAK,CAAC,SAChCC,CACF;EACA,GAAIJ;EAEH;CACY,CAAA;AAEnB,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAM,cAAc"}
1
+ {"version":3,"file":"badge-CU9K-wA1.js","names":["_jsx","cn","TruncatedText","forwardRef","jsx","KAESO_BADGE_VARIANTS","KAESO_BADGE_DEFAULT_VARIANTS","Badge","tone","className","children","props","ref","figures"],"sources":["../../src/components/badge/badge.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { figures } from \"../../utils/figures.js\";\nimport { TruncatedText } from \"../text/truncated.js\";\n\nexport const KAESO_BADGE_VARIANTS = {\n tone: {\n neutral: { classes: \"bg-fill-2 mark-fill text-fg-secondary\" },\n success: { classes: \"bg-success-tint text-success-text\" },\n warning: { classes: \"bg-warning-tint text-warning-text\" },\n danger: { classes: \"bg-danger-tint text-danger-text\" },\n info: { classes: \"bg-info-tint text-info-text\" },\n outline: { classes: \"bg-transparent text-fg-secondary shadow-ring\" },\n ink: { classes: \"bg-ink text-on-ink\" },\n },\n} as const;\nexport const KAESO_BADGE_DEFAULT_VARIANTS = { tone: \"neutral\" } as const;\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n tone?: keyof typeof KAESO_BADGE_VARIANTS.tone | undefined;\n children: ReactNode;\n}\n\nexport const Badge = /* @__PURE__ */ forwardRef<HTMLSpanElement, BadgeProps>(function Badge({ tone = \"neutral\", className, children, ...props }, ref) {\n return (\n <TruncatedText\n ref={ref}\n className={cn(\n \"inline-block h-22 max-w-full min-w-0 shrink-0 rounded-code px-8 py-3 align-middle text-caption font-medium\",\n figures(children),\n \"forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_BADGE_VARIANTS.tone[tone].classes,\n className,\n )}\n {...props}\n >\n {children}\n </TruncatedText>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Badge.displayName = \"Badge\";\n"],"mappings":";;;;;;;AAKA,IAAaK,IAAuB,EAClC,MAAM;CACJ,SAAS,EAAE,SAAS,wCAAwC;CAC5D,SAAS,EAAE,SAAS,oCAAoC;CACxD,SAAS,EAAE,SAAS,oCAAoC;CACxD,QAAQ,EAAE,SAAS,kCAAkC;CACrD,MAAM,EAAE,SAAS,8BAA8B;CAC/C,SAAS,EAAE,SAAS,+CAA+C;CACnE,KAAK,EAAE,SAAS,qBAAqB;AACvC,EACF,GACaC,IAA+B,EAAE,MAAM,UAAU,GAOjDC,IAAwBJ,kBAAwC,SAAe,EAAEK,UAAO,WAAWC,cAAWC,aAAU,GAAGC,KAASC,GAAK;CACpJ,OACEZ,kBAACE,GAAD;EACOU;EACL,WAAWX,EACT,8GACAY,EAAQH,CAAQ,GAChB,yDACAL,EAAqB,KAAKG,EAAK,CAAC,SAChCC,CACF;EACA,GAAIE;EAEHD;CACY,CAAA;AAEnB,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAcH,EAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"banner-R5GIFExf.js","names":["__icon_Info","__icon_CheckCircle","__icon_Alert","__icon_Stop","__icon_X","cn","Icon","Button","useUiText","devWarn","KAESO_BANNER_VARIANTS","KAESO_BANNER_DEFAULT_VARIANTS","ICON","Info","CheckCircle","Alert","Stop","ICON_TONE","Banner","hidden","setHidden","useState","t","dismissible","onDismiss","tone","mark","icon","layout","className","actions","title","children","X"],"sources":["../../src/components/banner/banner.tsx"],"sourcesContent":["import { forwardRef, useState, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Info as __icon_Info } from \"../../icons/octicons/info.js\";\nimport { CheckCircle as __icon_CheckCircle } from \"../../icons/octicons/check-circle.js\";\nimport { Alert as __icon_Alert } from \"../../icons/octicons/alert.js\";\nimport { Stop as __icon_Stop } from \"../../icons/octicons/stop.js\";\nimport { X as __icon_X } from \"../../icons/octicons/x.js\";\nimport { Icon, type IconData } from \"../icon/icon.js\";\nimport { Button } from \"../button/button.js\";\nimport { useUiText } from \"../../i18n/context.js\";\nimport { devWarn } from \"../../utils/dev.js\";\n\nexport const KAESO_BANNER_VARIANTS = {\n tone: {\n neutral: { classes: \"bg-fill-1 text-fg\" },\n info: { classes: \"bg-fill-1 text-fg\" },\n success: { classes: \"bg-fill-1 text-fg\" },\n warning: { classes: \"bg-fill-1 text-fg\" },\n danger: { classes: \"bg-fill-1 text-fg\" },\n },\n layout: {\n inline: {\n classes: \"flex min-h-56 flex-col justify-center rounded-well px-12 py-12\",\n },\n full: {\n classes: \"rounded-none px-gutter py-10 hairline-b-strong\",\n },\n },\n} as const;\nexport const KAESO_BANNER_DEFAULT_VARIANTS = { tone: \"neutral\", layout: \"inline\" } as const;\n\nconst ICON: Record<keyof typeof KAESO_BANNER_VARIANTS.tone, IconData | undefined> = {\n neutral: undefined,\n info: __icon_Info,\n success: __icon_CheckCircle,\n warning: __icon_Alert,\n danger: __icon_Stop,\n};\nconst ICON_TONE = {\n neutral: \"text-fg-secondary\",\n info: \"text-info-text\",\n success: \"text-success-text\",\n warning: \"text-warning-text\",\n danger: \"text-danger-text\",\n} as const;\n\nexport interface BannerProps {\n tone?: keyof typeof KAESO_BANNER_VARIANTS.tone | undefined;\n layout?: keyof typeof KAESO_BANNER_VARIANTS.layout | undefined;\n title?: ReactNode | undefined;\n children?: ReactNode | undefined;\n icon?: IconData | undefined;\n actions?: ReactNode | undefined;\n onDismiss?: (() => void) | undefined;\n className?: string | undefined;\n}\n\nexport const Banner = /* @__PURE__ */ forwardRef<HTMLDivElement, BannerProps>(function Banner(\n { tone = \"neutral\", layout = \"inline\", title, children, icon, actions, onDismiss, className },\n ref,\n) {\n const [hidden, setHidden] = useState(false);\n const t = useUiText();\n if (hidden) return null;\n const dismissible = onDismiss && (tone === \"neutral\" || tone === \"info\");\n if (onDismiss && !dismissible) devWarn(`Banner: a ${tone} banner can't be dismissed; it stays until its cause is fixed, so onDismiss is ignored.`);\n const mark = icon ?? ICON[tone];\n return (\n <div\n ref={ref}\n role={tone === \"danger\" ? \"alert\" : \"status\"}\n data-k-banner={layout}\n className={cn(\n \"@container w-full forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_BANNER_VARIANTS.tone[tone].classes,\n KAESO_BANNER_VARIANTS.layout[layout].classes,\n className,\n )}\n >\n <div className={cn(\"flex items-start gap-8\", actions && \"@banner:items-center\")}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-12 @banner:flex-row @banner:items-center @banner:gap-24\">\n <div className=\"flex min-w-0 flex-1 items-start gap-8\">\n {mark && <Icon icon={mark} size=\"sm\" className={cn(\"mt-2\", ICON_TONE[tone])} />}\n <div className=\"flex min-w-0 flex-1 flex-col gap-2 text-body\">\n {title && <span className=\"font-semibold text-fg\">{title}</span>}\n {children && <div className={cn(\"text-pretty\", title ? \"text-fg-secondary\" : \"text-fg\")}>{children}</div>}\n </div>\n </div>\n {actions && <div className={cn(\"flex shrink-0 flex-wrap items-center gap-8 @banner:ml-0\", mark && \"ml-24\")}>{actions}</div>}\n </div>\n {dismissible && (\n <Button\n variant=\"ghost\"\n icon={__icon_X}\n aria-label={t(\"banner.dismiss\", \"Dismiss\")}\n size=\"xs\"\n className=\"-my-2 -mr-6 hover:bg-fill-2 active:bg-fill-3\"\n onClick={() => {\n setHidden(true);\n onDismiss?.();\n }}\n />\n )}\n </div>\n </div>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Banner.displayName = \"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oB;MAAM,MAAK;MAAK,WAAWrB,EAAG,QAAQY,EAAUQ,EAAK;KAAI,CAAA,GAC9E,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACGM,KAAS,kBAAC,QAAD;OAAM,WAAU;OAAyB,UAAAA;MAAY,CAAA,GAC9DC,KAAY,kBAAC,OAAD;OAAK,WAAW3B,EAAG,eAAe0B,IAAQ,sBAAsB,SAAS;OAAI;MAAc,CAAA,CACrG;KACF,CAAA,CAAA;IACJ,CAAA,GAAAD,KAAW,kBAAC,OAAD;KAAK,WAAWzB,EAAG,2DAA2DqB,KAAQ,OAAO;KAAI,UAAAI;IAAa,CAAA,CACvH;GACJ,CAAA,GAAAP,KACC,kBAAChB,GAAD;IACE,SAAQ;IACR,MAAMH;IACN,cAAYkB,EAAE,kBAAkB,SAAS;IACzC,MAAK;IACL,WAAU;IACV,eAAe;KAEb,AADAF,EAAU,EAAI,GACdI,IAAY;IACd;GACD,CAAA,CAEA;;CACF,CAAA;AAET,CAAC;AACD,QAAA,IAAA,aAA6B,iBAAc,EAAO,cAAc"}
1
+ {"version":3,"file":"banner-R5GIFExf.js","names":["__icon_Info","__icon_CheckCircle","__icon_Alert","__icon_Stop","_jsx","_jsxs","__icon_X","cn","Info","CheckCircle","Alert","Stop","X","Icon","Button","useUiText","devWarn","forwardRef","useState","jsx","jsxs","KAESO_BANNER_VARIANTS","KAESO_BANNER_DEFAULT_VARIANTS","ICON","ICON_TONE","Banner","tone","layout","title","children","icon","actions","onDismiss","className","ref","hidden","setHidden","t","dismissible","mark"],"sources":["../../src/components/banner/banner.tsx"],"sourcesContent":["import { forwardRef, useState, type ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { Info as __icon_Info } from \"../../icons/octicons/info.js\";\nimport { CheckCircle as __icon_CheckCircle } from \"../../icons/octicons/check-circle.js\";\nimport { Alert as __icon_Alert } from \"../../icons/octicons/alert.js\";\nimport { Stop as __icon_Stop } from \"../../icons/octicons/stop.js\";\nimport { X as __icon_X } from \"../../icons/octicons/x.js\";\nimport { Icon, type IconData } from \"../icon/icon.js\";\nimport { Button } from \"../button/button.js\";\nimport { useUiText } from \"../../i18n/context.js\";\nimport { devWarn } from \"../../utils/dev.js\";\n\nexport const KAESO_BANNER_VARIANTS = {\n tone: {\n neutral: { classes: \"bg-fill-1 text-fg\" },\n info: { classes: \"bg-fill-1 text-fg\" },\n success: { classes: \"bg-fill-1 text-fg\" },\n warning: { classes: \"bg-fill-1 text-fg\" },\n danger: { classes: \"bg-fill-1 text-fg\" },\n },\n layout: {\n inline: {\n classes: \"flex min-h-56 flex-col justify-center rounded-well px-12 py-12\",\n },\n full: {\n classes: \"rounded-none px-gutter py-10 hairline-b-strong\",\n },\n },\n} as const;\nexport const KAESO_BANNER_DEFAULT_VARIANTS = { tone: \"neutral\", layout: \"inline\" } as const;\n\nconst ICON: Record<keyof typeof KAESO_BANNER_VARIANTS.tone, IconData | undefined> = {\n neutral: undefined,\n info: __icon_Info,\n success: __icon_CheckCircle,\n warning: __icon_Alert,\n danger: __icon_Stop,\n};\nconst ICON_TONE = {\n neutral: \"text-fg-secondary\",\n info: \"text-info-text\",\n success: \"text-success-text\",\n warning: \"text-warning-text\",\n danger: \"text-danger-text\",\n} as const;\n\nexport interface BannerProps {\n tone?: keyof typeof KAESO_BANNER_VARIANTS.tone | undefined;\n layout?: keyof typeof KAESO_BANNER_VARIANTS.layout | undefined;\n title?: ReactNode | undefined;\n children?: ReactNode | undefined;\n icon?: IconData | undefined;\n actions?: ReactNode | undefined;\n onDismiss?: (() => void) | undefined;\n className?: string | undefined;\n}\n\nexport const Banner = /* @__PURE__ */ forwardRef<HTMLDivElement, BannerProps>(function Banner(\n { tone = \"neutral\", layout = \"inline\", title, children, icon, actions, onDismiss, className },\n ref,\n) {\n const [hidden, setHidden] = useState(false);\n const t = useUiText();\n if (hidden) return null;\n const dismissible = onDismiss && (tone === \"neutral\" || tone === \"info\");\n if (onDismiss && !dismissible) devWarn(`Banner: a ${tone} banner can't be dismissed; it stays until its cause is fixed, so onDismiss is ignored.`);\n const mark = icon ?? ICON[tone];\n return (\n <div\n ref={ref}\n role={tone === \"danger\" ? \"alert\" : \"status\"}\n data-k-banner={layout}\n className={cn(\n \"@container w-full forced-colors:outline forced-colors:-outline-offset-1\",\n KAESO_BANNER_VARIANTS.tone[tone].classes,\n KAESO_BANNER_VARIANTS.layout[layout].classes,\n className,\n )}\n >\n <div className={cn(\"flex items-start gap-8\", actions && \"@banner:items-center\")}>\n <div className=\"flex min-w-0 flex-1 flex-col gap-12 @banner:flex-row @banner:items-center @banner:gap-24\">\n <div className=\"flex min-w-0 flex-1 items-start gap-8\">\n {mark && <Icon icon={mark} size=\"sm\" className={cn(\"mt-2\", ICON_TONE[tone])} />}\n <div className=\"flex min-w-0 flex-1 flex-col gap-2 text-body\">\n {title && <span className=\"font-semibold text-fg\">{title}</span>}\n {children && <div className={cn(\"text-pretty\", title ? \"text-fg-secondary\" : \"text-fg\")}>{children}</div>}\n </div>\n </div>\n {actions && <div className={cn(\"flex shrink-0 flex-wrap items-center gap-8 @banner:ml-0\", mark && \"ml-24\")}>{actions}</div>}\n </div>\n {dismissible && (\n <Button\n variant=\"ghost\"\n icon={__icon_X}\n aria-label={t(\"banner.dismiss\", \"Dismiss\")}\n size=\"xs\"\n className=\"-my-2 -mr-6 hover:bg-fill-2 active:bg-fill-3\"\n onClick={() => {\n setHidden(true);\n onDismiss?.();\n }}\n />\n )}\n </div>\n </div>\n );\n});\nif (process.env.NODE_ENV !== \"production\") Banner.displayName = \"Banner\";\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAaqB,IAAwB;CACnC,MAAM;EACJ,SAAS,EAAE,SAAS,oBAAoB;EACxC,MAAM,EAAE,SAAS,oBAAoB;EACrC,SAAS,EAAE,SAAS,oBAAoB;EACxC,SAAS,EAAE,SAAS,oBAAoB;EACxC,QAAQ,EAAE,SAAS,oBAAoB;CACzC;CACA,QAAQ;EACN,QAAQ,EACN,SAAS,iE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