@marimo-team/islands 0.25.1-dev27 → 0.25.1-dev28
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/{ErrorBoundary-D4ttmcVM.js → ErrorBoundary-CE6-1WC1.js} +1 -1
- package/dist/{code-visibility-BPU-HPcn.js → code-visibility--u2Q2Zfx.js} +1 -1
- package/dist/{common-BqBhuV4I.js → common-hHL7iKzA.js} +1 -1
- package/dist/{data-grid-overlay-editor-J_6pQ0_d.js → data-grid-overlay-editor-v7VZO5up.js} +1 -1
- package/dist/{feedback-button-BaxvkeuW.js → feedback-button-C3Ya1IXo.js} +2 -2
- package/dist/{glide-data-editor-CQLOtNIR.js → glide-data-editor-BKOLh2Tv.js} +3 -3
- package/dist/{globals-CNGEBL2Q.js → globals-DOJr_y24.js} +1 -1
- package/dist/main.js +6 -6
- package/dist/{number-overlay-editor-BdiJ3rzS.js → number-overlay-editor-DkEFJYK7.js} +1 -1
- package/dist/{reveal-component-Bphz8syB.js → reveal-component-rbEv9ppg.js} +2 -2
- package/package.json +1 -1
- package/src/__mocks__/common.ts +3 -3
- package/src/__tests__/CellStatus.test.tsx +1 -1
- package/src/__tests__/setup.ts +7 -7
- package/src/components/data-table/column-summary/chart-spec-model.tsx +4 -4
- package/src/components/dependency-graph/elements.ts +2 -2
- package/src/components/editor/ai/staged-cell-submission.ts +2 -2
- package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
- package/src/components/editor/connections/database/as-code.ts +44 -44
- package/src/components/editor/connections/storage/as-code.ts +3 -3
- package/src/components/editor/file-tree/requesting-tree.tsx +16 -13
- package/src/components/editor/navigation/clipboard.ts +2 -2
- package/src/components/editor/output/ansi-reduce.ts +13 -13
- package/src/components/slides/__tests__/minimap-actions.test.tsx +7 -7
- package/src/components/slides/__tests__/minimap.test.ts +12 -12
- package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +8 -8
- package/src/core/ai/context/__tests__/registry.test.ts +31 -28
- package/src/core/ai/context/providers/cell-output.ts +8 -8
- package/src/core/ai/context/providers/datasource.ts +10 -7
- package/src/core/ai/context/providers/error.ts +7 -7
- package/src/core/ai/context/providers/file.ts +8 -8
- package/src/core/ai/context/providers/tables.ts +7 -7
- package/src/core/ai/context/providers/variable.ts +7 -7
- package/src/core/ai/context/registry.ts +18 -18
- package/src/core/ai/ids/ids.ts +5 -5
- package/src/core/ai/model-registry.ts +12 -9
- package/src/core/ai/staged-cells.ts +6 -6
- package/src/core/ai/tools/base.ts +6 -6
- package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
- package/src/core/ai/tools/registry.ts +4 -4
- package/src/core/ai/tools/run-cells-tool.ts +7 -7
- package/src/core/ai/tools/sample-tool.ts +6 -6
- package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
- package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
- package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
- package/src/core/codemirror/code-lens/extension.ts +13 -13
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
- package/src/core/codemirror/copilot/language-server.ts +13 -13
- package/src/core/codemirror/copilot/transport.ts +1 -1
- package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
- package/src/core/codemirror/go-to-definition/underline.ts +3 -3
- package/src/core/codemirror/keymaps/vim.ts +3 -3
- package/src/core/codemirror/language/languages/markdown.ts +8 -8
- package/src/core/codemirror/language/languages/python.ts +7 -7
- package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
- package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
- package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
- package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
- package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
- package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
- package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
- package/src/core/codemirror/reactive-references/extension.ts +3 -3
- package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
- package/src/core/codemirror/rtc/loro/sync.ts +5 -5
- package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
- package/src/core/dom/ui-element.ts +5 -5
- package/src/core/dom/uiregistry.ts +10 -10
- package/src/core/hotkeys/hotkeys.ts +9 -9
- package/src/core/islands/__tests__/bridge.test.ts +4 -4
- package/src/core/islands/__tests__/test-utils.tsx +4 -4
- package/src/core/islands/bridge.ts +85 -82
- package/src/core/islands/components/web-components.tsx +7 -7
- package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
- package/src/core/islands/worker/controller.ts +6 -3
- package/src/core/islands/worker-factory.ts +2 -2
- package/src/core/kernel/RuntimeState.ts +4 -4
- package/src/core/lsp/__tests__/transport.test.ts +19 -19
- package/src/core/lsp/transport.ts +5 -5
- package/src/core/network/CachingRequestRegistry.ts +2 -2
- package/src/core/network/DeferredRequestRegistry.ts +4 -4
- package/src/core/runtime/runtime.ts +25 -20
- package/src/core/static/virtual-file-tracker.ts +5 -5
- package/src/core/wasm/__tests__/bridge.test.ts +2 -2
- package/src/core/wasm/bridge.ts +130 -126
- package/src/core/wasm/router.ts +5 -5
- package/src/core/wasm/store.ts +4 -4
- package/src/core/wasm/worker/bootstrap.ts +8 -5
- package/src/core/wasm/worker/message-buffer.ts +3 -3
- package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
- package/src/core/websocket/transports/basic.ts +15 -8
- package/src/core/websocket/transports/sse.ts +7 -7
- package/src/core/websocket/transports/transport.ts +3 -3
- package/src/core/websocket/transports/ws.ts +9 -7
- package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
- package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
- package/src/plugins/core/registerReactComponent.tsx +5 -5
- package/src/plugins/core/sidebar-element.tsx +2 -2
- package/src/plugins/impl/ButtonPlugin.tsx +3 -3
- package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
- package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
- package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
- package/src/plugins/impl/DateRangePlugin.tsx +3 -3
- package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
- package/src/plugins/impl/DictPlugin.tsx +3 -3
- package/src/plugins/impl/DropdownPlugin.tsx +3 -3
- package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
- package/src/plugins/impl/MatrixPlugin.tsx +4 -4
- package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
- package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
- package/src/plugins/impl/NumberPlugin.tsx +3 -3
- package/src/plugins/impl/RadioPlugin.tsx +3 -3
- package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
- package/src/plugins/impl/RefreshPlugin.tsx +3 -3
- package/src/plugins/impl/SliderPlugin.tsx +3 -3
- package/src/plugins/impl/SwitchPlugin.tsx +3 -3
- package/src/plugins/impl/TabsPlugin.tsx +3 -3
- package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
- package/src/plugins/impl/TextInputPlugin.tsx +3 -3
- package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
- package/src/plugins/impl/anywidget/model.ts +10 -10
- package/src/plugins/impl/anywidget/registry.ts +12 -9
- package/src/plugins/impl/anywidget/runtime.ts +11 -9
- package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
- package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
- package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
- package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
- package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
- package/src/plugins/impl/panel/utils.ts +5 -5
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
- package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
- package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
- package/src/plugins/layout/AccordionPlugin.tsx +3 -3
- package/src/plugins/layout/CalloutPlugin.tsx +3 -3
- package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
- package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
- package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
- package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
- package/src/plugins/layout/OutlinePlugin.tsx +3 -3
- package/src/plugins/layout/ProgressPlugin.tsx +3 -3
- package/src/plugins/layout/RoutesPlugin.tsx +3 -3
- package/src/plugins/layout/StatPlugin.tsx +3 -3
- package/src/plugins/layout/TexPlugin.tsx +3 -3
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
- package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
- package/src/utils/Deferred.ts +6 -6
- package/src/utils/async-capture-tracker.ts +10 -7
- package/src/utils/errors.ts +5 -5
- package/src/utils/id-tree.tsx +83 -80
- package/src/utils/lru.ts +1 -1
- package/src/utils/multi-map.ts +14 -12
- package/src/utils/paths.ts +6 -6
- package/src/utils/pluralize.ts +3 -3
- package/src/utils/progress.ts +6 -6
- package/src/utils/python-poet/poet.ts +14 -14
- package/src/utils/routes.ts +4 -2
- package/src/utils/semaphore.ts +6 -6
- package/src/utils/storage/storage.ts +6 -6
- package/src/utils/storage/typed.ts +16 -12
- package/src/utils/time.ts +9 -9
- package/src/utils/timed-cache.ts +4 -4
- package/src/utils/tracer.ts +9 -6
|
@@ -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-
|
|
138
|
+
var I = (0, T.lazy)(() => import("./feedback-button-C3Ya1IXo.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,
|
|
@@ -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.1-
|
|
21
|
+
var S = x() || "0.25.1-dev28", C = u(S), w = u(!0);
|
|
22
22
|
u(null);
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/core/wasm/state.ts
|
|
@@ -12,7 +12,7 @@ import { t as lt } from "./check-B7cIK6gb.js";
|
|
|
12
12
|
import { A as ut, C as dt, D as ft, M as pt, O as mt, S as ht, _ as gt, b as _t, c as vt, d as yt, g as bt, h as xt, i as St, m as Ct, n as wt, p as Tt, s as Et, t as Dt, u as Ot, v as kt, y as At } from "./select-C6plhmZr.js";
|
|
13
13
|
import { $ as jt, $t as Mt, A as Nt, At as Pt, B as Ft, Bt as It, Ct as Lt, D as Rt, Dt as zt, E as Bt, Et as Vt, F as Ht, Ft as Ut, G as Wt, Gt, H as Kt, Ht as qt, I as Jt, It as Yt, Jt as Xt, K as Zt, Kt as Qt, L as $t, Lt as en, M as tn, Mt as nn, N as rn, Nt as an, O as on, Ot as sn, P as cn, Pt as ln, Q as un, Qt as dn, R as fn, Rt as pn, S as mn, St as hn, T as gn, Tt as _n, U as vn, Ut as yn, V as bn, Vt as xn, W as Sn, Wt as Cn, X as wn, Xt as Tn, Y as En, Yt as Dn, Z as On, Zt as kn, _ as An, _t as jn, a as Mn, an as Nn, b as Pn, bt as Fn, cn as In, ct as Ln, d as Rn, dn as zn, dt as Bn, en as Vn, et as Hn, f as Un, fn as Wn, ft as Gn, gt as Kn, h as qn, ht as Jn, i as Yn, it as Xn, j as Zn, jt as Qn, k as $n, kt as er, l as tr, ln as nr, lt as rr, mt as ir, n as ar, nn as or, nt as sr, o as cr, on as lr, ot as ur, pn as dr, pt as fr, qt as pr, rn as mr, rt as hr, s as gr, sn as _r, st as vr, t as yr, tn as br, tt as xr, u as Sr, un as Cr, ut as wr, vt as Tr, w as Er, wt as Dr, x as Or, xt as kr, y as Ar, yt as jr, z as Mr, zt as Nr } from "./dropdown-menu-CZgjYSAh.js";
|
|
14
14
|
import { C as Pr, a as Fr, b as Ir, c as Lr, d as Rr, i as zr, n as Br, o as Vr, p as Hr, r as Ur, s as Wr, t as Gr, x as Kr } from "./toDate-C67bxMWn.js";
|
|
15
|
-
import { n as qr, t as Jr } from "./ErrorBoundary-
|
|
15
|
+
import { n as qr, t as Jr } from "./ErrorBoundary-CE6-1WC1.js";
|
|
16
16
|
import { t as Yr } from "./clsx-CoeGtWvn.js";
|
|
17
17
|
import { t as Xr } from "./react-dom-BUgJ-ab_.js";
|
|
18
18
|
import { t as Zr } from "./jsx-runtime-DgDPJV9S.js";
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
|
2
2
|
import { t } from "./react-ofJbxM4x.js";
|
|
3
3
|
import { t as n } from "./react-dom-BUgJ-ab_.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-BucVmDDp.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-
|
|
5
|
+
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-BKOLh2Tv.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.8_b9e6aec46d952f631ce71b0585d2a8e5/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
|
|
7
7
|
var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
|
|
8
8
|
name: "DataGridOverlayEditorStyle",
|
|
@@ -5,12 +5,12 @@ import { t as i } from "./compiler-runtime-Cj8ZWiNS.js";
|
|
|
5
5
|
import { t as a } from "./copy-icon-CLdENY__.js";
|
|
6
6
|
import { Ct as o, Ft as s, H as c, L as l, Lt as u, V as d, d as f, un as p } from "./cells-Cksce8br.js";
|
|
7
7
|
import { b as m } from "./select-C6plhmZr.js";
|
|
8
|
-
import { n as h, t as ee } from "./globals-
|
|
8
|
+
import { n as h, t as ee } from "./globals-DOJr_y24.js";
|
|
9
9
|
import { t as g } from "./jsx-runtime-DgDPJV9S.js";
|
|
10
10
|
import { C as _, _ as te, i as v } from "./useTheme-DzXmYZ5V.js";
|
|
11
11
|
import { a as ne, i as re, n as ie, r as ae } from "./dialog-CgNq6y9-.js";
|
|
12
12
|
import { t as oe } from "./useAsyncData-BD6AStMt.js";
|
|
13
|
-
import { t as se } from "./code-visibility
|
|
13
|
+
import { t as se } from "./code-visibility--u2Q2Zfx.js";
|
|
14
14
|
import { i as ce, n as le } from "./error-entries-CvCFdpY2.js";
|
|
15
15
|
//#region src/components/ui/skeleton.tsx
|
|
16
16
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = g(), ue = (e) => {
|
|
@@ -6,7 +6,7 @@ import { i as s, n as c, r as l } from "./copy-icon-CLdENY__.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-C6plhmZr.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-CZgjYSAh.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-B3rUT5PI.js";
|
|
9
|
-
import { n as ne, t as re } from "./ErrorBoundary-
|
|
9
|
+
import { n as ne, t as re } from "./ErrorBoundary-CE6-1WC1.js";
|
|
10
10
|
import { t as M } from "./react-dom-BUgJ-ab_.js";
|
|
11
11
|
import { t as N } from "./jsx-runtime-DgDPJV9S.js";
|
|
12
12
|
import { t as ie } from "./label-BJ49YTvk.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.2.8_b9e6aec46d952f631ce71b0585d2a8e5/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-v7VZO5up.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.2.8_b9e6aec46d952f631ce71b0585d2a8e5/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-DkEFJYK7.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 { g as e } from "./tooltip-qB8NlSqV.js";
|
|
2
2
|
import { _ as t } from "./useTheme-DzXmYZ5V.js";
|
|
3
|
-
import { r as n } from "./code-visibility
|
|
3
|
+
import { r as n } from "./code-visibility--u2Q2Zfx.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",
|
package/dist/main.js
CHANGED
|
@@ -7,7 +7,7 @@ import { C as T, F as E, G as D, I as O, J as k, K as A, L as j, P as M, R as N,
|
|
|
7
7
|
import { a as se, f as ce, g as V, i as le, n as ue, o as de, p as fe, r as pe, t as me } from "./tooltip-qB8NlSqV.js";
|
|
8
8
|
import { $ as he, $t as ge, B as _e, Bt as ve, C as ye, Ct as be, D as xe, Dt as Se, Et as Ce, F as we, G as Te, Gt as Ee, Ht as De, I as Oe, J as ke, Jt as Ae, Kt as je, L as Me, O as Ne, Ot as Pe, P as Fe, Pt as Ie, Q as Le, Qt as Re, Rt as ze, S as Be, St as Ve, T as He, Tt as Ue, U as We, W as Ge, Wt as Ke, bt as qe, c as Je, cn as Ye, ct as Xe, d as Ze, dn as Qe, dt as $e, en as et, f as tt, fn as nt, ft as rt, g as it, gt as at, h as ot, hn as st, k as ct, l as lt, ln as ut, m as dt, mn as ft, n as pt, o as mt, on as ht, ot as gt, p as _t, q as vt, qt as yt, r as bt, rn as xt, rt as St, sn as Ct, st as wt, tn as Tt, u as Et, v as Dt, w as Ot, wt as kt, zt as At } from "./cells-Cksce8br.js";
|
|
9
9
|
import { D as jt, E as Mt, O as Nt, S as Pt, T as Ft, _ as It, a as Lt, c as Rt, d as zt, f as Bt, g as Vt, h as Ht, i as Ut, l as Wt, m as Gt, n as Kt, o as qt, p as Jt, r as Yt, s as Xt, t as Zt, u as Qt, v as $t, w as en, x as tn, y as nn } from "./spec-CAYwFeV6.js";
|
|
10
|
-
import { $t as rn, A as an, At as on, B as sn, Bt as cn, C as ln, Ct as un, D as dn, Dt as fn, E as pn, Et as mn, F as hn, Ft as gn, G as _n, Gt as vn, H as yn, Ht as bn, I as xn, It as Sn, J as Cn, Jt as wn, K as Tn, Kt as En, L as Dn, Lt as On, M as kn, Mt as An, N as jn, Nt as Mn, O as Nn, Ot as Pn, P as Fn, Pt as In, Qt as Ln, R as Rn, Rt as zn, S as Bn, St as Vn, T as Hn, Tt as Un, U as Wn, Ut as Gn, V as Kn, Vt as qn, W as Jn, Wt as Yn, X as Xn, Xt as Zn, Y as Qn, Yt as $n, Zt as er, _ as tr, _t as nr, an as rr, at as ir, b as ar, c as or, cn as sr, ct as cr, d as lr, dn as ur, dt as dr, en as fr, et as pr, f as mr, fn as hr, ft as gr, g as _r, gt as vr, h as yr, hn as br, ht as xr, in as Sr, it as Cr, j as wr, jt as Tr, k as Er, kt as Dr, ln as Or, lt as kr, m as Ar, mn as jr, mt as Mr, nn as Nr, nt as Pr, ot as Fr, p as Ir, pn as Lr, pt as Rr, q as zr, qt as Br, r as Vr, rn as Hr, rt as Ur, sn as Wr, st as Gr, t as Kr, tn as qr, tt as Jr, u as Yr, un as Xr, ut as Zr, v as Qr, vt as $r, w as ei, wt as ti, x as ni, y as ri, yt as ii, z as ai, zt as oi } from "./common-
|
|
10
|
+
import { $t as rn, A as an, At as on, B as sn, Bt as cn, C as ln, Ct as un, D as dn, Dt as fn, E as pn, Et as mn, F as hn, Ft as gn, G as _n, Gt as vn, H as yn, Ht as bn, I as xn, It as Sn, J as Cn, Jt as wn, K as Tn, Kt as En, L as Dn, Lt as On, M as kn, Mt as An, N as jn, Nt as Mn, O as Nn, Ot as Pn, P as Fn, Pt as In, Qt as Ln, R as Rn, Rt as zn, S as Bn, St as Vn, T as Hn, Tt as Un, U as Wn, Ut as Gn, V as Kn, Vt as qn, W as Jn, Wt as Yn, X as Xn, Xt as Zn, Y as Qn, Yt as $n, Zt as er, _ as tr, _t as nr, an as rr, at as ir, b as ar, c as or, cn as sr, ct as cr, d as lr, dn as ur, dt as dr, en as fr, et as pr, f as mr, fn as hr, ft as gr, g as _r, gt as vr, h as yr, hn as br, ht as xr, in as Sr, it as Cr, j as wr, jt as Tr, k as Er, kt as Dr, ln as Or, lt as kr, m as Ar, mn as jr, mt as Mr, nn as Nr, nt as Pr, ot as Fr, p as Ir, pn as Lr, pt as Rr, q as zr, qt as Br, r as Vr, rn as Hr, rt as Ur, sn as Wr, st as Gr, t as Kr, tn as qr, tt as Jr, u as Yr, un as Xr, ut as Zr, v as Qr, vt as $r, w as ei, wt as ti, x as ni, y as ri, yt as ii, z as ai, zt as oi } from "./common-hHL7iKzA.js";
|
|
11
11
|
import { c as si, i as ci, n as li, o as ui, t as di } from "./useLifecycle-DPgiiwwU.js";
|
|
12
12
|
import { t as fi } from "./check-B7cIK6gb.js";
|
|
13
13
|
import { A as pi, C as mi, D as hi, E as gi, M as _i, O as vi, S as yi, T as bi, a as xi, b as Si, c as Ci, i as wi, k as Ti, l as Ei, n as Di, o as Oi, r as ki, s as Ai, t as ji, w as Mi, x as Ni } from "./select-C6plhmZr.js";
|
|
@@ -15,8 +15,8 @@ import { B as Pi, C as Fi, J as Ii, Mt as Li, Nt as Ri, S as zi, Vt as Bi, W as
|
|
|
15
15
|
import { C as da, S as fa, T as pa, _ as ma, c as ha, d as ga, f as _a, g as va, h as ya, m as ba, u as xa, x as Sa, y as Ca } from "./toDate-C67bxMWn.js";
|
|
16
16
|
import { a as wa, c as Ta, d as Ea, f as Da, i as Oa, l as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa } from "./process-output-C6apL85F.js";
|
|
17
17
|
import { a as Fa, c as Ia, d as La, i as Ra, l as za, r as Ba, u as Va } from "./glide-utils-B3rUT5PI.js";
|
|
18
|
-
import { n as Ha, t as Ua } from "./ErrorBoundary-
|
|
19
|
-
import { n as Wa, t as Ga } from "./globals-
|
|
18
|
+
import { n as Ha, t as Ua } from "./ErrorBoundary-CE6-1WC1.js";
|
|
19
|
+
import { n as Wa, t as Ga } from "./globals-DOJr_y24.js";
|
|
20
20
|
import { t as Ka } from "./react-dom-BUgJ-ab_.js";
|
|
21
21
|
import { t as qa } from "./jsx-runtime-DgDPJV9S.js";
|
|
22
22
|
import { B as Ja, C as H, Ct as Ya, D as Xa, E as Za, Et as Qa, F as U, G as $a, H as eo, I as to, L as no, M as W, N as ro, O as io, P as ao, Q as oo, R as so, S as G, St as co, Tt as lo, U as uo, W as fo, Y as po, Z as mo, _ as ho, a as go, b as _o, bt as vo, c as yo, d as bo, dt as xo, f as So, g as Co, gt as wo, h as To, i as Eo, j as K, k as Do, l as Oo, m as ko, n as Ao, o as jo, p as Mo, r as No, s as Po, u as Fo, v as Io, vt as Lo, w as Ro, wt as zo, x as Bo, xt as Vo, y as Ho, yt as Uo } from "./use-restore-focus-D5D9xEjZ.js";
|
|
@@ -40,7 +40,7 @@ import { t as Ns } from "./useAsyncData-BD6AStMt.js";
|
|
|
40
40
|
import { i as Ps, n as Fs, r as Is } from "./formats-Cl_67ghI.js";
|
|
41
41
|
import { M as Ls, N as Rs } from "./vega-loader.browser-DNST6uVf.js";
|
|
42
42
|
import { a as zs, n as Bs } from "./loader-DEZSzvma.js";
|
|
43
|
-
import { c as Vs, d as Hs, i as Us, l as Ws, o as Gs, s as Ks, t as qs, u as Js } from "./code-visibility
|
|
43
|
+
import { c as Vs, d as Hs, i as Us, l as Ws, o as Gs, s as Ks, t as qs, u as Js } from "./code-visibility--u2Q2Zfx.js";
|
|
44
44
|
import { t as Ys } from "./useDeepCompareMemoize-D_HNdyvI.js";
|
|
45
45
|
import { t as Xs } from "./esm-BElI3qKH.js";
|
|
46
46
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
@@ -10458,7 +10458,7 @@ function RC(e, t) {
|
|
|
10458
10458
|
}
|
|
10459
10459
|
//#endregion
|
|
10460
10460
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
10461
|
-
var zC = J.lazy(() => import("./glide-data-editor-
|
|
10461
|
+
var zC = J.lazy(() => import("./glide-data-editor-BKOLh2Tv.js").then((e) => e.t)), BC = xS("marimo-data-editor", { cssStyles: [WS] }).withData(W({
|
|
10462
10462
|
initialValue: W({ edits: G(W({
|
|
10463
10463
|
rowIdx: K(),
|
|
10464
10464
|
columnId: U(),
|
|
@@ -29934,7 +29934,7 @@ function bR(e) {
|
|
|
29934
29934
|
}
|
|
29935
29935
|
//#endregion
|
|
29936
29936
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
29937
|
-
var xR = J.lazy(() => import("./reveal-component-
|
|
29937
|
+
var xR = J.lazy(() => import("./reveal-component-rbEv9ppg.js")), SR = (e) => {
|
|
29938
29938
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = rs(Ca), s = a === "read" || o, c = rs(_t) > 1, [l, u] = (0, J.useState)(null), d;
|
|
29939
29939
|
t[0] !== i || t[1] !== n ? (d = vP(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
29940
29940
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
2
|
import { t } from "./react-ofJbxM4x.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor-
|
|
3
|
+
import { a as n } from "./glide-data-editor-BKOLh2Tv.js";
|
|
4
4
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.2.8_b9e6aec46d952f631ce71b0585d2a8e5/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js
|
|
5
5
|
var r = /* @__PURE__ */ e(t()), i = /*#__PURE__*/ n("div")({
|
|
6
6
|
name: "NumberOverlayEditorStyle",
|
|
@@ -4,14 +4,14 @@ import { t as o } from "./react-ofJbxM4x.js";
|
|
|
4
4
|
import { t as s } from "./compiler-runtime-Cj8ZWiNS.js";
|
|
5
5
|
import { g as c, t as l } from "./tooltip-qB8NlSqV.js";
|
|
6
6
|
import { w as u } from "./cells-Cksce8br.js";
|
|
7
|
-
import { $ as d, Q as f, Z as p, an as m, i as h, l as g, ln as _, n as v, on as y, r as b, t as x, u as S } from "./common-
|
|
7
|
+
import { $ as d, Q as f, Z as p, an as m, i as h, l as g, ln as _, n as v, on as y, r as b, t as x, u as S } from "./common-hHL7iKzA.js";
|
|
8
8
|
import { M as C } from "./select-C6plhmZr.js";
|
|
9
9
|
import { J as ee } from "./dropdown-menu-CZgjYSAh.js";
|
|
10
10
|
import { y as w } from "./toDate-C67bxMWn.js";
|
|
11
11
|
import { t as T } from "./jsx-runtime-DgDPJV9S.js";
|
|
12
12
|
import { q as te } from "./use-restore-focus-D5D9xEjZ.js";
|
|
13
13
|
import { A as E, C as D, b as O } from "./useTheme-DzXmYZ5V.js";
|
|
14
|
-
import { a as k, n as ne, t as re } from "./code-visibility
|
|
14
|
+
import { a as k, n as ne, t as re } from "./code-visibility--u2Q2Zfx.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
var A = c("sticky-note", [["path", {
|
|
17
17
|
d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
|
package/package.json
CHANGED
package/src/__mocks__/common.ts
CHANGED
|
@@ -101,9 +101,9 @@ export const SetupMocks = {
|
|
|
101
101
|
const unobserve = vi.fn();
|
|
102
102
|
const disconnect = vi.fn();
|
|
103
103
|
global.ResizeObserver = class MockResizeObserver {
|
|
104
|
-
observe = observe;
|
|
105
|
-
unobserve = unobserve;
|
|
106
|
-
disconnect = disconnect;
|
|
104
|
+
public observe = observe;
|
|
105
|
+
public unobserve = unobserve;
|
|
106
|
+
public disconnect = disconnect;
|
|
107
107
|
} as unknown as typeof ResizeObserver;
|
|
108
108
|
return { observe, unobserve, disconnect };
|
|
109
109
|
},
|
package/src/__tests__/setup.ts
CHANGED
|
@@ -9,29 +9,29 @@ import "blob-polyfill";
|
|
|
9
9
|
// if we need to test ResizeObserver functionality
|
|
10
10
|
// we can use a library like "resize-observer-polyfill"
|
|
11
11
|
globalThis.ResizeObserver ??= class {
|
|
12
|
-
observe(_target: Element) {
|
|
12
|
+
public observe(_target: Element) {
|
|
13
13
|
/* noop */
|
|
14
14
|
}
|
|
15
|
-
unobserve(_target: Element) {
|
|
15
|
+
public unobserve(_target: Element) {
|
|
16
16
|
/* noop */
|
|
17
17
|
}
|
|
18
|
-
disconnect() {
|
|
18
|
+
public disconnect() {
|
|
19
19
|
/* noop */
|
|
20
20
|
}
|
|
21
21
|
} as never;
|
|
22
22
|
|
|
23
23
|
// mock implementation because jsdom doesn't support IntersectionObserver
|
|
24
24
|
globalThis.IntersectionObserver ??= class {
|
|
25
|
-
observe(_target: Element) {
|
|
25
|
+
public observe(_target: Element) {
|
|
26
26
|
/* noop */
|
|
27
27
|
}
|
|
28
|
-
unobserve(_target: Element) {
|
|
28
|
+
public unobserve(_target: Element) {
|
|
29
29
|
/* noop */
|
|
30
30
|
}
|
|
31
|
-
disconnect() {
|
|
31
|
+
public disconnect() {
|
|
32
32
|
/* noop */
|
|
33
33
|
}
|
|
34
|
-
takeRecords() {
|
|
34
|
+
public takeRecords() {
|
|
35
35
|
return [];
|
|
36
36
|
}
|
|
37
37
|
} as never;
|
|
@@ -137,14 +137,14 @@ export class ColumnChartSpecModel<T> {
|
|
|
137
137
|
private legacySourceName: "data_0" | "source_0";
|
|
138
138
|
|
|
139
139
|
private readonly fieldTypes: FieldTypes;
|
|
140
|
-
readonly stats: Record<ColumnName, Partial<ColumnHeaderStats>>;
|
|
141
|
-
readonly binValues: Record<ColumnName, BinValues>;
|
|
142
|
-
readonly valueCounts: Record<ColumnName, ValueCounts>;
|
|
140
|
+
public readonly stats: Record<ColumnName, Partial<ColumnHeaderStats>>;
|
|
141
|
+
public readonly binValues: Record<ColumnName, BinValues>;
|
|
142
|
+
public readonly valueCounts: Record<ColumnName, ValueCounts>;
|
|
143
143
|
private readonly opts: {
|
|
144
144
|
includeCharts: boolean;
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
constructor(
|
|
147
|
+
public constructor(
|
|
148
148
|
data: T[] | string,
|
|
149
149
|
fieldTypes: FieldTypes,
|
|
150
150
|
stats: Record<ColumnName, Partial<ColumnHeaderStats>>,
|
|
@@ -225,7 +225,7 @@ export class VerticalElementsBuilder implements ElementsBuilder {
|
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
createElements(
|
|
228
|
+
public createElements(
|
|
229
229
|
cellIds: CellId[],
|
|
230
230
|
cellAtoms: Atom<CellData>[],
|
|
231
231
|
variables: Variables,
|
|
@@ -311,7 +311,7 @@ export class TreeElementsBuilder implements ElementsBuilder {
|
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
createElements(
|
|
314
|
+
public createElements(
|
|
315
315
|
cellIds: CellId[],
|
|
316
316
|
cellAtoms: Atom<CellData>[],
|
|
317
317
|
variables: Variables,
|
|
@@ -14,13 +14,13 @@ interface SubmissionAttempt {
|
|
|
14
14
|
export class StagedCellSubmissionController {
|
|
15
15
|
private activeAttempt: SubmissionAttempt | null = null;
|
|
16
16
|
|
|
17
|
-
cancel() {
|
|
17
|
+
public cancel() {
|
|
18
18
|
if (this.activeAttempt) {
|
|
19
19
|
this.activeAttempt.cancelled = true;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
async run<T>({ prepare, submit, onError }: SubmissionCallbacks<T>) {
|
|
23
|
+
public async run<T>({ prepare, submit, onError }: SubmissionCallbacks<T>) {
|
|
24
24
|
if (this.activeAttempt !== null) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
@@ -15,7 +15,7 @@ export class StreamingChunkTransport<
|
|
|
15
15
|
> extends DefaultChatTransport<UI_MESSAGE> {
|
|
16
16
|
private onChunkReceived: (chunk: UIMessageChunk) => void;
|
|
17
17
|
|
|
18
|
-
constructor(
|
|
18
|
+
public constructor(
|
|
19
19
|
options: HttpChatTransportInitOptions<UI_MESSAGE>,
|
|
20
20
|
onChunkReceived: (chunk: UIMessageChunk) => void,
|
|
21
21
|
) {
|
|
@@ -36,7 +36,7 @@ abstract class CodeGenerator<T extends DatabaseConnection["type"]> {
|
|
|
36
36
|
protected orm: ConnectionLibrary;
|
|
37
37
|
protected secrets: SecretContainer;
|
|
38
38
|
|
|
39
|
-
constructor(
|
|
39
|
+
public constructor(
|
|
40
40
|
connection: Extract<DatabaseConnection, { type: T }>,
|
|
41
41
|
orm: ConnectionLibrary,
|
|
42
42
|
secrets: SecretContainer,
|
|
@@ -46,7 +46,7 @@ abstract class CodeGenerator<T extends DatabaseConnection["type"]> {
|
|
|
46
46
|
this.secrets = secrets;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
get imports(): Set<string> {
|
|
49
|
+
public get imports(): Set<string> {
|
|
50
50
|
const imports = new Set<string>(this.generateImports());
|
|
51
51
|
switch (this.orm) {
|
|
52
52
|
case "sqlalchemy":
|
|
@@ -67,7 +67,7 @@ abstract class CodeGenerator<T extends DatabaseConnection["type"]> {
|
|
|
67
67
|
|
|
68
68
|
protected abstract generateImports(): string[];
|
|
69
69
|
|
|
70
|
-
abstract generateConnectionCode(): string;
|
|
70
|
+
public abstract generateConnectionCode(): string;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
const makePrivate = (name: string) => `_${name}`;
|
|
@@ -75,14 +75,14 @@ const makePrivate = (name: string) => `_${name}`;
|
|
|
75
75
|
class SecretContainer {
|
|
76
76
|
private secrets: Record<string, string> = {};
|
|
77
77
|
|
|
78
|
-
get imports(): Set<string> {
|
|
78
|
+
public get imports(): Set<string> {
|
|
79
79
|
if (Object.keys(this.secrets).length === 0) {
|
|
80
80
|
return new Set<string>();
|
|
81
81
|
}
|
|
82
82
|
return new Set<string>(["import os"]);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
print(
|
|
85
|
+
public print(
|
|
86
86
|
varName: string,
|
|
87
87
|
secretKeyOrValue: string | number | boolean,
|
|
88
88
|
defaultValue?: string | undefined,
|
|
@@ -119,7 +119,7 @@ class SecretContainer {
|
|
|
119
119
|
return `"${secretKeyOrValue}"`;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
printInFString(
|
|
122
|
+
public printInFString(
|
|
123
123
|
varName: string,
|
|
124
124
|
secretKeyOrValue: string | number | undefined | boolean,
|
|
125
125
|
defaultValue?: string | undefined,
|
|
@@ -171,7 +171,7 @@ class SecretContainer {
|
|
|
171
171
|
* f"db://sample:access_token@sample.com"
|
|
172
172
|
* ```
|
|
173
173
|
*/
|
|
174
|
-
printPassword(
|
|
174
|
+
public printPassword(
|
|
175
175
|
password: string | undefined,
|
|
176
176
|
passwordPlaceholder: string,
|
|
177
177
|
inFString: boolean,
|
|
@@ -187,11 +187,11 @@ class SecretContainer {
|
|
|
187
187
|
: printMethod(variableName || "password", passwordPlaceholder, password);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
getSecrets(): Record<string, string> {
|
|
190
|
+
public getSecrets(): Record<string, string> {
|
|
191
191
|
return this.secrets;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
formatSecrets(): string {
|
|
194
|
+
public formatSecrets(): string {
|
|
195
195
|
if (Object.keys(this.secrets).length === 0) {
|
|
196
196
|
return "";
|
|
197
197
|
}
|
|
@@ -203,11 +203,11 @@ class SecretContainer {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
class PostgresGenerator extends CodeGenerator<"postgres"> {
|
|
206
|
-
generateImports(): string[] {
|
|
206
|
+
public generateImports(): string[] {
|
|
207
207
|
return [];
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
generateConnectionCode(): string {
|
|
210
|
+
public generateConnectionCode(): string {
|
|
211
211
|
const ssl = this.connection.ssl
|
|
212
212
|
? ", connect_args={'sslmode': 'require'}"
|
|
213
213
|
: "";
|
|
@@ -235,11 +235,11 @@ class PostgresGenerator extends CodeGenerator<"postgres"> {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
class MySQLGenerator extends CodeGenerator<"mysql"> {
|
|
238
|
-
generateImports(): string[] {
|
|
238
|
+
public generateImports(): string[] {
|
|
239
239
|
return [];
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
generateConnectionCode(): string {
|
|
242
|
+
public generateConnectionCode(): string {
|
|
243
243
|
const ssl = this.connection.ssl
|
|
244
244
|
? ", connect_args={'ssl': {'ssl-mode': 'preferred'}}"
|
|
245
245
|
: "";
|
|
@@ -267,11 +267,11 @@ class MySQLGenerator extends CodeGenerator<"mysql"> {
|
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
class SQLiteGenerator extends CodeGenerator<"sqlite"> {
|
|
270
|
-
generateImports(): string[] {
|
|
270
|
+
public generateImports(): string[] {
|
|
271
271
|
return [];
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
generateConnectionCode(): string {
|
|
274
|
+
public generateConnectionCode(): string {
|
|
275
275
|
const database = this.connection.database
|
|
276
276
|
? this.secrets.printInFString("database", this.connection.database)
|
|
277
277
|
: "";
|
|
@@ -289,11 +289,11 @@ class SQLiteGenerator extends CodeGenerator<"sqlite"> {
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
class SnowflakeGenerator extends CodeGenerator<"snowflake"> {
|
|
292
|
-
generateImports(): string[] {
|
|
292
|
+
public generateImports(): string[] {
|
|
293
293
|
return ["from snowflake.sqlalchemy import URL"];
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
generateConnectionCode(): string {
|
|
296
|
+
public generateConnectionCode(): string {
|
|
297
297
|
const { authType, account, database, warehouse, schema, role } =
|
|
298
298
|
this.connection;
|
|
299
299
|
const baseParams: Record<string, string | undefined> = {
|
|
@@ -422,11 +422,11 @@ class BigQueryGenerator extends CodeGenerator<"bigquery"> {
|
|
|
422
422
|
);
|
|
423
423
|
}
|
|
424
424
|
|
|
425
|
-
generateImports(): string[] {
|
|
425
|
+
public generateImports(): string[] {
|
|
426
426
|
return this.credential.kind === "path" ? [] : ["import json"];
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
generateConnectionCode(): string {
|
|
429
|
+
public generateConnectionCode(): string {
|
|
430
430
|
const project = this.secrets.printInFString(
|
|
431
431
|
"project",
|
|
432
432
|
this.connection.project,
|
|
@@ -451,11 +451,11 @@ class BigQueryGenerator extends CodeGenerator<"bigquery"> {
|
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
class DuckDBGenerator extends CodeGenerator<"duckdb"> {
|
|
454
|
-
generateImports(): string[] {
|
|
454
|
+
public generateImports(): string[] {
|
|
455
455
|
return [];
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
generateConnectionCode(): string {
|
|
458
|
+
public generateConnectionCode(): string {
|
|
459
459
|
const database = this.secrets.printInFString(
|
|
460
460
|
"database",
|
|
461
461
|
this.connection.database || ":memory:",
|
|
@@ -469,11 +469,11 @@ class DuckDBGenerator extends CodeGenerator<"duckdb"> {
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
class MotherDuckGenerator extends CodeGenerator<"motherduck"> {
|
|
472
|
-
generateImports(): string[] {
|
|
472
|
+
public generateImports(): string[] {
|
|
473
473
|
return [];
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
generateConnectionCode(): string {
|
|
476
|
+
public generateConnectionCode(): string {
|
|
477
477
|
const database = this.secrets.printInFString(
|
|
478
478
|
"database",
|
|
479
479
|
this.connection.database,
|
|
@@ -497,11 +497,11 @@ class MotherDuckGenerator extends CodeGenerator<"motherduck"> {
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
class ClickHouseGenerator extends CodeGenerator<"clickhouse_connect"> {
|
|
500
|
-
generateImports(): string[] {
|
|
500
|
+
public generateImports(): string[] {
|
|
501
501
|
return ["import clickhouse_connect"];
|
|
502
502
|
}
|
|
503
503
|
|
|
504
|
-
generateConnectionCode(): string {
|
|
504
|
+
public generateConnectionCode(): string {
|
|
505
505
|
const password = this.secrets.printPassword(
|
|
506
506
|
this.connection.password,
|
|
507
507
|
"CLICKHOUSE_PASSWORD",
|
|
@@ -530,11 +530,11 @@ ${formatUrlParams(params, (inner) => ` ${inner}`)},
|
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
class TimeplusGenerator extends CodeGenerator<"timeplus"> {
|
|
533
|
-
generateImports(): string[] {
|
|
533
|
+
public generateImports(): string[] {
|
|
534
534
|
return [];
|
|
535
535
|
}
|
|
536
536
|
|
|
537
|
-
generateConnectionCode(): string {
|
|
537
|
+
public generateConnectionCode(): string {
|
|
538
538
|
const password = this.secrets.printPassword(
|
|
539
539
|
this.connection.password,
|
|
540
540
|
"TIMEPLUS_PASSWORD",
|
|
@@ -555,11 +555,11 @@ class TimeplusGenerator extends CodeGenerator<"timeplus"> {
|
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
class ChDBGenerator extends CodeGenerator<"chdb"> {
|
|
558
|
-
generateImports(): string[] {
|
|
558
|
+
public generateImports(): string[] {
|
|
559
559
|
return ["import chdb"];
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
generateConnectionCode(): string {
|
|
562
|
+
public generateConnectionCode(): string {
|
|
563
563
|
const database =
|
|
564
564
|
this.secrets.print("database", this.connection.database) || '""';
|
|
565
565
|
|
|
@@ -570,13 +570,13 @@ class ChDBGenerator extends CodeGenerator<"chdb"> {
|
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
class TrinoGenerator extends CodeGenerator<"trino"> {
|
|
573
|
-
generateImports(): string[] {
|
|
573
|
+
public generateImports(): string[] {
|
|
574
574
|
return this.connection.async_support
|
|
575
575
|
? ["import aiotrino"]
|
|
576
576
|
: ["import trino.sqlalchemy"];
|
|
577
577
|
}
|
|
578
578
|
|
|
579
|
-
generateConnectionCode(): string {
|
|
579
|
+
public generateConnectionCode(): string {
|
|
580
580
|
const trinoExtension = this.connection.async_support ? "aiotrino" : "trino";
|
|
581
581
|
const schema = this.connection.schema ? `/${this.connection.schema}` : "";
|
|
582
582
|
|
|
@@ -614,7 +614,7 @@ class PyIcebergGenerator extends CodeGenerator<"iceberg"> {
|
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
616
|
|
|
617
|
-
generateImports(): string[] {
|
|
617
|
+
public generateImports(): string[] {
|
|
618
618
|
if (Object.keys(this.getCatalogOptions()).length === 0) {
|
|
619
619
|
return ["from pyiceberg.catalog import load_catalog"];
|
|
620
620
|
}
|
|
@@ -635,7 +635,7 @@ class PyIcebergGenerator extends CodeGenerator<"iceberg"> {
|
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
-
generateConnectionCode(): string {
|
|
638
|
+
public generateConnectionCode(): string {
|
|
639
639
|
const name = `"${this.connection.name}"`;
|
|
640
640
|
const options = this.getCatalogOptions();
|
|
641
641
|
if (Object.keys(options).length === 0) {
|
|
@@ -705,12 +705,12 @@ class PyIcebergGenerator extends CodeGenerator<"iceberg"> {
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
class DataFusionGenerator extends CodeGenerator<"datafusion"> {
|
|
708
|
-
generateImports(): string[] {
|
|
708
|
+
public generateImports(): string[] {
|
|
709
709
|
// To trigger installation of ibis-datafusion
|
|
710
710
|
return ["from datafusion import SessionContext"];
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
-
generateConnectionCode(): string {
|
|
713
|
+
public generateConnectionCode(): string {
|
|
714
714
|
if (this.connection.sessionContext) {
|
|
715
715
|
return dedent(`
|
|
716
716
|
ctx = SessionContext()
|
|
@@ -727,11 +727,11 @@ class DataFusionGenerator extends CodeGenerator<"datafusion"> {
|
|
|
727
727
|
}
|
|
728
728
|
|
|
729
729
|
class PySparkGenerator extends CodeGenerator<"pyspark"> {
|
|
730
|
-
generateImports(): string[] {
|
|
730
|
+
public generateImports(): string[] {
|
|
731
731
|
return ["from pyspark.sql import SparkSession"];
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
generateConnectionCode(): string {
|
|
734
|
+
public generateConnectionCode(): string {
|
|
735
735
|
if (this.connection.host || this.connection.port) {
|
|
736
736
|
const host = this.secrets.printInFString("host", this.connection.host);
|
|
737
737
|
const port = this.secrets.printInFString("port", this.connection.port);
|
|
@@ -747,11 +747,11 @@ class PySparkGenerator extends CodeGenerator<"pyspark"> {
|
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
class RedshiftGenerator extends CodeGenerator<"redshift"> {
|
|
750
|
-
generateImports(): string[] {
|
|
750
|
+
public generateImports(): string[] {
|
|
751
751
|
return ["import redshift_connector"];
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
-
generateConnectionCode(): string {
|
|
754
|
+
public generateConnectionCode(): string {
|
|
755
755
|
const host = this.secrets.print("host", this.connection.host);
|
|
756
756
|
const port = this.secrets.print("port", this.connection.port);
|
|
757
757
|
const database = this.secrets.print("database", this.connection.database);
|
|
@@ -819,11 +819,11 @@ ${formatUrlParams(params, (inner) => ` ${inner}`)},
|
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
class DatabricksGenerator extends CodeGenerator<"databricks"> {
|
|
822
|
-
generateImports(): string[] {
|
|
822
|
+
public generateImports(): string[] {
|
|
823
823
|
return [];
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
generateConnectionCode(): string {
|
|
826
|
+
public generateConnectionCode(): string {
|
|
827
827
|
const useFString = this.orm !== "ibis";
|
|
828
828
|
|
|
829
829
|
const accessToken = this.secrets.printPassword(
|
|
@@ -883,14 +883,14 @@ class DatabricksGenerator extends CodeGenerator<"databricks"> {
|
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
class SupabaseGenerator extends CodeGenerator<"supabase"> {
|
|
886
|
-
generateImports(): string[] {
|
|
886
|
+
public generateImports(): string[] {
|
|
887
887
|
if (this.connection.disable_client_pooling) {
|
|
888
888
|
return ["from sqlalchemy.pool import NullPool"];
|
|
889
889
|
}
|
|
890
890
|
return [];
|
|
891
891
|
}
|
|
892
892
|
|
|
893
|
-
generateConnectionCode(): string {
|
|
893
|
+
public generateConnectionCode(): string {
|
|
894
894
|
const password = this.secrets.printPassword(
|
|
895
895
|
this.connection.password,
|
|
896
896
|
"SUPABASE_PASSWORD",
|
|
@@ -921,7 +921,7 @@ class SupabaseGenerator extends CodeGenerator<"supabase"> {
|
|
|
921
921
|
class CodeGeneratorFactory {
|
|
922
922
|
public secrets = new SecretContainer();
|
|
923
923
|
|
|
924
|
-
createGenerator(
|
|
924
|
+
public createGenerator(
|
|
925
925
|
connection: DatabaseConnection,
|
|
926
926
|
orm: ConnectionLibrary,
|
|
927
927
|
): CodeGenerator<DatabaseConnection["type"]> {
|