@marimo-team/islands 0.23.3-dev9 → 0.23.3

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 (42) hide show
  1. package/dist/{chat-ui-BLFhPclV.js → chat-ui-DEd_Ndal.js} +82 -82
  2. package/dist/{html-to-image-XYwXqg2E.js → html-to-image-DBosi5GK.js} +2240 -2214
  3. package/dist/main.js +2627 -2746
  4. package/dist/{process-output-BDVjDpbu.js → process-output-k-4WHpxz.js} +1 -1
  5. package/dist/{reveal-component-CrnLosc4.js → reveal-component-CFuofbBD.js} +827 -561
  6. package/dist/{slide-Dl7Rf496.js → slide-form-DgMI37ES.js} +1729 -894
  7. package/dist/style.css +1 -1
  8. package/package.json +1 -1
  9. package/src/components/editor/file-tree/renderers.tsx +1 -1
  10. package/src/components/editor/output/JsonOutput.tsx +187 -4
  11. package/src/components/editor/output/__tests__/JsonOutput-mimetype.test.tsx +80 -0
  12. package/src/components/editor/output/__tests__/json-output.test.ts +185 -2
  13. package/src/components/editor/renderers/slides-layout/__tests__/compute-slide-cells.test.ts +150 -0
  14. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +298 -0
  15. package/src/components/editor/renderers/slides-layout/compute-slide-cells.ts +50 -0
  16. package/src/components/editor/renderers/slides-layout/plugin.tsx +54 -9
  17. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +30 -12
  18. package/src/components/editor/renderers/slides-layout/types.ts +31 -3
  19. package/src/components/editor/renderers/types.ts +2 -0
  20. package/src/components/slides/__tests__/compose-slides.test.ts +433 -0
  21. package/src/components/slides/compose-slides.ts +337 -0
  22. package/src/components/slides/minimap.tsx +133 -12
  23. package/src/components/slides/reveal-component.tsx +337 -74
  24. package/src/components/slides/reveal-slides.css +33 -1
  25. package/src/components/slides/slide-form.tsx +347 -0
  26. package/src/components/ui/radio-group.tsx +5 -3
  27. package/src/core/cells/types.ts +2 -0
  28. package/src/core/islands/__tests__/bridge.test.ts +116 -5
  29. package/src/core/islands/bridge.ts +5 -1
  30. package/src/core/layout/layout.ts +6 -2
  31. package/src/core/static/__tests__/export-context.test.ts +122 -0
  32. package/src/core/static/__tests__/static-state.test.ts +80 -0
  33. package/src/core/static/export-context.ts +84 -0
  34. package/src/core/static/static-state.ts +44 -6
  35. package/src/plugins/core/RenderHTML.tsx +23 -2
  36. package/src/plugins/core/__test__/RenderHTML.test.ts +86 -1
  37. package/src/plugins/core/__test__/trusted-url.test.ts +130 -18
  38. package/src/plugins/core/sanitize.ts +11 -5
  39. package/src/plugins/core/trusted-url.ts +32 -10
  40. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +29 -1
  41. package/src/plugins/impl/mpl-interactive/__tests__/MplInteractivePlugin.test.tsx +34 -0
  42. package/src/plugins/impl/panel/__tests__/PanelPlugin.test.ts +35 -2
@@ -6,13 +6,13 @@ import { _ as Logger, c as Objects, g as cn, l as useEventListener, t as Button
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-TGGAUEWp.js";
9
- import { $t as ZodLocalStorage, Bt as allTablesAtom, C as AccordionContent, Cn as Wrench, Ct as createVariableInfoElement, D as ChatBubbleIcon, Dn as LoaderCircle, Et as moveToEndOfEditor, Ft as PluralWord, Ht as getTableType, Jt as singleFacet, Nt as jotaiJsonStorage, P as base64ToDataURL, Pn as CircleX, Pt as variablesAtom, S as Accordion, T as AccordionTrigger, U as cellErrorsAtom, V as renderHTML, Vt as dataSourceConnectionsAtom, Wt as getRequestClient, _ as Boosts, _n as Anchor2, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, gt as displayCellName, h as DatasourceContextProvider, hn as atomWithStorage, in as CellOutputId, kn as Info, n as MarkdownRenderer, q as notebookAtom, s as Spinner, t as toPng, u as PopoverContent, v as Sections, w as AccordionItem, x as AIContextRegistry, y as contextToXml } from "./html-to-image-XYwXqg2E.js";
9
+ import { C as AccordionContent, D as ChatBubbleIcon, Ft as jotaiJsonStorage, G as cellErrorsAtom, Ht as allTablesAtom, In as CircleX, It as variablesAtom, Kt as getRequestClient, Lt as PluralWord, Ot as moveToEndOfEditor, P as base64ToDataURL, S as Accordion, T as AccordionTrigger, Tn as Wrench, Tt as createVariableInfoElement, Ut as dataSourceConnectionsAtom, V as renderHTML, Wt as getTableType, Xt as singleFacet, Y as notebookAtom, _ as Boosts, _n as atomWithStorage, b as AIContextProvider, c as Popover, d as PopoverTrigger, f as isOutputEmpty, h as DatasourceContextProvider, jn as Info, kn as LoaderCircle, n as MarkdownRenderer, on as CellOutputId, s as Spinner, t as toPng, tn as ZodLocalStorage, u as PopoverContent, v as Sections, vt as displayCellName, w as AccordionItem, x as AIContextRegistry, y as contextToXml, yn as Anchor2 } from "./html-to-image-DBosi5GK.js";
10
10
  import "./chunk-5FQGJX7Z-CO1e63h_.js";
11
11
  import { u as createLucideIcon } from "./dist-ESg7xyoD.js";
12
12
  import { F as X, S as logNever, t as Strings } from "./strings-B_FOH6eV.js";
13
13
  import { a as NumberField, b as DropdownMenuTrigger, d as DropdownMenuContent, p as DropdownMenuItem, r as Input, u as DropdownMenu } from "./input-Drx1pguW.js";
14
14
  import { g as CircleQuestionMark } from "./toDate-yqOcZ_tY.js";
15
- import { a as MarimoIncomingMessageEvent, d as Trash2, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-BDVjDpbu.js";
15
+ import { a as MarimoIncomingMessageEvent, d as Trash2, f as File$1, n as blobToString, t as processOutput, u as deserializeBlob } from "./process-output-k-4WHpxz.js";
16
16
  import "./react-dom-BWRJ_g_k.js";
17
17
  import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
18
18
  import { 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-BxdsqRPd.js";
@@ -6358,8 +6358,8 @@ var import_compiler_runtime$3 = require_compiler_runtime();
6358
6358
  const ReasoningAccordion = (e18) => {
6359
6359
  let g = (0, import_compiler_runtime$3.c)(13), { reasoning: _, index: v, isStreaming: y } = e18, b = v === void 0 ? 0 : v, x = y === void 0 ? false : y, S = x ? "reasoning" : void 0, C;
6360
6360
  g[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BotMessageSquare, { className: "h-3 w-3" }), g[0] = C) : C = g[0];
6361
- let w = x ? "Thinking" : "View reasoning", T;
6362
- g[1] !== _.length || g[2] !== w ? (T = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6361
+ let w = x ? "Thinking" : "View reasoning", E;
6362
+ g[1] !== _.length || g[2] !== w ? (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6363
6363
  className: "text-xs text-muted-foreground hover:bg-muted/50 px-2 py-1 h-auto rounded-sm [&[data-state=open]>svg]:rotate-180",
6364
6364
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6365
6365
  className: "flex items-center gap-2",
@@ -6372,9 +6372,9 @@ const ReasoningAccordion = (e18) => {
6372
6372
  "chars)"
6373
6373
  ]
6374
6374
  })
6375
- }), g[1] = _.length, g[2] = w, g[3] = T) : T = g[3];
6376
- let E;
6377
- g[4] === _ ? E = g[5] : (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6375
+ }), g[1] = _.length, g[2] = w, g[3] = E) : E = g[3];
6376
+ let D;
6377
+ g[4] === _ ? D = g[5] : (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6378
6378
  className: "pb-2 px-2",
6379
6379
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
6380
6380
  className: "bg-muted/30 border border-muted/50 rounded-md p-3 italic text-muted-foreground/90 relative",
@@ -6383,13 +6383,13 @@ const ReasoningAccordion = (e18) => {
6383
6383
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownRenderer, { content: _ })
6384
6384
  })
6385
6385
  })
6386
- }), g[4] = _, g[5] = E);
6386
+ }), g[4] = _, g[5] = D);
6387
6387
  let O;
6388
- g[6] !== T || g[7] !== E ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6388
+ g[6] !== E || g[7] !== D ? (O = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6389
6389
  value: "reasoning",
6390
6390
  className: "border-0",
6391
- children: [T, E]
6392
- }), g[6] = T, g[7] = E, g[8] = O) : O = g[8];
6391
+ children: [E, D]
6392
+ }), g[6] = E, g[7] = D, g[8] = O) : O = g[8];
6393
6393
  let k;
6394
6394
  return g[9] !== b || g[10] !== S || g[11] !== O ? (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6395
6395
  type: "single",
@@ -6489,9 +6489,9 @@ var import_compiler_runtime$2 = require_compiler_runtime(), SuccessResultSchema
6489
6489
  }), g[7] = S, g[8] = C), C;
6490
6490
  };
6491
6491
  const ToolCallAccordion = (e18) => {
6492
- let g = (0, import_compiler_runtime$2.c)(38), { toolName: _, result: v, error: b, index: x, state: S, className: C, input: w } = e18, T = x === void 0 ? 0 : x, E = S === "output-available" && (v || b), k = b ? "error" : E ? "success" : "loading", A;
6493
- g[0] === k ? A = g[1] : (A = () => {
6494
- switch (k) {
6492
+ let g = (0, import_compiler_runtime$2.c)(38), { toolName: _, result: v, error: b, index: x, state: S, className: C, input: w } = e18, E = x === void 0 ? 0 : x, D = S === "output-available" && (v || b), O = b ? "error" : D ? "success" : "loading", k;
6493
+ g[0] === O ? k = g[1] : (k = () => {
6494
+ switch (O) {
6495
6495
  case "loading":
6496
6496
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LoaderCircle, { className: "h-3 w-3 animate-spin" });
6497
6497
  case "error":
@@ -6501,39 +6501,39 @@ const ToolCallAccordion = (e18) => {
6501
6501
  default:
6502
6502
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Wrench, { className: "h-3 w-3" });
6503
6503
  }
6504
- }, g[0] = k, g[1] = A);
6505
- let M = A, N;
6506
- g[2] !== b || g[3] !== E || g[4] !== k ? (N = () => k === "loading" ? "Running" : b ? "Failed" : E ? "Done" : "Tool call", g[2] = b, g[3] = E, g[4] = k, g[5] = N) : N = g[5];
6507
- let P = N, F = `tool-${T}`, I;
6508
- g[6] === C ? I = g[7] : (I = cn("w-full", C), g[6] = C, g[7] = I);
6509
- let L = k === "error" && "text-[var(--red-11)]/80", z = k === "success" && "text-[var(--grass-11)]/80", H;
6510
- g[8] !== L || g[9] !== z ? (H = 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", L, z), g[8] = L, g[9] = z, g[10] = H) : H = g[10];
6511
- let U;
6512
- g[11] === M ? U = g[12] : (U = M(), g[11] = M, g[12] = U);
6513
- let W = P(), G;
6514
- g[13] === _ ? G = g[14] : (G = formatToolName(_), g[13] = _, g[14] = G);
6515
- let K;
6516
- g[15] === G ? K = g[16] : (K = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6504
+ }, g[0] = O, g[1] = k);
6505
+ let j = k, M;
6506
+ g[2] !== b || g[3] !== D || g[4] !== O ? (M = () => O === "loading" ? "Running" : b ? "Failed" : D ? "Done" : "Tool call", g[2] = b, g[3] = D, g[4] = O, g[5] = M) : M = g[5];
6507
+ let N = M, P = `tool-${E}`, F;
6508
+ g[6] === C ? F = g[7] : (F = cn("w-full", C), g[6] = C, g[7] = F);
6509
+ let z = O === "error" && "text-[var(--red-11)]/80", B = O === "success" && "text-[var(--grass-11)]/80", V;
6510
+ g[8] !== z || g[9] !== B ? (V = 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", z, B), g[8] = z, g[9] = B, g[10] = V) : V = g[10];
6511
+ let H;
6512
+ g[11] === j ? H = g[12] : (H = j(), g[11] = j, g[12] = H);
6513
+ let U = N(), W;
6514
+ g[13] === _ ? W = g[14] : (W = formatToolName(_), g[13] = _, g[14] = W);
6515
+ let G;
6516
+ g[15] === W ? G = g[16] : (G = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
6517
6517
  className: "font-mono text-xs",
6518
- children: G
6519
- }), g[15] = G, g[16] = K);
6520
- let q;
6521
- g[17] !== W || g[18] !== K || g[19] !== U ? (q = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6518
+ children: W
6519
+ }), g[15] = W, g[16] = G);
6520
+ let K;
6521
+ g[17] !== U || g[18] !== G || g[19] !== H ? (K = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
6522
6522
  className: "flex items-center gap-1",
6523
6523
  children: [
6524
+ H,
6524
6525
  U,
6525
- W,
6526
6526
  ":",
6527
- K
6527
+ G
6528
6528
  ]
6529
- }), g[17] = W, g[18] = K, g[19] = U, g[20] = q) : q = g[20];
6529
+ }), g[17] = U, g[18] = G, g[19] = H, g[20] = K) : K = g[20];
6530
+ let q;
6531
+ g[21] !== K || g[22] !== V ? (q = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6532
+ className: V,
6533
+ children: K
6534
+ }), g[21] = K, g[22] = V, g[23] = q) : q = g[23];
6530
6535
  let J;
6531
- g[21] !== q || g[22] !== H ? (J = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionTrigger, {
6532
- className: H,
6533
- children: q
6534
- }), g[21] = q, g[22] = H, g[23] = J) : J = g[23];
6535
- let Y;
6536
- g[24] !== b || g[25] !== E || g[26] !== w || g[27] !== v ? (Y = E && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6536
+ g[24] !== b || g[25] !== D || g[26] !== w || g[27] !== v ? (J = D && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
6537
6537
  className: "space-y-3",
6538
6538
  children: [
6539
6539
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolArgsRenderer, { input: w }),
@@ -6549,25 +6549,25 @@ const ToolCallAccordion = (e18) => {
6549
6549
  })]
6550
6550
  })
6551
6551
  ]
6552
- }), g[24] = b, g[25] = E, g[26] = w, g[27] = v, g[28] = Y) : Y = g[28];
6553
- let Z;
6554
- g[29] === Y ? Z = g[30] : (Z = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6552
+ }), g[24] = b, g[25] = D, g[26] = w, g[27] = v, g[28] = J) : J = g[28];
6553
+ let Y;
6554
+ g[29] === J ? Y = g[30] : (Y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccordionContent, {
6555
6555
  className: "py-2 px-2",
6556
- children: Y
6557
- }), g[29] = Y, g[30] = Z);
6558
- let Q;
6559
- g[31] !== J || g[32] !== Z ? (Q = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6556
+ children: J
6557
+ }), g[29] = J, g[30] = Y);
6558
+ let Z;
6559
+ g[31] !== q || g[32] !== Y ? (Z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(AccordionItem, {
6560
6560
  value: "tool-call",
6561
6561
  className: "border-0",
6562
- children: [J, Z]
6563
- }), g[31] = J, g[32] = Z, g[33] = Q) : Q = g[33];
6564
- let $;
6565
- return g[34] !== Q || g[35] !== F || g[36] !== I ? ($ = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6562
+ children: [q, Y]
6563
+ }), g[31] = q, g[32] = Y, g[33] = Z) : Z = g[33];
6564
+ let Q;
6565
+ return g[34] !== Z || g[35] !== P || g[36] !== F ? (Q = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Accordion, {
6566
6566
  type: "single",
6567
6567
  collapsible: true,
6568
- className: I,
6569
- children: Q
6570
- }, F), g[34] = Q, g[35] = F, g[36] = I, g[37] = $) : $ = g[37], $;
6568
+ className: F,
6569
+ children: Z
6570
+ }, P), g[34] = Z, g[35] = P, g[36] = F, g[37] = Q) : Q = g[37], Q;
6571
6571
  };
6572
6572
  function formatToolName(e18) {
6573
6573
  return e18.replace("tool-", "");
@@ -7166,9 +7166,9 @@ const Chatbot = (e18) => {
7166
7166
  var _a;
7167
7167
  let [g, v] = (0, import_react.useState)(""), [S, C] = (0, import_react.useState)(e18.config), [w, T] = (0, import_react.useState)(e18.config), [E, D] = (0, import_react.useState)(void 0), O = (0, import_react.useRef)(null), k = (0, import_react.useRef)(null), A = (0, import_react.useRef)(null), j = (0, import_react.useRef)(null);
7168
7168
  Object.keys(e18.config).some((g2) => e18.config[g2] !== w[g2]) && (C(e18.config), T(e18.config));
7169
- let N = (0, import_react.useRef)(S);
7170
- N.current = S;
7171
- let P = (0, import_react.useRef)({
7169
+ let M = (0, import_react.useRef)(S);
7170
+ M.current = S;
7171
+ let N = (0, import_react.useRef)({
7172
7172
  backendMessageId: null,
7173
7173
  frontendMessageIndex: null
7174
7174
  }), F = (0, import_react.useRef)(null), { data: I } = useAsyncData(async () => (await e18.get_chat_history({})).messages, []), L = e18.value.length > 0 ? e18.value : I, { messages: R, sendMessage: z, setMessages: B, status: V, stop: H, error: U, regenerate: W, clearError: G } = useChat({
@@ -7176,12 +7176,12 @@ const Chatbot = (e18) => {
7176
7176
  var _a2;
7177
7177
  if (v2 === void 0) return fetch(g2);
7178
7178
  let y = JSON.parse(v2.body), b = v2.signal, x = {
7179
- max_tokens: N.current.max_tokens,
7180
- temperature: N.current.temperature,
7181
- top_p: N.current.top_p,
7182
- top_k: N.current.top_k,
7183
- frequency_penalty: N.current.frequency_penalty,
7184
- presence_penalty: N.current.presence_penalty
7179
+ max_tokens: M.current.max_tokens,
7180
+ temperature: M.current.temperature,
7181
+ top_p: M.current.top_p,
7182
+ top_k: M.current.top_k,
7183
+ frequency_penalty: M.current.frequency_penalty,
7184
+ presence_penalty: M.current.presence_penalty
7185
7185
  };
7186
7186
  try {
7187
7187
  let g3 = y.messages.map((e19) => {
@@ -7217,7 +7217,7 @@ const Chatbot = (e18) => {
7217
7217
  (_a3 = F.current) == null ? void 0 : _a3.error(e19), F.current = null;
7218
7218
  }), createUIMessageStreamResponse({ stream: v3 });
7219
7219
  } catch (e19) {
7220
- if (P.current = {
7220
+ if (N.current = {
7221
7221
  backendMessageId: null,
7222
7222
  frontendMessageIndex: null
7223
7223
  }, e19 instanceof Error && e19.name === "AbortError") return new Response("Aborted", { status: 499 });
@@ -7227,13 +7227,13 @@ const Chatbot = (e18) => {
7227
7227
  } }),
7228
7228
  messages: L,
7229
7229
  onFinish: (g2) => {
7230
- D(void 0), O.current && (O.current.value = ""), Logger.debug("Finished streaming message:", g2), P.current = {
7230
+ D(void 0), O.current && (O.current.value = ""), Logger.debug("Finished streaming message:", g2), N.current = {
7231
7231
  backendMessageId: null,
7232
7232
  frontendMessageIndex: null
7233
7233
  }, e18.setValue(g2.messages);
7234
7234
  },
7235
7235
  onError: (e19) => {
7236
- Logger.error("An error occurred:", e19), P.current = {
7236
+ Logger.error("An error occurred:", e19), N.current = {
7237
7237
  backendMessageId: null,
7238
7238
  frontendMessageIndex: null
7239
7239
  };
@@ -7574,8 +7574,8 @@ var configDescriptions = {
7574
7574
  g[0] === v ? w = g[1] : (w = (e19) => {
7575
7575
  [...e19.matchAll(/{{(\w+)}}/g)].length > 0 ? (C(e19), b(true)) : v(e19);
7576
7576
  }, g[0] = v, g[1] = w);
7577
- let T = w, E;
7578
- g[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
7577
+ let T = w, D;
7578
+ g[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
7579
7579
  content: "Select a prompt",
7580
7580
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuTrigger, {
7581
7581
  asChild: true,
@@ -7586,26 +7586,26 @@ var configDescriptions = {
7586
7586
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChatBubbleIcon, { className: "h-3 w-3" })
7587
7587
  })
7588
7588
  })
7589
- }), g[2] = E) : E = g[2];
7590
- let D;
7589
+ }), g[2] = D) : D = g[2];
7590
+ let O;
7591
7591
  if (g[3] !== T || g[4] !== _) {
7592
7592
  let e19;
7593
7593
  g[6] === T ? e19 = g[7] : (e19 = (e20, g2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuItem, {
7594
7594
  onSelect: () => T(e20),
7595
7595
  className: "whitespace-normal text-left",
7596
7596
  children: e20
7597
- }, g2), g[6] = T, g[7] = e19), D = _.map(e19), g[3] = T, g[4] = _, g[5] = D;
7598
- } else D = g[5];
7599
- let O;
7600
- g[8] === D ? O = g[9] : (O = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverAnchor, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [E, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, {
7597
+ }, g2), g[6] = T, g[7] = e19), O = _.map(e19), g[3] = T, g[4] = _, g[5] = O;
7598
+ } else O = g[5];
7599
+ let k;
7600
+ g[8] === O ? k = g[9] : (k = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverAnchor, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(DropdownMenu, { children: [D, /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DropdownMenuContent, {
7601
7601
  side: "right",
7602
7602
  align: "end",
7603
7603
  onCloseAutoFocus: _temp,
7604
7604
  className: "w-64 max-h-96 overflow-y-auto",
7605
- children: D
7606
- })] }) }), g[8] = D, g[9] = O);
7607
- let k;
7608
- g[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = () => b(false), g[10] = k) : k = g[10];
7605
+ children: O
7606
+ })] }) }), g[8] = O, g[9] = k);
7607
+ let A;
7608
+ g[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = () => b(false), g[10] = A) : A = g[10];
7609
7609
  let j;
7610
7610
  g[11] !== v || g[12] !== S ? (j = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContent, {
7611
7611
  side: "right",
@@ -7613,16 +7613,16 @@ var configDescriptions = {
7613
7613
  className: "min-w-80 px-2",
7614
7614
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PromptVariablesForm, {
7615
7615
  prompt: S,
7616
- onClose: k,
7616
+ onClose: A,
7617
7617
  onSelect: v
7618
7618
  })
7619
7619
  }), g[11] = v, g[12] = S, g[13] = j) : j = g[13];
7620
7620
  let M;
7621
- return g[14] !== y || g[15] !== O || g[16] !== j ? (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Popover, {
7621
+ return g[14] !== y || g[15] !== k || g[16] !== j ? (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Popover, {
7622
7622
  open: y,
7623
7623
  onOpenChange: b,
7624
- children: [O, j]
7625
- }), g[14] = y, g[15] = O, g[16] = j, g[17] = M) : M = g[17], M;
7624
+ children: [k, j]
7625
+ }), g[14] = y, g[15] = k, g[16] = j, g[17] = M) : M = g[17], M;
7626
7626
  }, PromptVariablesForm = (e18) => {
7627
7627
  let g = (0, import_compiler_runtime.c)(32), { prompt: _, onClose: v, onSelect: y } = e18, b;
7628
7628
  g[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {}, g[0] = b) : b = g[0];