@marimo-team/islands 0.25.3-dev51 → 0.25.3-dev55

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 (52) hide show
  1. package/dist/{ErrorBoundary-CbxCC2kk.js → ErrorBoundary-DL6Vkcwu.js} +1 -1
  2. package/dist/{chat-ui-C1Gjgokv.js → chat-ui-C0_lCzql.js} +52 -53
  3. package/dist/{code-visibility-DoZ9lxzx.js → code-visibility-CtaHItnb.js} +1 -1
  4. package/dist/{common-D1PacyXO.js → common-Bqcl1bUR.js} +6366 -6327
  5. package/dist/{data-grid-overlay-editor-B50UpkXd.js → data-grid-overlay-editor-C7NRbnX6.js} +1 -1
  6. package/dist/{dropdown-menu-MG5hiCIa.js → dropdown-menu-B3eUiVJB.js} +161 -153
  7. package/dist/{feedback-button-DqPqwryB.js → feedback-button-CpJHBUq4.js} +2 -2
  8. package/dist/{glide-data-editor-BxMhUd3K.js → glide-data-editor-Cd3d8sya.js} +4 -4
  9. package/dist/{globals-DTJa_doJ.js → globals-C5LrswXh.js} +1 -1
  10. package/dist/{html-to-image-By72ALyI.js → html-to-image-6xcoTKhC.js} +1 -1
  11. package/dist/main.js +2599 -2539
  12. package/dist/{number-overlay-editor-Z_H6x5b-.js → number-overlay-editor-Do7_pdca.js} +1 -1
  13. package/dist/{process-output-D-OMW5sV.js → process-output-BJRJFobf.js} +1 -1
  14. package/dist/{reveal-component-tAB5K3QE.js → reveal-component-CVYLwPCH.js} +12 -12
  15. package/package.json +1 -1
  16. package/src/components/app-config/ai-config.tsx +1 -1
  17. package/src/components/data-table/__tests__/export-actions.test.tsx +17 -0
  18. package/src/components/data-table/charts/charts.tsx +14 -19
  19. package/src/components/data-table/export-actions.tsx +5 -3
  20. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +24 -0
  21. package/src/components/editor/actions/pair-with-agent-modal.tsx +18 -15
  22. package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
  23. package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
  24. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +30 -1
  25. package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
  26. package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
  27. package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
  28. package/src/components/editor/file-tree/file-explorer.tsx +10 -5
  29. package/src/components/editor/file-tree/use-file-search.ts +35 -21
  30. package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
  31. package/src/components/icons/large-spinner.tsx +3 -14
  32. package/src/core/network/useConnectionNotice.ts +8 -2
  33. package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
  34. package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
  35. package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
  36. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
  37. package/src/hooks/__tests__/useScript.test.tsx +77 -0
  38. package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
  39. package/src/hooks/useDebounce.ts +5 -8
  40. package/src/hooks/useDeepCompareMemoize.ts +1 -1
  41. package/src/hooks/useDelayElapsed.ts +14 -10
  42. package/src/hooks/useInternalStateWithSync.ts +6 -6
  43. package/src/hooks/useScript.ts +67 -70
  44. package/src/hooks/useStateForKey.ts +93 -0
  45. package/src/plugins/impl/DataTablePlugin.tsx +14 -15
  46. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
  47. package/src/plugins/impl/SliderPlugin.tsx +6 -8
  48. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +117 -1
  49. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
  50. package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
  51. package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
  52. package/src/plugins/impl/chat/chat-ui.tsx +10 -9
@@ -135,7 +135,7 @@ function F(e) {
135
135
  }
136
136
  //#endregion
137
137
  //#region src/components/editor/boundary/ErrorBoundary.tsx
138
- var I = (0, T.lazy)(() => import("./feedback-button-DqPqwryB.js").then((e) => ({ default: e.FeedbackModal }))), L = (e) => {
138
+ var I = (0, T.lazy)(() => import("./feedback-button-CpJHBUq4.js").then((e) => ({ default: e.FeedbackModal }))), L = (e) => {
139
139
  let t = (0, w.c)(2), n;
140
140
  return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, j.jsx)(O, {
141
141
  FallbackComponent: R,
@@ -3,13 +3,13 @@ import { c as n, g as r, h as i, t as a } from "./button-BxB3RDjN.js";
3
3
  import { t as o } from "./react-sHtZdjeP.js";
4
4
  import { t as s } from "./compiler-runtime-CldRdSsv.js";
5
5
  import { i as c, t as l } from "./copy-icon-CPoxUG7G.js";
6
- import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as te, z as ne } from "./html-to-image-By72ALyI.js";
6
+ import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as te, z as ne } from "./html-to-image-6xcoTKhC.js";
7
7
  import { h as j, t as re } from "./tooltip-CKO1pHJo.js";
8
8
  import { Ct as ie, Et as ae, Ht as oe, L as se, Lt as ce, Nt as le, St as ue, X as de, cn as fe, ct as pe, dn as me, en as he, et as ge, h as _e, i as ve, ln as ye, mn as be, mt as xe, r as Se, rt as Ce, st as we, t as Te, w as Ee, xt as De } from "./error-entries-CMNtA8NK.js";
9
9
  import { A as Oe, C as ke, M as Ae, b as je } from "./select-B0LRDH0g.js";
10
- import { _ as Me, f as Ne, h as Pe, i as Fe, n as Ie, t as Le } from "./dropdown-menu-MG5hiCIa.js";
10
+ import { _ as Me, f as Ne, h as Pe, i as Fe, n as Ie, t as Le } from "./dropdown-menu-B3eUiVJB.js";
11
11
  import { C as Re, d as ze } from "./toDate-CjPuEPou.js";
12
- import { d as Be, f as Ve, i as He, n as Ue, t as We, u as Ge } from "./process-output-D-OMW5sV.js";
12
+ import { d as Be, f as Ve, i as He, n as Ue, t as We, u as Ge } from "./process-output-BJRJFobf.js";
13
13
  import { t as Ke } from "./jsx-runtime-3BD1kT0s.js";
14
14
  import { A as qe, C as Je, D as Ye, E as Xe, F as Ze, L as Qe, M as $e, O as et, P as tt, R as nt, S as rt, T as it, V as at, b as ot, j as st, v as ct, w as lt, x as ut, y as dt, z as ft } from "./use-restore-focus-DBCITLeF.js";
15
15
  import { n as pt } from "./error-banner-Sl2FlSJ4.js";
@@ -5410,7 +5410,9 @@ var Gs = (e) => {
5410
5410
  let [t, o] = (0, K.useState)(""), [s, c] = (0, K.useState)(e.config), [u, d] = (0, K.useState)(e.config), [f, p] = (0, K.useState)(void 0), h = (0, K.useRef)(null), g = (0, K.useRef)(null), _ = (0, K.useRef)(null), v = (0, K.useRef)(null);
5411
5411
  Object.keys(e.config).some((t) => e.config[t] !== u[t]) && (c(e.config), d(e.config));
5412
5412
  let y = (0, K.useRef)(s);
5413
- y.current = s;
5413
+ (0, K.useLayoutEffect)(() => {
5414
+ y.current = s;
5415
+ }, [s]);
5414
5416
  let b = (0, K.useRef)(null), x = (0, K.useRef)(null), S = (0, K.useRef)(null), [C, w] = (0, K.useState)(null), T = () => {
5415
5417
  S.current = null, w(null);
5416
5418
  }, { data: D } = Rt(async () => (await e.get_chat_history({})).messages, []), O = e.value.length > 0 ? e.value : D, { messages: k, sendMessage: A, setMessages: ee, status: te, stop: ne, error: j, regenerate: ie, clearError: ae, addToolApprovalResponse: oe } = eo({
@@ -5522,12 +5524,13 @@ var Gs = (e) => {
5522
5524
  behavior: "smooth"
5523
5525
  });
5524
5526
  }, [k.length, v]);
5525
- let fe = _.current?.view, pe = () => {
5526
- if (fe) {
5527
- let e = fe.state.doc.length;
5528
- fe.dispatch({ changes: {
5527
+ let fe = () => {
5528
+ let e = _.current?.view;
5529
+ if (e) {
5530
+ let t = e.state.doc.length;
5531
+ e.dispatch({ changes: {
5529
5532
  from: 0,
5530
- to: e,
5533
+ to: t,
5531
5534
  insert: ""
5532
5535
  } });
5533
5536
  }
@@ -5627,7 +5630,7 @@ var Gs = (e) => {
5627
5630
  type: "text",
5628
5631
  text: t
5629
5632
  }, ...r ?? []]
5630
- }), pe();
5633
+ }), fe();
5631
5634
  },
5632
5635
  ref: g,
5633
5636
  inert: e.disabled || void 0,
@@ -5641,7 +5644,8 @@ var Gs = (e) => {
5641
5644
  prompts: e.prompts,
5642
5645
  onSelect: (e) => {
5643
5646
  o(e), requestAnimationFrame(() => {
5644
- fe?.focus(), ge(fe);
5647
+ let e = _.current?.view;
5648
+ e?.focus(), ge(e);
5645
5649
  });
5646
5650
  }
5647
5651
  }),
@@ -5879,7 +5883,7 @@ var Gs = (e) => {
5879
5883
  prompt: s,
5880
5884
  onClose: h,
5881
5885
  onSelect: r
5882
- })
5886
+ }, s)
5883
5887
  }), t[11] = r, t[12] = s, t[13] = g) : g = t[13];
5884
5888
  let _;
5885
5889
  return t[14] !== i || t[15] !== m || t[16] !== g ? (_ = /* @__PURE__ */ (0, q.jsxs)(ne, {
@@ -5888,37 +5892,32 @@ var Gs = (e) => {
5888
5892
  children: [m, g]
5889
5893
  }), t[14] = i, t[15] = m, t[16] = g, t[17] = _) : _ = t[17], _;
5890
5894
  }, Ys = (e) => {
5891
- let t = (0, M.c)(32), { prompt: n, onClose: r, onSelect: i } = e, o;
5892
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = {}, t[0] = o) : o = t[0];
5893
- let [s, c] = (0, K.useState)(o), l, u;
5894
- t[1] === n ? (l = t[2], u = t[3]) : (l = () => {
5895
- let e = [...n.matchAll(/{{(\w+)}}/g)].reduce(Zs, {});
5896
- c(e);
5897
- }, u = [n], t[1] = n, t[2] = l, t[3] = u), (0, K.useEffect)(l, u);
5898
- let d;
5899
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (d = (e, t) => {
5895
+ let t = (0, M.c)(30), { prompt: n, onClose: r, onSelect: i } = e, o;
5896
+ t[0] === n ? o = t[1] : (o = () => [...n.matchAll(/{{(\w+)}}/g)].reduce(Zs, {}), t[0] = n, t[1] = o);
5897
+ let [s, c] = (0, K.useState)(o), l;
5898
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (e, t) => {
5900
5899
  c((n) => ({
5901
5900
  ...n,
5902
5901
  [e]: t
5903
5902
  }));
5904
- }, t[4] = d) : d = t[4];
5905
- let f = d, p;
5906
- if (t[5] !== n || t[6] !== s) {
5903
+ }, t[2] = l) : l = t[2];
5904
+ let u = l, d;
5905
+ if (t[3] !== n || t[4] !== s) {
5907
5906
  let e;
5908
- t[8] === Symbol.for("react.memo_cache_sentinel") ? (e = /{{(\w+)}}/g, t[8] = e) : e = t[8];
5907
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (e = /{{(\w+)}}/g, t[6] = e) : e = t[6];
5909
5908
  let r;
5910
- t[9] === s ? r = t[10] : (r = (e, t) => s[t] || `{{${t}}}`, t[9] = s, t[10] = r), p = n.replaceAll(e, r), t[5] = n, t[6] = s, t[7] = p;
5911
- } else p = t[7];
5909
+ t[7] === s ? r = t[8] : (r = (e, t) => s[t] || `{{${t}}}`, t[7] = s, t[8] = r), d = n.replaceAll(e, r), t[3] = n, t[4] = s, t[5] = d;
5910
+ } else d = t[5];
5911
+ let f = d, p;
5912
+ t[9] === s ? p = t[10] : (p = Object.values(s).some(Qs), t[9] = s, t[10] = p);
5912
5913
  let m = p, h;
5913
- t[11] === s ? h = t[12] : (h = Object.values(s).some(Qs), t[11] = s, t[12] = h);
5914
+ t[11] !== r || t[12] !== i || t[13] !== f ? (h = () => {
5915
+ i(f), r();
5916
+ }, t[11] = r, t[12] = i, t[13] = f, t[14] = h) : h = t[14];
5914
5917
  let g = h, _;
5915
- t[13] !== r || t[14] !== i || t[15] !== m ? (_ = () => {
5916
- i(m), r();
5917
- }, t[13] = r, t[14] = i, t[15] = m, t[16] = _) : _ = t[16];
5918
- let v = _, y;
5919
- t[17] === s ? y = t[18] : (y = Object.entries(s), t[17] = s, t[18] = y);
5920
- let b;
5921
- t[19] !== v || t[20] !== g || t[21] !== y ? (b = y.map((e, t) => {
5918
+ t[15] === s ? _ = t[16] : (_ = Object.entries(s), t[15] = s, t[16] = _);
5919
+ let v;
5920
+ t[17] !== g || t[18] !== m || t[19] !== _ ? (v = _.map((e, t) => {
5922
5921
  let [n, r] = e;
5923
5922
  return /* @__PURE__ */ (0, q.jsxs)("div", {
5924
5923
  className: "grid grid-cols-4 items-center gap-2",
@@ -5929,41 +5928,41 @@ var Gs = (e) => {
5929
5928
  }), /* @__PURE__ */ (0, q.jsx)(Pe, {
5930
5929
  id: n,
5931
5930
  value: r,
5932
- onChange: (e) => f(n, e.target.value),
5931
+ onChange: (e) => u(n, e.target.value),
5933
5932
  rootClassName: "col-span-3 w-full",
5934
5933
  className: "m-0",
5935
5934
  placeholder: `Enter value for ${n}`,
5936
5935
  autoFocus: t === 0,
5937
5936
  onKeyDown: (e) => {
5938
- e.key === "Enter" && !g && v();
5937
+ e.key === "Enter" && !m && g();
5939
5938
  }
5940
5939
  })]
5941
5940
  }, n);
5942
- }), t[19] = v, t[20] = g, t[21] = y, t[22] = b) : b = t[22];
5943
- let x;
5944
- t[23] === m ? x = t[24] : (x = /* @__PURE__ */ (0, q.jsx)("div", {
5941
+ }), t[17] = g, t[18] = m, t[19] = _, t[20] = v) : v = t[20];
5942
+ let y;
5943
+ t[21] === f ? y = t[22] : (y = /* @__PURE__ */ (0, q.jsx)("div", {
5945
5944
  className: "grid gap-2 prose dark:prose-invert",
5946
5945
  children: /* @__PURE__ */ (0, q.jsx)("blockquote", {
5947
5946
  className: "text-sm",
5948
- children: m
5947
+ children: f
5949
5948
  })
5950
- }), t[23] = m, t[24] = x);
5951
- let S;
5952
- t[25] !== v || t[26] !== g ? (S = /* @__PURE__ */ (0, q.jsx)(a, {
5953
- onClick: v,
5949
+ }), t[21] = f, t[22] = y);
5950
+ let b;
5951
+ t[23] !== g || t[24] !== m ? (b = /* @__PURE__ */ (0, q.jsx)(a, {
5952
+ onClick: g,
5954
5953
  size: "xs",
5955
- disabled: g,
5954
+ disabled: m,
5956
5955
  children: "Submit"
5957
- }), t[25] = v, t[26] = g, t[27] = S) : S = t[27];
5958
- let C;
5959
- return t[28] !== x || t[29] !== S || t[30] !== b ? (C = /* @__PURE__ */ (0, q.jsxs)("div", {
5956
+ }), t[23] = g, t[24] = m, t[25] = b) : b = t[25];
5957
+ let x;
5958
+ return t[26] !== v || t[27] !== y || t[28] !== b ? (x = /* @__PURE__ */ (0, q.jsxs)("div", {
5960
5959
  className: "grid gap-4",
5961
5960
  children: [
5962
- b,
5963
- x,
5964
- S
5961
+ v,
5962
+ y,
5963
+ b
5965
5964
  ]
5966
- }), t[28] = x, t[29] = S, t[30] = b, t[31] = C) : C = t[31], C;
5965
+ }), t[26] = v, t[27] = y, t[28] = b, t[29] = x) : x = t[29], x;
5967
5966
  };
5968
5967
  function Xs(e) {
5969
5968
  return e.preventDefault();
@@ -18,7 +18,7 @@ function x() {
18
18
  return e.warn("Failed to get version from mount config"), null;
19
19
  }
20
20
  }
21
- var S = x() || "0.25.3-dev51", C = u(S), w = u(!0);
21
+ var S = x() || "0.25.3-dev55", C = u(S), w = u(!0);
22
22
  u(null);
23
23
  //#endregion
24
24
  //#region src/core/wasm/state.ts