@marimo-team/islands 0.25.3-dev129 → 0.25.3-dev134
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-q0C1F7Sn.js → ConnectedDataExplorerComponent-BAiSVaHj.js} +3 -1
- package/dist/{ErrorBoundary-BwvkPkyC.js → ErrorBoundary-CImYa86e.js} +1 -1
- package/dist/{chat-ui-C0nJ84Wf.js → chat-ui-DqcauBr6.js} +21 -20
- package/dist/{code-visibility-BI1HUhjs.js → code-visibility-BZoWT5f1.js} +2 -2
- package/dist/{common-CMm0Ot4s.js → common-CGmIoGK3.js} +4383 -4327
- package/dist/{data-grid-overlay-editor-DMLTMI_S.js → data-grid-overlay-editor-CtOna148.js} +1 -1
- package/dist/{error-entries-BL2ZBgVo.js → error-entries-CmFDQ9CA.js} +109 -105
- package/dist/{feedback-button-BrpQxIbi.js → feedback-button-7ZbDdjfz.js} +14 -14
- package/dist/{glide-data-editor-DBsCdnOC.js → glide-data-editor-D72zmCan.js} +3 -3
- package/dist/{globals-BWb8HdpC.js → globals-DE2S2io9.js} +1 -1
- package/dist/{html-to-image-D9gz793p.js → html-to-image-CfgsWObF.js} +19 -19
- package/dist/main.js +5504 -5477
- package/dist/{number-overlay-editor-CUARNHHp.js → number-overlay-editor-Br0lPnFE.js} +1 -1
- package/dist/{process-output-761ZoDH1.js → process-output-B64ZYWuI.js} +3 -3
- package/dist/{reveal-component-CJjh6lrq.js → reveal-component-DnbPU885.js} +12 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/__tests__/module-entry.test.ts +32 -0
- package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
- package/src/components/ai/ai-model-dropdown.tsx +11 -6
- package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
- package/src/components/chat/acp/blocks.tsx +1 -0
- package/src/components/chat/acp/session-tabs.tsx +8 -3
- package/src/components/data-table/TableTopBar.tsx +2 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
- package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
- package/src/components/data-table/data-table.tsx +6 -0
- package/src/components/data-table/range-focus/atoms.ts +4 -6
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
- package/src/components/data-table/renderers.tsx +16 -7
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +2 -2
- package/src/components/datasources/datasources.tsx +1 -0
- package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
- package/src/components/editor/cell/collapse.tsx +5 -3
- package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
- package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
- package/src/components/editor/chrome/panels/snippets-panel.tsx +5 -1
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +4 -4
- package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +4 -4
- package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
- package/src/components/editor/file-tree/file-explorer.tsx +35 -3
- package/src/components/editor/file-tree/file-name-input.tsx +1 -0
- package/src/components/editor/header/status.tsx +28 -5
- package/src/components/editor/links/__tests__/cell-link.test.tsx +146 -0
- package/src/components/editor/links/cell-link.tsx +14 -5
- package/src/components/editor/navigation/focus-utils.ts +4 -4
- package/src/components/editor/notebook-cell.tsx +11 -2
- package/src/components/editor/output/MarimoTracebackOutput.tsx +17 -15
- package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
- package/src/components/editor/package-alert.tsx +8 -3
- package/src/components/scratchpad/scratchpad.test.tsx +95 -0
- package/src/components/scratchpad/scratchpad.tsx +14 -1
- package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
- package/src/components/tracing/tracing.tsx +43 -39
- package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
- package/src/components/ui/draggable-popover.tsx +24 -2
- package/src/core/attachments/state.ts +2 -2
- package/src/core/document/__tests__/codemirror.test.ts +3 -1
- package/src/core/document/__tests__/hooks.test.tsx +7 -7
- package/src/core/document/__tests__/model.test.ts +44 -11
- package/src/core/document/__tests__/scenario-fixture.ts +2 -1
- package/src/core/document/__tests__/test-notebook.ts +19 -9
- package/src/core/document/draft.ts +1 -1
- package/src/core/document/index.ts +3 -10
- package/src/core/document/model.ts +14 -11
- package/src/core/document/state.ts +1 -1
- package/src/core/document/sync.ts +24 -18
- package/src/core/host/AGENTS.md +3 -7
- package/src/core/host/__tests__/fixtures.ts +30 -0
- package/src/core/host/__tests__/{notebook-client.test.ts → replica.test.ts} +42 -74
- package/src/core/host/__tests__/wasm.test.ts +8 -0
- package/src/core/host/backend.ts +4 -0
- package/src/core/host/index.ts +14 -0
- package/src/core/host/{notebook-client.ts → replica.ts} +75 -86
- package/src/core/host/static.ts +2 -0
- package/src/core/host/wasm.ts +10 -1
- package/src/core/wasm/bridge.ts +1 -1
- package/src/core/websocket/__tests__/backend.test.ts +111 -22
- package/src/core/websocket/__tests__/useNotebookReplica.hook.test.tsx +141 -0
- package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +4 -4
- package/src/core/websocket/backend.ts +43 -5
- package/src/core/websocket/connection-state.ts +1 -1
- package/src/core/websocket/state.ts +3 -3
- package/src/core/websocket/transports/__tests__/notebook.test.ts +11 -21
- package/src/core/websocket/types.ts +2 -2
- package/src/core/websocket/useNotebookReplica.ts +69 -0
- package/src/core/websocket/useNotebookSession.tsx +6 -6
- package/src/plugins/impl/chat/chat-ui.tsx +2 -1
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
- package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
- package/src/plugins/impl/data-frames/panel.tsx +43 -16
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -228
- package/src/core/websocket/useNotebookClient.ts +0 -89
|
@@ -3,14 +3,14 @@ import { h as t, t as n } from "./button-BQRdqQi1.js";
|
|
|
3
3
|
import { t as r } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { t as a } from "./copy-icon-C1trdvVt.js";
|
|
6
|
-
import {
|
|
6
|
+
import { H as o, K as s, Lt as c, Ot as l, fn as u, h as d, i as f, n as p, q as m, zt as h } from "./error-entries-CmFDQ9CA.js";
|
|
7
7
|
import { b as g } from "./select-CkF_GBxO.js";
|
|
8
|
-
import { n as ee, t as te } from "./globals-
|
|
8
|
+
import { n as ee, t as te } from "./globals-DE2S2io9.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-3BD1kT0s.js";
|
|
10
10
|
import { C as v, _ as ne, i as y } from "./useTheme-Bq9pi_vz.js";
|
|
11
11
|
import { a as re, i as ie, n as ae, r as oe } from "./dialog-DgeqyrEZ.js";
|
|
12
12
|
import { t as se } from "./useAsyncData-BmVgnMP5.js";
|
|
13
|
-
import { t as ce } from "./code-visibility-
|
|
13
|
+
import { t as ce } from "./code-visibility-BZoWT5f1.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var b = /* @__PURE__ */ e(r(), 1), x = i(), S = _(), le = (e) => {
|
|
16
16
|
let n = (0, x.c)(8), r, i;
|
|
@@ -76,7 +76,7 @@ function pe(e) {
|
|
|
76
76
|
return w("Environment", C("json", JSON.stringify(e, null, 2)));
|
|
77
77
|
}
|
|
78
78
|
function me(e) {
|
|
79
|
-
return w("Errors", C("text", e.map(
|
|
79
|
+
return w("Errors", C("text", e.map(p).join("\n\n---\n\n")));
|
|
80
80
|
}
|
|
81
81
|
function he(e) {
|
|
82
82
|
return w("Code", C("python", e));
|
|
@@ -131,19 +131,19 @@ function ve(e) {
|
|
|
131
131
|
if (!e.hasRequestClient) return "Notebook source is unavailable.";
|
|
132
132
|
if (e.filename === null) return "Save the notebook first.";
|
|
133
133
|
if (!e.codeAvailable) return "Notebook source is hidden in this view.";
|
|
134
|
-
if (e.connectionState !==
|
|
134
|
+
if (e.connectionState !== m.OPEN) return "Connect the notebook to include its source.";
|
|
135
135
|
}
|
|
136
136
|
var T = () => {
|
|
137
|
-
let e = (0, x.c)(61), t = v(
|
|
137
|
+
let e = (0, x.c)(61), t = v(l), r, i;
|
|
138
138
|
e[0] === t ? (r = e[1], i = e[2]) : (r = async () => {
|
|
139
139
|
if (t != null) return t.getEnvironmentInfo();
|
|
140
140
|
}, i = [t], e[0] = t, e[1] = r, e[2] = i);
|
|
141
|
-
let c = se(r, i),
|
|
142
|
-
if (e[3] !==
|
|
141
|
+
let c = se(r, i), m = v(d), g = f(ne), _;
|
|
142
|
+
if (e[3] !== m.cellData || e[4] !== m.cellIds.inOrderIds) {
|
|
143
143
|
let t;
|
|
144
|
-
e[6] ===
|
|
144
|
+
e[6] === m.cellData ? t = e[7] : (t = (e) => m.cellData[e], e[6] = m.cellData, e[7] = t), _ = m.cellIds.inOrderIds.map(t), e[3] = m.cellData, e[4] = m.cellIds.inOrderIds, e[5] = _;
|
|
145
145
|
} else _ = e[5];
|
|
146
|
-
let b = ce(_), C = v(
|
|
146
|
+
let b = ce(_), C = v(h), w = v(s), T = t != null, E;
|
|
147
147
|
e[8] !== b || e[9] !== w.state || e[10] !== C || e[11] !== T ? (E = ve({
|
|
148
148
|
hasRequestClient: T,
|
|
149
149
|
filename: C,
|
|
@@ -168,11 +168,11 @@ var T = () => {
|
|
|
168
168
|
let we = Ce.map(ye).join(", "), F;
|
|
169
169
|
e[18] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ (0, S.jsxs)(ie, { children: [/* @__PURE__ */ (0, S.jsx)(re, { children: "Report an issue" }), /* @__PURE__ */ (0, S.jsx)(oe, { children: "Open a GitHub bug report prefilled with your environment, and optionally your current errors and notebook code. Nothing is uploaded automatically; review the details before posting." })] }), e[18] = F) : F = e[18];
|
|
170
170
|
let I;
|
|
171
|
-
e[19] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ (0, S.jsx)(
|
|
171
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ (0, S.jsx)(u, { className: "w-4 h-4 mr-2" }), e[19] = I) : I = e[19];
|
|
172
172
|
let Te = g.length === 0, L;
|
|
173
173
|
e[20] === be ? L = e[21] : (L = (e) => be(e === !0), e[20] = be, e[21] = L);
|
|
174
174
|
let R;
|
|
175
|
-
e[22] !== k || e[23] !== L || e[24] !== Te ? (R = /* @__PURE__ */ (0, S.jsx)(
|
|
175
|
+
e[22] !== k || e[23] !== L || e[24] !== Te ? (R = /* @__PURE__ */ (0, S.jsx)(o, {
|
|
176
176
|
id: "issue-include-errors",
|
|
177
177
|
checked: k,
|
|
178
178
|
disabled: Te,
|
|
@@ -192,7 +192,7 @@ var T = () => {
|
|
|
192
192
|
let Ee = !O, V;
|
|
193
193
|
e[29] === xe ? V = e[30] : (V = (e) => xe(e === !0), e[29] = xe, e[30] = V);
|
|
194
194
|
let H;
|
|
195
|
-
e[31] !== A || e[32] !== Ee || e[33] !== V ? (H = /* @__PURE__ */ (0, S.jsx)(
|
|
195
|
+
e[31] !== A || e[32] !== Ee || e[33] !== V ? (H = /* @__PURE__ */ (0, S.jsx)(o, {
|
|
196
196
|
id: "issue-include-code",
|
|
197
197
|
checked: A,
|
|
198
198
|
disabled: Ee,
|
|
@@ -361,7 +361,7 @@ var T = () => {
|
|
|
361
361
|
ariaLabel: "Copy errors",
|
|
362
362
|
toastTitle: "Errors copied"
|
|
363
363
|
})]
|
|
364
|
-
}), /* @__PURE__ */ (0, S.jsx)(_e, { content: g.map(
|
|
364
|
+
}), /* @__PURE__ */ (0, S.jsx)(_e, { content: g.map(p).join("\n\n---\n\n") })]
|
|
365
365
|
}),
|
|
366
366
|
Z,
|
|
367
367
|
$
|
|
@@ -6,7 +6,7 @@ import { i as s, n as c, r as l } from "./copy-icon-C1trdvVt.js";
|
|
|
6
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-CkF_GBxO.js";
|
|
7
7
|
import { d as _, h as v, i as y, l as b, n as x, o as S, s as C, t as w, u as T } from "./dropdown-menu-CgL3fm8P.js";
|
|
8
8
|
import { c as E, d as D, l as O, n as k, o as A, s as ee, t as j, u as te } from "./glide-utils-Dz_F4pAY.js";
|
|
9
|
-
import { n as ne, t as re } from "./ErrorBoundary-
|
|
9
|
+
import { n as ne, t as re } from "./ErrorBoundary-CImYa86e.js";
|
|
10
10
|
import { t as ie } from "./react-dom-DUmH0GXv.js";
|
|
11
11
|
import { t as M } from "./jsx-runtime-3BD1kT0s.js";
|
|
12
12
|
import { t as N } from "./label-D9_-zSg-.js";
|
|
@@ -7062,7 +7062,7 @@ function rs(e, t, n, r, i) {
|
|
|
7062
7062
|
}
|
|
7063
7063
|
//#endregion
|
|
7064
7064
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7065
|
-
var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7065
|
+
var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-CtOna148.js")), ss = 0;
|
|
7066
7066
|
function cs(e) {
|
|
7067
7067
|
return (0, is.default)((0, as.default)((0, as.default)(e).filter((e) => e.span !== void 0).map((e) => (0, Za.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7068
7068
|
}
|
|
@@ -9293,7 +9293,7 @@ function Vs(e, t, n, r, i) {
|
|
|
9293
9293
|
}
|
|
9294
9294
|
//#endregion
|
|
9295
9295
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9296
|
-
var Hs = K.lazy(async () => await import("./number-overlay-editor-
|
|
9296
|
+
var Hs = K.lazy(async () => await import("./number-overlay-editor-Br0lPnFE.js")), Us = {
|
|
9297
9297
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9298
9298
|
kind: W.Number,
|
|
9299
9299
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { m as e } from "./tooltip-CJ4Rqasp.js";
|
|
2
2
|
import { _ as t } from "./useTheme-Bq9pi_vz.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-BZoWT5f1.js";
|
|
4
4
|
var r = e("triangle-alert", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
@@ -5,7 +5,7 @@ import { t as l } from "./compiler-runtime-CldRdSsv.js";
|
|
|
5
5
|
import { n as u, t as d } from "./copy-icon-C1trdvVt.js";
|
|
6
6
|
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-DKplTrBY.js";
|
|
7
7
|
import { c as _, l as v, m as y, s as b, t as x, u as ee } from "./tooltip-CJ4Rqasp.js";
|
|
8
|
-
import {
|
|
8
|
+
import { $t as te, Ct as ne, Dt as re, Et as ie, F as ae, Ft as oe, N as se, St as ce, U as le, W as ue, X as de, a as fe, at as pe, bt as me, d as he, j as ge, mt as _e, nn as ve, nt as ye, wt as be, xt as xe, y as Se } from "./error-entries-CmFDQ9CA.js";
|
|
9
9
|
import { D as Ce, M as we, k as Te } from "./select-CkF_GBxO.js";
|
|
10
10
|
import { ft as Ee, q as De } from "./dropdown-menu-CgL3fm8P.js";
|
|
11
11
|
import { m as Oe, y as ke } from "./toDate-DGvRHwTk.js";
|
|
@@ -1853,7 +1853,7 @@ async function Nn(e) {
|
|
|
1853
1853
|
});
|
|
1854
1854
|
if (!n || n.options.length === 0) return;
|
|
1855
1855
|
let r = e.split(".").pop() ?? e, i = n.options[0], a = n.options.find((e) => e.name === r) ?? i;
|
|
1856
|
-
a?.completion_info && Je.set(
|
|
1856
|
+
a?.completion_info && Je.set(pe, { documentation: a.completion_info });
|
|
1857
1857
|
} catch (t) {
|
|
1858
1858
|
n.debug(`Doc lookup failed for "${e}"`, t);
|
|
1859
1859
|
}
|
|
@@ -2019,7 +2019,7 @@ var Hn = [], Un = (e) => {
|
|
|
2019
2019
|
bb0: {
|
|
2020
2020
|
if (i || o) {
|
|
2021
2021
|
let e;
|
|
2022
|
-
t[0] === n ? e = t[1] : (e =
|
|
2022
|
+
t[0] === n ? e = t[1] : (e = ge(n), t[0] = n, t[1] = e), s = e;
|
|
2023
2023
|
break bb0;
|
|
2024
2024
|
}
|
|
2025
2025
|
s = n;
|
|
@@ -2338,7 +2338,7 @@ var Nr = O.forwardRef((e, t) => {
|
|
|
2338
2338
|
Nr.displayName = en.displayName;
|
|
2339
2339
|
//#endregion
|
|
2340
2340
|
//#region src/utils/multi-map.ts
|
|
2341
|
-
var Pr = /* @__PURE__ */ e(
|
|
2341
|
+
var Pr = /* @__PURE__ */ e(xe(), 1), Fr = class {
|
|
2342
2342
|
map = /* @__PURE__ */ new Map();
|
|
2343
2343
|
get(e) {
|
|
2344
2344
|
return this.map.get(e) ?? [];
|
|
@@ -2478,7 +2478,7 @@ var Lr = class {
|
|
|
2478
2478
|
return (await Promise.all(i)).flat();
|
|
2479
2479
|
}
|
|
2480
2480
|
};
|
|
2481
|
-
|
|
2481
|
+
oe([te()], Rr.prototype, "getAllItems", null);
|
|
2482
2482
|
//#endregion
|
|
2483
2483
|
//#region src/core/ai/context/utils.ts
|
|
2484
2484
|
function zr(e) {
|
|
@@ -2533,12 +2533,12 @@ var Vr = {
|
|
|
2533
2533
|
connectionsMap;
|
|
2534
2534
|
dataframes;
|
|
2535
2535
|
constructor(e, t) {
|
|
2536
|
-
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) =>
|
|
2536
|
+
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) => be(e) === "dataframe");
|
|
2537
2537
|
}
|
|
2538
2538
|
getItems() {
|
|
2539
2539
|
return [...this.connectionsMap.values()].map((e) => {
|
|
2540
2540
|
let t = "Database schema.", n = { connection: e };
|
|
2541
|
-
return
|
|
2541
|
+
return ie.has(e.name) && (n.tables = this.dataframes, t = "Database schema and the dataframes that can be queried"), e.databases.length === 0 && (n.tables?.length ?? 0) === 0 ? null : {
|
|
2542
2542
|
uri: this.asURI(e.name),
|
|
2543
2543
|
name: e.name,
|
|
2544
2544
|
description: t,
|
|
@@ -2549,7 +2549,7 @@ var Vr = {
|
|
|
2549
2549
|
}
|
|
2550
2550
|
formatContext(e) {
|
|
2551
2551
|
let t = e.data, { name: n, display_name: r, source: i, ...a } = t.connection, o = a;
|
|
2552
|
-
return
|
|
2552
|
+
return ie.has(n) || (o = {
|
|
2553
2553
|
...a,
|
|
2554
2554
|
engine_name: n
|
|
2555
2555
|
}), Br({
|
|
@@ -2562,10 +2562,10 @@ var Vr = {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
formatCompletion(e) {
|
|
2564
2564
|
let t = e.data, n = t.connection, r = t.tables, i = n.name;
|
|
2565
|
-
return
|
|
2565
|
+
return ie.has(n.name) && (i = "In-Memory"), {
|
|
2566
2566
|
label: `@${i}`,
|
|
2567
2567
|
displayLabel: i,
|
|
2568
|
-
detail:
|
|
2568
|
+
detail: me(n.dialect),
|
|
2569
2569
|
boost: Vr.MEDIUM,
|
|
2570
2570
|
type: this.contextType,
|
|
2571
2571
|
section: Hr.DATA_SOURCES,
|
|
@@ -2577,23 +2577,23 @@ var Vr = {
|
|
|
2577
2577
|
}
|
|
2578
2578
|
};
|
|
2579
2579
|
function Gr(e, t) {
|
|
2580
|
-
let n = t.get(
|
|
2580
|
+
let n = t.get(fe(e))?.code;
|
|
2581
2581
|
if (!n || n.trim() === "") return null;
|
|
2582
|
-
let [r, i, a] =
|
|
2582
|
+
let [r, i, a] = le.sql.transformIn(n), o = t.get(ne).connectionsMap.get(a.engine);
|
|
2583
2583
|
return o ? `@${Ur}://${o.name}` : null;
|
|
2584
2584
|
}
|
|
2585
2585
|
function Kr(e, t) {
|
|
2586
2586
|
let n = Gr(e, t);
|
|
2587
2587
|
if (!n) return null;
|
|
2588
|
-
let r = t.get(
|
|
2588
|
+
let r = t.get(ne).connectionsMap, i = new Wr(r, t.get(ce)), a = n.slice(1), o = i.getItems().find((e) => e.uri === a);
|
|
2589
2589
|
return o ? i.formatContext(o) : null;
|
|
2590
2590
|
}
|
|
2591
2591
|
//#endregion
|
|
2592
2592
|
//#region src/core/cells/outputs.ts
|
|
2593
2593
|
var qr = {}, Jr = {};
|
|
2594
2594
|
function Yr(e) {
|
|
2595
|
-
let t = (0, k.c)(16), { mode: n } = D(ke), { updateCellConfig: r } =
|
|
2596
|
-
t[0] === e ? i = t[1] : (i = ve(
|
|
2595
|
+
let t = (0, k.c)(16), { mode: n } = D(ke), { updateCellConfig: r } = Se(), i;
|
|
2596
|
+
t[0] === e ? i = t[1] : (i = ve(fe(e), Zr, Object.is), t[0] = e, t[1] = i);
|
|
2597
2597
|
let a = D(i), o;
|
|
2598
2598
|
t[2] !== e || t[3] !== a ? (o = () => qr[e] ?? a, t[2] = e, t[3] = a, t[4] = o) : o = t[4];
|
|
2599
2599
|
let [s, c] = (0, O.useState)(o), l, u;
|
|
@@ -2638,10 +2638,10 @@ function ni(e, t) {
|
|
|
2638
2638
|
code: t
|
|
2639
2639
|
} : e === "sql" ? {
|
|
2640
2640
|
language: "python",
|
|
2641
|
-
code:
|
|
2641
|
+
code: ue.fromQuery(t)
|
|
2642
2642
|
} : e === "markdown" ? {
|
|
2643
2643
|
language: "python",
|
|
2644
|
-
code:
|
|
2644
|
+
code: de.fromMarkdown(t)
|
|
2645
2645
|
} : e === "shell" || e === "bash" ? {
|
|
2646
2646
|
language: "python",
|
|
2647
2647
|
code: `import subprocess\nsubprocess.run("${t}")`
|
|
@@ -2654,10 +2654,10 @@ function ni(e, t) {
|
|
|
2654
2654
|
};
|
|
2655
2655
|
}
|
|
2656
2656
|
var ri = (e) => {
|
|
2657
|
-
let t = (0, k.c)(9), { code: n, language: r } = e, { createNewCell: i } =
|
|
2657
|
+
let t = (0, k.c)(9), { code: n, language: r } = e, { createNewCell: i } = Se(), a = se(), s = D(Ye), c;
|
|
2658
2658
|
t[0] !== s || t[1] !== n || t[2] !== i || t[3] !== r || t[4] !== a ? (c = () => {
|
|
2659
2659
|
let e = ni(r, n);
|
|
2660
|
-
r === "sql" &&
|
|
2660
|
+
r === "sql" && ae({
|
|
2661
2661
|
autoInstantiate: s,
|
|
2662
2662
|
createNewCell: i,
|
|
2663
2663
|
fromCellId: a
|