@marimo-team/islands 0.24.1-dev42 → 0.24.1-dev44
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.
- package/dist/{ConnectedDataExplorerComponent-4UvlnITc.js → ConnectedDataExplorerComponent-CxLgYj_n.js} +1038 -1038
- package/dist/{any-language-editor-ClDhQoll.js → any-language-editor-BrPYtXHK.js} +1 -1
- package/dist/{chat-ui-BzZL5_XE.js → chat-ui-Mjq3lBLn.js} +1335 -1335
- package/dist/{common-DiHZo6cj.js → common-BTE61CWu.js} +20955 -20975
- package/dist/{input-CIaA2N0m.js → dropdown-menu-DEu759Oe.js} +930 -927
- package/dist/{error-banner-BbxpEiD5.js → error-banner-BT4uIIQ2.js} +190 -192
- package/dist/{glide-data-editor-CgO5z9xu.js → glide-data-editor-C2RTkAgQ.js} +51 -51
- package/dist/{html-to-image-DPAZGZSi.js → html-to-image-hKcfSWj_.js} +5795 -5590
- package/dist/main.js +8696 -8703
- package/dist/{mermaid-BBTUHwCi.js → mermaid-OsTxhZOI.js} +12 -12
- package/dist/{process-output-oZcxC_tq.js → process-output-BkHK-KDc.js} +6 -6
- package/dist/{reveal-component-UCcAUoNH.js → reveal-component-B6TKxaT4.js} +11 -11
- package/dist/{strings-CoQ5sA4r.js → select-Bakm9EUs.js} +50 -53
- package/dist/{spec-6c0_fLYz.js → spec-DqUrBQpS.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{useDateFormatter-6ImHK1ln.js → useDateFormatter-DjRKOAkR.js} +1 -1
- package/dist/{vega-component-DlnGFDeY.js → vega-component-A2xO4BUa.js} +17 -17
- package/package.json +1 -1
- package/src/components/datasources/datasources.tsx +16 -17
- package/src/components/editor/actions/useNotebookActions.tsx +50 -0
- package/src/components/editor/chrome/panels/components.tsx +1 -1
- package/src/components/editor/connections/__tests__/add-connection-button.test.tsx +129 -0
- package/src/components/editor/connections/add-connection-button.tsx +132 -0
- package/src/components/editor/connections/components.tsx +11 -0
- package/src/components/editor/connections/quick-add-data-sources.tsx +11 -11
- package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +109 -1
- package/src/components/storage/storage-inspector.tsx +15 -17
- package/src/core/codemirror/language/panel/sql.test.tsx +69 -0
- package/src/core/codemirror/language/panel/sql.tsx +81 -4
|
@@ -3,8 +3,8 @@ import { g as n, m as r, t as i } from "./button-DOCIubLd.js";
|
|
|
3
3
|
import { t as a } from "./react-DMWcHin-.js";
|
|
4
4
|
import { t as o } from "./compiler-runtime-CAH9RLw2.js";
|
|
5
5
|
import { n as s, r as c, t as l } from "./copy-DgAphl4k.js";
|
|
6
|
-
import { C as u,
|
|
7
|
-
import { J as _,
|
|
6
|
+
import { C as u, c as d, i as f, n as p, s as m, t as h, x as g } from "./select-Bakm9EUs.js";
|
|
7
|
+
import { J as _, d as v, g as y, i as b, l as x, n as S, o as C, p as w, s as T, t as E, u as D } from "./dropdown-menu-DEu759Oe.js";
|
|
8
8
|
import { i as O, n as k, r as A, t as j } from "./types-D8U7wKuc.js";
|
|
9
9
|
import { n as M, t as ee } from "./ErrorBoundary-DLlMgwFe.js";
|
|
10
10
|
import { t as N } from "./react-dom-C94wmq5w.js";
|
|
@@ -9555,7 +9555,7 @@ var Ks = o(), $ = P(), qs = (e) => {
|
|
|
9555
9555
|
let m;
|
|
9556
9556
|
t[9] === Symbol.for("react.memo_cache_sentinel") ? (m = (e) => s(e.target.value), t[9] = m) : m = t[9];
|
|
9557
9557
|
let h;
|
|
9558
|
-
t[10] !== d || t[11] !== o ? (h = /* @__PURE__ */ (0, $.jsxs)("div", { children: [p, /* @__PURE__ */ (0, $.jsx)(
|
|
9558
|
+
t[10] !== d || t[11] !== o ? (h = /* @__PURE__ */ (0, $.jsxs)("div", { children: [p, /* @__PURE__ */ (0, $.jsx)(y, {
|
|
9559
9559
|
value: o,
|
|
9560
9560
|
onChange: m,
|
|
9561
9561
|
placeholder: "Enter new column name",
|
|
@@ -9564,24 +9564,24 @@ var Ks = o(), $ = P(), qs = (e) => {
|
|
|
9564
9564
|
})] }), t[10] = d, t[11] = o, t[12] = h) : h = t[12];
|
|
9565
9565
|
let g;
|
|
9566
9566
|
t[13] === o ? g = t[14] : (g = o.trim(), t[13] = o, t[14] = g);
|
|
9567
|
-
let _ = !g,
|
|
9568
|
-
t[15] !== l || t[16] !== _ ? (
|
|
9567
|
+
let _ = !g, b;
|
|
9568
|
+
t[15] !== l || t[16] !== _ ? (b = /* @__PURE__ */ (0, $.jsx)(i, {
|
|
9569
9569
|
onClick: l,
|
|
9570
9570
|
disabled: _,
|
|
9571
9571
|
size: "sm",
|
|
9572
9572
|
className: "w-full",
|
|
9573
9573
|
children: "Rename"
|
|
9574
|
-
}), t[15] = l, t[16] = _, t[17] =
|
|
9574
|
+
}), t[15] = l, t[16] = _, t[17] = b) : b = t[17];
|
|
9575
9575
|
let S;
|
|
9576
|
-
return t[18] !== h || t[19] !==
|
|
9576
|
+
return t[18] !== h || t[19] !== b ? (S = /* @__PURE__ */ (0, $.jsxs)(x, { children: [f, /* @__PURE__ */ (0, $.jsx)(C, { children: /* @__PURE__ */ (0, $.jsx)(D, {
|
|
9577
9577
|
className: "w-64 p-4",
|
|
9578
9578
|
children: /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
9579
9579
|
className: "space-y-3",
|
|
9580
|
-
children: [h,
|
|
9580
|
+
children: [h, b]
|
|
9581
9581
|
})
|
|
9582
|
-
}) })] }), t[18] = h, t[19] =
|
|
9582
|
+
}) })] }), t[18] = h, t[19] = b, t[20] = S) : S = t[20], S;
|
|
9583
9583
|
}, Js = (e) => {
|
|
9584
|
-
let t = (0, Ks.c)(79), { direction: n, onAdd: r, onCancel: a } = e, [o, s] = (0, G.useState)(""), [c, l] = (0, G.useState)("string"), u,
|
|
9584
|
+
let t = (0, Ks.c)(79), { direction: n, onAdd: r, onCancel: a } = e, [o, s] = (0, G.useState)(""), [c, l] = (0, G.useState)("string"), u, f, g, _, b, S, w, T, E, O, k, A, j, ee, N;
|
|
9585
9585
|
if (t[0] !== o || t[1] !== c || t[2] !== n || t[3] !== r || t[4] !== a) {
|
|
9586
9586
|
let e = [
|
|
9587
9587
|
"string",
|
|
@@ -9597,13 +9597,13 @@ var Ks = o(), $ = P(), qs = (e) => {
|
|
|
9597
9597
|
e.key === "Enter" ? S() : e.key === "Escape" && a();
|
|
9598
9598
|
}, t[24] = S, t[25] = a, t[26] = P) : P = t[26];
|
|
9599
9599
|
let ne = P;
|
|
9600
|
-
|
|
9600
|
+
b = x;
|
|
9601
9601
|
let re;
|
|
9602
9602
|
t[27] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ (0, $.jsx)(M, { className: "mr-2 h-3.5 w-3.5" }), t[27] = re) : re = t[27], t[28] === n ? N = t[29] : (N = /* @__PURE__ */ (0, $.jsxs)(v, { children: [
|
|
9603
9603
|
re,
|
|
9604
9604
|
"Add column to the ",
|
|
9605
9605
|
n
|
|
9606
|
-
] }), t[28] = n, t[29] = N), _ =
|
|
9606
|
+
] }), t[28] = n, t[29] = N), _ = C, g = D, ee = "w-64 p-4", A = "space-y-3";
|
|
9607
9607
|
let F = `add-column-input-${n}`, I;
|
|
9608
9608
|
t[30] === F ? I = t[31] : (I = /* @__PURE__ */ (0, $.jsx)(te, {
|
|
9609
9609
|
htmlFor: F,
|
|
@@ -9612,7 +9612,7 @@ var Ks = o(), $ = P(), qs = (e) => {
|
|
|
9612
9612
|
let L = `add-column-input-${n}`, R;
|
|
9613
9613
|
t[32] === Symbol.for("react.memo_cache_sentinel") ? (R = (e) => s(e.target.value), t[32] = R) : R = t[32];
|
|
9614
9614
|
let ie;
|
|
9615
|
-
t[33] !== o || t[34] !== ne || t[35] !== L ? (ie = /* @__PURE__ */ (0, $.jsx)(
|
|
9615
|
+
t[33] !== o || t[34] !== ne || t[35] !== L ? (ie = /* @__PURE__ */ (0, $.jsx)(y, {
|
|
9616
9616
|
id: L,
|
|
9617
9617
|
value: o,
|
|
9618
9618
|
onChange: R,
|
|
@@ -9624,22 +9624,22 @@ var Ks = o(), $ = P(), qs = (e) => {
|
|
|
9624
9624
|
t[40] === z ? k = t[41] : (k = /* @__PURE__ */ (0, $.jsx)(te, {
|
|
9625
9625
|
htmlFor: z,
|
|
9626
9626
|
children: "Data type"
|
|
9627
|
-
}), t[40] = z, t[41] = k),
|
|
9627
|
+
}), t[40] = z, t[41] = k), f = h, T = c, t[42] === Symbol.for("react.memo_cache_sentinel") ? (E = (e) => l(e), t[42] = E) : E = t[42];
|
|
9628
9628
|
let ae = `add-column-type-${n}`, oe;
|
|
9629
|
-
t[43] === Symbol.for("react.memo_cache_sentinel") ? (oe = /* @__PURE__ */ (0, $.jsx)(
|
|
9629
|
+
t[43] === Symbol.for("react.memo_cache_sentinel") ? (oe = /* @__PURE__ */ (0, $.jsx)(d, {}), t[43] = oe) : oe = t[43], t[44] === ae ? O = t[45] : (O = /* @__PURE__ */ (0, $.jsx)(m, {
|
|
9630
9630
|
id: ae,
|
|
9631
9631
|
className: "mt-1",
|
|
9632
9632
|
children: oe
|
|
9633
|
-
}), t[44] = ae, t[45] = O), u =
|
|
9634
|
-
} else u = t[5],
|
|
9633
|
+
}), t[44] = ae, t[45] = O), u = p, w = e.map(Ys), t[0] = o, t[1] = c, t[2] = n, t[3] = r, t[4] = a, t[5] = u, t[6] = f, t[7] = g, t[8] = _, t[9] = b, t[10] = S, t[11] = w, t[12] = T, t[13] = E, t[14] = O, t[15] = k, t[16] = A, t[17] = j, t[18] = ee, t[19] = N;
|
|
9634
|
+
} else u = t[5], f = t[6], g = t[7], _ = t[8], b = t[9], S = t[10], w = t[11], T = t[12], E = t[13], O = t[14], k = t[15], A = t[16], j = t[17], ee = t[18], N = t[19];
|
|
9635
9635
|
let P;
|
|
9636
|
-
t[46] !== u || t[47] !==
|
|
9636
|
+
t[46] !== u || t[47] !== w ? (P = /* @__PURE__ */ (0, $.jsx)(u, { children: w }), t[46] = u, t[47] = w, t[48] = P) : P = t[48];
|
|
9637
9637
|
let ne;
|
|
9638
|
-
t[49] !==
|
|
9639
|
-
value:
|
|
9638
|
+
t[49] !== f || t[50] !== P || t[51] !== T || t[52] !== E || t[53] !== O ? (ne = /* @__PURE__ */ (0, $.jsxs)(f, {
|
|
9639
|
+
value: T,
|
|
9640
9640
|
onValueChange: E,
|
|
9641
9641
|
children: [O, P]
|
|
9642
|
-
}), t[49] =
|
|
9642
|
+
}), t[49] = f, t[50] = P, t[51] = T, t[52] = E, t[53] = O, t[54] = ne) : ne = t[54];
|
|
9643
9643
|
let re;
|
|
9644
9644
|
t[55] !== ne || t[56] !== k ? (re = /* @__PURE__ */ (0, $.jsxs)("div", { children: [k, ne] }), t[55] = ne, t[56] = k, t[57] = re) : re = t[57];
|
|
9645
9645
|
let F;
|
|
@@ -9662,19 +9662,19 @@ var Ks = o(), $ = P(), qs = (e) => {
|
|
|
9662
9662
|
]
|
|
9663
9663
|
}), t[63] = re, t[64] = L, t[65] = A, t[66] = j, t[67] = R) : R = t[67];
|
|
9664
9664
|
let ie;
|
|
9665
|
-
t[68] !==
|
|
9665
|
+
t[68] !== g || t[69] !== R || t[70] !== ee ? (ie = /* @__PURE__ */ (0, $.jsx)(g, {
|
|
9666
9666
|
className: ee,
|
|
9667
9667
|
children: R
|
|
9668
|
-
}), t[68] =
|
|
9668
|
+
}), t[68] = g, t[69] = R, t[70] = ee, t[71] = ie) : ie = t[71];
|
|
9669
9669
|
let z;
|
|
9670
9670
|
t[72] !== _ || t[73] !== ie ? (z = /* @__PURE__ */ (0, $.jsx)(_, { children: ie }), t[72] = _, t[73] = ie, t[74] = z) : z = t[74];
|
|
9671
9671
|
let ae;
|
|
9672
|
-
return t[75] !==
|
|
9672
|
+
return t[75] !== b || t[76] !== z || t[77] !== N ? (ae = /* @__PURE__ */ (0, $.jsxs)(b, { children: [N, z] }), t[75] = b, t[76] = z, t[77] = N, t[78] = ae) : ae = t[78], ae;
|
|
9673
9673
|
};
|
|
9674
9674
|
function Ys(e) {
|
|
9675
|
-
return /* @__PURE__ */ (0, $.jsx)(
|
|
9675
|
+
return /* @__PURE__ */ (0, $.jsx)(f, {
|
|
9676
9676
|
value: e,
|
|
9677
|
-
children:
|
|
9677
|
+
children: g(e)
|
|
9678
9678
|
}, e);
|
|
9679
9679
|
}
|
|
9680
9680
|
//#endregion
|
|
@@ -9779,7 +9779,7 @@ function ic(e) {
|
|
|
9779
9779
|
//#endregion
|
|
9780
9780
|
//#region src/plugins/impl/data-editor/glide-data-editor.tsx
|
|
9781
9781
|
var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableColumns: o, edits: d, onAddEdits: f, onAddRows: p, onDeleteRows: m, onRenameColumn: h, onDeleteColumn: g, onAddColumn: _ }) => {
|
|
9782
|
-
let { theme: v } = re(), y = (0, G.useRef)(null),
|
|
9782
|
+
let { theme: v } = re(), y = (0, G.useRef)(null), x = (0, G.useRef)(null), [C, D] = (0, G.useState)(), [O, k] = (0, G.useState)(!1), [M, N] = G.useState({
|
|
9783
9783
|
columns: W.empty(),
|
|
9784
9784
|
rows: W.empty()
|
|
9785
9785
|
}), [P, te] = (0, G.useState)({}), F = w(), I = (0, G.useRef)(!1), L = (0, G.useMemo)(() => {
|
|
@@ -9978,8 +9978,8 @@ var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableCo
|
|
|
9978
9978
|
bounds: t
|
|
9979
9979
|
});
|
|
9980
9980
|
}), ue = async () => {
|
|
9981
|
-
if (
|
|
9982
|
-
let e = L[
|
|
9981
|
+
if (C) {
|
|
9982
|
+
let e = L[C.col].title;
|
|
9983
9983
|
await l(e), D(void 0);
|
|
9984
9984
|
}
|
|
9985
9985
|
};
|
|
@@ -9991,31 +9991,31 @@ var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableCo
|
|
|
9991
9991
|
});
|
|
9992
9992
|
}
|
|
9993
9993
|
let fe = (e) => {
|
|
9994
|
-
if (
|
|
9995
|
-
let r = L[
|
|
9994
|
+
if (C) {
|
|
9995
|
+
let r = L[C.col].title;
|
|
9996
9996
|
if (n.has(e)) {
|
|
9997
9997
|
de(e);
|
|
9998
9998
|
return;
|
|
9999
9999
|
}
|
|
10000
|
-
let i = L[
|
|
10001
|
-
h(
|
|
10000
|
+
let i = L[C.col].dataType;
|
|
10001
|
+
h(C.col, e), a((t) => $s({
|
|
10002
10002
|
columnFields: t,
|
|
10003
|
-
columnIdx:
|
|
10003
|
+
columnIdx: C.col,
|
|
10004
10004
|
type: "rename",
|
|
10005
10005
|
dataType: i,
|
|
10006
10006
|
newColumnName: e
|
|
10007
10007
|
})), t((t) => Qs(t, r, e)), D(void 0);
|
|
10008
10008
|
}
|
|
10009
10009
|
}, pe = () => {
|
|
10010
|
-
|
|
10010
|
+
C && (g(C.col), a((e) => $s({
|
|
10011
10011
|
columnFields: e,
|
|
10012
|
-
columnIdx:
|
|
10012
|
+
columnIdx: C.col,
|
|
10013
10013
|
type: "remove"
|
|
10014
|
-
})), t((e) => Xs(e,
|
|
10014
|
+
})), t((e) => Xs(e, C.col)), D(void 0));
|
|
10015
10015
|
}, me = (e) => {
|
|
10016
10016
|
let { direction: r, columnName: i, dataType: o } = e;
|
|
10017
|
-
if (
|
|
10018
|
-
let e =
|
|
10017
|
+
if (C) {
|
|
10018
|
+
let e = C.col + (r === "left" ? 0 : 1), s = Math.max(0, Math.min(e, L.length));
|
|
10019
10019
|
if (n.has(i)) {
|
|
10020
10020
|
de(i);
|
|
10021
10021
|
return;
|
|
@@ -10028,7 +10028,7 @@ var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableCo
|
|
|
10028
10028
|
newColumnName: i
|
|
10029
10029
|
})), t((e) => Zs(e, i)), D(void 0);
|
|
10030
10030
|
}
|
|
10031
|
-
}, he =
|
|
10031
|
+
}, he = C?.col === L.length - 1, B = C !== void 0, ge = "mr-2 h-3.5 w-3.5", V = {
|
|
10032
10032
|
hint: "New row",
|
|
10033
10033
|
sticky: !0,
|
|
10034
10034
|
tint: !0
|
|
@@ -10036,10 +10036,10 @@ var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableCo
|
|
|
10036
10036
|
return /* @__PURE__ */ (0, $.jsxs)("div", {
|
|
10037
10037
|
className: "relative w-full min-w-0",
|
|
10038
10038
|
children: [
|
|
10039
|
-
/* @__PURE__ */ (0, $.jsx)(ic, { portalRef:
|
|
10039
|
+
/* @__PURE__ */ (0, $.jsx)(ic, { portalRef: x }),
|
|
10040
10040
|
/* @__PURE__ */ (0, $.jsx)(ee, { children: /* @__PURE__ */ (0, $.jsx)(Rs, {
|
|
10041
10041
|
ref: y,
|
|
10042
|
-
portalElementRef:
|
|
10042
|
+
portalElementRef: x,
|
|
10043
10043
|
getCellContent: R,
|
|
10044
10044
|
columns: L,
|
|
10045
10045
|
gridSelection: M,
|
|
@@ -10072,11 +10072,11 @@ var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableCo
|
|
|
10072
10072
|
if (!B) return;
|
|
10073
10073
|
let e = /* @__PURE__ */ (0, $.jsxs)($.Fragment, { children: [
|
|
10074
10074
|
ve && /* @__PURE__ */ (0, $.jsx)(qs, {
|
|
10075
|
-
currentColumnName: L[
|
|
10075
|
+
currentColumnName: L[C.col].title,
|
|
10076
10076
|
onRename: fe,
|
|
10077
10077
|
onCancel: () => D(void 0)
|
|
10078
10078
|
}),
|
|
10079
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
10079
|
+
/* @__PURE__ */ (0, $.jsx)(T, {}),
|
|
10080
10080
|
/* @__PURE__ */ (0, $.jsx)(Js, {
|
|
10081
10081
|
direction: "left",
|
|
10082
10082
|
onAdd: (e, t) => me({
|
|
@@ -10095,23 +10095,23 @@ var ac = ({ data: e, setData: t, columnFields: n, setColumnFields: a, editableCo
|
|
|
10095
10095
|
}),
|
|
10096
10096
|
onCancel: () => D(void 0)
|
|
10097
10097
|
}),
|
|
10098
|
-
/* @__PURE__ */ (0, $.jsx)(
|
|
10099
|
-
!he && ve && /* @__PURE__ */ (0, $.jsxs)(
|
|
10098
|
+
/* @__PURE__ */ (0, $.jsx)(T, {}),
|
|
10099
|
+
!he && ve && /* @__PURE__ */ (0, $.jsxs)(b, {
|
|
10100
10100
|
onClick: pe,
|
|
10101
10101
|
className: "text-destructive focus:text-destructive",
|
|
10102
10102
|
children: [/* @__PURE__ */ (0, $.jsx)(A, { className: ge }), "Delete column"]
|
|
10103
10103
|
})
|
|
10104
10104
|
] });
|
|
10105
|
-
return /* @__PURE__ */ (0, $.jsx)(
|
|
10105
|
+
return /* @__PURE__ */ (0, $.jsx)(E, {
|
|
10106
10106
|
open: B,
|
|
10107
10107
|
onOpenChange: (e) => !e && D(void 0),
|
|
10108
|
-
children: /* @__PURE__ */ (0, $.jsxs)(
|
|
10108
|
+
children: /* @__PURE__ */ (0, $.jsxs)(S, {
|
|
10109
10109
|
style: {
|
|
10110
|
-
left:
|
|
10111
|
-
top: (
|
|
10110
|
+
left: C?.bounds.x ?? 0,
|
|
10111
|
+
top: (C?.bounds.y ?? 0) + (C?.bounds.height ?? 0)
|
|
10112
10112
|
},
|
|
10113
10113
|
className: "fixed w-52",
|
|
10114
|
-
children: [/* @__PURE__ */ (0, $.jsxs)(
|
|
10114
|
+
children: [/* @__PURE__ */ (0, $.jsxs)(b, {
|
|
10115
10115
|
onClick: ue,
|
|
10116
10116
|
children: [/* @__PURE__ */ (0, $.jsx)(s, { className: ge }), "Copy column name"]
|
|
10117
10117
|
}), !_e && e]
|