@marimo-team/islands 0.16.4 → 0.16.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 (65) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CCjhPKMy.js → ConnectedDataExplorerComponent-D96i9G-X.js} +3 -3
  2. package/dist/assets/__vite-browser-external-Dv_SHu1h.js +1 -0
  3. package/dist/assets/{worker-DnuXpGWN.js → worker-DVOR9oZG.js} +2 -2
  4. package/dist/{formats-D5C6JAJf.js → formats-ChrNdVdJ.js} +1 -1
  5. package/dist/{glide-data-editor-CYfKmSNp.js → glide-data-editor-D_kEsT07.js} +68 -68
  6. package/dist/main.js +84 -213
  7. package/dist/{mermaid-BlJDcO4M.js → mermaid-MWiyXDcI.js} +2 -2
  8. package/dist/style.css +1 -1
  9. package/dist/{types-Dcb1hf55.js → types-1X1uZB4y.js} +323 -179
  10. package/dist/{useAsyncData-DAtPzJzP.js → useAsyncData-C4IqQK0g.js} +1 -1
  11. package/dist/{useDateFormatter-CiUlIu7v.js → useDateFormatter-BCsBqetx.js} +1 -1
  12. package/dist/{useTheme-CmsvrO5o.js → useTheme-C2pgJzDH.js} +1 -0
  13. package/dist/{vega-component-B3LA6qbm.js → vega-component-Cv4J8CHz.js} +3 -3
  14. package/package.json +1 -1
  15. package/src/__tests__/chat-history.test.ts +123 -0
  16. package/src/components/app-config/ai-config.tsx +23 -0
  17. package/src/components/app-config/mcp-config.tsx +42 -2
  18. package/src/components/app-config/user-config-form.tsx +0 -24
  19. package/src/components/chat/acp/__tests__/context-utils.test.ts +1 -1
  20. package/src/components/chat/acp/agent-panel.tsx +1 -1
  21. package/src/components/chat/acp/blocks.tsx +46 -53
  22. package/src/components/chat/acp/common.tsx +1 -1
  23. package/src/components/chat/acp/context-utils.ts +1 -1
  24. package/src/components/chat/acp/session-tabs.tsx +1 -1
  25. package/src/components/chat/chat-history-popover.tsx +125 -0
  26. package/src/components/chat/chat-history-utils.ts +69 -0
  27. package/src/components/chat/chat-panel.tsx +9 -57
  28. package/src/components/editor/__tests__/data-attributes.test.tsx +1 -1
  29. package/src/components/editor/actions/useNotebookActions.tsx +2 -4
  30. package/src/components/editor/ai/__tests__/completion-utils.test.ts +23 -31
  31. package/src/components/editor/cell/CreateCellButton.tsx +14 -2
  32. package/src/components/editor/cell/code/cell-editor.tsx +1 -0
  33. package/src/components/editor/database/schemas.ts +2 -10
  34. package/src/components/editor/{Cell.tsx → notebook-cell.tsx} +5 -1
  35. package/src/components/editor/output/MarimoErrorOutput.tsx +4 -34
  36. package/src/components/editor/renderers/{CellArray.tsx → cell-array.tsx} +1 -1
  37. package/src/components/forms/__tests__/form-utils.test.ts +2 -2
  38. package/src/components/mcp/hooks.ts +48 -0
  39. package/src/components/mcp/mcp-status-indicator.tsx +144 -0
  40. package/src/components/ui/number-field.tsx +4 -1
  41. package/src/core/ai/context/providers/__tests__/__snapshots__/tables.test.ts.snap +13 -19
  42. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +0 -1
  43. package/src/core/ai/context/providers/__tests__/datasource.test.ts +5 -6
  44. package/src/core/ai/context/providers/__tests__/error.test.ts +24 -15
  45. package/src/core/ai/context/providers/cell-output.ts +5 -5
  46. package/src/core/ai/context/providers/common.ts +13 -4
  47. package/src/core/ai/context/providers/datasource.ts +31 -20
  48. package/src/core/ai/context/providers/error.ts +3 -4
  49. package/src/core/ai/context/providers/file.ts +2 -2
  50. package/src/core/ai/context/providers/tables.ts +36 -8
  51. package/src/core/ai/context/providers/variable.ts +2 -3
  52. package/src/core/cells/__tests__/cells.test.ts +6 -6
  53. package/src/core/cells/cells.ts +12 -13
  54. package/src/core/cells/scrollCellIntoView.ts +1 -1
  55. package/src/core/codemirror/__tests__/setup.test.ts +1 -0
  56. package/src/core/codemirror/cm.ts +3 -2
  57. package/src/core/config/__tests__/config-schema.test.ts +2 -0
  58. package/src/core/config/config-schema.ts +2 -0
  59. package/src/core/config/feature-flag.tsx +0 -2
  60. package/src/core/edit-app.tsx +1 -1
  61. package/src/core/network/CachingRequestRegistry.ts +2 -2
  62. package/src/stories/cell.stories.tsx +1 -1
  63. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  64. package/src/utils/numbers.ts +24 -1
  65. package/dist/assets/__vite-browser-external-BeNtI_tJ.js +0 -1
@@ -8,12 +8,12 @@ import { n as Copy, r as toast, t as copyToClipboard } from "./copy-C5RFg7ok.js"
8
8
  import "./fullscreen-D1yTiBlu.js";
9
9
  import "./check-BK9zDfQk.js";
10
10
  import { c as Select, d as SelectItem, h as SelectValue, k as useOnMount, l as SelectContent, m as SelectTrigger, t as Label } from "./label-BinTsX-u.js";
11
- import { Gt as capitalize_default, Ht as useNonce, Jt as Plus, Kt as Trash, Wt as logNever, Yt as Pencil, _ as DropdownMenuSub, a as Input, d as DropdownMenuContent, g as DropdownMenuSeparator, h as DropdownMenuPortal, n as ErrorBoundary, p as DropdownMenuItem, t as BulkEdit, u as DropdownMenu, v as DropdownMenuSubContent, y as DropdownMenuSubTrigger } from "./types-Dcb1hf55.js";
11
+ import { Gt as useNonce, S as DropdownMenuSubTrigger, a as Input, an as Trash, b as DropdownMenuSub, cn as Pencil, g as DropdownMenuItem, in as capitalize_default, m as DropdownMenuContent, n as ErrorBoundary, p as DropdownMenu, qt as logNever, sn as Plus, t as BulkEdit, v as DropdownMenuPortal, x as DropdownMenuSubContent, y as DropdownMenuSeparator } from "./types-1X1uZB4y.js";
12
12
  import { t as Button, u as Events } from "./button-CEcjneWG.js";
13
13
  import { s as Logger } from "./hotkeys-yFrUwyJK.js";
14
14
  import "./react-dom-CpBooCbY.js";
15
15
  import "./zod-UPQf9SGn.js";
16
- import { g as useEvent_default, n as useTheme } from "./useTheme-CmsvrO5o.js";
16
+ import { g as useEvent_default, n as useTheme } from "./useTheme-C2pgJzDH.js";
17
17
  import "./isArrayLikeObject-DiDsNamC.js";
18
18
  import "./isSymbol-BxF-_8BA.js";
19
19
  import "./toString-BvCd3yJc.js";
@@ -10566,16 +10566,16 @@ let __tla = (async () => {
10566
10566
  })
10567
10567
  ]
10568
10568
  }), t[10] = u, t[11] = a, t[12] = y) : y = t[12];
10569
- let x = !a.trim(), S;
10570
- t[13] !== c || t[14] !== x ? (S = (0, import_jsx_runtime.jsx)(Button, {
10569
+ let C = !a.trim(), O;
10570
+ t[13] !== c || t[14] !== C ? (O = (0, import_jsx_runtime.jsx)(Button, {
10571
10571
  onClick: c,
10572
- disabled: x,
10572
+ disabled: C,
10573
10573
  size: "sm",
10574
10574
  className: "w-full",
10575
10575
  children: "Rename"
10576
- }), t[13] = c, t[14] = x, t[15] = S) : S = t[15];
10577
- let C;
10578
- return t[16] !== y || t[17] !== S ? (C = (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
10576
+ }), t[13] = c, t[14] = C, t[15] = O) : O = t[15];
10577
+ let k;
10578
+ return t[16] !== y || t[17] !== O ? (k = (0, import_jsx_runtime.jsxs)(DropdownMenuSub, {
10579
10579
  children: [
10580
10580
  f,
10581
10581
  (0, import_jsx_runtime.jsx)(DropdownMenuPortal, {
@@ -10585,15 +10585,15 @@ let __tla = (async () => {
10585
10585
  className: "space-y-3",
10586
10586
  children: [
10587
10587
  y,
10588
- S
10588
+ O
10589
10589
  ]
10590
10590
  })
10591
10591
  })
10592
10592
  })
10593
10593
  ]
10594
- }), t[16] = y, t[17] = S, t[18] = C) : C = t[18], C;
10594
+ }), t[16] = y, t[17] = O, t[18] = k) : k = t[18], k;
10595
10595
  }, AddColumnSub = (e) => {
10596
- let t = (0, import_compiler_runtime.c)(77), { direction: n, onAdd: r, onCancel: i } = e, [a, o] = (0, import_react.useState)(""), [s, l] = (0, import_react.useState)("string"), f, y, x, C, E, D, A, j, N, P, F, I, Mr, V, H;
10596
+ let t = (0, import_compiler_runtime.c)(77), { direction: n, onAdd: r, onCancel: i } = e, [a, o] = (0, import_react.useState)(""), [s, l] = (0, import_react.useState)("string"), f, y, C, D, O, k, A, j, M, N, F, jr, Mr, V, H;
10597
10597
  if (t[0] !== a || t[1] !== s || t[2] !== n || t[3] !== r || t[4] !== i) {
10598
10598
  let e2 = [
10599
10599
  "string",
@@ -10603,13 +10603,13 @@ let __tla = (async () => {
10603
10603
  ], B;
10604
10604
  t[20] !== a || t[21] !== s || t[22] !== r ? (B = () => {
10605
10605
  a.trim() && (r(a.trim(), s), o(""), l("string"));
10606
- }, t[20] = a, t[21] = s, t[22] = r, t[23] = B) : B = t[23], D = B;
10606
+ }, t[20] = a, t[21] = s, t[22] = r, t[23] = B) : B = t[23], k = B;
10607
10607
  let Nr2;
10608
- t[24] !== D || t[25] !== i ? (Nr2 = (e3) => {
10609
- e3.key === "Enter" ? D() : e3.key === "Escape" && i();
10610
- }, t[24] = D, t[25] = i, t[26] = Nr2) : Nr2 = t[26];
10608
+ t[24] !== k || t[25] !== i ? (Nr2 = (e3) => {
10609
+ e3.key === "Enter" ? k() : e3.key === "Escape" && i();
10610
+ }, t[24] = k, t[25] = i, t[26] = Nr2) : Nr2 = t[26];
10611
10611
  let U2 = Nr2;
10612
- E = DropdownMenuSub;
10612
+ O = DropdownMenuSub;
10613
10613
  let Pr2;
10614
10614
  t[27] === Symbol.for("react.memo_cache_sentinel") ? (Pr2 = (0, import_jsx_runtime.jsx)(Plus, {
10615
10615
  className: "mr-2 h-3.5 w-3.5"
@@ -10619,7 +10619,7 @@ let __tla = (async () => {
10619
10619
  "Add column to the ",
10620
10620
  n
10621
10621
  ]
10622
- }), t[28] = n, t[29] = H), C = DropdownMenuPortal, x = DropdownMenuSubContent, V = "w-64 p-4", I = "space-y-3";
10622
+ }), t[28] = n, t[29] = H), D = DropdownMenuPortal, C = DropdownMenuSubContent, V = "w-64 p-4", jr = "space-y-3";
10623
10623
  let W2 = `add-column-input-${n}`, G2;
10624
10624
  t[30] === W2 ? G2 = t[31] : (G2 = (0, import_jsx_runtime.jsx)(Label, {
10625
10625
  htmlFor: W2,
@@ -10645,27 +10645,27 @@ let __tla = (async () => {
10645
10645
  t[40] === J2 ? F = t[41] : (F = (0, import_jsx_runtime.jsx)(Label, {
10646
10646
  htmlFor: J2,
10647
10647
  children: "Data type"
10648
- }), t[40] = J2, t[41] = F), y = Select, j = s, t[42] === Symbol.for("react.memo_cache_sentinel") ? (N = (e3) => l(e3), t[42] = N) : N = t[42];
10648
+ }), t[40] = J2, t[41] = F), y = Select, j = s, t[42] === Symbol.for("react.memo_cache_sentinel") ? (M = (e3) => l(e3), t[42] = M) : M = t[42];
10649
10649
  let Ir = `add-column-type-${n}`, Lr;
10650
- t[43] === Symbol.for("react.memo_cache_sentinel") ? (Lr = (0, import_jsx_runtime.jsx)(SelectValue, {}), t[43] = Lr) : Lr = t[43], t[44] === Ir ? P = t[45] : (P = (0, import_jsx_runtime.jsx)(SelectTrigger, {
10650
+ t[43] === Symbol.for("react.memo_cache_sentinel") ? (Lr = (0, import_jsx_runtime.jsx)(SelectValue, {}), t[43] = Lr) : Lr = t[43], t[44] === Ir ? N = t[45] : (N = (0, import_jsx_runtime.jsx)(SelectTrigger, {
10651
10651
  id: Ir,
10652
10652
  className: "mt-1",
10653
10653
  children: Lr
10654
- }), t[44] = Ir, t[45] = P), f = SelectContent, A = e2.map(_temp), t[0] = a, t[1] = s, t[2] = n, t[3] = r, t[4] = i, t[5] = f, t[6] = y, t[7] = x, t[8] = C, t[9] = E, t[10] = D, t[11] = A, t[12] = j, t[13] = N, t[14] = P, t[15] = F, t[16] = I, t[17] = Mr, t[18] = V, t[19] = H;
10655
- } else f = t[5], y = t[6], x = t[7], C = t[8], E = t[9], D = t[10], A = t[11], j = t[12], N = t[13], P = t[14], F = t[15], I = t[16], Mr = t[17], V = t[18], H = t[19];
10654
+ }), t[44] = Ir, t[45] = N), f = SelectContent, A = e2.map(_temp), t[0] = a, t[1] = s, t[2] = n, t[3] = r, t[4] = i, t[5] = f, t[6] = y, t[7] = C, t[8] = D, t[9] = O, t[10] = k, t[11] = A, t[12] = j, t[13] = M, t[14] = N, t[15] = F, t[16] = jr, t[17] = Mr, t[18] = V, t[19] = H;
10655
+ } else f = t[5], y = t[6], C = t[7], D = t[8], O = t[9], k = t[10], A = t[11], j = t[12], M = t[13], N = t[14], F = t[15], jr = t[16], Mr = t[17], V = t[18], H = t[19];
10656
10656
  let Nr;
10657
10657
  t[46] !== f || t[47] !== A ? (Nr = (0, import_jsx_runtime.jsx)(f, {
10658
10658
  children: A
10659
10659
  }), t[46] = f, t[47] = A, t[48] = Nr) : Nr = t[48];
10660
10660
  let U;
10661
- t[49] !== y || t[50] !== Nr || t[51] !== j || t[52] !== N || t[53] !== P ? (U = (0, import_jsx_runtime.jsxs)(y, {
10661
+ t[49] !== y || t[50] !== Nr || t[51] !== j || t[52] !== M || t[53] !== N ? (U = (0, import_jsx_runtime.jsxs)(y, {
10662
10662
  value: j,
10663
- onValueChange: N,
10663
+ onValueChange: M,
10664
10664
  children: [
10665
- P,
10665
+ N,
10666
10666
  Nr
10667
10667
  ]
10668
- }), t[49] = y, t[50] = Nr, t[51] = j, t[52] = N, t[53] = P, t[54] = U) : U = t[54];
10668
+ }), t[49] = y, t[50] = Nr, t[51] = j, t[52] = M, t[53] = N, t[54] = U) : U = t[54];
10669
10669
  let Pr;
10670
10670
  t[55] !== U || t[56] !== F ? (Pr = (0, import_jsx_runtime.jsxs)("div", {
10671
10671
  children: [
@@ -10674,38 +10674,38 @@ let __tla = (async () => {
10674
10674
  ]
10675
10675
  }), t[55] = U, t[56] = F, t[57] = Pr) : Pr = t[57];
10676
10676
  let W = !a.trim(), G;
10677
- t[58] !== D || t[59] !== W ? (G = (0, import_jsx_runtime.jsx)(Button, {
10678
- onClick: D,
10677
+ t[58] !== k || t[59] !== W ? (G = (0, import_jsx_runtime.jsx)(Button, {
10678
+ onClick: k,
10679
10679
  disabled: W,
10680
10680
  size: "sm",
10681
10681
  className: "w-full",
10682
10682
  children: "Add"
10683
- }), t[58] = D, t[59] = W, t[60] = G) : G = t[60];
10683
+ }), t[58] = k, t[59] = W, t[60] = G) : G = t[60];
10684
10684
  let Fr;
10685
- t[61] !== Pr || t[62] !== G || t[63] !== I || t[64] !== Mr ? (Fr = (0, import_jsx_runtime.jsxs)("div", {
10686
- className: I,
10685
+ t[61] !== Pr || t[62] !== G || t[63] !== jr || t[64] !== Mr ? (Fr = (0, import_jsx_runtime.jsxs)("div", {
10686
+ className: jr,
10687
10687
  children: [
10688
10688
  Mr,
10689
10689
  Pr,
10690
10690
  G
10691
10691
  ]
10692
- }), t[61] = Pr, t[62] = G, t[63] = I, t[64] = Mr, t[65] = Fr) : Fr = t[65];
10692
+ }), t[61] = Pr, t[62] = G, t[63] = jr, t[64] = Mr, t[65] = Fr) : Fr = t[65];
10693
10693
  let K;
10694
- t[66] !== x || t[67] !== Fr || t[68] !== V ? (K = (0, import_jsx_runtime.jsx)(x, {
10694
+ t[66] !== C || t[67] !== Fr || t[68] !== V ? (K = (0, import_jsx_runtime.jsx)(C, {
10695
10695
  className: V,
10696
10696
  children: Fr
10697
- }), t[66] = x, t[67] = Fr, t[68] = V, t[69] = K) : K = t[69];
10697
+ }), t[66] = C, t[67] = Fr, t[68] = V, t[69] = K) : K = t[69];
10698
10698
  let q;
10699
- t[70] !== C || t[71] !== K ? (q = (0, import_jsx_runtime.jsx)(C, {
10699
+ t[70] !== D || t[71] !== K ? (q = (0, import_jsx_runtime.jsx)(D, {
10700
10700
  children: K
10701
- }), t[70] = C, t[71] = K, t[72] = q) : q = t[72];
10701
+ }), t[70] = D, t[71] = K, t[72] = q) : q = t[72];
10702
10702
  let J;
10703
- return t[73] !== E || t[74] !== q || t[75] !== H ? (J = (0, import_jsx_runtime.jsxs)(E, {
10703
+ return t[73] !== O || t[74] !== q || t[75] !== H ? (J = (0, import_jsx_runtime.jsxs)(O, {
10704
10704
  children: [
10705
10705
  H,
10706
10706
  q
10707
10707
  ]
10708
- }), t[73] = E, t[74] = q, t[75] = H, t[76] = J) : J = t[76], J;
10708
+ }), t[73] = O, t[74] = q, t[75] = H, t[76] = J) : J = t[76], J;
10709
10709
  };
10710
10710
  function _temp(e) {
10711
10711
  return (0, import_jsx_runtime.jsx)(SelectItem, {
@@ -10776,8 +10776,8 @@ let __tla = (async () => {
10776
10776
  }
10777
10777
  }
10778
10778
  }
10779
- GlideDataEditor = ({ data: e, setData: t, columnFields: n, setColumnFields: r, editableColumns: i, edits: c, onAddEdits: l, onAddRows: u, onDeleteRows: m, onRenameColumn: h, onDeleteColumn: g, onAddColumn: y }) => {
10780
- let { theme: S } = useTheme(), D = (0, import_react.useRef)(null), [O, k] = (0, import_react.useState)(), [M, L] = (0, import_react.useState)(false), [jr, V] = import_react.useState({
10779
+ GlideDataEditor = ({ data: e, setData: t, columnFields: n, setColumnFields: r, editableColumns: i, edits: c, onAddEdits: l, onAddRows: u, onDeleteRows: m, onRenameColumn: h, onDeleteColumn: g, onAddColumn: x }) => {
10780
+ let { theme: S } = useTheme(), E = (0, import_react.useRef)(null), [D, k] = (0, import_react.useState)(), [P, I] = (0, import_react.useState)(false), [L, V] = import_react.useState({
10781
10781
  columns: CompactSelection.empty(),
10782
10782
  rows: CompactSelection.empty()
10783
10783
  }), [U, Pr] = (0, import_react.useState)({}), W = useNonce();
@@ -10922,14 +10922,14 @@ let __tla = (async () => {
10922
10922
  n,
10923
10923
  G
10924
10924
  ]), Ir = (0, import_react.useCallback)((n2) => {
10925
- if (D.current) {
10925
+ if (E.current) {
10926
10926
  if (Events.isMetaOrCtrl(n2) && n2.key === "c") {
10927
- D.current.emit("copy");
10927
+ E.current.emit("copy");
10928
10928
  return;
10929
10929
  }
10930
10930
  if (Events.isMetaOrCtrl(n2) && n2.key === "v") {
10931
10931
  pasteCells({
10932
- selection: jr,
10932
+ selection: L,
10933
10933
  data: e,
10934
10934
  setData: t,
10935
10935
  columns: G,
@@ -10939,11 +10939,11 @@ let __tla = (async () => {
10939
10939
  return;
10940
10940
  }
10941
10941
  if (Events.isMetaOrCtrl(n2) && n2.key === "f") {
10942
- L((e2) => !e2), n2.stopPropagation(), n2.preventDefault();
10942
+ I((e2) => !e2), n2.stopPropagation(), n2.preventDefault();
10943
10943
  return;
10944
10944
  }
10945
10945
  if (n2.key === "Escape") {
10946
- L(false);
10946
+ I(false);
10947
10947
  return;
10948
10948
  }
10949
10949
  }
@@ -10952,7 +10952,7 @@ let __tla = (async () => {
10952
10952
  e,
10953
10953
  i,
10954
10954
  l,
10955
- jr,
10955
+ L,
10956
10956
  t
10957
10957
  ]), Lr = (0, import_react.useCallback)(() => {
10958
10958
  let e2 = Object.fromEntries(G.map((e3) => {
@@ -11000,7 +11000,7 @@ let __tla = (async () => {
11000
11000
  u,
11001
11001
  t
11002
11002
  ]), Rr = () => {
11003
- let e2 = jr.rows.toArray();
11003
+ let e2 = L.rows.toArray();
11004
11004
  m(e2);
11005
11005
  let n2 = 0;
11006
11006
  for (let r2 of e2) {
@@ -11017,8 +11017,8 @@ let __tla = (async () => {
11017
11017
  bounds: t2
11018
11018
  });
11019
11019
  }), Br = async () => {
11020
- if (O) {
11021
- let e2 = G[O.col].title;
11020
+ if (D) {
11021
+ let e2 = G[D.col].title;
11022
11022
  await copyToClipboard(e2), k(void 0);
11023
11023
  }
11024
11024
  };
@@ -11030,36 +11030,36 @@ let __tla = (async () => {
11030
11030
  });
11031
11031
  }
11032
11032
  let Hr = (e2) => {
11033
- if (O) {
11034
- let i2 = G[O.col].title;
11033
+ if (D) {
11034
+ let i2 = G[D.col].title;
11035
11035
  if (n[e2]) {
11036
11036
  Vr(e2);
11037
11037
  return;
11038
11038
  }
11039
- let a = G[O.col].dataType;
11040
- h(O.col, e2), r((t2) => modifyColumnFields({
11039
+ let a = G[D.col].dataType;
11040
+ h(D.col, e2), r((t2) => modifyColumnFields({
11041
11041
  columnFields: t2,
11042
- columnIdx: O.col,
11042
+ columnIdx: D.col,
11043
11043
  type: "rename",
11044
11044
  dataType: a,
11045
11045
  newColumnName: e2
11046
11046
  })), t((t2) => renameColumn(t2, i2, e2)), k(void 0);
11047
11047
  }
11048
11048
  }, Y = () => {
11049
- O && (g(O.col), r((e2) => modifyColumnFields({
11049
+ D && (g(D.col), r((e2) => modifyColumnFields({
11050
11050
  columnFields: e2,
11051
- columnIdx: O.col,
11051
+ columnIdx: D.col,
11052
11052
  type: "remove"
11053
- })), t((e2) => removeColumn(e2, O.col)), k(void 0));
11053
+ })), t((e2) => removeColumn(e2, D.col)), k(void 0));
11054
11054
  }, Ur = (e2) => {
11055
11055
  let { direction: i2, columnName: a, dataType: o } = e2;
11056
- if (O) {
11057
- let e3 = O.col + (i2 === "left" ? 0 : 1), s = Math.max(0, Math.min(e3, G.length));
11056
+ if (D) {
11057
+ let e3 = D.col + (i2 === "left" ? 0 : 1), s = Math.max(0, Math.min(e3, G.length));
11058
11058
  if (n[a]) {
11059
11059
  Vr(a);
11060
11060
  return;
11061
11061
  }
11062
- y(s, a), r((e4) => modifyColumnFields({
11062
+ x(s, a), r((e4) => modifyColumnFields({
11063
11063
  columnFields: e4,
11064
11064
  columnIdx: s,
11065
11065
  type: "insert",
@@ -11067,7 +11067,7 @@ let __tla = (async () => {
11067
11067
  newColumnName: a
11068
11068
  })), t((e4) => insertColumn(e4, a)), k(void 0);
11069
11069
  }
11070
- }, Wr = (O == null ? void 0 : O.col) === G.length - 1, Gr = O !== void 0, X = "mr-2 h-3.5 w-3.5", Kr = {
11070
+ }, Wr = (D == null ? void 0 : D.col) === G.length - 1, Gr = D !== void 0, X = "mr-2 h-3.5 w-3.5", Kr = {
11071
11071
  hint: "New row",
11072
11072
  sticky: true,
11073
11073
  tint: true
@@ -11077,10 +11077,10 @@ let __tla = (async () => {
11077
11077
  children: [
11078
11078
  (0, import_jsx_runtime.jsx)(ErrorBoundary, {
11079
11079
  children: (0, import_jsx_runtime.jsx)(DataEditorAll, {
11080
- ref: D,
11080
+ ref: E,
11081
11081
  getCellContent: Fr,
11082
11082
  columns: G,
11083
- gridSelection: jr,
11083
+ gridSelection: L,
11084
11084
  onGridSelectionChange: V,
11085
11085
  rows: e.length,
11086
11086
  overscrollX: 50,
@@ -11089,7 +11089,7 @@ let __tla = (async () => {
11089
11089
  validateCell: J,
11090
11090
  getCellsForSelection: true,
11091
11091
  onPaste: true,
11092
- showSearch: M,
11092
+ showSearch: P,
11093
11093
  fillHandle: true,
11094
11094
  allowedFillDirections: "vertical",
11095
11095
  onKeyDown: Ir,
@@ -11114,7 +11114,7 @@ let __tla = (async () => {
11114
11114
  let e2 = (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
11115
11115
  children: [
11116
11116
  Jr && (0, import_jsx_runtime.jsx)(RenameColumnSub, {
11117
- currentColumnName: G[O.col].title,
11117
+ currentColumnName: G[D.col].title,
11118
11118
  onRename: Hr,
11119
11119
  onCancel: () => k(void 0)
11120
11120
  }),
@@ -11155,8 +11155,8 @@ let __tla = (async () => {
11155
11155
  onOpenChange: (e3) => !e3 && k(void 0),
11156
11156
  children: (0, import_jsx_runtime.jsxs)(DropdownMenuContent, {
11157
11157
  style: {
11158
- left: (O == null ? void 0 : O.bounds.x) ?? 0,
11159
- top: ((O == null ? void 0 : O.bounds.y) ?? 0) + ((O == null ? void 0 : O.bounds.height) ?? 0)
11158
+ left: (D == null ? void 0 : D.bounds.x) ?? 0,
11159
+ top: ((D == null ? void 0 : D.bounds.y) ?? 0) + ((D == null ? void 0 : D.bounds.height) ?? 0)
11160
11160
  },
11161
11161
  className: "fixed w-52",
11162
11162
  children: [
@@ -11179,10 +11179,10 @@ let __tla = (async () => {
11179
11179
  children: (0, import_jsx_runtime.jsx)(Button, {
11180
11180
  variant: "destructive",
11181
11181
  size: "sm",
11182
- disabled: jr.rows.length === 0,
11182
+ disabled: L.rows.length === 0,
11183
11183
  className: "right-2 h-7",
11184
11184
  onClick: Rr,
11185
- children: jr.rows.length <= 1 ? "Delete row" : "Delete rows"
11185
+ children: L.rows.length <= 1 ? "Delete row" : "Delete rows"
11186
11186
  })
11187
11187
  })
11188
11188
  ]