@marimo-team/islands 0.23.17-dev31 → 0.23.17-dev32

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.
@@ -6,13 +6,13 @@ import { c as useEventListener, g as Logger, h as cn, t as Button } from "./butt
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
8
  import { r as toast } from "./copy-D45ZUY3j.js";
9
- import { Bn as Info, Bt as PluralWord, C as Accordion, E as AccordionTrigger, En as Anchor2, Ft as variablesAtom, Gt as allTablesAtom, H as renderHTML, Kn as CircleX, Kt as dataSourceConnectionsAtom, Mn as Wrench, Nn as Trash2, O as ChatBubbleIcon, Pt as jotaiJsonStorage, Q as notebookAtom, Rn as LoaderCircle, S as AIContextRegistry, T as AccordionItem, Un as ExternalLink, Vn as FileText, Yt as getRequestClient, b as contextToXml, c as Popover, d as PopoverTrigger, f as isOutputEmpty, g as formatDatasourceContextForCell, h as DatasourceContextProvider, ht as displayCellName, in as singleFacet, jt as generateUUID, kt as moveToEndOfEditor, ln as ZodLocalStorage, mn as CellOutputId, n as Spinner, nn as isMarimoErrorsMime, qt as getTableType, r as MarkdownRenderer, rn as isTracebackMime, st as parseHtmlContent, t as toPng, tn as isErrorMime, u as PopoverContent, v as Boosts, w as AccordionContent, wn as atomWithStorage, wt as createVariableInfoElement, x as AIContextProvider, y as Sections } from "./html-to-image-B8KJvlou.js";
9
+ import { Bt as PluralWord, C as Accordion, Dn as Anchor2, E as AccordionTrigger, Ft as variablesAtom, H as renderHTML, Hn as FileText, Jt as getTableType, Kt as allTablesAtom, Nn as Wrench, O as ChatBubbleIcon, Pn as Trash2, Pt as jotaiJsonStorage, Q as notebookAtom, S as AIContextRegistry, T as AccordionItem, Tn as atomWithStorage, Vn as Info, Wn as ExternalLink, Xt as getRequestClient, an as singleFacet, b as contextToXml, c as Popover, d as PopoverTrigger, f as isOutputEmpty, g as formatDatasourceContextForCell, h as DatasourceContextProvider, hn as CellOutputId, ht as displayCellName, in as isTracebackMime, jt as generateUUID, kt as moveToEndOfEditor, n as Spinner, nn as isErrorMime, qn as CircleX, qt as dataSourceConnectionsAtom, r as MarkdownRenderer, rn as isMarimoErrorsMime, st as parseHtmlContent, t as toPng, u as PopoverContent, un as ZodLocalStorage, v as Boosts, w as AccordionContent, wt as createVariableInfoElement, x as AIContextProvider, y as Sections, zn as LoaderCircle } from "./html-to-image-Bgb6aaXi.js";
10
10
  import "./chunk-5FQGJX7Z-B9WoXK1R.js";
11
11
  import { u as createLucideIcon } from "./dist-DgzzIPS4.js";
12
12
  import { C as logNever, I as X, R as ChevronDown, t as Strings } from "./strings-CITcoFNY.js";
13
13
  import { C as DropdownMenuTrigger, a as NumberField, f as DropdownMenu, h as DropdownMenuItem, p as DropdownMenuContent, r as Input } from "./input-DtTqU0xh.js";
14
14
  import { p as isUrl, w as CircleQuestionMark } from "./toDate-kxcuDOWd.js";
15
- import { a as MarimoIncomingMessageEvent, d as fileDetailsToBlob, f as Square, n as blobToString, p as File$1, t as processOutput } from "./process-output-CjS9wS4l.js";
15
+ import { a as MarimoIncomingMessageEvent, d as fileDetailsToBlob, f as Square, n as blobToString, p as File$1, t as processOutput } from "./process-output-D2Oxf11p.js";
16
16
  import "./react-dom-BTJzcVJ9.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-DebpN0FN.js";
18
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-DdNi9290.js";
@@ -6608,15 +6608,15 @@ var import_compiler_runtime$8 = require_compiler_runtime();
6608
6608
  const ReasoningAccordion = (e18) => {
6609
6609
  let h = (0, import_compiler_runtime$8.c)(13), { reasoning: g, index: _, isStreaming: v } = e18, y = _ === void 0 ? 0 : _, b = v === void 0 ? false : v, [x, S] = import_react.useState("");
6610
6610
  if (!g && !b) return null;
6611
- let C = b ? "reasoning" : x, w;
6612
- h[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), h[0] = w) : w = h[0];
6611
+ let C = b ? "reasoning" : x, T;
6612
+ h[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), h[0] = T) : T = h[0];
6613
6613
  let D = b ? "Thinking" : "View reasoning", O = g.length > 0 && ` (${g.length} chars)`, k;
6614
6614
  h[1] !== D || h[2] !== O ? (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6615
6615
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
6616
6616
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6617
6617
  className: "flex items-center gap-2",
6618
6618
  children: [
6619
- w,
6619
+ T,
6620
6620
  D,
6621
6621
  O
6622
6622
  ]
@@ -6757,38 +6757,38 @@ const ToolErrorCard = (e18) => {
6757
6757
  className: "font-semibold",
6758
6758
  children: "Failed:"
6759
6759
  }), h[7] = A) : A = h[7];
6760
+ let j;
6761
+ h[8] === g ? j = h[9] : (j = formatToolName(g), h[8] = g, h[9] = j);
6760
6762
  let M;
6761
- h[8] === g ? M = h[9] : (M = formatToolName(g), h[8] = g, h[9] = M);
6762
- let N;
6763
- h[10] === M ? N = h[11] : (N = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6763
+ h[10] === j ? M = h[11] : (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6764
6764
  className: "flex-1 text-left",
6765
6765
  children: [
6766
6766
  A,
6767
6767
  " ",
6768
6768
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6769
6769
  className: "font-mono",
6770
- children: M
6770
+ children: j
6771
6771
  })
6772
6772
  ]
6773
- }), h[10] = M, h[11] = N);
6774
- let P = S && "rotate-180", F;
6775
- h[12] === P ? F = h[13] : (F = cn("h-3.5 w-3.5 shrink-0 transition-transform", P), h[12] = P, h[13] = F);
6773
+ }), h[10] = j, h[11] = M);
6774
+ let N = S && "rotate-180", P;
6775
+ h[12] === N ? P = h[13] : (P = cn("h-3.5 w-3.5 shrink-0 transition-transform", N), h[12] = N, h[13] = P);
6776
+ let F;
6777
+ h[14] === P ? F = h[15] : (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: P }), h[14] = P, h[15] = F);
6776
6778
  let I;
6777
- h[14] === F ? I = h[15] : (I = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChevronDown, { className: F }), h[14] = F, h[15] = I);
6778
- let L;
6779
- h[16] !== S || h[17] !== I || h[18] !== N ? (L = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
6779
+ h[16] !== S || h[17] !== F || h[18] !== M ? (I = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("button", {
6780
6780
  type: "button",
6781
6781
  onClick: O,
6782
6782
  className: "w-full flex items-center gap-2 px-3 py-2 text-xs text-(--red-11) hover:bg-(--red-3) rounded-md transition-colors",
6783
6783
  "aria-expanded": S,
6784
6784
  children: [
6785
6785
  k,
6786
- N,
6787
- I
6786
+ M,
6787
+ F
6788
6788
  ]
6789
- }), h[16] = S, h[17] = I, h[18] = N, h[19] = L) : L = h[19];
6790
- let R;
6791
- h[20] !== y || h[21] !== _ || h[22] !== S ? (R = S && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6789
+ }), h[16] = S, h[17] = F, h[18] = M, h[19] = I) : I = h[19];
6790
+ let L;
6791
+ h[20] !== y || h[21] !== _ || h[22] !== S ? (L = S && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6792
6792
  className: "px-3 pb-3 space-y-3 border-t border-(--red-6)/40 pt-3",
6793
6793
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: _ }), y && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6794
6794
  className: "text-xs font-semibold text-(--red-11) mb-1",
@@ -6797,12 +6797,12 @@ const ToolErrorCard = (e18) => {
6797
6797
  className: "bg-(--red-2) border border-(--red-6) rounded p-2 text-xs text-(--red-11) leading-relaxed overflow-auto scrollbar-thin max-h-64 whitespace-pre-wrap",
6798
6798
  children: y
6799
6799
  })] })]
6800
- }), h[20] = y, h[21] = _, h[22] = S, h[23] = R) : R = h[23];
6801
- let z;
6802
- return h[24] !== L || h[25] !== R || h[26] !== D ? (z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6800
+ }), h[20] = y, h[21] = _, h[22] = S, h[23] = L) : L = h[23];
6801
+ let R;
6802
+ return h[24] !== I || h[25] !== L || h[26] !== D ? (R = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6803
6803
  className: D,
6804
- children: [L, R]
6805
- }), h[24] = L, h[25] = R, h[26] = D, h[27] = z) : z = h[27], z;
6804
+ children: [I, L]
6805
+ }), h[24] = I, h[25] = L, h[26] = D, h[27] = R) : R = h[27], R;
6806
6806
  };
6807
6807
  function _temp$3(e18) {
6808
6808
  return !e18;
@@ -6821,44 +6821,44 @@ var SuccessResultSchema = looseObject({
6821
6821
  }), PrettySuccessResult = (e18) => {
6822
6822
  let h = (0, import_compiler_runtime$4.c)(12), { data: g } = e18, _;
6823
6823
  if (h[0] !== g) {
6824
- let { status: e19, auth_required: v, action_url: y, meta: b, next_steps: x, message: S, ...w } = g, T;
6825
- h[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6824
+ let { status: e19, auth_required: v, action_url: y, meta: b, next_steps: x, message: S, ...C } = g, w;
6825
+ h[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
6826
6826
  className: "text-xs font-semibold text-muted-foreground",
6827
6827
  children: "Tool Result"
6828
- }), h[2] = T) : T = h[2];
6829
- let E;
6830
- h[3] === e19 ? E = h[4] : (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6828
+ }), h[2] = w) : w = h[2];
6829
+ let T;
6830
+ h[3] === e19 ? T = h[4] : (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6831
6831
  className: "text-xs px-2 py-0.5 bg-(--grass-2) text-(--grass-11) rounded-full font-medium capitalize",
6832
6832
  children: e19
6833
- }), h[3] = e19, h[4] = E);
6834
- let D;
6835
- h[5] === v ? D = h[6] : (D = v && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6833
+ }), h[3] = e19, h[4] = T);
6834
+ let E;
6835
+ h[5] === v ? E = h[6] : (E = v && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
6836
6836
  className: "text-xs px-2 py-0.5 bg-(--amber-2) text-(--amber-11) rounded-full",
6837
6837
  children: "Auth Required"
6838
- }), h[5] = v, h[6] = D);
6839
- let O;
6840
- h[7] !== E || h[8] !== D ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6838
+ }), h[5] = v, h[6] = E);
6839
+ let D;
6840
+ h[7] !== T || h[8] !== E ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6841
6841
  className: "flex items-center justify-between",
6842
- children: [T, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6842
+ children: [w, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6843
6843
  className: "flex items-center gap-2",
6844
- children: [E, D]
6844
+ children: [T, E]
6845
6845
  })]
6846
- }), h[7] = E, h[8] = D, h[9] = O) : O = h[9];
6847
- let k;
6848
- h[10] === S ? k = h[11] : (k = S && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6846
+ }), h[7] = T, h[8] = E, h[9] = D) : D = h[9];
6847
+ let O;
6848
+ h[10] === S ? O = h[11] : (O = S && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6849
6849
  className: "flex items-start gap-2",
6850
6850
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Info, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6851
6851
  className: "text-xs text-foreground",
6852
6852
  children: S
6853
6853
  })]
6854
- }), h[10] = S, h[11] = k), _ = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6854
+ }), h[10] = S, h[11] = O), _ = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6855
6855
  className: "flex flex-col gap-1.5",
6856
6856
  children: [
6857
+ D,
6857
6858
  O,
6858
- k,
6859
- w && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6859
+ C && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6860
6860
  className: "space-y-3",
6861
- children: Object.entries(w).map(_temp$2)
6861
+ children: Object.entries(C).map(_temp$2)
6862
6862
  })
6863
6863
  ]
6864
6864
  }), h[0] = g, h[1] = _;
@@ -6947,7 +6947,7 @@ function getTriggerToneClass(e18) {
6947
6947
  }
6948
6948
  }
6949
6949
  const ToolHistoryRow = (e18) => {
6950
- let h = (0, import_compiler_runtime$3.c)(34), { toolName: g, state: _, input: y, result: b, approval: x, index: S, className: C, isActive: w } = e18, D = S === void 0 ? 0 : S, O = w === void 0 ? true : w, k;
6950
+ let h = (0, import_compiler_runtime$3.c)(34), { toolName: g, state: _, input: y, result: b, approval: x, index: S, className: C, isActive: T } = e18, D = S === void 0 ? 0 : S, O = T === void 0 ? true : T, k;
6951
6951
  h[0] !== O || h[1] !== _ ? (k = !O && PENDING_STATES.has(_), h[0] = O, h[1] = _, h[2] = k) : k = h[2];
6952
6952
  let A = k, j = `tool-${D}`, M;
6953
6953
  h[3] === C ? M = h[4] : (M = cn("w-full", C), h[3] = C, h[4] = M);
@@ -6965,8 +6965,8 @@ const ToolHistoryRow = (e18) => {
6965
6965
  className: "font-mono text-xs",
6966
6966
  children: I
6967
6967
  }), h[13] = I, h[14] = L);
6968
- let R;
6969
- h[15] !== L || h[16] !== P || h[17] !== F ? (R = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6968
+ let z;
6969
+ h[15] !== L || h[16] !== P || h[17] !== F ? (z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6970
6970
  className: "flex items-center gap-1",
6971
6971
  children: [
6972
6972
  P,
@@ -6974,12 +6974,12 @@ const ToolHistoryRow = (e18) => {
6974
6974
  ":",
6975
6975
  L
6976
6976
  ]
6977
- }), h[15] = L, h[16] = P, h[17] = F, h[18] = R) : R = h[18];
6978
- let z;
6979
- h[19] !== R || h[20] !== N ? (z = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6977
+ }), h[15] = L, h[16] = P, h[17] = F, h[18] = z) : z = h[18];
6978
+ let B;
6979
+ h[19] !== z || h[20] !== N ? (B = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6980
6980
  className: N,
6981
- children: R
6982
- }), h[19] = R, h[20] = N, h[21] = z) : z = h[21];
6981
+ children: z
6982
+ }), h[19] = z, h[20] = N, h[21] = B) : B = h[21];
6983
6983
  let V;
6984
6984
  h[22] !== x || h[23] !== y || h[24] !== b || h[25] !== _ ? (V = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6985
6985
  className: "py-2 px-2",
@@ -6991,11 +6991,11 @@ const ToolHistoryRow = (e18) => {
6991
6991
  })
6992
6992
  }), h[22] = x, h[23] = y, h[24] = b, h[25] = _, h[26] = V) : V = h[26];
6993
6993
  let H;
6994
- h[27] !== z || h[28] !== V ? (H = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6994
+ h[27] !== B || h[28] !== V ? (H = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6995
6995
  value: "tool-call",
6996
6996
  className: "border-0",
6997
- children: [z, V]
6998
- }), h[27] = z, h[28] = V, h[29] = H) : H = h[29];
6997
+ children: [B, V]
6998
+ }), h[27] = B, h[28] = V, h[29] = H) : H = h[29];
6999
6999
  let U;
7000
7000
  return h[30] !== H || h[31] !== j || h[32] !== M ? (U = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
7001
7001
  type: "single",