@marimo-team/islands 0.23.10-dev3 → 0.23.10-dev30

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 (165) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CyV83R2m.js → ConnectedDataExplorerComponent-DmBropAy.js} +31 -31
  2. package/dist/{ErrorBoundary-rULOrC_p.js → ErrorBoundary-DpbaKVv7.js} +1 -1
  3. package/dist/{any-language-editor-DfdpyDv_.js → any-language-editor-DNmoSiWL.js} +20 -20
  4. package/dist/assets/__vite-browser-external-eshhtsgZ.js +1 -0
  5. package/dist/assets/worker-CC0Oul9k.js +73 -0
  6. package/dist/{chat-ui-C1tL1pML.js → chat-ui-D6oraHT2.js} +76 -76
  7. package/dist/{check-DTbrK0zt.js → check-BCaJeT-J.js} +1 -1
  8. package/dist/{code-visibility-DfnO0DcH.js → code-visibility-wR7WSQ4c.js} +2166 -1292
  9. package/dist/{copy-BuQpJEzp.js → copy-UqRYxiOg.js} +33 -33
  10. package/dist/dist-7QfXoMdB.js +5 -0
  11. package/dist/{dist-DgnE8F-r.js → dist-A2846XWO.js} +1 -1
  12. package/dist/dist-BEXXyZig.js +5 -0
  13. package/dist/{dist-B3pZ0Ab6.js → dist-BR_gyG9L.js} +3 -3
  14. package/dist/{dist-CcXxepx6.js → dist-BSAt6RhH.js} +27 -27
  15. package/dist/{dist-Bde4a2kU.js → dist-BY018Paw.js} +8 -8
  16. package/dist/dist-BYj57OV4.js +5 -0
  17. package/dist/{dist-CUCNs1ja.js → dist-BaoDKvdy.js} +2 -2
  18. package/dist/{dist-Cy1WxgBD.js → dist-Bf7SHuNp.js} +5 -5
  19. package/dist/{dist-Bz_sYWbr.js → dist-Bk75fBZA.js} +2 -2
  20. package/dist/dist-BlSvQzNr.js +5 -0
  21. package/dist/{dist-C5VC_yzu.js → dist-BzEzfugY.js} +1 -1
  22. package/dist/dist-CCBlxAgS.js +8 -0
  23. package/dist/dist-CIDTVIUf.js +5 -0
  24. package/dist/{dist-CLUtPrdy.js → dist-CIYBwstr.js} +1 -1
  25. package/dist/{dist-BotSqB48.js → dist-C_Y3oV3C.js} +12 -12
  26. package/dist/{dist-BTfv03uy.js → dist-CcWX6tmx.js} +2 -2
  27. package/dist/{dist-BhM8gdSO.js → dist-CoXAujgg.js} +4 -4
  28. package/dist/{dist-4j4c7bjm.js → dist-CpxNdDkw.js} +3 -3
  29. package/dist/dist-CqQyhAM8.js +8 -0
  30. package/dist/dist-CwRu2Xzh.js +5 -0
  31. package/dist/{dist-BcuoonNH.js → dist-CxJDU6Bh.js} +9 -9
  32. package/dist/{dist-DxvORzUR.js → dist-D-W5ny5a.js} +8 -8
  33. package/dist/dist-D8CDTVgf.js +6 -0
  34. package/dist/dist-D8DNB0nO.js +8 -0
  35. package/dist/dist-DL6N_q-A.js +5 -0
  36. package/dist/{dist-BbbIBDiQ.js → dist-DMjWuVs8.js} +1 -1
  37. package/dist/dist-DOFbNV_b.js +8 -0
  38. package/dist/dist-DPrYzMY0.js +6 -0
  39. package/dist/{dist-h2c8sZvT.js → dist-DZORgqKY.js} +1 -1
  40. package/dist/{dist-B3P2fFpz.js → dist-DZo4nSS0.js} +14 -14
  41. package/dist/{dist-D4CewLk6.js → dist-Dax--nl9.js} +1 -1
  42. package/dist/{dist-DRfcqpxJ.js → dist-DgGbNavJ.js} +2 -2
  43. package/dist/{dist-C1BYNeCR.js → dist-Dk6PV_d3.js} +10 -10
  44. package/dist/{dist-fQ0ViXGs.js → dist-Dv_Y15yk.js} +107 -107
  45. package/dist/{dist-Bfwsv11D.js → dist-DyyjKEYf.js} +2 -2
  46. package/dist/{dist-p2qyWijU.js → dist-GZXUmt0b.js} +2 -2
  47. package/dist/{dist-CLJWPTX2.js → dist-LTU8Hdvn.js} +3 -3
  48. package/dist/{dist-DqAWR3CS.js → dist-M9Vag9Y0.js} +20 -20
  49. package/dist/{dist-DNdhYsgW.js → dist-U4F-tbMs.js} +79 -62
  50. package/dist/{dist-RqXTaiir.js → dist-abid3KgM.js} +11 -11
  51. package/dist/dist-cdmMjgsn.js +5 -0
  52. package/dist/dist-hT4QzYX-.js +1247 -0
  53. package/dist/{dist-luvabDEB.js → dist-t9Kf7xqC.js} +2 -2
  54. package/dist/{error-banner-5bz0L9hS.js → error-banner-Cc0I3C9e.js} +1 -1
  55. package/dist/esm-BaH2eg5-.js +1171 -0
  56. package/dist/{esm-Duie8iU-.js → esm-ga2Bf3O2.js} +43 -43
  57. package/dist/{extends-BgdxCfYu.js → extends-D_hDsj6R.js} +4 -4
  58. package/dist/{formats-DHxc-FdY.js → formats-C4wO47tk.js} +1 -1
  59. package/dist/{glide-data-editor-BOmK9ETQ.js → glide-data-editor-Qhu8oCX-.js} +12 -12
  60. package/dist/{html-to-image-CNa5ok96.js → html-to-image-UEH5lFDZ.js} +2318 -2275
  61. package/dist/{input-_2sjvfne.js → input-CMYy4hzj.js} +187 -185
  62. package/dist/{label-LWtdw5i8.js → label-CC4ytI1X.js} +1 -1
  63. package/dist/main.js +6941 -6913
  64. package/dist/{mermaid-lXOw5Py9.js → mermaid-zuLgJ8J8.js} +4 -4
  65. package/dist/{process-output-DKr4f1di.js → process-output-CyMLTogj.js} +3 -3
  66. package/dist/{reveal-component-UdMnCK5U.js → reveal-component-BjnkUAZ9.js} +697 -619
  67. package/dist/{spec-B96zNUEA.js → spec-X7FwLJni.js} +4 -4
  68. package/dist/{strings-Bu3vlb6W.js → strings-J57tzLr3.js} +47 -46
  69. package/dist/style.css +1 -1
  70. package/dist/{toDate-x-WRDCH7.js → toDate-d8RCRrRd.js} +2 -2
  71. package/dist/{tooltip-C5FYOpQc.js → tooltip-DpcyNkQ2.js} +2 -2
  72. package/dist/{types-CVvp1fKr.js → types-ChtMFmZ2.js} +1 -1
  73. package/dist/{useAsyncData-iRgKDT5s.js → useAsyncData-PonK__yh.js} +1 -1
  74. package/dist/{useDateFormatter-BA4FCquG.js → useDateFormatter-QB-3MpYr.js} +2 -2
  75. package/dist/{useDeepCompareMemoize-CkQ57VS2.js → useDeepCompareMemoize-D3NGWke6.js} +1 -1
  76. package/dist/{useLifecycle-BBO9PIph.js → useLifecycle-00mO3OSS.js} +2 -2
  77. package/dist/{useTheme-DHIrRQOe.js → useTheme-DEhDzATN.js} +1 -1
  78. package/dist/{vega-component-Dq-SH463.js → vega-component-9h1ACS78.js} +8 -8
  79. package/dist/{zod-CoBiJ5v4.js → zod-aLSua2NL.js} +24 -23
  80. package/package.json +3 -3
  81. package/src/components/data-table/TableBottomBar.tsx +1 -15
  82. package/src/components/data-table/TableTopBar.tsx +8 -13
  83. package/src/components/data-table/__tests__/TableBottomBar.test.tsx +6 -12
  84. package/src/components/data-table/__tests__/column-visibility-dropdown.test.tsx +227 -0
  85. package/src/components/data-table/__tests__/data-table.test.tsx +154 -12
  86. package/src/components/data-table/column-visibility-dropdown.tsx +204 -0
  87. package/src/components/data-table/data-table.tsx +1 -1
  88. package/src/components/data-table/filter-by-values-picker.tsx +39 -17
  89. package/src/components/data-table/filter-pills.tsx +1 -1
  90. package/src/components/data-table/hover-tooltip/__tests__/content.test.ts +60 -0
  91. package/src/components/data-table/hover-tooltip/content.ts +44 -0
  92. package/src/components/data-table/hover-tooltip/hover-tooltip.tsx +55 -0
  93. package/src/components/data-table/hover-tooltip/use-table-hover-tooltip.ts +159 -0
  94. package/src/components/data-table/renderers.tsx +27 -43
  95. package/src/components/datasources/__tests__/filter-empty.test.ts +183 -0
  96. package/src/components/datasources/datasources.tsx +92 -3
  97. package/src/components/editor/cell/cell-context-menu.tsx +15 -2
  98. package/src/components/editor/cell/code/language-toggle.tsx +7 -1
  99. package/src/components/editor/chrome/wrapper/app-chrome.tsx +97 -52
  100. package/src/components/editor/chrome/wrapper/lazy-panels.ts +91 -0
  101. package/src/components/editor/chrome/wrapper/sidebar.tsx +2 -0
  102. package/src/components/editor/documentation.css +35 -0
  103. package/src/components/editor/file-tree/file-explorer.tsx +8 -18
  104. package/src/components/editor/file-tree/tree-actions.tsx +46 -1
  105. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +20 -0
  106. package/src/components/editor/renderers/slides-layout/types.ts +1 -0
  107. package/src/components/slides/__tests__/minimap-actions.test.tsx +166 -0
  108. package/src/components/slides/__tests__/reveal-component.test.ts +425 -0
  109. package/src/components/slides/minimap.tsx +127 -10
  110. package/src/components/slides/reveal-component.tsx +287 -61
  111. package/src/components/slides/slide-cell-view.tsx +26 -2
  112. package/src/components/slides/slide-form.tsx +26 -4
  113. package/src/components/storage/__tests__/storage-inspector.test.ts +53 -0
  114. package/src/components/storage/storage-inspector.tsx +68 -48
  115. package/src/components/ui/__tests__/use-toast.test.ts +75 -0
  116. package/src/components/ui/combobox.tsx +51 -32
  117. package/src/components/ui/reorderable-list.tsx +13 -0
  118. package/src/components/ui/select-core/__tests__/use-select-list.test.ts +294 -0
  119. package/src/components/ui/select-core/__tests__/utils.test.ts +222 -0
  120. package/src/components/ui/select-core/index.ts +16 -0
  121. package/src/components/ui/select-core/option-row.tsx +33 -0
  122. package/src/components/ui/select-core/render-slot.ts +20 -0
  123. package/src/components/ui/select-core/select-list.tsx +248 -0
  124. package/src/components/ui/select-core/types.ts +44 -0
  125. package/src/components/ui/select-core/use-select-list.ts +347 -0
  126. package/src/components/ui/select-core/utils.ts +121 -0
  127. package/src/components/ui/use-toast.ts +33 -13
  128. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -28
  129. package/src/core/cells/__tests__/cell.test.ts +29 -2
  130. package/src/core/cells/cell.ts +5 -1
  131. package/src/core/codemirror/go-to-definition/commands.ts +4 -3
  132. package/src/core/codemirror/language/languages/python.ts +2 -0
  133. package/src/core/codemirror/language/languages/sql/utils.ts +3 -1
  134. package/src/core/codemirror/lsp/__tests__/markdown-renderer.test.ts +41 -0
  135. package/src/core/codemirror/lsp/markdown-renderer.ts +59 -0
  136. package/src/core/datasets/data-source-connections.ts +2 -0
  137. package/src/core/network/__tests__/requests-static.test.ts +30 -0
  138. package/src/core/network/requests-static.ts +14 -10
  139. package/src/core/wasm/worker/bootstrap.ts +12 -4
  140. package/src/plugins/impl/MultiselectPlugin.tsx +19 -142
  141. package/src/plugins/impl/SearchableSelect.tsx +16 -97
  142. package/src/plugins/impl/__tests__/DropdownPlugin.test.tsx +5 -2
  143. package/src/plugins/impl/__tests__/MultiSelectPlugin.test.ts +1 -1
  144. package/src/plugins/layout/DownloadPlugin.tsx +1 -1
  145. package/src/utils/lazy.ts +6 -1
  146. package/dist/assets/__vite-browser-external-Ci2ZQfXU.js +0 -1
  147. package/dist/assets/worker-ip3AI_sN.js +0 -73
  148. package/dist/dist-0Fif7jnk.js +0 -5
  149. package/dist/dist-B5h_9sHB.js +0 -6
  150. package/dist/dist-B9M6R5ye.js +0 -5
  151. package/dist/dist-BCt3tnck.js +0 -8
  152. package/dist/dist-BUIJwMwn.js +0 -8
  153. package/dist/dist-BpquMd3k.js +0 -5
  154. package/dist/dist-BzJsqYfz.js +0 -5
  155. package/dist/dist-CA5ELXAf.js +0 -6
  156. package/dist/dist-CLBRs6Uv.js +0 -5
  157. package/dist/dist-CStVCMbq.js +0 -5
  158. package/dist/dist-CZRIEY3Y.js +0 -8
  159. package/dist/dist-CuUHbFD0.js +0 -5
  160. package/dist/dist-DV7Iabxb.js +0 -8
  161. package/dist/dist-DhHh0jLg.js +0 -1247
  162. package/dist/dist-DuEeHMvL.js +0 -5
  163. package/dist/esm-BfhQmZjp.js +0 -1171
  164. package/src/plugins/impl/multiselectFilterFn.tsx +0 -22
  165. /package/src/components/{data-table → ui}/value-chips.tsx +0 -0
@@ -5,34 +5,34 @@ import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
5
5
  import { _ as Logger, c as Objects, g as cn, l as useEventListener, t as Button } from "./button-C5K9fIPF.js";
6
6
  import { t as require_react } from "./react-DA-nE2FX.js";
7
7
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
8
- import { r as toast } from "./copy-BuQpJEzp.js";
9
- import { An as LoaderCircle, C as AccordionContent, D as ChatBubbleIcon, Fn as ExternalLink, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Mn as Info, Nn as FileText, Ot as moveToEndOfEditor, P as base64ToDataURL, Rn as CircleX, S as Accordion, T as AccordionTrigger, Tn as Trash2, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, gn as atomWithStorage, h as DatasourceContextProvider, jt as generateUUID, n as Spinner, on as CellOutputId, r as MarkdownRenderer, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vn as Anchor2, vt as displayCellName, w as AccordionItem, wn as Wrench, x as AIContextRegistry, y as contextToXml } from "./html-to-image-CNa5ok96.js";
8
+ import { r as toast } from "./copy-UqRYxiOg.js";
9
+ import { C as AccordionContent, D as ChatBubbleIcon, En as Trash2, Et as createVariableInfoElement, G as cellErrorsAtom, Gt as getTableType, In as ExternalLink, It as jotaiJsonStorage, Lt as variablesAtom, Mt as generateUUID, Nn as Info, P as base64ToDataURL, Pn as FileText, Rt as PluralWord, S as Accordion, T as AccordionTrigger, Tn as Wrench, Ut as allTablesAtom, V as renderHTML, Wt as dataSourceConnectionsAtom, X as notebookAtom, Zt as singleFacet, _ as Boosts, _n as atomWithStorage, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, jn as LoaderCircle, kt as moveToEndOfEditor, n as Spinner, nn as ZodLocalStorage, qt as getRequestClient, r as MarkdownRenderer, sn as CellOutputId, t as toPng, u as PopoverContent, v as Sections, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yn as Anchor2, yt as displayCellName, zn as CircleX } from "./html-to-image-UEH5lFDZ.js";
10
10
  import "./chunk-5FQGJX7Z-BNjes6Yx.js";
11
- import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
12
- import { F as X, L as ChevronDown, S as logNever, t as Strings } from "./strings-Bu3vlb6W.js";
13
- import { a as NumberField, b as DropdownMenuTrigger, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu } from "./input-_2sjvfne.js";
14
- import { p as isUrl, v as CircleQuestionMark } from "./toDate-x-WRDCH7.js";
15
- import { a as MarimoIncomingMessageEvent, d as Square, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-DKr4f1di.js";
11
+ import { u as createLucideIcon } from "./dist-Dk6PV_d3.js";
12
+ import { C as logNever, I as X, R as ChevronDown, t as Strings } from "./strings-J57tzLr3.js";
13
+ import { a as NumberField, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu, x as DropdownMenuTrigger } from "./input-CMYy4hzj.js";
14
+ import { p as isUrl, v as CircleQuestionMark } from "./toDate-d8RCRrRd.js";
15
+ import { a as MarimoIncomingMessageEvent, d as Square, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-CyMLTogj.js";
16
16
  import "./react-dom-BTJzcVJ9.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
18
- import { A as looseObject, B as union, C as any, D as discriminatedUnion, E as custom, H as safeParseAsync, I as record, L as strictObject, M as never, N as number, O as lazy, P as object$1, R as string, S as _null, T as boolean, V as unknown, W as toJSONSchema, b as _enum, k as literal, w as array$1, x as _instanceof } from "./zod-CoBiJ5v4.js";
19
- import { n as ErrorBanner } from "./error-banner-5bz0L9hS.js";
20
- import { t as Label } from "./label-LWtdw5i8.js";
21
- import { t as Tooltip } from "./tooltip-C5FYOpQc.js";
22
- import { f as CopyClipboardIcon } from "./extends-BgdxCfYu.js";
18
+ import { A as looseObject, B as union, C as any, D as discriminatedUnion, E as custom, H as safeParseAsync, I as record, L as strictObject, M as never, N as number, O as lazy, P as object$1, R as string, S as _null, T as boolean, V as unknown, W as toJSONSchema, b as _enum, k as literal, w as array$1, x as _instanceof } from "./zod-aLSua2NL.js";
19
+ import { n as ErrorBanner } from "./error-banner-Cc0I3C9e.js";
20
+ import { t as Label } from "./label-CC4ytI1X.js";
21
+ import { t as Tooltip } from "./tooltip-DpcyNkQ2.js";
22
+ import { f as CopyClipboardIcon } from "./extends-D_hDsj6R.js";
23
23
  import { t as isEmpty_default } from "./isEmpty-CJJMn-QP.js";
24
- import { T as useEvent_default, n as useTheme, y as useStore } from "./useTheme-DHIrRQOe.js";
25
- import { $ as ViewPlugin, At as Prec, Dt as EditorState, Ft as StateField, Lt as Transaction, Ot as Facet, Pt as StateEffect, Y as Decoration, Z as EditorView, dt as keymap, et as WidgetType, ut as hoverTooltip } from "./dist-DNdhYsgW.js";
26
- import { n as acceptCompletion, o as closeCompletion, r as autocompletion } from "./dist-DhHh0jLg.js";
24
+ import { T as useEvent_default, n as useTheme, y as useStore } from "./useTheme-DEhDzATN.js";
25
+ import { $ as EditorView, At as Facet, It as StateEffect, Lt as StateField, Mt as Prec, Z as Decoration, ft as hoverTooltip, kt as EditorState, nt as WidgetType, pt as keymap, tt as ViewPlugin, zt as Transaction } from "./dist-U4F-tbMs.js";
26
+ import { n as acceptCompletion, o as closeCompletion, r as autocompletion } from "./dist-hT4QzYX-.js";
27
27
  import "./main-Tj_-QTyF.js";
28
- import { a as markdown } from "./dist-fQ0ViXGs.js";
29
- import "./dist-CcXxepx6.js";
30
- import "./dist-DxvORzUR.js";
31
- import "./dist-DqAWR3CS.js";
32
- import "./dist-BotSqB48.js";
33
- import { n as minimalSetup, t as esm_default } from "./esm-BfhQmZjp.js";
28
+ import { a as markdown } from "./dist-Dv_Y15yk.js";
29
+ import "./dist-BSAt6RhH.js";
30
+ import "./dist-D-W5ny5a.js";
31
+ import "./dist-M9Vag9Y0.js";
32
+ import "./dist-C_Y3oV3C.js";
33
+ import { n as minimalSetup, t as esm_default } from "./esm-BaH2eg5-.js";
34
34
  import "./purify.es-H92eMd9-.js";
35
- import { t as useAsyncData } from "./useAsyncData-iRgKDT5s.js";
35
+ import { t as useAsyncData } from "./useAsyncData-PonK__yh.js";
36
36
  var Ban = createLucideIcon("ban", [["path", {
37
37
  d: "M4.929 4.929 19.07 19.071",
38
38
  key: "196cmz"
@@ -6504,15 +6504,15 @@ var import_compiler_runtime$8 = require_compiler_runtime();
6504
6504
  const ReasoningAccordion = (e18) => {
6505
6505
  let m = (0, import_compiler_runtime$8.c)(13), { reasoning: h, index: g, isStreaming: _ } = e18, v = g === void 0 ? 0 : g, y = _ === void 0 ? false : _, [b, x] = import_react.useState("");
6506
6506
  if (!h && !y) return null;
6507
- let S = y ? "reasoning" : b, C;
6508
- m[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), m[0] = C) : C = m[0];
6507
+ let S = y ? "reasoning" : b, w;
6508
+ m[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), m[0] = w) : w = m[0];
6509
6509
  let T = y ? "Thinking" : "View reasoning", E = h.length > 0 && ` (${h.length} chars)`, D;
6510
6510
  m[1] !== T || m[2] !== E ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6511
6511
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
6512
6512
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6513
6513
  className: "flex items-center gap-2",
6514
6514
  children: [
6515
- C,
6515
+ w,
6516
6516
  T,
6517
6517
  E
6518
6518
  ]
@@ -6694,11 +6694,11 @@ const ToolErrorCard = (e18) => {
6694
6694
  children: v
6695
6695
  })] })]
6696
6696
  }), m[20] = v, m[21] = g, m[22] = x, m[23] = I) : I = m[23];
6697
- let R;
6698
- return m[24] !== F || m[25] !== I || m[26] !== E ? (R = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6697
+ let L;
6698
+ return m[24] !== F || m[25] !== I || m[26] !== E ? (L = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6699
6699
  className: E,
6700
6700
  children: [F, I]
6701
- }), m[24] = F, m[25] = I, m[26] = E, m[27] = R) : R = m[27], R;
6701
+ }), m[24] = F, m[25] = I, m[26] = E, m[27] = L) : L = m[27], L;
6702
6702
  };
6703
6703
  function _temp$2(e18) {
6704
6704
  return !e18;
@@ -6835,7 +6835,7 @@ function getTriggerToneClass(e18) {
6835
6835
  }
6836
6836
  }
6837
6837
  const ToolHistoryRow = (e18) => {
6838
- let m = (0, import_compiler_runtime$3.c)(29), { toolName: h, state: g, input: v, result: y, approval: b, index: x, className: S } = e18, C = `tool-${x === void 0 ? 0 : x}`, T;
6838
+ let m = (0, import_compiler_runtime$3.c)(29), { toolName: h, state: g, input: v, result: y, approval: b, index: x, className: S } = e18, w = `tool-${x === void 0 ? 0 : x}`, T;
6839
6839
  m[0] === S ? T = m[1] : (T = cn("w-full", S), m[0] = S, m[1] = T);
6840
6840
  let E;
6841
6841
  m[2] === g ? E = m[3] : (E = cn("h-6 text-xs border-border shadow-none! ring-0! bg-muted/60 hover:bg-muted py-0 px-2 gap-1 rounded-sm [&[data-state=open]>svg]:rotate-180 hover:no-underline", getTriggerToneClass(g)), m[2] = g, m[3] = E);
@@ -6880,12 +6880,12 @@ const ToolHistoryRow = (e18) => {
6880
6880
  children: [M, N]
6881
6881
  }), m[22] = M, m[23] = N, m[24] = P) : P = m[24];
6882
6882
  let F;
6883
- return m[25] !== P || m[26] !== C || m[27] !== T ? (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6883
+ return m[25] !== P || m[26] !== w || m[27] !== T ? (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6884
6884
  type: "single",
6885
6885
  collapsible: true,
6886
6886
  className: T,
6887
6887
  children: P
6888
- }, C), m[25] = P, m[26] = C, m[27] = T, m[28] = F) : F = m[28], F;
6888
+ }, w), m[25] = P, m[26] = w, m[27] = T, m[28] = F) : F = m[28], F;
6889
6889
  };
6890
6890
  var HistoryContent = (e18) => {
6891
6891
  let m = (0, import_compiler_runtime$3.c)(16), { state: h, input: g, result: _, approval: v } = e18;
@@ -7584,22 +7584,22 @@ function routeIncomingChatChunk(e18, m) {
7584
7584
  }
7585
7585
  const Chatbot = (e18) => {
7586
7586
  var _a;
7587
- let [m, g] = (0, import_react.useState)(""), [b, x] = (0, import_react.useState)(e18.config), [S, C] = (0, import_react.useState)(e18.config), [w, T] = (0, import_react.useState)(void 0), E = (0, import_react.useRef)(null), D = (0, import_react.useRef)(null), O = (0, import_react.useRef)(null), k = (0, import_react.useRef)(null);
7587
+ let [m, g] = (0, import_react.useState)(""), [b, x] = (0, import_react.useState)(e18.config), [S, C] = (0, import_react.useState)(e18.config), [w, E] = (0, import_react.useState)(void 0), D = (0, import_react.useRef)(null), O = (0, import_react.useRef)(null), k = (0, import_react.useRef)(null), A = (0, import_react.useRef)(null);
7588
7588
  Object.keys(e18.config).some((m2) => e18.config[m2] !== S[m2]) && (x(e18.config), C(e18.config));
7589
- let A = (0, import_react.useRef)(b);
7590
- A.current = b;
7591
- let j = (0, import_react.useRef)(null), M = (0, import_react.useRef)(null), { data: N } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), P = e18.value.length > 0 ? e18.value : N, { messages: I, sendMessage: L, setMessages: R, status: z, stop: V, error: H, regenerate: U, clearError: W, addToolApprovalResponse: G } = useChat({
7589
+ let j = (0, import_react.useRef)(b);
7590
+ j.current = b;
7591
+ let N = (0, import_react.useRef)(null), P = (0, import_react.useRef)(null), { data: F } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), I = e18.value.length > 0 ? e18.value : F, { messages: L, sendMessage: R, setMessages: z, status: B, stop: V, error: H, regenerate: U, clearError: W, addToolApprovalResponse: G } = useChat({
7592
7592
  sendAutomaticallyWhen: ({ messages: e19 }) => hasPendingToolCalls(e19),
7593
7593
  transport: new DefaultChatTransport({ fetch: async (m2, g2) => {
7594
7594
  var _a2;
7595
7595
  if (g2 === void 0) return fetch(m2);
7596
7596
  let _ = JSON.parse(g2.body), v = g2.signal, y = {
7597
- max_tokens: A.current.max_tokens,
7598
- temperature: A.current.temperature,
7599
- top_p: A.current.top_p,
7600
- top_k: A.current.top_k,
7601
- frequency_penalty: A.current.frequency_penalty,
7602
- presence_penalty: A.current.presence_penalty
7597
+ max_tokens: j.current.max_tokens,
7598
+ temperature: j.current.temperature,
7599
+ top_p: j.current.top_p,
7600
+ top_k: j.current.top_k,
7601
+ frequency_penalty: j.current.frequency_penalty,
7602
+ presence_penalty: j.current.presence_penalty
7603
7603
  };
7604
7604
  try {
7605
7605
  let m3 = _.messages.map((e19) => {
@@ -7610,14 +7610,14 @@ const Chatbot = (e18) => {
7610
7610
  };
7611
7611
  }), g3 = generateUUID(), b2 = new ReadableStream({
7612
7612
  start(m4) {
7613
- j.current = m4, M.current = g3;
7613
+ N.current = m4, P.current = g3;
7614
7614
  let _2 = () => {
7615
7615
  try {
7616
7616
  m4.close();
7617
7617
  } catch (e19) {
7618
7618
  Logger.debug("Controller may already be closed", { error: e19 });
7619
7619
  }
7620
- j.current = null, M.current = null, e18.cancel_prompt({ request_id: g3 }).catch((e19) => {
7620
+ N.current = null, P.current = null, e18.cancel_prompt({ request_id: g3 }).catch((e19) => {
7621
7621
  Logger.debug("cancel_prompt failed", { error: e19 });
7622
7622
  });
7623
7623
  };
@@ -7626,7 +7626,7 @@ const Chatbot = (e18) => {
7626
7626
  };
7627
7627
  },
7628
7628
  cancel() {
7629
- j.current = null, M.current = null;
7629
+ N.current = null, P.current = null;
7630
7630
  }
7631
7631
  });
7632
7632
  return e18.send_prompt({
@@ -7635,7 +7635,7 @@ const Chatbot = (e18) => {
7635
7635
  config: y
7636
7636
  }).catch((e19) => {
7637
7637
  var _a3;
7638
- (_a3 = j.current) == null ? void 0 : _a3.error(e19), j.current = null, M.current = null;
7638
+ (_a3 = N.current) == null ? void 0 : _a3.error(e19), N.current = null, P.current = null;
7639
7639
  }), createUIMessageStreamResponse({ stream: b2 });
7640
7640
  } catch (e19) {
7641
7641
  if (e19 instanceof Error && e19.name === "AbortError") return new Response("Aborted", { status: 499 });
@@ -7643,9 +7643,9 @@ const Chatbot = (e18) => {
7643
7643
  return new Response(m3, { status: 400 });
7644
7644
  }
7645
7645
  } }),
7646
- messages: P,
7646
+ messages: I,
7647
7647
  onFinish: (m2) => {
7648
- T(void 0), E.current && (E.current.value = ""), Logger.debug("Finished streaming message:", m2), e18.setValue(m2.messages);
7648
+ E(void 0), D.current && (D.current.value = ""), Logger.debug("Finished streaming message:", m2), e18.setValue(m2.messages);
7649
7649
  },
7650
7650
  onError: (e19) => {
7651
7651
  Logger.error("An error occurred:", e19);
@@ -7654,15 +7654,15 @@ const Chatbot = (e18) => {
7654
7654
  useEventListener(e18.host, MarimoIncomingMessageEvent.TYPE, (e19) => {
7655
7655
  let m2 = ChatMessageIncomingSchema.safeParse(e19.detail.message);
7656
7656
  m2.success && routeIncomingChatChunk(m2.data, {
7657
- controllerRef: j,
7658
- activeRequestIdRef: M
7657
+ controllerRef: N,
7658
+ activeRequestIdRef: P
7659
7659
  });
7660
7660
  });
7661
- let K = z === "submitted" || z === "streaming", q = (m2) => {
7662
- let h = I.findIndex((e19) => e19.id === m2);
7661
+ let K = B === "submitted" || B === "streaming", q = (m2) => {
7662
+ let h = L.findIndex((e19) => e19.id === m2);
7663
7663
  if (h !== -1) {
7664
- let g2 = I.filter((e19) => e19.id !== m2);
7665
- e18.delete_chat_message({ index: h }), R(g2), e18.setValue(g2);
7664
+ let g2 = L.filter((e19) => e19.id !== m2);
7665
+ e18.delete_chat_message({ index: h }), z(g2), e18.setValue(g2);
7666
7666
  }
7667
7667
  }, J = Array.isArray(e18.allowAttachments) && e18.allowAttachments.length > 0 || e18.allowAttachments === true, Y = {
7668
7668
  triggerCompletionRegex: /^\/(\w+)?/,
@@ -7674,12 +7674,12 @@ const Chatbot = (e18) => {
7674
7674
  }, Z = e18.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
7675
7675
  (0, import_react.useEffect)(() => {
7676
7676
  var _a2;
7677
- (_a2 = k.current) == null ? void 0 : _a2.scrollTo({
7678
- top: k.current.scrollHeight,
7677
+ (_a2 = A.current) == null ? void 0 : _a2.scrollTo({
7678
+ top: A.current.scrollHeight,
7679
7679
  behavior: "smooth"
7680
7680
  });
7681
- }, [I.length, k]);
7682
- let Q = (_a = O.current) == null ? void 0 : _a.view, $ = () => {
7681
+ }, [L.length, A]);
7682
+ let Q = (_a = k.current) == null ? void 0 : _a.view, $ = () => {
7683
7683
  if (Q) {
7684
7684
  let e19 = Q.state.doc.length;
7685
7685
  Q.dispatch({ changes: {
@@ -7699,18 +7699,18 @@ const Chatbot = (e18) => {
7699
7699
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
7700
7700
  variant: "text",
7701
7701
  size: "icon",
7702
- disabled: I.length === 0,
7702
+ disabled: L.length === 0,
7703
7703
  onClick: () => {
7704
- R([]), e18.setValue([]), e18.delete_chat_history({}), W();
7704
+ z([]), e18.setValue([]), e18.delete_chat_history({}), W();
7705
7705
  },
7706
7706
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RotateCw, { className: "h-3 w-3" })
7707
7707
  })
7708
7708
  }),
7709
7709
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7710
7710
  className: "grow overflow-y-auto gap-4 pt-8 pb-4 px-2 flex flex-col",
7711
- ref: k,
7711
+ ref: A,
7712
7712
  children: [
7713
- I.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7713
+ L.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7714
7714
  className: "flex flex-col items-center justify-center h-full text-muted-foreground text-center p-4",
7715
7715
  children: [
7716
7716
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-12 w-12 mb-4" }),
@@ -7724,16 +7724,16 @@ const Chatbot = (e18) => {
7724
7724
  })
7725
7725
  ]
7726
7726
  }),
7727
- I.map((e19, m2) => {
7727
+ L.map((e19, m2) => {
7728
7728
  var _a2;
7729
- let h = (_a2 = e19.parts) == null ? void 0 : _a2.filter((e20) => e20.type === "text").map((e20) => e20.text).join("\n"), g2 = m2 === I.length - 1;
7729
+ let h = (_a2 = e19.parts) == null ? void 0 : _a2.filter((e20) => e20.type === "text").map((e20) => e20.text).join("\n"), g2 = m2 === L.length - 1;
7730
7730
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
7731
7731
  className: cn("flex flex-col group gap-2", e19.role === "user" ? "items-end" : "items-start"),
7732
7732
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
7733
7733
  className: `max-w-[80%] p-3 rounded-lg ${e19.role === "user" ? "bg-(--sky-11) text-(--slate-1) whitespace-pre-wrap" : "bg-(--slate-4) text-(--slate-12)"}`,
7734
7734
  children: renderUIMessage({
7735
7735
  message: e19,
7736
- isStreamingReasoning: z === "streaming",
7736
+ isStreamingReasoning: B === "streaming",
7737
7737
  isLast: g2,
7738
7738
  addToolApprovalResponse: g2 ? G : void 0
7739
7739
  })
@@ -7771,7 +7771,7 @@ const Chatbot = (e18) => {
7771
7771
  onSubmit: async (h) => {
7772
7772
  if (h.preventDefault(), e18.disabled) return;
7773
7773
  let g2 = w ? await convertToFileUIPart(w) : void 0;
7774
- L({
7774
+ R({
7775
7775
  role: "user",
7776
7776
  parts: [{
7777
7777
  type: "text",
@@ -7779,7 +7779,7 @@ const Chatbot = (e18) => {
7779
7779
  }, ...g2 ?? []]
7780
7780
  }), $();
7781
7781
  },
7782
- ref: D,
7782
+ ref: O,
7783
7783
  inert: e18.disabled || void 0,
7784
7784
  className: cn("flex w-full border-t border-(--slate-6) px-2 py-1 items-center", e18.disabled && "opacity-50 cursor-not-allowed"),
7785
7785
  children: [
@@ -7799,12 +7799,12 @@ const Chatbot = (e18) => {
7799
7799
  className: "rounded-sm mr-2",
7800
7800
  placeholder: Z,
7801
7801
  value: m,
7802
- inputRef: O,
7802
+ inputRef: k,
7803
7803
  maxHeight: e18.maxHeight ? `${e18.maxHeight / 2}px` : void 0,
7804
7804
  onChange: g,
7805
7805
  onSubmit: (e19, m2) => {
7806
7806
  var _a2;
7807
- m2.trim() && ((_a2 = D.current) == null ? void 0 : _a2.requestSubmit());
7807
+ m2.trim() && ((_a2 = O.current) == null ? void 0 : _a2.requestSubmit());
7808
7808
  },
7809
7809
  onClose: () => {
7810
7810
  },
@@ -7825,7 +7825,7 @@ const Chatbot = (e18) => {
7825
7825
  variant: "text",
7826
7826
  size: "sm",
7827
7827
  onClick: () => {
7828
- T(void 0), E.current && (E.current.value = "");
7828
+ E(void 0), D.current && (D.current.value = "");
7829
7829
  },
7830
7830
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(X, { className: "size-3" })
7831
7831
  }),
@@ -7835,17 +7835,17 @@ const Chatbot = (e18) => {
7835
7835
  size: "sm",
7836
7836
  onClick: () => {
7837
7837
  var _a2;
7838
- return (_a2 = E.current) == null ? void 0 : _a2.click();
7838
+ return (_a2 = D.current) == null ? void 0 : _a2.click();
7839
7839
  },
7840
7840
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Paperclip, { className: "h-4" })
7841
7841
  }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
7842
7842
  type: "file",
7843
- ref: E,
7843
+ ref: D,
7844
7844
  className: "hidden",
7845
7845
  multiple: true,
7846
7846
  accept: Array.isArray(e18.allowAttachments) ? e18.allowAttachments.join(",") : void 0,
7847
7847
  onChange: (e19) => {
7848
- e19.target.files && T([...e19.target.files]);
7848
+ e19.target.files && E([...e19.target.files]);
7849
7849
  }
7850
7850
  })] }),
7851
7851
  K ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
@@ -7993,8 +7993,8 @@ var configDescriptions = {
7993
7993
  m[0] === g ? S = m[1] : (S = (e19) => {
7994
7994
  [...e19.matchAll(/{{(\w+)}}/g)].length > 0 ? (x(e19), v(true)) : g(e19);
7995
7995
  }, m[0] = g, m[1] = S);
7996
- let C = S, w;
7997
- m[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
7996
+ let C = S, T;
7997
+ m[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
7998
7998
  content: "Select a prompt",
7999
7999
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
8000
8000
  asChild: true,
@@ -8005,7 +8005,7 @@ var configDescriptions = {
8005
8005
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChatBubbleIcon, { className: "h-3 w-3" })
8006
8006
  })
8007
8007
  })
8008
- }), m[2] = w) : w = m[2];
8008
+ }), m[2] = T) : T = m[2];
8009
8009
  let E;
8010
8010
  if (m[3] !== C || m[4] !== h) {
8011
8011
  let e19;
@@ -8016,7 +8016,7 @@ var configDescriptions = {
8016
8016
  }, m2), m[6] = C, m[7] = e19), E = h.map(e19), m[3] = C, m[4] = h, m[5] = E;
8017
8017
  } else E = m[5];
8018
8018
  let D;
8019
- m[8] === E ? D = m[9] : (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverAnchor, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [w, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, {
8019
+ m[8] === E ? D = m[9] : (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverAnchor, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [T, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, {
8020
8020
  side: "right",
8021
8021
  align: "end",
8022
8022
  onCloseAutoFocus: _temp,
@@ -1,4 +1,4 @@
1
- import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
1
+ import { u as createLucideIcon } from "./dist-Dk6PV_d3.js";
2
2
  var Check = createLucideIcon("check", [["path", {
3
3
  d: "M20 6 9 17l-5-5",
4
4
  key: "1gmf2c"