@logicplanes/kaeso-ui 0.4.4 → 0.4.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 (482) hide show
  1. package/ai/component-guides.md +250 -98
  2. package/ai/component-registry.json +264 -236
  3. package/ai/component-registry.md +222 -218
  4. package/ai/icons.md +1 -1
  5. package/ai/tokens.md +18 -14
  6. package/dist/blocks/delete-resource.js +3 -3
  7. package/dist/blocks/delete-resource.js.map +1 -1
  8. package/dist/blocks/pages.js +47 -42
  9. package/dist/blocks/pages.js.map +1 -1
  10. package/dist/blocks/resource-list.js +68 -55
  11. package/dist/blocks/resource-list.js.map +1 -1
  12. package/dist/chunks/agent-avatar-DHieggHK.js +188 -0
  13. package/dist/chunks/agent-avatar-DHieggHK.js.map +1 -0
  14. package/dist/chunks/app-frame-DysOel2X.js +232 -0
  15. package/dist/chunks/app-frame-DysOel2X.js.map +1 -0
  16. package/dist/chunks/arrow-focus-B0KdRFX8.js +20 -0
  17. package/dist/chunks/arrow-focus-B0KdRFX8.js.map +1 -0
  18. package/dist/chunks/avatar-CYNMK7uY.js +110 -0
  19. package/dist/chunks/avatar-CYNMK7uY.js.map +1 -0
  20. package/dist/chunks/badge-C0GC3B9X.js +27 -0
  21. package/dist/chunks/badge-C0GC3B9X.js.map +1 -0
  22. package/dist/chunks/banner-B3DGLTBu.js +88 -0
  23. package/dist/chunks/banner-B3DGLTBu.js.map +1 -0
  24. package/dist/chunks/button-IblhXUyZ.js +202 -0
  25. package/dist/chunks/button-IblhXUyZ.js.map +1 -0
  26. package/dist/chunks/{calendar-BWaf2MXc.js → calendar-Dc6_dl0f.js} +4 -4
  27. package/dist/chunks/calendar-Dc6_dl0f.js.map +1 -0
  28. package/dist/chunks/checkbox-9tbimmF3.js +141 -0
  29. package/dist/chunks/checkbox-9tbimmF3.js.map +1 -0
  30. package/dist/chunks/{cn-Dj6sRgkF.js → cn-BjnOAUrA.js} +45 -4
  31. package/dist/chunks/cn-BjnOAUrA.js.map +1 -0
  32. package/dist/chunks/code-block-64e-Cy1S.js +346 -0
  33. package/dist/chunks/code-block-64e-Cy1S.js.map +1 -0
  34. package/dist/chunks/{code-block-DdNPHEzI.js → code-block-KIvuE8jg.js} +122 -114
  35. package/dist/chunks/code-block-KIvuE8jg.js.map +1 -0
  36. package/dist/chunks/{code-tqj0uhBL.js → code-xqjww4Pv.js} +5 -6
  37. package/dist/chunks/code-xqjww4Pv.js.map +1 -0
  38. package/dist/chunks/combobox-DkcjkWc6.js +352 -0
  39. package/dist/chunks/combobox-DkcjkWc6.js.map +1 -0
  40. package/dist/chunks/command-list-CypqsC4T.js +456 -0
  41. package/dist/chunks/command-list-CypqsC4T.js.map +1 -0
  42. package/dist/chunks/{copy-button-FJvPJn72.js → copy-button-CwU8t_9_.js} +22 -15
  43. package/dist/chunks/copy-button-CwU8t_9_.js.map +1 -0
  44. package/dist/chunks/core-CmK-8ObW.js +505 -0
  45. package/dist/chunks/core-CmK-8ObW.js.map +1 -0
  46. package/dist/chunks/data-table-CqY8_6IS.js +581 -0
  47. package/dist/chunks/data-table-CqY8_6IS.js.map +1 -0
  48. package/dist/chunks/date-popup-DAnjptFt.js +58 -0
  49. package/dist/chunks/date-popup-DAnjptFt.js.map +1 -0
  50. package/dist/chunks/{de-D_0mmG-k.js → de-CqC4aSIV.js} +74 -40
  51. package/dist/chunks/de-CqC4aSIV.js.map +1 -0
  52. package/dist/chunks/{dialog-Cg9A_6SF.js → dialog-2zb6ClNR.js} +156 -134
  53. package/dist/chunks/dialog-2zb6ClNR.js.map +1 -0
  54. package/dist/chunks/disclosure-BtYRTDO3.js +22 -0
  55. package/dist/chunks/disclosure-BtYRTDO3.js.map +1 -0
  56. package/dist/chunks/domain-obd_w9xk.js +28 -0
  57. package/dist/chunks/domain-obd_w9xk.js.map +1 -0
  58. package/dist/chunks/{empty-DvhyMXQq.js → empty-BpiUgGzm.js} +2 -2
  59. package/dist/chunks/{empty-DvhyMXQq.js.map → empty-BpiUgGzm.js.map} +1 -1
  60. package/dist/chunks/{field-TviMvYa2.js → field-D7m-yl-D.js} +37 -34
  61. package/dist/chunks/field-D7m-yl-D.js.map +1 -0
  62. package/dist/chunks/{icon-D7ja-_Yk.js → icon-CBzOwqrX.js} +7 -6
  63. package/dist/chunks/{icon-D7ja-_Yk.js.map → icon-CBzOwqrX.js.map} +1 -1
  64. package/dist/chunks/{icon-button-CrdF_eMG.js → icon-button-Dfwpvmav.js} +7 -6
  65. package/dist/chunks/icon-button-Dfwpvmav.js.map +1 -0
  66. package/dist/chunks/{identity-BmhQ6BQ-.js → identity-3Foi5F8w.js} +7 -7
  67. package/dist/chunks/{identity-BmhQ6BQ-.js.map → identity-3Foi5F8w.js.map} +1 -1
  68. package/dist/chunks/{input-2VJuj_M4.js → input-Bo5-UZg2.js} +15 -9
  69. package/dist/chunks/input-Bo5-UZg2.js.map +1 -0
  70. package/dist/chunks/{input-group-DQ_4DoXg.js → input-group-jPcK9T_a.js} +42 -29
  71. package/dist/chunks/input-group-jPcK9T_a.js.map +1 -0
  72. package/dist/chunks/iso-field-DoqHBg8n.js +52 -0
  73. package/dist/chunks/iso-field-DoqHBg8n.js.map +1 -0
  74. package/dist/chunks/json-view-DZ2nL2Ir.js +253 -0
  75. package/dist/chunks/json-view-DZ2nL2Ir.js.map +1 -0
  76. package/dist/chunks/{kbd-BF1vKXJf.js → kbd-8A0ML_up.js} +30 -28
  77. package/dist/chunks/kbd-8A0ML_up.js.map +1 -0
  78. package/dist/chunks/label-DW24Aj0Z.js +26 -0
  79. package/dist/chunks/label-DW24Aj0Z.js.map +1 -0
  80. package/dist/chunks/{link-KWI7PevW.js → link-CMjkcLQK.js} +14 -14
  81. package/dist/chunks/link-CMjkcLQK.js.map +1 -0
  82. package/dist/chunks/list-B4G-sWwV.js +540 -0
  83. package/dist/chunks/list-B4G-sWwV.js.map +1 -0
  84. package/dist/chunks/{loader-DCfPndXa.js → loader-zo8CCIGJ.js} +2 -2
  85. package/dist/chunks/{loader-DCfPndXa.js.map → loader-zo8CCIGJ.js.map} +1 -1
  86. package/dist/chunks/markdown-C565aBR7.js +338 -0
  87. package/dist/chunks/markdown-C565aBR7.js.map +1 -0
  88. package/dist/chunks/menu-Clvv6ftq.js +485 -0
  89. package/dist/chunks/menu-Clvv6ftq.js.map +1 -0
  90. package/dist/chunks/merge-refs-BN1FyQt9.js +20 -0
  91. package/dist/chunks/merge-refs-BN1FyQt9.js.map +1 -0
  92. package/dist/chunks/meter-CASMHlxl.js +100 -0
  93. package/dist/chunks/meter-CASMHlxl.js.map +1 -0
  94. package/dist/chunks/nav-sheet-Dt6JSvzX.js +67 -0
  95. package/dist/chunks/nav-sheet-Dt6JSvzX.js.map +1 -0
  96. package/dist/chunks/{nav-wordmark-_pjheAsZ.js → nav-wordmark-J4pB_vjr.js} +4 -8
  97. package/dist/chunks/nav-wordmark-J4pB_vjr.js.map +1 -0
  98. package/dist/chunks/page-header-kS5tdmvb.js +45 -0
  99. package/dist/chunks/page-header-kS5tdmvb.js.map +1 -0
  100. package/dist/chunks/pagination-D7fAm8qg.js +147 -0
  101. package/dist/chunks/pagination-D7fAm8qg.js.map +1 -0
  102. package/dist/chunks/picker-popover-1FHb1LQG.js +119 -0
  103. package/dist/chunks/picker-popover-1FHb1LQG.js.map +1 -0
  104. package/dist/chunks/popover-Bl5QYqnh.js +51 -0
  105. package/dist/chunks/popover-Bl5QYqnh.js.map +1 -0
  106. package/dist/chunks/{portal-context-BBbzDKmY.js → portal-context-CTatR2Z8.js} +14 -4
  107. package/dist/chunks/portal-context-CTatR2Z8.js.map +1 -0
  108. package/dist/chunks/{radio-CDDFpdtL.js → radio-C6GtzF_t.js} +38 -23
  109. package/dist/chunks/radio-C6GtzF_t.js.map +1 -0
  110. package/dist/chunks/range-popup-lGiZsG3s.js +160 -0
  111. package/dist/chunks/range-popup-lGiZsG3s.js.map +1 -0
  112. package/dist/chunks/reasoning-frame-C3HdQRRS.js +51 -0
  113. package/dist/chunks/reasoning-frame-C3HdQRRS.js.map +1 -0
  114. package/dist/chunks/release-art-ChiT4T2S.js +582 -0
  115. package/dist/chunks/release-art-ChiT4T2S.js.map +1 -0
  116. package/dist/chunks/rights-B68ocZuq.js +312 -0
  117. package/dist/chunks/rights-B68ocZuq.js.map +1 -0
  118. package/dist/chunks/{scroll-area-D8MD7Vpo.js → scroll-area-_Ljh4-bG.js} +11 -6
  119. package/dist/chunks/scroll-area-_Ljh4-bG.js.map +1 -0
  120. package/dist/chunks/section-CFBYhsUi.js +77 -0
  121. package/dist/chunks/section-CFBYhsUi.js.map +1 -0
  122. package/dist/chunks/section-header-DU1Q4Tdf.js +28 -0
  123. package/dist/chunks/section-header-DU1Q4Tdf.js.map +1 -0
  124. package/dist/chunks/segmented-D9i1avik.js +119 -0
  125. package/dist/chunks/segmented-D9i1avik.js.map +1 -0
  126. package/dist/chunks/select-BqjmQOqx.js +222 -0
  127. package/dist/chunks/select-BqjmQOqx.js.map +1 -0
  128. package/dist/chunks/{separator-D7TzNHmX.js → separator-BNWf6BBj.js} +13 -8
  129. package/dist/chunks/separator-BNWf6BBj.js.map +1 -0
  130. package/dist/chunks/sidebar-Dq7oGOje.js +664 -0
  131. package/dist/chunks/sidebar-Dq7oGOje.js.map +1 -0
  132. package/dist/chunks/{sidebar-menu-BN3jkTlK.js → sidebar-menu-QSSNu1jJ.js} +2 -2
  133. package/dist/chunks/{sidebar-menu-BN3jkTlK.js.map → sidebar-menu-QSSNu1jJ.js.map} +1 -1
  134. package/dist/chunks/{skeleton-Dcz57Zyp.js → skeleton-D-qk3mes.js} +3 -3
  135. package/dist/chunks/skeleton-D-qk3mes.js.map +1 -0
  136. package/dist/chunks/slider-CcE8GtuV.js +58 -0
  137. package/dist/chunks/slider-CcE8GtuV.js.map +1 -0
  138. package/dist/chunks/{status-dot-QJTF0Yv4.js → status-dot-CP6runiC.js} +4 -4
  139. package/dist/chunks/{status-dot-QJTF0Yv4.js.map → status-dot-CP6runiC.js.map} +1 -1
  140. package/dist/chunks/{styles-CVJU9t9v.js → styles-hkFkoBbi.js} +2 -2
  141. package/dist/chunks/{styles-CVJU9t9v.js.map → styles-hkFkoBbi.js.map} +1 -1
  142. package/dist/chunks/{swap-text-Dr0Irxz6.js → swap-text-SlUjrTlG.js} +3 -3
  143. package/dist/chunks/swap-text-SlUjrTlG.js.map +1 -0
  144. package/dist/chunks/switch-ngywMQdl.js +76 -0
  145. package/dist/chunks/switch-ngywMQdl.js.map +1 -0
  146. package/dist/chunks/table-CTK5E0J7.js +102 -0
  147. package/dist/chunks/table-CTK5E0J7.js.map +1 -0
  148. package/dist/chunks/tag-BGr6lTSV.js +100 -0
  149. package/dist/chunks/tag-BGr6lTSV.js.map +1 -0
  150. package/dist/chunks/{text-CIXH8rmT.js → text-DkKdTVUf.js} +9 -9
  151. package/dist/chunks/text-DkKdTVUf.js.map +1 -0
  152. package/dist/chunks/{textarea--4FRL3Pb.js → textarea-CO0HP6fK.js} +47 -36
  153. package/dist/chunks/textarea-CO0HP6fK.js.map +1 -0
  154. package/dist/chunks/timeseries-Ck-q0wWn.js +381 -0
  155. package/dist/chunks/timeseries-Ck-q0wWn.js.map +1 -0
  156. package/dist/chunks/toolbar-u0Gm7Q7-.js +61 -0
  157. package/dist/chunks/toolbar-u0Gm7Q7-.js.map +1 -0
  158. package/dist/chunks/tooltip-Tkm-urbi.js +202 -0
  159. package/dist/chunks/tooltip-Tkm-urbi.js.map +1 -0
  160. package/dist/chunks/tooltip-root-BC_RNNiP.js +70 -0
  161. package/dist/chunks/tooltip-root-BC_RNNiP.js.map +1 -0
  162. package/dist/chunks/truncated-d1afmUJT.js +33 -0
  163. package/dist/chunks/truncated-d1afmUJT.js.map +1 -0
  164. package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js +28 -0
  165. package/dist/chunks/use-coarse-pointer-Ml5oE6oX.js.map +1 -0
  166. package/dist/chunks/use-hydrating-COtYVRo4.js +8 -0
  167. package/dist/chunks/use-hydrating-COtYVRo4.js.map +1 -0
  168. package/dist/chunks/use-scroll-fade-uc8mWSDX.js +30 -0
  169. package/dist/chunks/use-scroll-fade-uc8mWSDX.js.map +1 -0
  170. package/dist/chunks/{zh-CN-Bm6UPIbW.js → zh-CN-BlpsT6d_.js} +73 -39
  171. package/dist/chunks/zh-CN-BlpsT6d_.js.map +1 -0
  172. package/dist/components/agent-avatar.js +1 -1
  173. package/dist/components/app-frame.js +2 -2
  174. package/dist/components/avatar.js +1 -1
  175. package/dist/components/badge.js +1 -1
  176. package/dist/components/banner.js +1 -1
  177. package/dist/components/button-group.js +22 -22
  178. package/dist/components/button-group.js.map +1 -1
  179. package/dist/components/button.js +1 -1
  180. package/dist/components/calendar.js +1 -1
  181. package/dist/components/charts/bar.js +235 -160
  182. package/dist/components/charts/bar.js.map +1 -1
  183. package/dist/components/charts/donut.js +144 -99
  184. package/dist/components/charts/donut.js.map +1 -1
  185. package/dist/components/charts/gauge.js +61 -49
  186. package/dist/components/charts/gauge.js.map +1 -1
  187. package/dist/components/charts/heatmap.js +179 -70
  188. package/dist/components/charts/heatmap.js.map +1 -1
  189. package/dist/components/charts/sankey.js +144 -77
  190. package/dist/components/charts/sankey.js.map +1 -1
  191. package/dist/components/charts/sparkline.js +54 -38
  192. package/dist/components/charts/sparkline.js.map +1 -1
  193. package/dist/components/charts/timeseries.js +1 -1
  194. package/dist/components/charts.js +2 -2
  195. package/dist/components/checkbox.js +1 -1
  196. package/dist/components/code-block.js +3 -3
  197. package/dist/components/code.js +1 -1
  198. package/dist/components/collapsible.js +77 -1
  199. package/dist/components/collapsible.js.map +1 -0
  200. package/dist/components/combobox.js +1 -1
  201. package/dist/components/command-list.js +2 -2
  202. package/dist/components/command-palette.js +89 -66
  203. package/dist/components/command-palette.js.map +1 -1
  204. package/dist/components/copy-button.js +1 -1
  205. package/dist/components/data-table.js +1 -459
  206. package/dist/components/date-picker.js +162 -151
  207. package/dist/components/date-picker.js.map +1 -1
  208. package/dist/components/dialog.js +74 -63
  209. package/dist/components/dialog.js.map +1 -1
  210. package/dist/components/display-options.js +76 -64
  211. package/dist/components/display-options.js.map +1 -1
  212. package/dist/components/empty.js +1 -1
  213. package/dist/components/field.js +1 -1
  214. package/dist/components/figure.js +2 -2
  215. package/dist/components/filter-chip.js +36 -27
  216. package/dist/components/filter-chip.js.map +1 -1
  217. package/dist/components/filter-row.js +4 -4
  218. package/dist/components/filter-row.js.map +1 -1
  219. package/dist/components/flow.js +94 -63
  220. package/dist/components/flow.js.map +1 -1
  221. package/dist/components/heading.js +1 -1
  222. package/dist/components/icon-button.js +1 -1
  223. package/dist/components/icon.js +1 -1
  224. package/dist/components/input.js +176 -98
  225. package/dist/components/input.js.map +1 -1
  226. package/dist/components/kaeso/conversation.js +51 -46
  227. package/dist/components/kaeso/conversation.js.map +1 -1
  228. package/dist/components/kaeso/identity.js +1 -1
  229. package/dist/components/kaeso/moments.js +23 -20
  230. package/dist/components/kaeso/moments.js.map +1 -1
  231. package/dist/components/kaeso/rights.js +1 -1
  232. package/dist/components/kaeso/usage.js +90 -74
  233. package/dist/components/kaeso/usage.js.map +1 -1
  234. package/dist/components/kaeso.js +200 -187
  235. package/dist/components/kaeso.js.map +1 -1
  236. package/dist/components/kbd.js +1 -1
  237. package/dist/components/key-value.js +32 -47
  238. package/dist/components/key-value.js.map +1 -1
  239. package/dist/components/label.js +1 -25
  240. package/dist/components/layout.js +2 -2
  241. package/dist/components/layout.js.map +1 -1
  242. package/dist/components/link.js +1 -1
  243. package/dist/components/list.js +1 -1
  244. package/dist/components/loader.js +11 -10
  245. package/dist/components/loader.js.map +1 -1
  246. package/dist/components/logo.js +2 -2
  247. package/dist/components/markdown.js +1 -1
  248. package/dist/components/menu.js +2 -2
  249. package/dist/components/meter.js +1 -1
  250. package/dist/components/page-header.js +1 -1
  251. package/dist/components/pagination.js +1 -1
  252. package/dist/components/playground.js +644 -529
  253. package/dist/components/playground.js.map +1 -1
  254. package/dist/components/popover.js +4 -4
  255. package/dist/components/popover.js.map +1 -1
  256. package/dist/components/portal.js +1 -1
  257. package/dist/components/qr-code.js +2 -2
  258. package/dist/components/qr-code.js.map +1 -1
  259. package/dist/components/radio.js +1 -1
  260. package/dist/components/release-art.js +1 -1
  261. package/dist/components/scroll-area.js +1 -1
  262. package/dist/components/section.js +1 -1
  263. package/dist/components/segmented.js +1 -1
  264. package/dist/components/select.js +1 -1
  265. package/dist/components/separator.js +1 -1
  266. package/dist/components/settings.js +39 -46
  267. package/dist/components/settings.js.map +1 -1
  268. package/dist/components/sheet.js +10 -9
  269. package/dist/components/sheet.js.map +1 -1
  270. package/dist/components/sidebar.js +1 -1
  271. package/dist/components/skeleton.js +1 -1
  272. package/dist/components/slider.js +1 -1
  273. package/dist/components/stat.js +98 -84
  274. package/dist/components/stat.js.map +1 -1
  275. package/dist/components/status-dot.js +1 -1
  276. package/dist/components/surface.js +1 -1
  277. package/dist/components/swap-text.js +1 -1
  278. package/dist/components/switch.js +1 -1
  279. package/dist/components/table.js +1 -1
  280. package/dist/components/tabs.js +73 -55
  281. package/dist/components/tabs.js.map +1 -1
  282. package/dist/components/tag.js +1 -1
  283. package/dist/components/text.js +1 -1
  284. package/dist/components/theme-image.js +1 -1
  285. package/dist/components/theme-menu.js +5 -2
  286. package/dist/components/theme-menu.js.map +1 -1
  287. package/dist/components/theme-select.js +1 -1
  288. package/dist/components/thumbnail.js +35 -24
  289. package/dist/components/thumbnail.js.map +1 -1
  290. package/dist/components/timeline.js +51 -35
  291. package/dist/components/timeline.js.map +1 -1
  292. package/dist/components/toast.js +76 -66
  293. package/dist/components/toast.js.map +1 -1
  294. package/dist/components/toc.js +14 -8
  295. package/dist/components/toc.js.map +1 -1
  296. package/dist/components/toolbar.js +1 -1
  297. package/dist/components/tooltip.js +1 -1
  298. package/dist/components/visually-hidden.js +1 -1
  299. package/dist/i18n-provider.js +1 -1
  300. package/dist/index.js +100 -100
  301. package/dist/kaeso.css +605 -67
  302. package/dist/styles.css +1 -1
  303. package/dist/tailwind.css +1 -1
  304. package/dist/types/blocks/delete-resource/delete-resource.d.ts +2 -2
  305. package/dist/types/components/agent-avatar/agent-avatar.d.ts +24 -19
  306. package/dist/types/components/badge/badge.d.ts +3 -3
  307. package/dist/types/components/banner/banner.d.ts +3 -3
  308. package/dist/types/components/button/button.d.ts +2 -2
  309. package/dist/types/components/button-group/button-group.d.ts +1 -1
  310. package/dist/types/components/charts/domain.d.ts +11 -0
  311. package/dist/types/components/charts/marks.d.ts +1 -0
  312. package/dist/types/components/code/code.d.ts +3 -3
  313. package/dist/types/components/code-block/json-view.d.ts +2 -1
  314. package/dist/types/components/code-block/numbers.d.ts +1 -0
  315. package/dist/types/components/collapsible/collapsible.d.ts +2 -2
  316. package/dist/types/components/collapsible/disclosure.d.ts +2 -0
  317. package/dist/types/components/data-table/data-table.d.ts +6 -5
  318. package/dist/types/components/data-table/docs.d.ts +1 -0
  319. package/dist/types/components/data-table/time-columns.d.ts +1 -0
  320. package/dist/types/components/date-picker/focus-day.d.ts +1 -0
  321. package/dist/types/components/date-picker/iso-field.d.ts +8 -1
  322. package/dist/types/components/dialog/dialog.d.ts +7 -7
  323. package/dist/types/components/field/field.d.ts +1 -1
  324. package/dist/types/components/flow/flow.d.ts +1 -1
  325. package/dist/types/components/icon-button/icon-button.d.ts +1 -1
  326. package/dist/types/components/input/input-group.d.ts +2 -0
  327. package/dist/types/components/input/number-input.d.ts +4 -4
  328. package/dist/types/components/input/otp-input.d.ts +3 -3
  329. package/dist/types/components/kaeso/client-button.d.ts +2 -1
  330. package/dist/types/components/kaeso/provider-picker.d.ts +1 -0
  331. package/dist/types/components/kaeso/rights.d.ts +1 -1
  332. package/dist/types/components/kaeso/role-picker.d.ts +1 -0
  333. package/dist/types/components/key-value/key-value.d.ts +2 -2
  334. package/dist/types/components/layout/layout.d.ts +2 -2
  335. package/dist/types/components/link/link.d.ts +4 -4
  336. package/dist/types/components/list/list.d.ts +2 -2
  337. package/dist/types/components/menu/menu.d.ts +2 -1
  338. package/dist/types/components/menu/styles.d.ts +3 -3
  339. package/dist/types/components/meter/meter.d.ts +3 -3
  340. package/dist/types/components/page-header/page-header.d.ts +1 -1
  341. package/dist/types/components/pagination/pagination.d.ts +2 -2
  342. package/dist/types/components/playground/prompt-suggestions.d.ts +1 -0
  343. package/dist/types/components/playground/reasoning-frame.d.ts +14 -0
  344. package/dist/types/components/playground/reasoning.d.ts +1 -0
  345. package/dist/types/components/popover/popover.d.ts +1 -1
  346. package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
  347. package/dist/types/components/section/section-header.d.ts +6 -0
  348. package/dist/types/components/segmented/segmented.d.ts +1 -0
  349. package/dist/types/components/select/select.d.ts +1 -1
  350. package/dist/types/components/sheet/sheet.d.ts +3 -3
  351. package/dist/types/components/sidebar/sidebar.d.ts +1 -0
  352. package/dist/types/components/slider/slider.d.ts +2 -2
  353. package/dist/types/components/stat/stat.d.ts +1 -1
  354. package/dist/types/components/tabs/tabs.d.ts +6 -4
  355. package/dist/types/components/text/truncated.d.ts +7 -0
  356. package/dist/types/components/timeline/timeline.d.ts +5 -5
  357. package/dist/types/components/toc/toc.d.ts +1 -1
  358. package/dist/types/components/toolbar/toolbar.d.ts +1 -1
  359. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  360. package/dist/types/components/tooltip/trigger-props.d.ts +1 -0
  361. package/dist/types/hooks/use-coarse-pointer.d.ts +1 -0
  362. package/dist/types/hooks/use-hydrating.d.ts +1 -0
  363. package/dist/types/utils/arrow-focus.d.ts +4 -1
  364. package/dist/types/utils/cn.d.ts +33 -0
  365. package/dist/types/utils/portal-context.d.ts +7 -1
  366. package/dist/utils.js +2 -2
  367. package/foundations/accessibility.md +3 -2
  368. package/foundations/color.md +5 -1
  369. package/foundations/elevation.md +1 -0
  370. package/foundations/motion.md +1 -1
  371. package/foundations/shape.md +2 -2
  372. package/foundations/typography.md +12 -12
  373. package/package.json +2 -2
  374. package/dist/chunks/agent-avatar-0pdBTWkR.js +0 -171
  375. package/dist/chunks/agent-avatar-0pdBTWkR.js.map +0 -1
  376. package/dist/chunks/app-frame-DogGRmsu.js +0 -221
  377. package/dist/chunks/app-frame-DogGRmsu.js.map +0 -1
  378. package/dist/chunks/arrow-focus-BcySmwwU.js +0 -11
  379. package/dist/chunks/arrow-focus-BcySmwwU.js.map +0 -1
  380. package/dist/chunks/avatar-CWbdwbJv.js +0 -83
  381. package/dist/chunks/avatar-CWbdwbJv.js.map +0 -1
  382. package/dist/chunks/badge-C2KtxCLB.js +0 -26
  383. package/dist/chunks/badge-C2KtxCLB.js.map +0 -1
  384. package/dist/chunks/banner-BA2ALw9M.js +0 -85
  385. package/dist/chunks/banner-BA2ALw9M.js.map +0 -1
  386. package/dist/chunks/button-CzuxqawA.js +0 -164
  387. package/dist/chunks/button-CzuxqawA.js.map +0 -1
  388. package/dist/chunks/calendar-BWaf2MXc.js.map +0 -1
  389. package/dist/chunks/checkbox-CQjwCPkc.js +0 -126
  390. package/dist/chunks/checkbox-CQjwCPkc.js.map +0 -1
  391. package/dist/chunks/cn-Dj6sRgkF.js.map +0 -1
  392. package/dist/chunks/code-block-BZIe_B9l.js +0 -334
  393. package/dist/chunks/code-block-BZIe_B9l.js.map +0 -1
  394. package/dist/chunks/code-block-DdNPHEzI.js.map +0 -1
  395. package/dist/chunks/code-tqj0uhBL.js.map +0 -1
  396. package/dist/chunks/collapsible-CKrCX_T9.js +0 -87
  397. package/dist/chunks/collapsible-CKrCX_T9.js.map +0 -1
  398. package/dist/chunks/combobox-DjDI7SUC.js +0 -319
  399. package/dist/chunks/combobox-DjDI7SUC.js.map +0 -1
  400. package/dist/chunks/command-list-C2Y7V_lt.js +0 -418
  401. package/dist/chunks/command-list-C2Y7V_lt.js.map +0 -1
  402. package/dist/chunks/copy-button-FJvPJn72.js.map +0 -1
  403. package/dist/chunks/core-BYns5ytV.js +0 -472
  404. package/dist/chunks/core-BYns5ytV.js.map +0 -1
  405. package/dist/chunks/date-popup-CPA_zt6o.js +0 -35
  406. package/dist/chunks/date-popup-CPA_zt6o.js.map +0 -1
  407. package/dist/chunks/de-D_0mmG-k.js.map +0 -1
  408. package/dist/chunks/dialog-Cg9A_6SF.js.map +0 -1
  409. package/dist/chunks/field-TviMvYa2.js.map +0 -1
  410. package/dist/chunks/hidden-description-B2zSmLcn.js +0 -23
  411. package/dist/chunks/hidden-description-B2zSmLcn.js.map +0 -1
  412. package/dist/chunks/icon-button-CrdF_eMG.js.map +0 -1
  413. package/dist/chunks/input-2VJuj_M4.js.map +0 -1
  414. package/dist/chunks/input-group-DQ_4DoXg.js.map +0 -1
  415. package/dist/chunks/iso-field-B2rTwiBo.js +0 -33
  416. package/dist/chunks/iso-field-B2rTwiBo.js.map +0 -1
  417. package/dist/chunks/json-view-Dqd2TDkc.js +0 -175
  418. package/dist/chunks/json-view-Dqd2TDkc.js.map +0 -1
  419. package/dist/chunks/kbd-BF1vKXJf.js.map +0 -1
  420. package/dist/chunks/link-KWI7PevW.js.map +0 -1
  421. package/dist/chunks/list-M1csq-d4.js +0 -494
  422. package/dist/chunks/list-M1csq-d4.js.map +0 -1
  423. package/dist/chunks/markdown-BupwFOae.js +0 -313
  424. package/dist/chunks/markdown-BupwFOae.js.map +0 -1
  425. package/dist/chunks/menu-DEmBfdPm.js +0 -450
  426. package/dist/chunks/menu-DEmBfdPm.js.map +0 -1
  427. package/dist/chunks/meter-Bj4N3Xuh.js +0 -84
  428. package/dist/chunks/meter-Bj4N3Xuh.js.map +0 -1
  429. package/dist/chunks/nav-sheet-CzgIwgAm.js +0 -60
  430. package/dist/chunks/nav-sheet-CzgIwgAm.js.map +0 -1
  431. package/dist/chunks/nav-wordmark-_pjheAsZ.js.map +0 -1
  432. package/dist/chunks/page-header-DL2y2iZp.js +0 -41
  433. package/dist/chunks/page-header-DL2y2iZp.js.map +0 -1
  434. package/dist/chunks/pagination-Cn_qF4cg.js +0 -86
  435. package/dist/chunks/pagination-Cn_qF4cg.js.map +0 -1
  436. package/dist/chunks/picker-popover-BxyU1U9F.js +0 -106
  437. package/dist/chunks/picker-popover-BxyU1U9F.js.map +0 -1
  438. package/dist/chunks/popover-DNN4S47w.js +0 -50
  439. package/dist/chunks/popover-DNN4S47w.js.map +0 -1
  440. package/dist/chunks/portal-context-BBbzDKmY.js.map +0 -1
  441. package/dist/chunks/radio-CDDFpdtL.js.map +0 -1
  442. package/dist/chunks/range-popup-CRyWYUB1.js +0 -128
  443. package/dist/chunks/range-popup-CRyWYUB1.js.map +0 -1
  444. package/dist/chunks/release-art-ZwfFQImt.js +0 -561
  445. package/dist/chunks/release-art-ZwfFQImt.js.map +0 -1
  446. package/dist/chunks/rights-Cyp0Pzp-.js +0 -279
  447. package/dist/chunks/rights-Cyp0Pzp-.js.map +0 -1
  448. package/dist/chunks/scroll-area-D8MD7Vpo.js.map +0 -1
  449. package/dist/chunks/scroll-parent-WXvzQcUo.js +0 -14
  450. package/dist/chunks/scroll-parent-WXvzQcUo.js.map +0 -1
  451. package/dist/chunks/section-Ce1efbsP.js +0 -87
  452. package/dist/chunks/section-Ce1efbsP.js.map +0 -1
  453. package/dist/chunks/segmented-CErcoxwi.js +0 -114
  454. package/dist/chunks/segmented-CErcoxwi.js.map +0 -1
  455. package/dist/chunks/select-x4XVsdCI.js +0 -210
  456. package/dist/chunks/select-x4XVsdCI.js.map +0 -1
  457. package/dist/chunks/separator-D7TzNHmX.js.map +0 -1
  458. package/dist/chunks/sidebar-3r1ZRXlN.js +0 -621
  459. package/dist/chunks/sidebar-3r1ZRXlN.js.map +0 -1
  460. package/dist/chunks/skeleton-Dcz57Zyp.js.map +0 -1
  461. package/dist/chunks/slider-Ci83PGtj.js +0 -57
  462. package/dist/chunks/slider-Ci83PGtj.js.map +0 -1
  463. package/dist/chunks/swap-text-Dr0Irxz6.js.map +0 -1
  464. package/dist/chunks/switch-BNMq_kGt.js +0 -59
  465. package/dist/chunks/switch-BNMq_kGt.js.map +0 -1
  466. package/dist/chunks/table-BeOSKl_3.js +0 -84
  467. package/dist/chunks/table-BeOSKl_3.js.map +0 -1
  468. package/dist/chunks/tag-D_M1s2qS.js +0 -87
  469. package/dist/chunks/tag-D_M1s2qS.js.map +0 -1
  470. package/dist/chunks/text-CIXH8rmT.js.map +0 -1
  471. package/dist/chunks/textarea--4FRL3Pb.js.map +0 -1
  472. package/dist/chunks/timeseries-D1xjRXfk.js +0 -339
  473. package/dist/chunks/timeseries-D1xjRXfk.js.map +0 -1
  474. package/dist/chunks/toolbar-WA_oZgu-.js +0 -37
  475. package/dist/chunks/toolbar-WA_oZgu-.js.map +0 -1
  476. package/dist/chunks/tooltip-OcwO0VUT.js +0 -154
  477. package/dist/chunks/tooltip-OcwO0VUT.js.map +0 -1
  478. package/dist/chunks/tooltip-root-DzahJDVj.js +0 -60
  479. package/dist/chunks/tooltip-root-DzahJDVj.js.map +0 -1
  480. package/dist/chunks/zh-CN-Bm6UPIbW.js.map +0 -1
  481. package/dist/components/data-table.js.map +0 -1
  482. package/dist/components/label.js.map +0 -1
@@ -1,117 +1,142 @@
1
1
  "use client";
2
- import { t as e } from "../chunks/cn-Dj6sRgkF.js";
2
+ import { t as e } from "../chunks/cn-BjnOAUrA.js";
3
3
  import { t } from "../chunks/use-controllable-B5Fd12Bx.js";
4
4
  import { i as n, r } from "../chunks/context-BELWW79w.js";
5
- import { formatContext as i, formatDuration as a, formatNumber as o, formatUSD as s } from "../format.js";
6
- import { t as c } from "../chunks/icon-D7ja-_Yk.js";
7
- import { t as l } from "../chunks/use-truncated-CW0hByYt.js";
8
- import { n as u } from "../chunks/button-CzuxqawA.js";
9
- import { t as d } from "../chunks/icon-button-CrdF_eMG.js";
10
- import { a as f, o as p, s as m } from "../chunks/field-TviMvYa2.js";
11
- import { o as h, r as g } from "../chunks/textarea--4FRL3Pb.js";
12
- import { r as _ } from "../chunks/slider-Ci83PGtj.js";
13
- import { r as v } from "../chunks/switch-BNMq_kGt.js";
14
- import { r as y } from "../chunks/segmented-CErcoxwi.js";
15
- import { n as b, r as x } from "../chunks/select-x4XVsdCI.js";
16
- import { i as S } from "../chunks/popover-DNN4S47w.js";
17
- import { r as C } from "../chunks/combobox-DjDI7SUC.js";
18
- import { a as ee, t as w } from "../chunks/command-list-C2Y7V_lt.js";
19
- import { i as T, r as E } from "../chunks/picker-popover-BxyU1U9F.js";
20
- import { c as D, f as O, s as k, t as A } from "../chunks/identity-BmhQ6BQ-.js";
21
- import { r as j } from "../chunks/markdown-BupwFOae.js";
22
- import { Children as M, createContext as te, forwardRef as N, isValidElement as ne, useCallback as P, useContext as re, useEffect as F, useId as ie, useLayoutEffect as I, useMemo as L, useRef as R, useState as z, useSyncExternalStore as ae } from "react";
23
- import { Fragment as oe, jsx as B, jsxs as V } from "react/jsx-runtime";
24
- import { Add01Icon as se, ArrowLeft01Icon as ce, ArrowRight01Icon as H, Cancel01Icon as U, SlidersHorizontalIcon as W } from "@hugeicons/core-free-icons";
25
- import { Collapsible as G } from "@base-ui/react/collapsible";
5
+ import { formatContext as i, formatDuration as a, formatNumber as o, formatPrice as s, formatUSD as c } from "../format.js";
6
+ import { r as l } from "../chunks/tooltip-Tkm-urbi.js";
7
+ import { t as u } from "../chunks/use-truncated-CW0hByYt.js";
8
+ import { n as d } from "../chunks/button-IblhXUyZ.js";
9
+ import { t as f } from "../chunks/icon-button-Dfwpvmav.js";
10
+ import { a as p, o as m, s as h } from "../chunks/field-D7m-yl-D.js";
11
+ import { o as g, r as _ } from "../chunks/textarea-CO0HP6fK.js";
12
+ import { r as v } from "../chunks/slider-CcE8GtuV.js";
13
+ import { r as y } from "../chunks/switch-ngywMQdl.js";
14
+ import { r as b } from "../chunks/segmented-D9i1avik.js";
15
+ import { n as x, r as S } from "../chunks/select-BqjmQOqx.js";
16
+ import { i as C } from "../chunks/popover-Bl5QYqnh.js";
17
+ import { r as w } from "../chunks/combobox-DkcjkWc6.js";
18
+ import { a as T, t as E } from "../chunks/command-list-CypqsC4T.js";
19
+ import { i as ee, r as D } from "../chunks/picker-popover-1FHb1LQG.js";
20
+ import { c as O, f as k, s as A, t as j } from "../chunks/identity-3Foi5F8w.js";
21
+ import { t as M } from "../chunks/reasoning-frame-C3HdQRRS.js";
22
+ import { r as N } from "../chunks/markdown-C565aBR7.js";
23
+ import { Children as te, createContext as ne, forwardRef as P, isValidElement as re, useCallback as F, useContext as ie, useEffect as I, useId as L, useLayoutEffect as ae, useMemo as R, useRef as z, useState as B, useSyncExternalStore as oe } from "react";
24
+ import { Fragment as se, jsx as V, jsxs as H } from "react/jsx-runtime";
25
+ import { Add01Icon as U, ArrowLeft01Icon as W, ArrowRight01Icon as G, Cancel01Icon as K, SlidersHorizontalIcon as ce } from "@hugeicons/core-free-icons";
26
26
  //#region src/components/playground/composer.tsx
27
- var le = { size: {
27
+ var q = { size: {
28
28
  md: { classes: "rounded-frame" },
29
29
  sm: { classes: "rounded-frame" }
30
- } }, K = { size: "md" }, ue = "(pointer: coarse)";
31
- function q(e) {
30
+ } }, le = { size: "md" }, J = "(pointer: coarse)";
31
+ function ue(e) {
32
32
  if (typeof window > "u" || !window.matchMedia) return () => {};
33
- let t = window.matchMedia(ue);
33
+ let t = window.matchMedia(J);
34
34
  return t.addEventListener?.("change", e), () => t.removeEventListener?.("change", e);
35
35
  }
36
- var de = () => typeof window < "u" && !!window.matchMedia?.(ue).matches, fe = () => ae(q, de, () => !1), pe = /* @__PURE__ */ N(function({ value: r, defaultValue: i = "", onValueChange: a, onSubmit: o, onStop: s, submitOn: c = "enter", streaming: l = !1, loading: d = !1, disabled: f = !1, clearOnSubmit: p = !0, placeholder: m, "aria-label": h, maxRows: g = 10, size: _ = "md", actions: v, submitLabel: y, stopLabel: b, autoFocus: x, name: S, "data-force": C, className: ee }, w) {
37
- let T = n(), E = m ?? T("composer.placeholder", "Write a prompt"), D = h ?? T("composer.prompt", "Prompt"), O = y ?? T("composer.send", "Send"), k = b ?? T("composer.stop", "Stop"), [A, j] = t(r, i, a), M = R(null), te = _ === "sm" ? 1 : 2, N = P(() => {
38
- let e = M.current;
39
- e && (e.style.height = "auto", e.style.height = `${Math.min(Math.max(e.scrollHeight, te * 20 + 16), g * 20 + 16)}px`);
40
- }, [g, te]);
41
- I(N, [N, A]);
42
- let ne = A.trim() === "", re = !f && !l && !d && !ne, F = () => {
43
- re && (o?.(A), p && r === void 0 && j(""));
44
- }, ie = fe(), L = c === "enter" && !ie, z = (e) => {
45
- e.key === "Enter" && (e.nativeEvent.isComposing || e.keyCode === 229 || (e.metaKey || e.ctrlKey || L && !e.shiftKey && !e.altKey) && (e.preventDefault(), F()));
36
+ var de = () => typeof window < "u" && !!window.matchMedia?.(J).matches, fe = () => oe(ue, de, () => !1), Y = /* @__PURE__ */ P(function({ value: r, defaultValue: i = "", onValueChange: a, onSubmit: o, onStop: s, submitOn: c = "enter", streaming: l = !1, loading: u = !1, disabled: f = !1, clearOnSubmit: p = !0, placeholder: m, "aria-label": h, maxRows: g = 10, size: _ = "md", actions: v, submitLabel: y, stopLabel: b, autoFocus: x, name: S, "data-force": C, className: w }, T) {
37
+ let E = n(), ee = m ?? E("composer.placeholder", "Write a prompt"), D = h ?? E("composer.prompt", "Prompt"), O = y ?? E("composer.send", "Send"), k = b ?? E("composer.stop", "Stop"), [A, j] = t(r, i, a), M = L(), N = z(null), te = _ === "sm" ? 1 : 2, ne = F(() => {
38
+ let e = N.current;
39
+ e && (e.style.setProperty("--scroll-area-overflow-y-start", `${Math.max(0, e.scrollTop)}px`), e.style.setProperty("--scroll-area-overflow-y-end", `${Math.max(0, e.scrollHeight - e.clientHeight - e.scrollTop)}px`));
40
+ }, []), P = F(() => {
41
+ let e = N.current;
42
+ e && (e.style.height = "auto", e.style.height = `${Math.min(Math.max(e.scrollHeight, te * 20 + 16), g * 20 + 16)}px`, ne());
43
+ }, [
44
+ g,
45
+ te,
46
+ ne
47
+ ]);
48
+ ae(P, [P, A]);
49
+ let re = A.trim() === "", ie = !f && !l && !u && !re, I = () => {
50
+ ie && (o?.(A), p && r === void 0 && j(""));
51
+ }, R = fe(), B = c === "enter" && !R, oe = (e) => {
52
+ e.key === "Enter" && (e.nativeEvent.isComposing || e.keyCode === 229 || (e.metaKey || e.ctrlKey || B && !e.shiftKey && !e.altKey) && (e.preventDefault(), I()));
46
53
  };
47
- return /* @__PURE__ */ V("form", {
54
+ return /* @__PURE__ */ H("form", {
48
55
  onSubmit: (e) => {
49
- e.preventDefault(), F();
56
+ e.preventDefault(), I();
50
57
  },
51
58
  onMouseDown: (e) => {
52
- e.target === e.currentTarget && !f && (e.preventDefault(), M.current?.focus());
59
+ if (f || e.button !== 0 || !e.currentTarget.contains(e.target)) return;
60
+ let t = e.target.closest("textarea, button, a, input, select, label, [role], [tabindex]");
61
+ t && e.currentTarget.contains(t) || (e.preventDefault(), N.current?.focus());
53
62
  },
54
63
  ...C ? { "data-force": C } : {},
55
64
  ...f ? { "data-disabled": "" } : {},
56
- className: e("flex min-w-0 cursor-text flex-col material-composer transition-control", le.size[_].classes, f && "cursor-not-allowed", ee),
57
- children: [/* @__PURE__ */ B("textarea", {
58
- ref: (e) => {
59
- M.current = e, typeof w == "function" ? w(e) : w && (w.current = e);
60
- },
61
- rows: te,
62
- value: A,
63
- onChange: (e) => j(e.target.value),
64
- onKeyDown: z,
65
- disabled: f,
66
- placeholder: E,
67
- "aria-label": D,
68
- "aria-keyshortcuts": L ? "Enter Meta+Enter Control+Enter" : "Meta+Enter Control+Enter",
69
- ...L ? { enterKeyHint: "send" } : {},
70
- autoFocus: x,
71
- ...S ? { name: S } : {},
72
- className: "block w-full min-w-0 resize-none bg-transparent px-16 pt-12 pb-4 text-body text-fg outline-none scrollbar-quiet placeholder:text-fg-tertiary disabled:cursor-not-allowed disabled:text-fg-disabled"
73
- }), /* @__PURE__ */ V("div", {
74
- className: "flex min-w-0 items-center gap-8 p-8 pt-4",
75
- children: [/* @__PURE__ */ B("div", {
76
- className: "flex min-w-0 flex-1 items-center gap-4",
77
- children: v
78
- }), l ? /* @__PURE__ */ B(u, {
79
- type: "button",
80
- size: "sm",
81
- variant: "secondary",
82
- reserveLabels: [O, k],
83
- onClick: () => s?.(),
65
+ className: e("flex min-w-0 cursor-text flex-col material-composer transition-control", q.size[_].classes, f && "cursor-not-allowed", w),
66
+ children: [
67
+ /* @__PURE__ */ V("textarea", {
68
+ ref: (e) => {
69
+ N.current = e, typeof T == "function" ? T(e) : T && (T.current = e);
70
+ },
71
+ rows: te,
72
+ value: A,
73
+ onChange: (e) => j(e.target.value),
74
+ onKeyDown: oe,
75
+ onScroll: ne,
84
76
  disabled: f,
85
- children: k
86
- }) : /* @__PURE__ */ B(u, {
87
- type: "submit",
88
- size: "sm",
89
- variant: "primary",
90
- reserveLabels: [O, k],
91
- loading: d,
92
- disabled: !re && !d,
93
- children: O
94
- })]
95
- })]
77
+ placeholder: ee,
78
+ "aria-label": D,
79
+ ...l && !re ? { "aria-describedby": M } : {},
80
+ "aria-keyshortcuts": B ? "Enter Meta+Enter Control+Enter" : "Meta+Enter Control+Enter",
81
+ ...B ? { enterKeyHint: "send" } : {},
82
+ autoFocus: x,
83
+ ...S ? { name: S } : {},
84
+ className: "block w-full min-w-0 resize-none bg-transparent px-16 pt-12 pb-4 text-body text-fg outline-none scrollbar-quiet scroll-fade-y placeholder:text-fg-tertiary disabled:cursor-not-allowed disabled:text-fg-disabled disabled:placeholder:text-fg-disabled"
85
+ }),
86
+ /* @__PURE__ */ V("span", {
87
+ id: M,
88
+ className: "sr-only",
89
+ children: E("composer.stopToSend", "A response is arriving; stop it to send this prompt.")
90
+ }),
91
+ /* @__PURE__ */ H("div", {
92
+ className: "flex min-w-0 items-center gap-8 p-8 pt-4 controls-on-fill",
93
+ children: [/* @__PURE__ */ V("div", {
94
+ className: "flex min-w-0 flex-1 items-center gap-4",
95
+ children: v
96
+ }), l ? /* @__PURE__ */ V(d, {
97
+ type: "button",
98
+ size: "sm",
99
+ variant: "secondary",
100
+ reserveLabels: [O, k],
101
+ onClick: () => s?.(),
102
+ disabled: f,
103
+ children: k
104
+ }) : /* @__PURE__ */ V(d, {
105
+ type: "submit",
106
+ size: "sm",
107
+ variant: "primary",
108
+ reserveLabels: [O, k],
109
+ loading: u,
110
+ disabled: !ie && !u,
111
+ children: O
112
+ })]
113
+ })
114
+ ]
96
115
  });
97
116
  });
98
- process.env.NODE_ENV !== "production" && (pe.displayName = "Composer");
117
+ process.env.NODE_ENV !== "production" && (Y.displayName = "Composer");
99
118
  //#endregion
100
119
  //#region src/components/playground/compare-grid.tsx
101
- var J = { divider: {
120
+ var X = { divider: {
102
121
  hairline: { classes: "hairline-l" },
103
122
  none: { classes: "" }
104
- } }, Y = { divider: "hairline" }, X = /* @__PURE__ */ te({
123
+ } }, Z = { divider: "hairline" }, pe = /* @__PURE__ */ ne({
105
124
  index: 0,
106
125
  count: 1,
107
126
  divider: "hairline",
108
- add: null
109
- }), me = /* @__PURE__ */ N(function({ children: t, "aria-label": r, onAdd: i, addLabel: a, max: o = 4, active: s, onActiveChange: c, divider: l = "hairline", className: u }, f) {
110
- let p = n(), m = M.toArray(t).filter(ne), h = m.length, g = R(null), [_, v] = z(0), y = Math.min(s ?? _, Math.max(0, h - 1)), b = R(null), x = R(c);
111
- I(() => {
127
+ add: null,
128
+ removing: () => {}
129
+ }), me = "button:not([disabled]), [href], input:not([disabled]), select, textarea, [tabindex]:not([tabindex='-1'])";
130
+ function he(e, t) {
131
+ let n = e?.querySelector("header");
132
+ ((t ? n?.querySelector(t) : null) ?? n?.querySelector(me))?.focus({ preventScroll: !0 });
133
+ }
134
+ var ge = /* @__PURE__ */ P(function({ children: t, "aria-label": r, onAdd: i, addLabel: a, max: o = 4, active: s, onActiveChange: c, divider: l = "hairline", className: u }, d) {
135
+ let p = n(), m = te.toArray(t).filter(re), h = m.length, g = z(null), [_, v] = B(0), y = Math.min(s ?? _, Math.max(0, h - 1)), b = z(null), x = z(c);
136
+ ae(() => {
112
137
  x.current = c;
113
138
  });
114
- let S = P((e) => {
139
+ let S = F((e) => {
115
140
  let t = g.current?.children[e], n = g.current;
116
141
  if (!t || !n) return;
117
142
  b.current = n.scrollLeft === t.offsetLeft ? null : e;
@@ -124,28 +149,44 @@ var J = { divider: {
124
149
  let t = Math.max(0, Math.min(h - 1, e));
125
150
  v(t), c?.(t), S(t);
126
151
  };
127
- F(() => {
152
+ I(() => {
128
153
  s !== void 0 && S(s);
129
154
  }, [s, S]);
130
- let ee = R(h);
131
- I(() => {
132
- h > ee.current && (v(h - 1), x.current?.(h - 1), S(h - 1)), ee.current = h;
155
+ let w = z(h), T = z(!1), E = z(null);
156
+ ae(() => {
157
+ let e = g.current?.children;
158
+ if (h > w.current) v(h - 1), x.current?.(h - 1), S(h - 1), T.current && he(e?.[h - 1]);
159
+ else if (h < w.current && E.current !== null) {
160
+ let t = Math.min(E.current, h - 1);
161
+ he(e?.[t], "[data-compare-remove]");
162
+ }
163
+ T.current = !1, E.current = null, w.current = h;
133
164
  }, [h, S]);
134
- let w = P(() => {
165
+ let ee = F((e) => {
166
+ E.current = e;
167
+ }, []), [D, O] = B(null), k = F(() => {
135
168
  let e = g.current;
136
169
  if (!e) return;
137
170
  let t = e.scrollWidth - e.clientWidth - e.scrollLeft;
138
171
  e.style.setProperty("--k-fade-start", e.scrollLeft > 1 ? "24px" : "0px"), e.style.setProperty("--k-fade-end", t > 1 ? "24px" : "0px");
172
+ let n = {
173
+ overflow: e.scrollWidth - e.clientWidth > 1,
174
+ start: e.scrollLeft <= 1,
175
+ end: t <= 1
176
+ };
177
+ O((e) => e && e.overflow === n.overflow && e.start === n.start && e.end === n.end ? e : n);
139
178
  }, []);
140
- I(() => {
179
+ ae(() => {
141
180
  let e = g.current;
142
181
  if (!e || typeof ResizeObserver > "u") return;
143
- w();
144
- let t = new ResizeObserver(w);
145
- return t.observe(e), () => t.disconnect();
146
- }, [w, h]);
147
- let T = () => {
148
- w();
182
+ k();
183
+ let t = new ResizeObserver(k);
184
+ t.observe(e);
185
+ for (let n of e.children) t.observe(n);
186
+ return () => t.disconnect();
187
+ }, [k, h]);
188
+ let A = () => {
189
+ k();
149
190
  let e = g.current, t = e?.children[0];
150
191
  if (!e || !t || !t.offsetWidth) return;
151
192
  let n = Math.max(0, Math.min(h - 1, Math.round(e.scrollLeft / t.offsetWidth)));
@@ -154,75 +195,96 @@ var J = { divider: {
154
195
  b.current = null;
155
196
  }
156
197
  n !== y && (v(n), c?.(n));
157
- }, E = () => {
198
+ }, j = () => {
158
199
  b.current = null;
159
- }, D = h >= o, O = i ? /* @__PURE__ */ B(d, {
160
- icon: se,
200
+ }, M = h >= o, N = i ? /* @__PURE__ */ V(f, {
201
+ icon: U,
161
202
  "aria-label": a ?? p("compareGrid.addModel", "Add model"),
162
203
  size: "sm",
163
- onClick: i,
164
- disabled: D,
165
- ...D ? { disabledReason: p("compareGrid.compareUpTo", "Compare up to {max} at once", { max: o }) } : {}
166
- }) : null, k = m[y]?.props.label ?? "";
167
- return /* @__PURE__ */ V("div", {
168
- ref: f,
204
+ onClick: () => {
205
+ T.current = !0, i();
206
+ },
207
+ disabled: M,
208
+ ...M ? { disabledReason: p("compareGrid.compareUpTo", "Compare up to {max} at once", { max: o }) } : {}
209
+ }) : null, ne = m[y]?.props.label ?? "", P = D?.overflow ? "flex" : "flex md:hidden", ie = D?.overflow ? D.start : y === 0, L = D?.overflow ? D.end : y >= h - 1, R = {
210
+ index: y + 1,
211
+ count: h
212
+ };
213
+ return /* @__PURE__ */ H("div", {
214
+ ref: d,
169
215
  role: "group",
170
216
  "aria-label": r,
171
217
  className: e("flex h-full min-h-0 min-w-0 flex-col", u),
172
- children: [h > 1 || i ? /* @__PURE__ */ V("div", {
173
- className: "flex h-44 shrink-0 items-center gap-4 px-24 hairline-b md:hidden",
218
+ children: [(h > 1 || D?.overflow) && /* @__PURE__ */ H("div", {
219
+ className: e("h-44 shrink-0 items-center gap-4 px-24 hairline-b", P),
174
220
  children: [
175
- /* @__PURE__ */ B(d, {
176
- icon: ce,
221
+ /* @__PURE__ */ V(f, {
222
+ icon: W,
177
223
  "aria-label": p("compareGrid.previousColumn", "Previous column"),
178
224
  size: "sm",
179
- disabled: y === 0,
225
+ disabled: ie,
180
226
  onClick: () => C(y - 1)
181
227
  }),
182
- /* @__PURE__ */ V("span", {
228
+ /* @__PURE__ */ H("span", {
183
229
  "aria-live": "polite",
184
230
  className: "min-w-0 flex-1 truncate text-center text-small text-fg-secondary tabular",
185
- children: [/* @__PURE__ */ B("span", {
231
+ children: [/* @__PURE__ */ V("span", {
186
232
  className: "sr-only",
187
- children: p("compareGrid.columnName", "{label}, ", { label: k })
188
- }), p("compareGrid.position", "{index} of {count}", {
189
- index: y + 1,
190
- count: h
233
+ children: p("compareGrid.namedPosition", "{label}, {index} of {count}", {
234
+ label: ne,
235
+ ...R
236
+ })
237
+ }), /* @__PURE__ */ V("span", {
238
+ "aria-hidden": !0,
239
+ children: p("compareGrid.position", "{index} of {count}", R)
191
240
  })]
192
241
  }),
193
- /* @__PURE__ */ B(d, {
194
- icon: H,
242
+ /* @__PURE__ */ V(f, {
243
+ icon: G,
195
244
  "aria-label": p("compareGrid.nextColumn", "Next column"),
196
245
  size: "sm",
197
- disabled: y >= h - 1,
246
+ disabled: L,
198
247
  onClick: () => C(y + 1)
199
248
  }),
200
- O
249
+ N && /* @__PURE__ */ V("span", {
250
+ className: "contents md:hidden",
251
+ children: N
252
+ })
201
253
  ]
202
- }) : null, /* @__PURE__ */ B("div", {
203
- ref: g,
204
- onScroll: T,
205
- onPointerDown: E,
206
- onWheel: E,
207
- onTouchStart: E,
208
- onKeyDown: E,
209
- className: "relative min-h-0 min-w-0 flex-1 compare-grid",
210
- children: m.map((e, t) => /* @__PURE__ */ B(X.Provider, {
211
- value: {
212
- index: t,
213
- count: h,
214
- divider: l,
215
- add: t === h - 1 ? O : null
216
- },
217
- children: e
218
- }, e.key ?? t))
254
+ }), /* @__PURE__ */ H("div", {
255
+ className: "flex min-h-0 min-w-0 flex-1",
256
+ children: [/* @__PURE__ */ V("div", {
257
+ ref: g,
258
+ onScroll: A,
259
+ onPointerDown: j,
260
+ onWheel: j,
261
+ onTouchStart: j,
262
+ onKeyDown: j,
263
+ className: "relative min-h-0 min-w-0 flex-1 compare-grid",
264
+ children: m.map((e, t) => /* @__PURE__ */ V(pe.Provider, {
265
+ value: {
266
+ index: t,
267
+ count: h,
268
+ divider: l,
269
+ add: h === 1 ? N : null,
270
+ removing: ee
271
+ },
272
+ children: e
273
+ }, e.key ?? t))
274
+ }), N && /* @__PURE__ */ V("div", {
275
+ className: e("hidden w-56 shrink-0 flex-col md:flex", X.divider[l].classes),
276
+ children: /* @__PURE__ */ V("div", {
277
+ className: "flex h-52 shrink-0 items-center justify-center hairline-b",
278
+ children: N
279
+ })
280
+ })]
219
281
  })]
220
282
  });
221
283
  });
222
- process.env.NODE_ENV !== "production" && (me.displayName = "CompareGrid");
223
- function he(e) {
224
- let t = R(null), n = R(null), r = R(!0);
225
- return F(() => {
284
+ process.env.NODE_ENV !== "production" && (ge.displayName = "CompareGrid");
285
+ function _e(e) {
286
+ let t = z(null), n = z(null), r = z(!0);
287
+ return I(() => {
226
288
  let i = t.current, a = n.current;
227
289
  if (!e || !i || !a || typeof ResizeObserver > "u") return;
228
290
  let o = i.scrollTop, s = () => {
@@ -242,48 +304,54 @@ function he(e) {
242
304
  content: n
243
305
  };
244
306
  }
245
- var Z = /* @__PURE__ */ N(function({ label: t, header: r, actions: i, children: a, footer: o, onRemove: s, removeLabel: c, stickToEnd: l = !0, className: u }, f) {
246
- let p = n(), { index: m, count: h, divider: g, add: _ } = re(X), { body: v, content: y } = he(l);
247
- return /* @__PURE__ */ V("section", {
248
- ref: f,
307
+ var ve = /* @__PURE__ */ P(function({ label: t, header: r, actions: i, children: a, footer: o, onRemove: s, removeLabel: c, stickToEnd: l = !0, className: u }, d) {
308
+ let p = n(), { index: m, count: h, divider: g, add: _, removing: v } = ie(pe), { body: y, content: b } = _e(l);
309
+ return /* @__PURE__ */ H("section", {
310
+ ref: d,
249
311
  "aria-label": t,
250
- className: e("row-span-3 grid min-h-0 min-w-0 snap-start snap-always grid-rows-subgrid", m > 0 && J.divider[g].classes, u),
312
+ className: e("row-span-3 grid min-h-0 min-w-0 snap-start snap-always grid-rows-subgrid", m > 0 && X.divider[g].classes, u),
251
313
  children: [
252
- /* @__PURE__ */ V("header", {
314
+ /* @__PURE__ */ H("header", {
253
315
  className: "flex h-52 min-w-0 items-center gap-4 px-24 hairline-b",
254
316
  children: [
255
- /* @__PURE__ */ B("div", {
317
+ /* @__PURE__ */ V("div", {
256
318
  className: "flex min-w-0 flex-1 items-center",
257
319
  children: r
258
320
  }),
259
321
  i,
260
- s && h > 1 && /* @__PURE__ */ B(d, {
261
- icon: U,
322
+ s && h > 1 && /* @__PURE__ */ V(f, {
323
+ "data-compare-remove": "",
324
+ icon: K,
262
325
  "aria-label": c ?? p("compareGrid.remove", "Remove {label}", { label: t }),
263
326
  size: "sm",
264
- onClick: s
327
+ onClick: () => {
328
+ v(m), s();
329
+ }
265
330
  }),
266
- _ && /* @__PURE__ */ B("span", {
267
- className: "hidden md:contents",
331
+ _ && /* @__PURE__ */ V("span", {
332
+ className: "flex shrink-0 md:hidden",
268
333
  children: _
269
334
  })
270
335
  ]
271
336
  }),
272
- /* @__PURE__ */ B("div", {
273
- ref: v,
274
- tabIndex: 0,
275
- "aria-label": p("compareGrid.thread", "{label} thread", { label: t }),
276
- role: "region",
277
- className: "relative min-h-0 overflow-y-auto overscroll-contain scrollbar-quiet scroll-fade-y focus-ring-inset",
278
- children: /* @__PURE__ */ B("div", {
337
+ /* @__PURE__ */ V("div", {
338
+ className: "min-h-0 min-w-0 compare-thread",
339
+ children: /* @__PURE__ */ V("div", {
279
340
  ref: y,
280
- className: "flex min-h-full flex-col px-24 pt-16 pb-24",
281
- children: a
341
+ tabIndex: 0,
342
+ "aria-label": p("compareGrid.thread", "{label} thread", { label: t }),
343
+ role: "region",
344
+ className: "relative h-full min-h-0 overflow-y-auto overscroll-contain outline-none scrollbar-quiet scroll-fade-y",
345
+ children: /* @__PURE__ */ V("div", {
346
+ ref: b,
347
+ className: "flex min-h-full flex-col px-24 pt-16 pb-24",
348
+ children: a
349
+ })
282
350
  })
283
351
  }),
284
- o != null && /* @__PURE__ */ B("footer", {
352
+ o != null && /* @__PURE__ */ V("footer", {
285
353
  className: "flex min-h-44 min-w-0 items-start px-24 pt-12 pb-12",
286
- children: /* @__PURE__ */ B("div", {
354
+ children: /* @__PURE__ */ V("div", {
287
355
  className: "min-w-0 px-12",
288
356
  children: o
289
357
  })
@@ -291,12 +359,12 @@ var Z = /* @__PURE__ */ N(function({ label: t, header: r, actions: i, children:
291
359
  ]
292
360
  });
293
361
  });
294
- process.env.NODE_ENV !== "production" && (Z.displayName = "CompareGrid.Column");
295
- var ge = /* @__PURE__ */ Object.assign(me, { Column: Z }), _e = { state: {
362
+ process.env.NODE_ENV !== "production" && (ve.displayName = "CompareGrid.Column");
363
+ var ye = /* @__PURE__ */ Object.assign(ge, { Column: ve }), be = { state: {
296
364
  done: { classes: "" },
297
365
  live: { classes: "" }
298
- } }, ve = { state: "done" };
299
- function ye(e) {
366
+ } }, Q = { state: "done" };
367
+ function xe(e) {
300
368
  let t = e.trim().split("\n");
301
369
  for (let e = t.length - 1; e >= 0; e--) {
302
370
  let n = (t[e] ?? "").replace(/[*_`#>]+/g, "").trim();
@@ -304,76 +372,74 @@ function ye(e) {
304
372
  }
305
373
  return "";
306
374
  }
307
- var be = /* @__PURE__ */ N(function({ text: t = "", live: r = !1, duration: i, title: o, hint: s, open: l, defaultOpen: u, onOpenChange: d, children: f, className: p }, m) {
308
- let h = n(), g = s ?? (r ? ye(t) : ""), _ = o ?? (!r && i !== void 0 ? h("responseView.thoughtFor", "Thought for {duration}", { duration: a(i) }) : h("responseView.thinking", "Thinking"));
309
- return /* @__PURE__ */ V(G.Root, {
310
- ref: m,
311
- ...l === void 0 ? {} : { open: l },
312
- ...u === void 0 ? {} : { defaultOpen: u },
313
- ...d ? { onOpenChange: (e) => d(e) } : {},
314
- className: e("flex min-w-0 flex-col", p),
315
- children: [/* @__PURE__ */ V(G.Trigger, {
316
- className: "group/think flex h-32 min-w-0 cursor-pointer items-center gap-6 rounded-pill px-12 text-left text-small text-fg-secondary transition-control hover:bg-fill-1 hover:text-fg focus-ring-inset",
317
- children: [
318
- /* @__PURE__ */ B("span", {
319
- className: e("shrink-0 font-medium", r && "animate-pulse-quiet reduced:animate-none"),
320
- children: _
321
- }),
322
- /* @__PURE__ */ B(c, {
323
- icon: H,
324
- size: "xs",
325
- className: "shrink-0 text-fg-tertiary transition-transform duration-180 ease-overlay group-data-panel-open/think:rotate-90"
326
- }),
327
- /* @__PURE__ */ B("span", {
328
- "aria-hidden": s === void 0,
329
- className: "min-w-0 flex-1 truncate text-fg-tertiary group-data-panel-open/think:invisible",
330
- children: g
331
- })
332
- ]
333
- }), /* @__PURE__ */ B(G.Panel, {
334
- className: "collapse-motion",
335
- children: /* @__PURE__ */ V("div", {
336
- className: "flex gap-12 pt-4 pb-8 pl-12",
337
- children: [/* @__PURE__ */ B("span", {
338
- "aria-hidden": !0,
339
- className: "w-1 shrink-0 rounded-pill bg-line"
340
- }), f ?? /* @__PURE__ */ B(j, {
341
- text: t,
342
- size: "small",
343
- tone: "secondary",
344
- streaming: r,
345
- collapseAfter: 0,
346
- wrapCode: !0,
347
- className: "min-w-0 flex-1"
348
- })]
349
- })
350
- })]
375
+ var Se = /* @__PURE__ */ P(function({ text: e = "", live: t = !1, duration: r, title: i, hint: o, open: s, defaultOpen: c, onOpenChange: l, children: u, className: d, "data-force": f }, p) {
376
+ let m = n(), h = i ?? (!t && r !== void 0 ? m("responseView.thoughtFor", "Thought for {duration}", { duration: a(r) }) : m("responseView.thinking", "Thinking"));
377
+ return /* @__PURE__ */ V(M, {
378
+ ref: p,
379
+ heading: h,
380
+ preview: o ?? (t ? xe(e) : ""),
381
+ previewHidden: o === void 0,
382
+ live: t,
383
+ open: s,
384
+ defaultOpen: c,
385
+ onOpenChange: l,
386
+ className: d,
387
+ "data-force": f,
388
+ children: u ?? /* @__PURE__ */ V(N, {
389
+ text: e,
390
+ size: "small",
391
+ tone: "secondary",
392
+ streaming: t,
393
+ collapseAfter: 0,
394
+ wrapCode: !0,
395
+ className: "min-w-0"
396
+ })
351
397
  });
352
398
  });
353
- process.env.NODE_ENV !== "production" && (be.displayName = "Reasoning");
399
+ process.env.NODE_ENV !== "production" && (Se.displayName = "Reasoning");
354
400
  //#endregion
355
401
  //#region src/components/playground/response-view.tsx
356
- var Q = { status: {
402
+ var Ce = { status: {
357
403
  pending: { classes: "" },
358
404
  streaming: { classes: "" },
359
405
  done: { classes: "" },
360
406
  stopped: { classes: "" },
361
407
  incomplete: { classes: "" },
362
408
  error: { classes: "" }
363
- } }, xe = { status: "done" };
364
- function Se(e, t) {
409
+ } }, we = { status: "done" };
410
+ function Te(e, t) {
365
411
  return t === "max_output_tokens" ? e("responseView.outputLimit", "Stopped at the output limit") : t === "content_filter" ? e("responseView.contentFilter", "Stopped by the provider's content filter") : e("responseView.incomplete", "The model ended the response early");
366
412
  }
367
- var Ce = /* @__PURE__ */ N(function({ text: t = "", reasoning: r, status: i = "done", reasoningDuration: a, reasoningOpen: o, defaultReasoningOpen: s, onReasoningOpenChange: c, incompleteReason: l, error: d, onRetry: f, footer: p, "aria-label": m, className: h }, g) {
368
- let _ = n(), v = m ?? _("responseView.response", "Response"), y = ie(), b = i === "pending" || i === "streaming", x = t.trim() !== "", S = !!r && r.trim() !== "", C = b && S && !x;
369
- return /* @__PURE__ */ V("article", {
413
+ var Ee = /* @__PURE__ */ V("span", {
414
+ "aria-hidden": !0,
415
+ "data-caret": "",
416
+ className: "ml-2 inline-block h-16 w-2 rounded-pill bg-fg-tertiary align-text-bottom animate-pulse-quiet forced-line reduced:animate-none"
417
+ });
418
+ function De(e, t) {
419
+ let [n, r] = B(""), i = z(e);
420
+ return I(() => {
421
+ let n = i.current;
422
+ i.current = e, e === "pending" || e === "streaming" ? r("") : (n === "pending" || n === "streaming") && e !== "error" && r(t);
423
+ }, [e, t]), n;
424
+ }
425
+ var Oe = /* @__PURE__ */ P(function({ text: t = "", reasoning: r, status: i = "done", reasoningDuration: a, reasoningOpen: o, defaultReasoningOpen: s, onReasoningOpenChange: c, incompleteReason: l, error: u, onRetry: f, footer: p, "aria-label": m, className: h }, g) {
426
+ let _ = n(), v = m ?? _("responseView.response", "Response"), y = L(), b = i === "pending" || i === "streaming", x = t.trim() !== "", S = !!r && r.trim() !== "", C = b && S && !x, w = De(i, i === "stopped" ? _("responseView.endedStopped", "{label} stopped", { label: v }) : i === "incomplete" ? _("responseView.endedIncomplete", "{label}: {reason}", {
427
+ label: v,
428
+ reason: Te(_, l)
429
+ }) : _("responseView.endedDone", "{label} finished", { label: v })), T = f ? /* @__PURE__ */ V(d, {
430
+ size: "sm",
431
+ variant: "secondary",
432
+ onClick: f,
433
+ children: _("responseView.retry", "Retry")
434
+ }) : null;
435
+ return /* @__PURE__ */ H("article", {
370
436
  ref: g,
371
437
  "aria-label": v,
372
438
  "aria-busy": b || void 0,
373
439
  "aria-describedby": y,
374
440
  className: e("flex min-w-0 flex-col gap-8", h),
375
441
  children: [
376
- S && /* @__PURE__ */ B(be, {
442
+ S && /* @__PURE__ */ V(Se, {
377
443
  text: r,
378
444
  live: C,
379
445
  duration: a,
@@ -381,213 +447,215 @@ var Ce = /* @__PURE__ */ N(function({ text: t = "", reasoning: r, status: i = "d
381
447
  defaultOpen: s,
382
448
  onOpenChange: c
383
449
  }),
384
- x ? /* @__PURE__ */ B(j, {
450
+ x ? /* @__PURE__ */ V(N, {
385
451
  text: t,
386
452
  size: "lg",
387
453
  streaming: b,
388
454
  collapseAfter: 0,
389
455
  wrapCode: !0,
390
- className: "px-12"
391
- }) : b && !S ? /* @__PURE__ */ B("div", {
456
+ trailing: i === "streaming" ? Ee : void 0,
457
+ className: "markdown-text-inset"
458
+ }) : b && !S ? /* @__PURE__ */ V("div", {
392
459
  "aria-hidden": !0,
393
- className: "h-22 px-12"
460
+ "data-pending": "",
461
+ className: "flex h-22 items-center px-12",
462
+ children: /* @__PURE__ */ V("span", { className: "h-16 w-2 rounded-pill bg-fg-tertiary animate-pulse-quiet forced-line reduced:animate-none" })
394
463
  }) : null,
395
- i === "stopped" && /* @__PURE__ */ V("div", {
396
- className: "flex min-h-24 flex-wrap items-center gap-x-12 gap-y-4 px-12",
397
- children: [/* @__PURE__ */ B("span", {
398
- className: "text-small text-fg-tertiary",
399
- children: x ? _("responseView.stopped", "Stopped") : _("responseView.stoppedBeforeResponse", "Stopped before a response")
400
- }), f && /* @__PURE__ */ B(u, {
401
- size: "xs",
402
- variant: "ghost",
403
- onClick: f,
404
- children: _("responseView.retry", "Retry")
405
- })]
406
- }),
407
- i === "incomplete" && /* @__PURE__ */ V("div", {
408
- className: "flex min-h-24 flex-wrap items-center gap-x-12 gap-y-4 px-12",
409
- children: [/* @__PURE__ */ B("span", {
464
+ (i === "stopped" || i === "incomplete") && /* @__PURE__ */ H("div", {
465
+ className: "flex min-h-32 flex-wrap items-center gap-x-12 gap-y-4 px-12",
466
+ children: [/* @__PURE__ */ V("span", {
410
467
  className: "text-small text-fg-secondary",
411
- children: Se(_, l)
412
- }), f && /* @__PURE__ */ B(u, {
413
- size: "xs",
414
- variant: "ghost",
415
- onClick: f,
416
- children: _("responseView.retry", "Retry")
417
- })]
468
+ children: i === "incomplete" ? Te(_, l) : x ? _("responseView.stopped", "Stopped") : _("responseView.stoppedBeforeResponse", "Stopped before a response")
469
+ }), T]
418
470
  }),
419
- i === "error" && /* @__PURE__ */ V("div", {
420
- role: "alert",
421
- className: "flex min-h-24 flex-col items-start gap-4 px-12",
422
- children: [
423
- /* @__PURE__ */ B("span", {
471
+ i === "error" && /* @__PURE__ */ H("div", {
472
+ className: "flex flex-col items-start gap-8 px-12",
473
+ children: [/* @__PURE__ */ H("div", {
474
+ role: "alert",
475
+ className: "flex min-w-0 flex-col gap-4",
476
+ children: [/* @__PURE__ */ V("span", {
424
477
  className: "text-small font-medium text-fg",
425
- children: x ? _("responseView.stoppedEarly", "The response stopped early") : _("responseView.noResponse", "No response")
426
- }),
427
- d && /* @__PURE__ */ B(j, {
428
- text: d,
478
+ children: x ? _("responseView.failedPartway", "The response failed partway") : _("responseView.noResponse", "No response")
479
+ }), u && /* @__PURE__ */ V(N, {
480
+ text: u,
429
481
  size: "small",
430
482
  tone: "secondary",
431
483
  className: "max-w-prose min-w-0"
432
- }),
433
- f && /* @__PURE__ */ B(u, {
434
- size: "xs",
435
- variant: "secondary",
436
- onClick: f,
437
- className: "mt-4",
438
- children: _("responseView.retry", "Retry")
439
- })
440
- ]
484
+ })]
485
+ }), T]
441
486
  }),
442
- i === "done" && !x && /* @__PURE__ */ B("span", {
487
+ i === "done" && !x && /* @__PURE__ */ V("span", {
443
488
  className: "px-12 text-small text-fg-tertiary",
444
489
  children: _("responseView.noText", "The model returned no text")
445
490
  }),
446
- p,
447
- /* @__PURE__ */ B("span", {
491
+ p != null && /* @__PURE__ */ V("div", {
492
+ className: "min-w-0 px-12",
493
+ children: p
494
+ }),
495
+ /* @__PURE__ */ V("span", {
448
496
  id: y,
449
497
  className: "sr-only",
450
498
  children: i === "pending" ? _("responseView.waiting", "Waiting for the response") : i === "streaming" ? _("responseView.responding", "Responding") : ""
499
+ }),
500
+ /* @__PURE__ */ V("span", {
501
+ role: "status",
502
+ className: "sr-only",
503
+ children: w
451
504
  })
452
505
  ]
453
506
  });
454
507
  });
455
- process.env.NODE_ENV !== "production" && (Ce.displayName = "ResponseView");
456
- var we = {
508
+ process.env.NODE_ENV !== "production" && (Oe.displayName = "ResponseView");
509
+ var ke = {
457
510
  2: "line-clamp-2",
458
511
  3: "line-clamp-3",
459
512
  4: "line-clamp-4",
460
513
  6: "line-clamp-6"
461
- }, Te = /* @__PURE__ */ N(function({ children: t, maxLines: r = 4, "aria-label": i, className: a }, o) {
462
- let s = n(), c = i ?? s("userMessage.prompt", "Prompt"), d = s("userMessage.showAll", "Show all"), f = s("userMessage.showLess", "Show less"), [p, m] = z(!1), h = R(null), g = l(h, r > 0 && !p);
463
- return /* @__PURE__ */ V("div", {
514
+ }, Ae = /* @__PURE__ */ P(function({ children: t, maxLines: r = 4, "aria-label": i, className: a }, o) {
515
+ let s = n(), c = i ?? s("userMessage.prompt", "Prompt"), l = s("userMessage.showAll", "Show all"), f = s("userMessage.showLess", "Show less"), [p, m] = B(!1), h = L(), g = z(null), _ = u(g, r > 0 && !p);
516
+ return /* @__PURE__ */ H("div", {
464
517
  ref: o,
465
518
  role: "group",
466
519
  "aria-label": c,
467
- className: e("flex min-w-0 flex-col items-start gap-2 px-12", a),
468
- children: [/* @__PURE__ */ B("p", {
469
- ref: h,
470
- className: e("max-w-prose min-w-0 text-body font-medium whitespace-pre-wrap wrap-break-word text-fg-secondary", r !== 0 && !p && we[r]),
520
+ className: e("flex min-w-0 flex-col items-start gap-2", a),
521
+ children: [/* @__PURE__ */ V("p", {
522
+ id: h,
523
+ ref: g,
524
+ className: e("max-w-prose min-w-0 px-12 text-body font-medium whitespace-pre-wrap wrap-break-word text-fg-secondary", r !== 0 && !p && ke[r]),
471
525
  children: t
472
- }), (g || p) && /* @__PURE__ */ B(u, {
473
- size: "xs",
474
- variant: "link",
475
- reserveLabels: [d, f],
526
+ }), (_ || p) && /* @__PURE__ */ V(d, {
527
+ size: "sm",
528
+ variant: "quiet",
529
+ "aria-expanded": p,
530
+ "aria-controls": h,
531
+ reserveLabels: [l, f],
476
532
  onClick: () => m((e) => !e),
477
- className: "text-fg-tertiary",
478
- children: p ? f : d
533
+ children: p ? f : l
479
534
  })]
480
535
  });
481
536
  });
482
- process.env.NODE_ENV !== "production" && (Te.displayName = "UserMessage");
483
- var Ee = /* @__PURE__ */ N(function({ children: t, className: n }, r) {
484
- return /* @__PURE__ */ B("div", {
537
+ process.env.NODE_ENV !== "production" && (Ae.displayName = "UserMessage");
538
+ var je = /* @__PURE__ */ P(function({ children: t, className: n }, r) {
539
+ return /* @__PURE__ */ V("div", {
485
540
  ref: r,
486
541
  className: e("flex min-w-0 flex-col gap-32", n),
487
542
  children: t
488
543
  });
489
544
  });
490
- process.env.NODE_ENV !== "production" && (Ee.displayName = "Thread");
545
+ process.env.NODE_ENV !== "production" && (je.displayName = "Thread");
491
546
  //#endregion
492
547
  //#region src/components/playground/response-metrics.tsx
493
- var De = { size: {
548
+ var Me = { size: {
494
549
  sm: { classes: "text-caption gap-x-12 gap-y-2" },
495
550
  md: { classes: "text-small gap-x-16 gap-y-4" }
496
- } }, Oe = { size: "sm" };
497
- function ke(e) {
551
+ } }, Ne = { size: "sm" };
552
+ function Pe(e) {
498
553
  return !Number.isFinite(e) || e < 0 ? "—" : a(e, { precise: !0 });
499
554
  }
500
- function Ae(e) {
501
- let [t, n] = z(() => Date.now());
502
- return F(() => {
555
+ function Fe(e) {
556
+ let [t, n] = B(() => Date.now());
557
+ return I(() => {
503
558
  if (e === void 0) return;
504
559
  n(Date.now());
505
560
  let t = setInterval(() => n(Date.now()), 100);
506
561
  return () => clearInterval(t);
507
562
  }, [e]), e === void 0 ? void 0 : Math.max(0, t - e);
508
563
  }
509
- function je(e) {
510
- return /[1-9]/.test(e) ? s(e, { decimals: 6 }) : s("0", { decimals: 0 });
564
+ function Ie(e) {
565
+ return /[1-9]/.test(e) ? s(e) : c("0", { decimals: 0 });
511
566
  }
512
567
  function $(e) {
513
568
  return typeof e == "number" && Number.isFinite(e);
514
569
  }
515
- function Me({ label: t, width: n, children: r }) {
516
- return /* @__PURE__ */ V("div", {
570
+ function Le({ label: e, reserve: t, children: n }) {
571
+ return /* @__PURE__ */ H("div", {
517
572
  className: "flex items-baseline gap-4 whitespace-nowrap",
518
- children: [/* @__PURE__ */ B("dt", {
573
+ children: [/* @__PURE__ */ V("dt", {
519
574
  className: "text-fg-tertiary",
520
- children: t
521
- }), /* @__PURE__ */ B("dd", {
522
- className: e("text-fg-secondary tabular", n),
523
- children: r
575
+ children: e
576
+ }), /* @__PURE__ */ H("dd", {
577
+ className: "inline-grid justify-items-start text-fg-secondary tabular",
578
+ children: [/* @__PURE__ */ V("span", {
579
+ className: "col-start-1 row-start-1",
580
+ children: n
581
+ }), /* @__PURE__ */ V("span", {
582
+ "aria-hidden": !0,
583
+ "data-reserve": t,
584
+ className: "invisible col-start-1 row-start-1 reserve-text"
585
+ })]
524
586
  })]
525
587
  });
526
588
  }
527
- var Ne = /* @__PURE__ */ N(function({ timeToFirstToken: t, duration: r, inputTokens: i, outputTokens: a, reasoningTokens: s, reasoning: c, live: l = !1, startedAt: u, cost: d, size: f = "sm", className: p }, m) {
528
- let h = n(), g = Ae(l && u !== void 0 && !$(r) ? u : void 0), _ = $(i) || $(a), v = d != null && d !== "", y = e("flex min-w-0 flex-wrap items-baseline", De.size[f].classes, p);
529
- if (!l && !_ && !v && !$(t) && !$(r) && !$(s)) return /* @__PURE__ */ B("dl", {
530
- ref: m,
531
- "aria-label": h("responseMetrics.metrics", "Metrics"),
532
- className: e(y, f === "sm" ? "min-h-16" : "min-h-18")
589
+ var Re = /* @__PURE__ */ P(function({ timeToFirstToken: t, duration: r, inputTokens: i, outputTokens: c, reasoningTokens: l, reasoning: u, live: d = !1, startedAt: f, cost: p, size: m = "sm", className: h }, g) {
590
+ let _ = n(), v = Fe(d && f !== void 0 && !$(r) ? f : void 0), y = $(i) || $(c), b = p != null && p !== "", x = e("flex min-w-0 flex-wrap items-baseline", Me.size[m].classes, h);
591
+ if (!d && !y && !b && !$(t) && !$(r) && !$(l)) return /* @__PURE__ */ V("dl", {
592
+ ref: g,
593
+ "aria-label": _("responseMetrics.metrics", "Metrics"),
594
+ className: e(x, m === "sm" ? "min-h-16" : "min-h-18")
533
595
  });
534
- let b = (e) => l || e, x = /* @__PURE__ */ V("span", {
596
+ let S = (e) => d || e, C = /* @__PURE__ */ H("span", {
535
597
  className: "text-fg-tertiary",
536
- children: [/* @__PURE__ */ B("span", {
598
+ children: [/* @__PURE__ */ V("span", {
537
599
  "aria-hidden": !0,
538
600
  children: "—"
539
- }), /* @__PURE__ */ B("span", {
601
+ }), /* @__PURE__ */ V("span", {
540
602
  className: "sr-only",
541
- children: h("responseMetrics.notYetKnown", "not yet known")
603
+ children: d ? _("responseMetrics.notYetKnown", "not yet known") : _("responseMetrics.notReported", "not reported")
542
604
  })]
543
- });
544
- return /* @__PURE__ */ V("dl", {
545
- ref: m,
546
- "aria-label": h("responseMetrics.metrics", "Metrics"),
547
- className: y,
605
+ }), w = (e) => e < 1e4 ? _("format.seconds", "{s} s", { s: o(Math.floor(e / 100) / 10, {
606
+ minimumFractionDigits: 1,
607
+ maximumFractionDigits: 1
608
+ }) }) : e < 6e4 ? _("format.seconds", "{s} s", { s: o(Math.floor(e / 1e3)) }) : a(Math.floor(e / 1e3) * 1e3), T = Pe(8880);
609
+ return /* @__PURE__ */ H("dl", {
610
+ ref: g,
611
+ "aria-label": _("responseMetrics.metrics", "Metrics"),
612
+ className: x,
548
613
  children: [
549
- b($(t)) && /* @__PURE__ */ B(Me, {
550
- label: h("responseMetrics.firstToken", "First token"),
551
- width: "min-w-40",
552
- children: $(t) ? ke(t) : x
614
+ S($(t)) && /* @__PURE__ */ V(Le, {
615
+ label: _("responseMetrics.firstToken", "First token"),
616
+ reserve: T,
617
+ children: $(t) ? Pe(t) : C
553
618
  }),
554
- b($(r)) && /* @__PURE__ */ B(Me, {
555
- label: h("responseMetrics.total", "Total"),
556
- width: "min-w-40",
557
- children: $(r) ? ke(r) : g === void 0 ? x : /* @__PURE__ */ B("span", {
619
+ S($(r)) && /* @__PURE__ */ V(Le, {
620
+ label: _("responseMetrics.total", "Total"),
621
+ reserve: T,
622
+ children: $(r) ? Pe(r) : v === void 0 ? C : /* @__PURE__ */ V("span", {
558
623
  className: "text-fg-tertiary",
559
- children: ke(g)
624
+ children: w(v)
560
625
  })
561
626
  }),
562
- b(_) && /* @__PURE__ */ B(Me, {
563
- label: h("responseMetrics.tokens", "Tokens"),
564
- width: "min-w-48",
565
- children: _ ? h("responseMetrics.tokensValue", "{input} in · {output} out", {
627
+ S(y) && /* @__PURE__ */ V(Le, {
628
+ label: _("responseMetrics.tokens", "Tokens"),
629
+ reserve: _("responseMetrics.tokensValue", "{input} in · {output} out", {
630
+ input: o(8888),
631
+ output: o(888)
632
+ }),
633
+ children: y ? _("responseMetrics.tokensValue", "{input} in · {output} out", {
566
634
  input: $(i) ? o(i) : "—",
567
- output: $(a) ? o(a) : "—"
568
- }) : x
635
+ output: $(c) ? o(c) : "—"
636
+ }) : C
569
637
  }),
570
- ($(s) || l && c) && /* @__PURE__ */ B(Me, {
571
- label: h("responseMetrics.reasoning", "Reasoning"),
572
- width: "min-w-24",
573
- children: $(s) ? o(s) : x
638
+ ($(l) || u) && /* @__PURE__ */ V(Le, {
639
+ label: _("responseMetrics.reasoning", "Reasoning"),
640
+ reserve: o(888),
641
+ children: $(l) ? o(l) : C
574
642
  }),
575
- b(v) && /* @__PURE__ */ B(Me, {
576
- label: h("responseMetrics.cost", "Cost"),
577
- width: "min-w-40",
578
- children: v ? je(d) : x
643
+ S(b) && /* @__PURE__ */ V(Le, {
644
+ label: _("responseMetrics.cost", "Cost"),
645
+ reserve: s("0.008888"),
646
+ children: b ? Ie(p) : C
579
647
  })
580
648
  ]
581
649
  });
582
650
  });
583
- process.env.NODE_ENV !== "production" && (Ne.displayName = "ResponseMetrics");
651
+ process.env.NODE_ENV !== "production" && (Re.displayName = "ResponseMetrics");
584
652
  //#endregion
585
653
  //#region src/components/playground/parameter-panel.tsx
586
- var Pe = { layout: {
654
+ var ze = { layout: {
587
655
  popover: { classes: "w-full gap-20" },
588
656
  panel: { classes: "w-full gap-24" }
589
- } }, Fe = { layout: "popover" };
590
- function Ie(e) {
657
+ } }, Be = { layout: "popover" };
658
+ function Ve(e) {
591
659
  return [
592
660
  {
593
661
  value: "none",
@@ -619,26 +687,25 @@ function Ie(e) {
619
687
  }
620
688
  ];
621
689
  }
622
- function Le({ label: t, value: r, unset: i, min: a, max: s, step: c, digits: l, disabled: u, onChange: d }) {
623
- let f = ie(), p = n(), m = o(r, {
690
+ function He({ label: t, value: r, unset: i, min: a, max: s, step: c, digits: l, disabled: u, onChange: d }) {
691
+ let f = n(), p = o(r, {
624
692
  minimumFractionDigits: l,
625
693
  maximumFractionDigits: l
626
694
  });
627
- return /* @__PURE__ */ V("div", {
695
+ return /* @__PURE__ */ H("div", {
628
696
  className: "flex flex-col gap-8",
629
- children: [/* @__PURE__ */ V("div", {
697
+ children: [/* @__PURE__ */ H("div", {
630
698
  className: "flex items-baseline justify-between gap-12",
631
- children: [/* @__PURE__ */ B("span", {
632
- id: f,
699
+ children: [/* @__PURE__ */ V("span", {
633
700
  className: e("text-body font-medium", u ? "text-fg-disabled" : "text-fg"),
634
701
  children: t
635
- }), /* @__PURE__ */ B("span", {
702
+ }), /* @__PURE__ */ V("span", {
636
703
  className: e("text-small tabular", i ? "text-fg-tertiary" : "text-fg-secondary"),
637
- children: i ? p("parameterPanel.valueDefault", "{value} default", { value: m }) : m
704
+ children: i ? f("parameterPanel.valueDefault", "{value} (default)", { value: p }) : p
638
705
  })]
639
- }), /* @__PURE__ */ B("div", {
706
+ }), /* @__PURE__ */ V("div", {
640
707
  className: "px-8",
641
- children: /* @__PURE__ */ B(_, {
708
+ children: /* @__PURE__ */ V(v, {
642
709
  "aria-label": t,
643
710
  min: a,
644
711
  max: s,
@@ -654,186 +721,206 @@ function Le({ label: t, value: r, unset: i, min: a, max: s, step: c, digits: l,
654
721
  })]
655
722
  });
656
723
  }
657
- var Re = /* @__PURE__ */ N(function({ value: t, onValueChange: r, defaults: i, instructions: a = !0, sampling: o = !0, reasoning: s = !1, maxOutputTokensLimit: c, disabled: l = !1, layout: d = "popover", className: f }, p) {
658
- let m = n(), _ = (e) => r({
724
+ var Ue = /* @__PURE__ */ P(function({ value: t, onValueChange: r, defaults: i, instructions: a = !0, sampling: s = !0, reasoning: c = !1, maxOutputTokensLimit: l, disabled: u = !1, layout: f = "popover", className: p }, m) {
725
+ let h = n(), v = (e) => r({
659
726
  ...t,
660
727
  ...e
661
- }), v = Ie(m), b = s === !0 ? v : Array.isArray(s) ? v.filter((e) => s.includes(e.value)) : [], S = t.temperature !== void 0 || t.topP !== void 0 || t.maxOutputTokens !== void 0 || t.reasoningEffort !== void 0 || t.reasoningSummary !== void 0;
662
- return /* @__PURE__ */ V("div", {
663
- ref: p,
664
- className: e("flex min-w-0 flex-col", Pe.layout[d].classes, f),
728
+ }), y = Ve(h), x = c === !0 ? y : Array.isArray(c) ? y.filter((e) => c.includes(e.value)) : [], C = t.temperature !== void 0 || t.topP !== void 0 || t.maxOutputTokens !== void 0 || t.reasoningEffort !== void 0 || t.reasoningSummary !== void 0;
729
+ return /* @__PURE__ */ H("div", {
730
+ ref: m,
731
+ className: e("flex min-w-0 flex-col", ze.layout[f].classes, p),
665
732
  children: [
666
- a && /* @__PURE__ */ B(g, {
667
- label: m("parameterPanel.systemInstructions", "System instructions"),
733
+ a && /* @__PURE__ */ V(_, {
734
+ label: h("parameterPanel.systemInstructions", "System instructions"),
668
735
  rows: 3,
669
736
  maxRows: 8,
670
- placeholder: m("parameterPanel.instructionsPlaceholder", "You are a helpful assistant."),
737
+ placeholder: h("parameterPanel.instructionsPlaceholder", "You are a helpful assistant."),
671
738
  value: t.instructions ?? "",
672
- disabled: l,
673
- onChange: (e) => _({ instructions: e.target.value === "" ? void 0 : e.target.value })
739
+ disabled: u,
740
+ onChange: (e) => v({ instructions: e.target.value === "" ? void 0 : e.target.value })
674
741
  }),
675
- o && /* @__PURE__ */ V(oe, { children: [/* @__PURE__ */ B(Le, {
676
- label: m("parameterPanel.temperature", "Temperature"),
742
+ s && /* @__PURE__ */ H(se, { children: [/* @__PURE__ */ V(He, {
743
+ label: h("parameterPanel.temperature", "Temperature"),
677
744
  value: t.temperature ?? i?.temperature ?? 1,
678
745
  unset: t.temperature === void 0,
679
746
  min: 0,
680
747
  max: 2,
681
748
  step: .05,
682
749
  digits: 2,
683
- disabled: l,
684
- onChange: (e) => _({ temperature: e })
685
- }), /* @__PURE__ */ B(Le, {
686
- label: m("parameterPanel.topP", "Top P"),
750
+ disabled: u,
751
+ onChange: (e) => v({ temperature: e })
752
+ }), /* @__PURE__ */ V(He, {
753
+ label: h("parameterPanel.topP", "Top P"),
687
754
  value: t.topP ?? i?.topP ?? 1,
688
755
  unset: t.topP === void 0,
689
756
  min: 0,
690
757
  max: 1,
691
758
  step: .01,
692
759
  digits: 2,
693
- disabled: l,
694
- onChange: (e) => _({ topP: e })
760
+ disabled: u,
761
+ onChange: (e) => v({ topP: e })
695
762
  })] }),
696
- /* @__PURE__ */ B(h, {
697
- label: m("parameterPanel.maxOutputTokens", "Max output tokens"),
763
+ /* @__PURE__ */ V(g, {
764
+ label: h("parameterPanel.maxOutputTokens", "Max output tokens"),
698
765
  size: "sm",
699
- placeholder: m("parameterPanel.modelDefault", "Model default"),
766
+ placeholder: h("parameterPanel.modelDefault", "Model default"),
700
767
  align: "start",
701
768
  min: "1",
702
- ...c ? { max: String(c) } : {},
769
+ ...l ? {
770
+ max: String(l),
771
+ description: h("parameterPanel.maxOutputTokensLimit", "Up to {max} for this model", { max: o(l) })
772
+ } : {},
703
773
  step: "256",
704
774
  value: t.maxOutputTokens === void 0 ? "" : String(t.maxOutputTokens),
705
- disabled: l,
775
+ disabled: u,
706
776
  onValueChange: (e) => {
707
777
  let t = Number(e);
708
- _({ maxOutputTokens: e.trim() === "" || !Number.isFinite(t) || t <= 0 ? void 0 : Math.round(t) });
778
+ v({ maxOutputTokens: e.trim() === "" || !Number.isFinite(t) || t <= 0 ? void 0 : Math.round(t) });
709
779
  }
710
780
  }),
711
- b.length > 0 && /* @__PURE__ */ V(oe, { children: [/* @__PURE__ */ B(x, {
712
- label: m("parameterPanel.reasoningEffort", "Reasoning effort"),
781
+ x.length > 0 && /* @__PURE__ */ H(se, { children: [/* @__PURE__ */ V(S, {
782
+ label: h("parameterPanel.reasoningEffort", "Reasoning effort"),
713
783
  size: "sm",
714
784
  fullWidth: !0,
715
- disabled: l,
785
+ disabled: u,
716
786
  value: t.reasoningEffort ?? "default",
717
787
  options: [{
718
788
  value: "default",
719
- label: m("parameterPanel.modelDefault", "Model default")
720
- }, ...b],
721
- onValueChange: (e) => _({ reasoningEffort: e === "default" ? void 0 : e })
722
- }), /* @__PURE__ */ V("div", {
789
+ label: h("parameterPanel.modelDefault", "Model default")
790
+ }, ...x],
791
+ onValueChange: (e) => v({ reasoningEffort: e === "default" ? void 0 : e })
792
+ }), /* @__PURE__ */ H("div", {
723
793
  className: "flex flex-col gap-8",
724
- children: [/* @__PURE__ */ B("span", {
725
- className: e("text-body font-medium", l ? "text-fg-disabled" : "text-fg"),
726
- children: m("parameterPanel.reasoningSummary", "Reasoning summary")
727
- }), /* @__PURE__ */ B(y, {
728
- "aria-label": m("parameterPanel.reasoningSummary", "Reasoning summary"),
794
+ children: [/* @__PURE__ */ V("span", {
795
+ className: e("text-body font-medium", u ? "text-fg-disabled" : "text-fg"),
796
+ children: h("parameterPanel.reasoningSummary", "Reasoning summary")
797
+ }), /* @__PURE__ */ V(b, {
798
+ "aria-label": h("parameterPanel.reasoningSummary", "Reasoning summary"),
729
799
  size: "sm",
730
800
  fullWidth: !0,
731
- disabled: l,
801
+ disabled: u,
732
802
  value: t.reasoningSummary ?? "auto",
733
803
  options: [
734
804
  {
735
805
  value: "auto",
736
- label: m("parameterPanel.summaryAuto", "Auto")
806
+ label: h("parameterPanel.summaryAuto", "Auto")
737
807
  },
738
808
  {
739
809
  value: "concise",
740
- label: m("parameterPanel.summaryConcise", "Concise")
810
+ label: h("parameterPanel.summaryConcise", "Concise")
741
811
  },
742
812
  {
743
813
  value: "detailed",
744
- label: m("parameterPanel.summaryDetailed", "Detailed")
814
+ label: h("parameterPanel.summaryDetailed", "Detailed")
745
815
  },
746
816
  {
747
817
  value: "off",
748
- label: m("parameterPanel.summaryOff", "Off")
818
+ label: h("parameterPanel.summaryOff", "Off")
749
819
  }
750
820
  ],
751
- onValueChange: (e) => _({ reasoningSummary: e === "auto" ? void 0 : e })
821
+ onValueChange: (e) => v({ reasoningSummary: e === "auto" ? void 0 : e })
752
822
  })]
753
823
  })] }),
754
- /* @__PURE__ */ B("div", {
824
+ /* @__PURE__ */ V("div", {
755
825
  className: "flex justify-end",
756
- children: /* @__PURE__ */ B(u, {
826
+ children: /* @__PURE__ */ V(d, {
757
827
  size: "sm",
758
828
  variant: "ghost",
759
- disabled: l || !S,
829
+ disabled: u || !C,
760
830
  onClick: () => r(t.instructions === void 0 ? {} : { instructions: t.instructions }),
761
- children: m("parameterPanel.resetToDefaults", "Reset to defaults")
831
+ children: h("parameterPanel.resetToDefaults", "Reset to defaults")
762
832
  })
763
833
  })
764
834
  ]
765
835
  });
766
836
  });
767
- process.env.NODE_ENV !== "production" && (Re.displayName = "ParameterPanel");
768
- var ze = /* @__PURE__ */ N(function({ trigger: e, title: t, open: r, defaultOpen: i, onOpenChange: a, side: o = "bottom", align: s = "end", ...c }, l) {
769
- let u = n(), f = t ?? u("parameterPopover.parameters", "Parameters");
770
- return /* @__PURE__ */ V(S, {
837
+ process.env.NODE_ENV !== "production" && (Ue.displayName = "ParameterPanel");
838
+ var We = /* @__PURE__ */ P(function({ trigger: e, title: t, open: r, defaultOpen: i, onOpenChange: a, side: o = "bottom", align: s = "end", ...c }, l) {
839
+ let u = n(), d = t ?? u("parameterPopover.parameters", "Parameters");
840
+ return /* @__PURE__ */ H(C, {
771
841
  trapFocus: !0,
772
842
  ...r === void 0 ? {} : { open: r },
773
843
  ...i === void 0 ? {} : { defaultOpen: i },
774
844
  ...a ? { onOpenChange: a } : {},
775
- children: [/* @__PURE__ */ B(S.Trigger, { children: e ?? /* @__PURE__ */ B(d, {
776
- icon: W,
777
- "aria-label": f,
845
+ children: [/* @__PURE__ */ V(C.Trigger, { children: e ?? /* @__PURE__ */ V(f, {
846
+ icon: ce,
847
+ "aria-label": d,
778
848
  size: "sm"
779
- }) }), /* @__PURE__ */ B(S.Content, {
849
+ }) }), /* @__PURE__ */ V(C.Content, {
780
850
  ref: l,
781
- title: f,
851
+ "aria-label": d,
782
852
  side: o,
783
853
  align: s,
784
854
  className: "w-320 max-w-(--available-width)",
785
- children: /* @__PURE__ */ B(Re, { ...c })
855
+ children: /* @__PURE__ */ H("div", {
856
+ className: "relative",
857
+ children: [
858
+ /* @__PURE__ */ V("p", {
859
+ className: "mb-16 flex min-h-32 items-center pr-40 text-body font-semibold text-fg",
860
+ children: d
861
+ }),
862
+ /* @__PURE__ */ V(Ue, { ...c }),
863
+ /* @__PURE__ */ V("div", {
864
+ className: "absolute top-0 right-0",
865
+ children: /* @__PURE__ */ V(C.Close, { children: /* @__PURE__ */ V(f, {
866
+ icon: K,
867
+ "aria-label": u("parameterPopover.close", "Close parameters"),
868
+ size: "sm"
869
+ }) })
870
+ })
871
+ ]
872
+ })
786
873
  })]
787
874
  });
788
875
  });
789
- process.env.NODE_ENV !== "production" && (ze.displayName = "ParameterPopover");
876
+ process.env.NODE_ENV !== "production" && (We.displayName = "ParameterPopover");
790
877
  //#endregion
791
878
  //#region src/components/playground/model-picker.tsx
792
- var Be = {
879
+ var Ge = {
793
880
  ghost: "header",
794
881
  default: "default"
795
- }, Ve = { appearance: {
796
- ghost: { classes: b.appearance.header.classes },
797
- default: { classes: b.appearance.default.classes }
798
- } }, He = { appearance: "ghost" }, Ue = "", We = "*";
799
- function Ge({ option: t, query: n, providerLabel: r }) {
882
+ }, Ke = { appearance: {
883
+ ghost: { classes: x.appearance.header.classes },
884
+ default: { classes: x.appearance.default.classes }
885
+ } }, qe = { appearance: "ghost" }, Je = "", Ye = "*";
886
+ function Xe({ option: t, query: n, providerLabel: r }) {
800
887
  let a = t.model ?? t.value, o = [t.context ? i(t.context) : "", t.price ?? ""].filter(Boolean).join(" · ");
801
- return /* @__PURE__ */ V(oe, { children: [
802
- r !== void 0 && /* @__PURE__ */ B("span", {
888
+ return /* @__PURE__ */ H(se, { children: [
889
+ r !== void 0 && /* @__PURE__ */ V("span", {
803
890
  "aria-hidden": !0,
804
891
  className: "flex",
805
- children: /* @__PURE__ */ B(D, {
892
+ children: /* @__PURE__ */ V(O, {
806
893
  provider: t.provider,
807
894
  name: r
808
895
  })
809
896
  }),
810
- /* @__PURE__ */ V("span", {
897
+ /* @__PURE__ */ H("span", {
811
898
  className: "flex min-w-0 flex-1 items-baseline gap-8",
812
- children: [/* @__PURE__ */ B("span", {
899
+ children: [/* @__PURE__ */ V("span", {
813
900
  className: "min-w-0 shrink truncate",
814
- children: /* @__PURE__ */ B(C, {
901
+ children: /* @__PURE__ */ V(w, {
815
902
  text: t.name ?? a,
816
903
  query: n
817
904
  })
818
- }), t.name && t.name !== a && /* @__PURE__ */ B("span", {
905
+ }), t.name && t.name !== a && /* @__PURE__ */ V("span", {
819
906
  className: "min-w-0 flex-1 truncate mono text-small font-regular text-fg-tertiary",
820
- children: /* @__PURE__ */ B(C, {
907
+ children: /* @__PURE__ */ V(w, {
821
908
  text: a,
822
909
  query: n
823
910
  })
824
911
  })]
825
912
  }),
826
- t.capabilities && t.capabilities.length > 0 && /* @__PURE__ */ B(A, {
913
+ t.capabilities && t.capabilities.length > 0 && /* @__PURE__ */ V(j, {
827
914
  capabilities: t.capabilities,
828
915
  className: "hidden sm:flex"
829
916
  }),
830
- (t.note ?? o) && /* @__PURE__ */ B("span", {
917
+ (t.note ?? o) && /* @__PURE__ */ V("span", {
831
918
  className: e("shrink-0 text-caption font-regular tabular", t.note ? "text-fg-secondary" : "hidden text-fg-tertiary sm:inline"),
832
919
  children: t.note ?? o
833
920
  })
834
921
  ] });
835
922
  }
836
- function Ke(e, t, n) {
923
+ function Ze(e, t, n) {
837
924
  let r = e.model ?? e.value, i = t(e.provider);
838
925
  return {
839
926
  value: e.value,
@@ -843,7 +930,7 @@ function Ke(e, t, n) {
843
930
  i,
844
931
  e.provider
845
932
  ],
846
- render: ({ query: t }) => /* @__PURE__ */ B(Ge, {
933
+ render: ({ query: t }) => /* @__PURE__ */ V(Xe, {
847
934
  option: e,
848
935
  query: t,
849
936
  ...n ? { providerLabel: i } : {}
@@ -851,34 +938,34 @@ function Ke(e, t, n) {
851
938
  ...e.disabled ? { disabled: !0 } : {}
852
939
  };
853
940
  }
854
- function qe(e, t, n, r) {
941
+ function Qe(e, t, n, r) {
855
942
  return n ? t.flatMap((t) => {
856
943
  let n = e.filter((e) => e.provider === t);
857
944
  return n.length ? [{
858
945
  id: `provider:${t}`,
859
946
  label: r(t),
860
- leading: /* @__PURE__ */ B("span", {
947
+ leading: /* @__PURE__ */ V("span", {
861
948
  "aria-hidden": !0,
862
949
  className: "flex",
863
- children: /* @__PURE__ */ B(D, {
950
+ children: /* @__PURE__ */ V(O, {
864
951
  provider: t,
865
952
  name: r(t),
866
953
  size: "sm"
867
954
  })
868
955
  }),
869
956
  count: n.length,
870
- items: n.map((e) => Ke(e, r, !1))
957
+ items: n.map((e) => Ze(e, r, !1))
871
958
  }] : [];
872
959
  }) : [{
873
960
  id: "models",
874
- items: e.map((e) => Ke(e, r, !0))
961
+ items: e.map((e) => Ze(e, r, !0))
875
962
  }];
876
963
  }
877
- function Je(e, t) {
878
- let n = r(), i = L(() => new Map(t.map((e) => [e.id, e])), [t]), a = P((e) => O(e, i.get(e)?.name), [i]);
964
+ function $e(e, t) {
965
+ let n = r(), i = R(() => new Map(t.map((e) => [e.id, e])), [t]), a = F((e) => k(e, i.get(e)?.name), [i]);
879
966
  return {
880
967
  nameOf: a,
881
- providerOrder: L(() => [...new Set(e.map((e) => e.provider))].sort((e, t) => Number(!!i.get(t)?.connected) - Number(!!i.get(e)?.connected) || a(e).localeCompare(a(t), n, { sensitivity: "base" })), [
968
+ providerOrder: R(() => [...new Set(e.map((e) => e.provider))].sort((e, t) => Number(!!i.get(t)?.connected) - Number(!!i.get(e)?.connected) || a(e).localeCompare(a(t), n, { sensitivity: "base" })), [
882
969
  e,
883
970
  i,
884
971
  a,
@@ -886,202 +973,230 @@ function Je(e, t) {
886
973
  ])
887
974
  };
888
975
  }
889
- function Ye(e, { providers: t = [], groupByProvider: n } = {}) {
890
- let { nameOf: r, providerOrder: i } = Je(e, t), a = n ?? i.length > 1;
891
- return L(() => qe(e, i, a, r), [
976
+ function et(e, { providers: t = [], groupByProvider: n } = {}) {
977
+ let { nameOf: r, providerOrder: i } = $e(e, t), a = n ?? i.length > 1;
978
+ return R(() => Qe(e, i, a, r), [
892
979
  e,
893
980
  i,
894
981
  a,
895
982
  r
896
983
  ]);
897
984
  }
898
- var Xe = /* @__PURE__ */ N(function(t, r) {
899
- let { options: i, providers: a = [], recent: s = [], groupByProvider: c, placeholder: l, "aria-label": u, appearance: d = "ghost", size: h = "sm", fullWidth: g, disabled: _, invalid: y, open: b, onOpenChange: S, "data-force": C, className: O, label: A, description: j, error: M, optional: te, required: N, layout: ne } = t, P = n(), re = f(), F = p(t), [ie, I] = z(!1), R = b ?? ie, ae = (e) => {
900
- b === void 0 && I(e), S?.(e);
901
- }, [se, ce] = z(() => t.defaultValue ?? (t.multiple ? [] : null)), H = t.value === void 0 ? se : t.value, U = Array.isArray(H) ? H : H ? [H] : [], W = t.multiple ? void 0 : t.allLabel, [G, le] = z(""), [K, ue] = z(null), [q, de] = z(!1), [fe, pe] = z(R);
902
- R !== fe && (pe(R), R && (le(""), ue(null)));
903
- let J = L(() => new Map(i.map((e) => [e.value, e])), [i]), { nameOf: Y, providerOrder: X } = Je(i, a), me = c ?? X.length > 1, he = i.some((e) => e.deprecated && !U.includes(e.value)), Z = U.join("\0"), ge = L(() => {
904
- let e = new Set(Z.split("\0")), t = (t) => (q || !t.deprecated || e.has(t.value)) && (!K || t.provider === K), n = [];
905
- W && !K && n.push({
985
+ var tt = /* @__PURE__ */ P(function(t, r) {
986
+ let { options: i, providers: a = [], recent: s = [], groupByProvider: c, placeholder: l, "aria-label": u, appearance: d = "ghost", size: f = "sm", fullWidth: g, disabled: _, invalid: v, open: b, onOpenChange: x, "data-force": C, className: w, label: k, description: j, error: M, optional: N, required: te, layout: ne } = t, P = n(), re = p(), F = m(t), [ie, I] = B(!1), L = b ?? ie, ae = (e) => {
987
+ b === void 0 && I(e), x?.(e);
988
+ }, [z, oe] = B(() => t.defaultValue ?? (t.multiple ? [] : null)), U = t.value === void 0 ? z : t.value, W = Array.isArray(U) ? U : U ? [U] : [], G = t.multiple ? void 0 : t.allLabel, [K, ce] = B(""), [q, le] = B(null), [J, ue] = B(!1), [de, fe] = B(L);
989
+ L !== de && (fe(L), L && (ce(""), le(null)));
990
+ let Y = R(() => new Map(i.map((e) => [e.value, e])), [i]), { nameOf: X, providerOrder: Z } = $e(i, a), pe = c ?? Z.length > 1, me = i.some((e) => e.deprecated && !W.includes(e.value)), he = W.join("\0"), ge = R(() => {
991
+ let e = new Set(he.split("\0")), t = (t) => (J || !t.deprecated || e.has(t.value)) && (!q || t.provider === q), n = [];
992
+ G && !q && n.push({
906
993
  id: "all",
907
994
  items: [{
908
- value: Ue,
909
- label: W
995
+ value: Je,
996
+ label: G
910
997
  }]
911
998
  });
912
- let r = G.trim() || K ? [] : s.flatMap((e) => J.get(e) && t(J.get(e)) ? [Ke(J.get(e), Y, !0)] : []);
999
+ let r = K.trim() || q ? [] : s.flatMap((e) => Y.get(e) && t(Y.get(e)) ? [Ze(Y.get(e), X, !0)] : []);
913
1000
  return r.length && n.push({
914
1001
  id: "recent",
915
1002
  label: P("modelPicker.recent", "Recent"),
916
1003
  items: r
917
- }), [...n, ...qe(i.filter(t), X, me, Y)];
1004
+ }), [...n, ...Qe(i.filter(t), Z, pe, X)];
918
1005
  }, [
919
1006
  i,
920
- X,
921
- me,
1007
+ Z,
1008
+ pe,
922
1009
  s,
923
- J,
924
- G,
1010
+ Y,
925
1011
  K,
926
1012
  q,
927
- Z,
928
- W,
1013
+ J,
1014
+ he,
1015
+ G,
929
1016
  P,
930
- Y
1017
+ X
931
1018
  ]), _e = (e) => {
932
1019
  if (t.multiple) {
933
- let n = U.includes(e) ? U.filter((t) => t !== e) : [...U, e];
934
- t.value === void 0 && ce(n), t.onValueChange?.(n);
935
- } else t.value === void 0 && ce(e === Ue ? null : e), t.onValueChange?.(e), ae(!1);
936
- }, ve = L(() => {
937
- let e = G.trim(), t = new Set(Z.split("\0")), n = /* @__PURE__ */ new Map();
1020
+ let n = W.includes(e) ? W.filter((t) => t !== e) : [...W, e];
1021
+ t.value === void 0 && oe(n), t.onValueChange?.(n);
1022
+ } else t.value === void 0 && oe(e === Je ? null : e), t.onValueChange?.(e), ae(!1);
1023
+ }, ve = R(() => {
1024
+ let e = K.trim(), t = new Set(he.split("\0")), n = /* @__PURE__ */ new Map();
938
1025
  for (let r of i) {
939
- if (r.deprecated && !q && !t.has(r.value)) continue;
1026
+ if (r.deprecated && !J && !t.has(r.value)) continue;
940
1027
  let i = r.model ?? r.value;
941
- e && ee(e, [
1028
+ e && T(e, [
942
1029
  r.name ?? i,
943
1030
  i,
944
- Y(r.provider),
1031
+ X(r.provider),
945
1032
  r.provider
946
1033
  ]) <= 0 || n.set(r.provider, (n.get(r.provider) ?? 0) + 1);
947
1034
  }
948
- return X.filter((e) => n.has(e) || e === K).map((e) => ({
1035
+ return Z.filter((e) => n.has(e) || e === q).map((e) => ({
949
1036
  id: e,
950
1037
  count: n.get(e) ?? 0
951
1038
  }));
952
1039
  }, [
953
1040
  i,
954
- X,
955
- G,
956
- q,
957
1041
  Z,
958
1042
  K,
959
- Y
960
- ]), ye = me && X.length > 1 ? /* @__PURE__ */ B(x, {
1043
+ J,
1044
+ he,
1045
+ q,
1046
+ X
1047
+ ]), ye = pe && Z.length > 1 ? /* @__PURE__ */ V(S, {
961
1048
  "aria-label": P("modelPicker.provider", "Provider"),
962
1049
  size: "sm",
963
1050
  appearance: "ghost",
964
- value: K ?? We,
965
- onValueChange: (e) => ue(e === We ? null : e),
1051
+ value: q ?? Ye,
1052
+ onValueChange: (e) => le(e === Ye ? null : e),
966
1053
  options: [{
967
- value: We,
1054
+ value: Ye,
968
1055
  label: P("modelPicker.everyProvider", "All providers")
969
1056
  }, ...ve.map(({ id: e, count: t }) => ({
970
1057
  value: e,
971
- textValue: Y(e),
972
- label: /* @__PURE__ */ V("span", {
1058
+ textValue: X(e),
1059
+ label: /* @__PURE__ */ H("span", {
973
1060
  className: "flex min-w-0 items-center gap-8",
974
1061
  children: [
975
- /* @__PURE__ */ B("span", {
1062
+ /* @__PURE__ */ V("span", {
976
1063
  "aria-hidden": !0,
977
1064
  className: "flex shrink-0",
978
- children: /* @__PURE__ */ B(D, {
1065
+ children: /* @__PURE__ */ V(O, {
979
1066
  provider: e,
980
1067
  size: "sm"
981
1068
  })
982
1069
  }),
983
- /* @__PURE__ */ B("span", {
1070
+ /* @__PURE__ */ V("span", {
984
1071
  className: "min-w-0 truncate",
985
- children: Y(e)
1072
+ children: X(e)
986
1073
  }),
987
- /* @__PURE__ */ B("span", {
1074
+ /* @__PURE__ */ V("span", {
988
1075
  className: "shrink-0 text-fg-tertiary tabular",
989
1076
  children: o(t)
990
1077
  })
991
1078
  ]
992
1079
  })
993
1080
  }))]
994
- }) : null, be = ye || he ? /* @__PURE__ */ V(oe, { children: [ye, he && /* @__PURE__ */ B(v, {
1081
+ }) : null, be = ye || me ? /* @__PURE__ */ H(se, { children: [ye, me && /* @__PURE__ */ V(y, {
995
1082
  size: "sm",
996
- label: P("modelPicker.showDeprecated", "Deprecated"),
997
- checked: q,
998
- onCheckedChange: de
999
- })] }) : void 0, Q = U[0] ? J.get(U[0]) : void 0, xe = t.multiple ? Q ? U.length === 1 ? /* @__PURE__ */ B(k, {
1083
+ label: P("modelPicker.showDeprecated", "Show deprecated"),
1084
+ checked: J,
1085
+ onCheckedChange: ue
1086
+ })] }) : void 0, Q = W[0] ? Y.get(W[0]) : void 0, xe = t.multiple ? Q ? W.length === 1 ? /* @__PURE__ */ V(A, {
1000
1087
  provider: Q.provider,
1001
- providerName: Y(Q.provider),
1088
+ providerName: X(Q.provider),
1002
1089
  model: Q.model ?? Q.value,
1003
1090
  ...Q.name ? { name: Q.name } : {}
1004
- }) : P("modelPicker.firstAndMore", "{first} +{count}", {
1005
- first: Q.name ?? Q.model ?? Q.value,
1006
- count: String(U.length - 1)
1007
- }) : void 0 : Q ? /* @__PURE__ */ B(k, {
1091
+ }) : /* @__PURE__ */ H("span", {
1092
+ className: "flex min-w-0 items-center",
1093
+ children: [
1094
+ /* @__PURE__ */ V("span", {
1095
+ className: "min-w-0 truncate",
1096
+ children: Q.name ?? Q.model ?? Q.value
1097
+ }),
1098
+ " ",
1099
+ /* @__PURE__ */ V("span", {
1100
+ className: "shrink-0 pl-4 tabular",
1101
+ children: P("select.more", "+{count}", { count: String(W.length - 1) })
1102
+ })
1103
+ ]
1104
+ }) : void 0 : Q ? /* @__PURE__ */ V(A, {
1008
1105
  provider: Q.provider,
1009
- providerName: Y(Q.provider),
1106
+ providerName: X(Q.provider),
1010
1107
  model: Q.model ?? Q.value,
1011
1108
  ...Q.name ? { name: Q.name } : {}
1012
- }) : H === Ue || H === null && W ? W : void 0, Se = u ?? (typeof A == "string" ? A : P("modelPicker.model", "Model")), Ce = /* @__PURE__ */ B(E, {
1109
+ }) : U === Je || U === null && G ? G : void 0, Se = u ?? (typeof k == "string" ? k : P("modelPicker.model", "Model")), Ce = /* @__PURE__ */ V(D, {
1013
1110
  title: Se,
1014
1111
  width: "lg",
1015
- open: R,
1112
+ open: L,
1016
1113
  onOpenChange: ae,
1017
- trigger: /* @__PURE__ */ B(T, {
1114
+ trigger: /* @__PURE__ */ V(ee, {
1018
1115
  ref: r,
1019
- appearance: Be[d],
1020
- size: h,
1116
+ appearance: Ge[d],
1117
+ size: f,
1021
1118
  ...F.controlProps,
1022
- ...u || !A ? { "aria-label": Se } : {},
1119
+ ...u || !k ? { "aria-label": Se } : {},
1023
1120
  ..._ ? { disabled: _ } : {},
1024
- ...y ? { invalid: y } : {},
1121
+ ...v ? { invalid: v } : {},
1025
1122
  ...g ? { fullWidth: g } : {},
1026
1123
  ...C ? { "data-force": C } : {},
1124
+ ...Q && !t.multiple ? { title: Q.name && Q.name !== (Q.model ?? Q.value) ? `${Q.name} · ${Q.model ?? Q.value}` : Q.model ?? Q.value } : {},
1027
1125
  placeholder: l ?? (t.multiple ? P("modelPicker.chooseSome", "Choose models") : P("modelPicker.choose", "Choose a model")),
1028
- className: e("max-w-full", !(A || j || M) && O),
1126
+ className: e("max-w-full", !(k || j || M) && w),
1029
1127
  children: xe
1030
1128
  }),
1031
- children: /* @__PURE__ */ B(w, {
1129
+ children: /* @__PURE__ */ V(E, {
1032
1130
  groups: ge,
1033
1131
  "aria-label": Se,
1034
- value: t.multiple ? U : U[0] ?? (W ? Ue : null),
1132
+ value: t.multiple ? W : W[0] ?? (G ? Je : null),
1035
1133
  ...t.multiple ? { multiple: !0 } : {},
1036
1134
  onSelect: _e,
1037
- query: G,
1038
- onQueryChange: le,
1135
+ query: K,
1136
+ onQueryChange: ce,
1039
1137
  placeholder: P("modelPicker.search", "Search models"),
1040
1138
  emptyText: P("modelPicker.noMatch", "No models match"),
1041
1139
  toolbar: be,
1042
1140
  autoFocus: !0
1043
1141
  })
1044
1142
  });
1045
- return re ? Ce : m({
1046
- label: A,
1143
+ return re ? Ce : h({
1144
+ label: k,
1047
1145
  description: j,
1048
1146
  error: M,
1049
- optional: te,
1050
- required: N,
1147
+ optional: N,
1148
+ required: te,
1051
1149
  layout: ne,
1052
1150
  id: F.wrapId,
1053
1151
  disabled: _,
1054
- className: O
1152
+ className: w
1055
1153
  }, Ce);
1056
1154
  });
1057
- process.env.NODE_ENV !== "production" && (Xe.displayName = "ModelPicker");
1155
+ process.env.NODE_ENV !== "production" && (tt.displayName = "ModelPicker");
1058
1156
  //#endregion
1059
1157
  //#region src/components/playground/prompt-suggestions.tsx
1060
- var Ze = { align: {
1158
+ var nt = { align: {
1061
1159
  start: { classes: "items-stretch" },
1062
1160
  center: { classes: "items-center text-center" }
1063
- } }, Qe = { align: "start" }, $e = /* @__PURE__ */ N(function({ suggestions: t, onSelect: r, "aria-label": i, align: a = "start", className: o }, s) {
1064
- let c = n(), l = i ?? c("promptSuggestions.examplePrompts", "Example prompts");
1065
- return /* @__PURE__ */ B("ul", {
1066
- ref: s,
1067
- "aria-label": l,
1068
- className: e("flex min-w-0 flex-col gap-2", Ze.align[a].classes, o),
1069
- children: t.slice(0, 3).map((t) => /* @__PURE__ */ B("li", {
1070
- className: e("flex min-w-0", a === "center" && "justify-center"),
1071
- children: /* @__PURE__ */ B("button", {
1161
+ } }, rt = { align: "start" };
1162
+ function it({ prompt: t, align: n, force: r, onSelect: i }) {
1163
+ let a = z(null), o = u(a);
1164
+ return /* @__PURE__ */ V("li", {
1165
+ className: e("flex min-w-0", n === "center" && "justify-center"),
1166
+ children: /* @__PURE__ */ V(l, {
1167
+ content: t,
1168
+ disabled: !o,
1169
+ shape: "multiline",
1170
+ children: /* @__PURE__ */ V("button", {
1072
1171
  type: "button",
1073
- onClick: () => r(t),
1074
- className: e("flex h-36 max-w-full min-w-0 cursor-pointer items-center rounded-item px-16 text-body text-fg-secondary transition-control hover:bg-fill-1 hover:text-fg focus-ring-inset", a === "start" && "flex-1"),
1075
- children: /* @__PURE__ */ B("span", {
1172
+ ...r ? { "data-force": r } : {},
1173
+ onClick: () => i(t),
1174
+ className: e("flex h-36 max-w-full min-w-0 cursor-pointer items-center rounded-pill px-16 text-body text-fg-secondary transition-control hover:bg-fill-1 hover:text-fg focus-visible:text-fg active:bg-fill-2 active:text-fg focus-ring-inset coarse:h-44", n === "start" && "flex-1"),
1175
+ children: /* @__PURE__ */ V("span", {
1176
+ ref: a,
1076
1177
  className: "min-w-0 truncate",
1077
1178
  children: t
1078
1179
  })
1079
1180
  })
1181
+ })
1182
+ });
1183
+ }
1184
+ var at = /* @__PURE__ */ P(function({ suggestions: t, onSelect: r, "aria-label": i, align: a = "start", className: o, "data-force": s }, c) {
1185
+ let l = n(), u = i ?? l("promptSuggestions.examplePrompts", "Example prompts");
1186
+ return /* @__PURE__ */ V("ul", {
1187
+ ref: c,
1188
+ "aria-label": u,
1189
+ className: e("flex min-w-0 flex-col gap-2", nt.align[a].classes, o),
1190
+ children: t.slice(0, 3).map((e, t) => /* @__PURE__ */ V(it, {
1191
+ prompt: e,
1192
+ align: a,
1193
+ force: s,
1194
+ onSelect: r
1080
1195
  }, t))
1081
1196
  });
1082
1197
  });
1083
- process.env.NODE_ENV !== "production" && ($e.displayName = "PromptSuggestions");
1198
+ process.env.NODE_ENV !== "production" && (at.displayName = "PromptSuggestions");
1084
1199
  //#endregion
1085
- export { ge as CompareGrid, pe as Composer, Y as KAESO_COMPARE_GRID_DEFAULT_VARIANTS, J as KAESO_COMPARE_GRID_VARIANTS, K as KAESO_COMPOSER_DEFAULT_VARIANTS, le as KAESO_COMPOSER_VARIANTS, He as KAESO_MODEL_PICKER_DEFAULT_VARIANTS, Ve as KAESO_MODEL_PICKER_VARIANTS, Fe as KAESO_PARAMETER_PANEL_DEFAULT_VARIANTS, Pe as KAESO_PARAMETER_PANEL_VARIANTS, Qe as KAESO_PROMPT_SUGGESTIONS_DEFAULT_VARIANTS, Ze as KAESO_PROMPT_SUGGESTIONS_VARIANTS, ve as KAESO_REASONING_DEFAULT_VARIANTS, _e as KAESO_REASONING_VARIANTS, Oe as KAESO_RESPONSE_METRICS_DEFAULT_VARIANTS, De as KAESO_RESPONSE_METRICS_VARIANTS, xe as KAESO_RESPONSE_VIEW_DEFAULT_VARIANTS, Q as KAESO_RESPONSE_VIEW_VARIANTS, Xe as ModelPicker, Re as ParameterPanel, ze as ParameterPopover, $e as PromptSuggestions, be as Reasoning, Ne as ResponseMetrics, Ce as ResponseView, Ee as Thread, Te as UserMessage, ke as formatLatency, Ye as useModelGroups };
1200
+ export { ye as CompareGrid, Y as Composer, Z as KAESO_COMPARE_GRID_DEFAULT_VARIANTS, X as KAESO_COMPARE_GRID_VARIANTS, le as KAESO_COMPOSER_DEFAULT_VARIANTS, q as KAESO_COMPOSER_VARIANTS, qe as KAESO_MODEL_PICKER_DEFAULT_VARIANTS, Ke as KAESO_MODEL_PICKER_VARIANTS, Be as KAESO_PARAMETER_PANEL_DEFAULT_VARIANTS, ze as KAESO_PARAMETER_PANEL_VARIANTS, rt as KAESO_PROMPT_SUGGESTIONS_DEFAULT_VARIANTS, nt as KAESO_PROMPT_SUGGESTIONS_VARIANTS, Q as KAESO_REASONING_DEFAULT_VARIANTS, be as KAESO_REASONING_VARIANTS, Ne as KAESO_RESPONSE_METRICS_DEFAULT_VARIANTS, Me as KAESO_RESPONSE_METRICS_VARIANTS, we as KAESO_RESPONSE_VIEW_DEFAULT_VARIANTS, Ce as KAESO_RESPONSE_VIEW_VARIANTS, tt as ModelPicker, Ue as ParameterPanel, We as ParameterPopover, at as PromptSuggestions, Se as Reasoning, Re as ResponseMetrics, Oe as ResponseView, je as Thread, Ae as UserMessage, Pe as formatLatency, et as useModelGroups };
1086
1201
 
1087
1202
  //# sourceMappingURL=playground.js.map