@marimo-team/islands 0.25.3-dev475 → 0.25.3-dev479
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-DuXBPuzQ.js → ErrorBoundary-CLARdSzQ.js} +1 -1
- package/dist/{code-visibility-Dgz7KYYA.js → code-visibility-CStA-vv8.js} +1 -1
- package/dist/{common-D0xNsLvX.js → common-Bb7h6oRY.js} +1 -1
- package/dist/{data-grid-overlay-editor-Dr_wDqQS.js → data-grid-overlay-editor-Bw1x8hD7.js} +1 -1
- package/dist/{feedback-button-DBUHbGji.js → feedback-button-kCWPaljb.js} +2 -2
- package/dist/{glide-data-editor-BG5TAJ3u.js → glide-data-editor-CVFpoLXX.js} +3 -3
- package/dist/{globals-OVKGWVJG.js → globals-3MEUeM07.js} +1 -1
- package/dist/main.js +15 -15
- package/dist/{number-overlay-editor-BJ4Rvick.js → number-overlay-editor-D3is5twx.js} +1 -1
- package/dist/{reveal-component-ByuuVlEo.js → reveal-component-DgaqXs6t.js} +2 -2
- package/package.json +1 -1
- package/src/core/islands/worker/worker.tsx +2 -2
- package/src/core/notebook/replica/index.ts +1 -1
- package/src/core/notebook/replica/replica.ts +4 -4
- package/src/core/runtime/__tests__/createWsUrl.test.ts +1 -1
- package/src/core/runtime/__tests__/runtime.test.ts +1 -1
- package/src/core/saving/__tests__/useSaveNotebook.test.tsx +69 -0
- package/src/core/saving/save-component.tsx +35 -6
- package/src/core/saving/state.ts +7 -1
- package/src/core/session/__tests__/backend.test.ts +1 -1
- package/src/core/session/backend.ts +2 -2
- package/src/core/transports/__tests__/server.test.ts +2 -2
- package/src/core/wasm/worker/types.ts +1 -1
- package/src/core/wasm/worker/worker.ts +2 -2
|
@@ -148,7 +148,7 @@ function L(e) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/editor/boundary/ErrorBoundary.tsx
|
|
151
|
-
var R = (0, T.lazy)(() => import("./feedback-button-
|
|
151
|
+
var R = (0, T.lazy)(() => import("./feedback-button-kCWPaljb.js").then((e) => ({ default: e.FeedbackModal }))), z = (e) => {
|
|
152
152
|
let t = (0, w.c)(2), n;
|
|
153
153
|
return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, N.jsx)(O, {
|
|
154
154
|
FallbackComponent: B,
|
|
@@ -14,7 +14,7 @@ function y() {
|
|
|
14
14
|
return e.warn("Failed to get version from mount config"), null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
var b = y() || "0.25.3-
|
|
17
|
+
var b = y() || "0.25.3-dev479", x = s(b), S = s(!0);
|
|
18
18
|
s(null);
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/core/wasm/state.ts
|
|
@@ -33,7 +33,7 @@ import { o as ba } from "./dist-DNkrY12t.js";
|
|
|
33
33
|
import { a as xa, i as Sa, n as Ca, o as wa, r as Ta, t as Ea } from "./dialog-rgayPemF.js";
|
|
34
34
|
import { t as Da } from "./useAsyncData-P5-Oovhq.js";
|
|
35
35
|
import { n as W, t as G } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
36
|
-
import { n as Oa, t as ka } from "./ErrorBoundary-
|
|
36
|
+
import { n as Oa, t as ka } from "./ErrorBoundary-CLARdSzQ.js";
|
|
37
37
|
import { W as Aa, n as ja } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
38
38
|
import { a as Ma, n as Na, r as Pa, t as Fa } from "./loader-Bin_dutt.js";
|
|
39
39
|
import { t as Ia } from "./useIframeCapabilities-HTZiVlGV.js";
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
3
|
import { t as n } from "./react-dom-DdqGVp5N.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-DIX_pCco.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-CVFpoLXX.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.3.1_57c124ac5a994dbbf13fd11838cf9ba9/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",
|
|
@@ -4,13 +4,13 @@ import { t as r } from "./react-Bgs_wQh3.js";
|
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { t as a } from "./copy-icon-CDvvlY90.js";
|
|
6
6
|
import { D as o, I as s, K as c, O as l, P as u, an as d, en as f, i as p, n as m } from "./error-entries--YT1ZOUW.js";
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
7
|
+
import { n as h, t as ee } from "./globals-3MEUeM07.js";
|
|
8
8
|
import { r as g } from "./assertNever-DOTNJ2Y4.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Rt as te, St as ne, m as v } from "./use-restore-focus-BLj45Ibw.js";
|
|
11
11
|
import { a as re, i as ie, n as ae, r as oe } from "./dialog-rgayPemF.js";
|
|
12
12
|
import { t as se } from "./useAsyncData-P5-Oovhq.js";
|
|
13
|
-
import { t as ce } from "./code-visibility-
|
|
13
|
+
import { t as ce } from "./code-visibility-CStA-vv8.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = _(), le = (e) => {
|
|
16
16
|
let n = (0, b.c)(8), r, i;
|
|
@@ -14,7 +14,7 @@ import { t as F } from "./jsx-runtime-D8btoEHk.js";
|
|
|
14
14
|
import { d as ae, r as I } from "./use-restore-focus-BLj45Ibw.js";
|
|
15
15
|
import { t as oe } from "./useEvent-BoN7U38T.js";
|
|
16
16
|
import { n as L, t as se } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
17
|
-
import { t as ce } from "./ErrorBoundary-
|
|
17
|
+
import { t as ce } from "./ErrorBoundary-CLARdSzQ.js";
|
|
18
18
|
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, L as he, M as ge, N as R, O as z, P as _e, R as ve, S as ye, T as be, _ as xe, a as Se, b as B, c as Ce, d as we, f as V, g as Te, h as Ee, i as De, j as H, k as Oe, l as ke, m as Ae, n as je, o as Me, p as Ne, r as U, s as Pe, t as Fe, u as Ie, v as Le, w as Re, x as ze, y as Be, z as Ve } from "./data-grid-types-DIX_pCco.js";
|
|
19
19
|
//#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
20
20
|
function He(e) {
|
|
@@ -7061,7 +7061,7 @@ function ds(e, t, n, r, i) {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
//#endregion
|
|
7063
7063
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7064
|
-
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7064
|
+
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-Bw1x8hD7.js")), hs = 0;
|
|
7065
7065
|
function gs(e) {
|
|
7066
7066
|
return (0, fs.default)((0, ps.default)((0, ps.default)(e).filter((e) => e.span !== void 0).map((e) => (0, ao.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7067
7067
|
}
|
|
@@ -9284,7 +9284,7 @@ function Ys(e, t, n, r, i) {
|
|
|
9284
9284
|
}
|
|
9285
9285
|
//#endregion
|
|
9286
9286
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9287
|
-
var Xs = W.lazy(async () => await import("./number-overlay-editor-
|
|
9287
|
+
var Xs = W.lazy(async () => await import("./number-overlay-editor-D3is5twx.js")), Zs = {
|
|
9288
9288
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9289
9289
|
kind: U.Number,
|
|
9290
9290
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-CiJ919pg.js";
|
|
2
2
|
import { St as t } from "./use-restore-focus-BLj45Ibw.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-CStA-vv8.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
|
@@ -6,7 +6,7 @@ import { i as x, n as S, r as C, t as w } from "./copy-icon-CDvvlY90.js";
|
|
|
6
6
|
import { B as T, Bt as E, Ct as D, E as O, F as k, Ft as A, I as j, It as M, L as N, Lt as P, M as F, Mt as I, O as L, Ot as ee, P as R, R as z, Rt as te, St as B, Ut as ne, Vt as re, Wt as ie, X as ae, Z as oe, _ as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, dt as he, i as ge, it as _e, j as ve, kt as ye, lt as be, mt as xe, n as Se, o as Ce, ot as we, q as Te, rt as Ee, ut as De, vt as Oe, yt as ke, z as Ae, zt as je } from "./html-to-image-BMt1erSy.js";
|
|
7
7
|
import { a as Me, f as Ne, h as Pe, i as Fe, m as Ie, n as Le, o as Re, r as ze, t as Be } from "./tooltip-CiJ919pg.js";
|
|
8
8
|
import { D as Ve, E as He, S as Ue, T as We, _ as Ge, a as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, i as Qe, l as $e, m as et, n as tt, o as nt, p as rt, r as it, s as at, t as ot, u as st, v as ct, w as lt, x as ut, y as dt } from "./spec-6shN7lEe.js";
|
|
9
|
-
import { $ as ft, $t as pt, A as mt, An as ht, At as gt, B as _t, Bt as vt, C as yt, D as bt, Dn as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mn as Vt, Mt as Ht, N as Ut, Nt as Wt, O as Gt, On as Kt, Ot as qt, P as Jt, Pt as Yt, Q as Xt, Qt as Zt, R as Qt, Rt as $t, S as en, Sn as tn, St as nn, T as rn, Tn as an, Tt as on, U as sn, Ut as cn, V as ln, Vt as un, W as dn, Wt as fn, X as pn, Xt as mn, Y as hn, Yt as gn, Z as _n, Zt as vn, _ as yn, _n as bn, _t as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, f as Pn, fn as Fn, ft as In, g as Ln, gn as Rn, gt as zn, h as Bn, hn as Vn, ht as Hn, in as Un, it as Wn, j as Gn, jn as Kn, jt as qn, k as Jn, kn as Yn, kt as Xn, ln as Zn, lt as Qn, m as $n, mn as er, mt as tr, nn as nr, on as rr, ot as ir, p as ar, pn as or, pt as sr, q as cr, qt as lr, r as ur, rn as dr, rt as fr, sn as pr, st as mr, t as hr, tn as gr, u as _r, un as vr, ut as yr, v as br, vn as xr, vt as Sr, w as Cr, wn as wr, x as Tr, xn as Er, xt as Dr, y as Or, yn as kr, yt as Ar, z as jr, zt as Mr } from "./common-
|
|
9
|
+
import { $ as ft, $t as pt, A as mt, An as ht, At as gt, B as _t, Bt as vt, C as yt, D as bt, Dn as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mn as Vt, Mt as Ht, N as Ut, Nt as Wt, O as Gt, On as Kt, Ot as qt, P as Jt, Pt as Yt, Q as Xt, Qt as Zt, R as Qt, Rt as $t, S as en, Sn as tn, St as nn, T as rn, Tn as an, Tt as on, U as sn, Ut as cn, V as ln, Vt as un, W as dn, Wt as fn, X as pn, Xt as mn, Y as hn, Yt as gn, Z as _n, Zt as vn, _ as yn, _n as bn, _t as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, f as Pn, fn as Fn, ft as In, g as Ln, gn as Rn, gt as zn, h as Bn, hn as Vn, ht as Hn, in as Un, it as Wn, j as Gn, jn as Kn, jt as qn, k as Jn, kn as Yn, kt as Xn, ln as Zn, lt as Qn, m as $n, mn as er, mt as tr, nn as nr, on as rr, ot as ir, p as ar, pn as or, pt as sr, q as cr, qt as lr, r as ur, rn as dr, rt as fr, sn as pr, st as mr, t as hr, tn as gr, u as _r, un as vr, ut as yr, v as br, vn as xr, vt as Sr, w as Cr, wn as wr, x as Tr, xn as Er, xt as Dr, y as Or, yn as kr, yt as Ar, z as jr, zt as Mr } from "./common-Bb7h6oRY.js";
|
|
10
10
|
import { a as Nr, n as Pr, s as Fr, t as Ir } from "./useLifecycle-mKiMNa4V.js";
|
|
11
11
|
import { t as Lr } from "./check-CApwK1fD.js";
|
|
12
12
|
import { A as Rr, C as zr, D as Br, M as Vr, O as Hr, a as Ur, c as Wr, d as Gr, i as Kr, k as qr, l as Jr, n as Yr, o as Xr, r as Zr, s as Qr, t as $r, w as ei, x as ti } from "./select-PQHWLm64.js";
|
|
@@ -16,7 +16,7 @@ import { $t as Ui, At as Wi, B as Gi, Ct as Ki, D as qi, Dt as Ji, Ft as Yi, G a
|
|
|
16
16
|
import { a as Pa, d as Fa, i as Ia, n as La, o as Ra, r as za, s as Ba, t as Va, u as Ha } from "./process-output-CNBGRz3r.js";
|
|
17
17
|
import { t as Ua } from "./pencil-BC7pOv9g.js";
|
|
18
18
|
import { a as Wa, c as Ga, d as Ka, f as qa, i as Ja, l as Ya, r as Xa } from "./glide-utils-D1McS0Pn.js";
|
|
19
|
-
import { n as Za, t as Qa } from "./globals-
|
|
19
|
+
import { n as Za, t as Qa } from "./globals-3MEUeM07.js";
|
|
20
20
|
import { a as $a, i as eo, n as to, r as no, s as ro, t as io } from "./assertNever-DOTNJ2Y4.js";
|
|
21
21
|
import { t as ao } from "./react-dom-DdqGVp5N.js";
|
|
22
22
|
import { t as oo } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -40,10 +40,10 @@ import { n as rc, t as ic } from "./esm-Bwp_FHP0.js";
|
|
|
40
40
|
import { p as ac } from "./dist-DpYpG8Yc.js";
|
|
41
41
|
import { t as oc } from "./useAsyncData-P5-Oovhq.js";
|
|
42
42
|
import { n as sc, r as cc, t as lc } from "./useDeepCompareMemoize-CDhinwm7.js";
|
|
43
|
-
import { t as uc } from "./ErrorBoundary-
|
|
43
|
+
import { t as uc } from "./ErrorBoundary-CLARdSzQ.js";
|
|
44
44
|
import { G as dc, W as fc } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
45
45
|
import { a as pc, n as mc } from "./loader-Bin_dutt.js";
|
|
46
|
-
import { a as hc, c as gc, i as _c, l as vc, o as yc, s as bc, t as xc } from "./code-visibility-
|
|
46
|
+
import { a as hc, c as gc, i as _c, l as vc, o as yc, s as bc, t as xc } from "./code-visibility-CStA-vv8.js";
|
|
47
47
|
import { t as Sc } from "./esm-B9n0caHs.js";
|
|
48
48
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
49
49
|
var Cc = Object.freeze({
|
|
@@ -3410,7 +3410,7 @@ var Jh = H([
|
|
|
3410
3410
|
"variable",
|
|
3411
3411
|
"analysis",
|
|
3412
3412
|
"custom"
|
|
3413
|
-
]).describe("The kinds a stream carries, and the values `
|
|
3413
|
+
]).describe("The kinds a stream carries, and the values `kinds` accepts. The catalog stream carries host, project, notebook, runtime, and attachment. A notebook's stream carries notebook, document, cell, runtime, attachment, run, execution, output, console, input, variable, analysis, and custom. Custom events describe occurrences rather than object state."), Yh = W({
|
|
3414
3414
|
pid: ko().min(1).describe("The process id."),
|
|
3415
3415
|
started_at: Wp.describe("When the process started.")
|
|
3416
3416
|
}).describe("The process that wrote a record. A client checks that a process\nwith this `pid` that started at `started_at` still exists. If it\ndoes not, the record is stale and may be removed.\n");
|
|
@@ -3594,7 +3594,7 @@ var Ng = {
|
|
|
3594
3594
|
events: {
|
|
3595
3595
|
method: "GET",
|
|
3596
3596
|
path: "/events",
|
|
3597
|
-
query: {
|
|
3597
|
+
query: { kinds: !1 },
|
|
3598
3598
|
headers: { "last-event-id": !1 },
|
|
3599
3599
|
body: null,
|
|
3600
3600
|
responses: { 200: "text/event-stream" },
|
|
@@ -3662,7 +3662,7 @@ var Ng = {
|
|
|
3662
3662
|
method: "GET",
|
|
3663
3663
|
path: "/notebooks/{notebook_id}/events",
|
|
3664
3664
|
query: {
|
|
3665
|
-
|
|
3665
|
+
kinds: !1,
|
|
3666
3666
|
run_id: !1
|
|
3667
3667
|
},
|
|
3668
3668
|
headers: {
|
|
@@ -3698,7 +3698,7 @@ var Ng = {
|
|
|
3698
3698
|
501: [cg]
|
|
3699
3699
|
}
|
|
3700
3700
|
},
|
|
3701
|
-
"
|
|
3701
|
+
"input.reply": {
|
|
3702
3702
|
method: "POST",
|
|
3703
3703
|
path: "/notebooks/{notebook_id}/runtime/inputs/{input_id}/reply",
|
|
3704
3704
|
query: {},
|
|
@@ -4059,7 +4059,7 @@ var Yg = class {
|
|
|
4059
4059
|
this.#e = e.cursor ?? null, this.#n = /* @__PURE__ */ new Set([
|
|
4060
4060
|
"ready",
|
|
4061
4061
|
"reset",
|
|
4062
|
-
...(e.
|
|
4062
|
+
...(e.kinds ?? t).flatMap((e) => {
|
|
4063
4063
|
let t = `${e}.removed`;
|
|
4064
4064
|
return Kg.has(t) ? [e, t] : [e];
|
|
4065
4065
|
})
|
|
@@ -4122,10 +4122,10 @@ var e_ = class {
|
|
|
4122
4122
|
if (typeof e == "function") r = e;
|
|
4123
4123
|
else {
|
|
4124
4124
|
let n = new URL(e);
|
|
4125
|
-
t.
|
|
4125
|
+
t.kinds !== void 0 && n.searchParams.set("kinds", t.kinds.join(",")), r = Gg(n, t);
|
|
4126
4126
|
}
|
|
4127
4127
|
if (this.#e = new Yg({
|
|
4128
|
-
|
|
4128
|
+
kinds: t.kinds,
|
|
4129
4129
|
cursor: t.cursor
|
|
4130
4130
|
}, n), this.#r = t.onStatus, this.closed = new Promise((e, t) => {
|
|
4131
4131
|
this.#i = {
|
|
@@ -4319,7 +4319,7 @@ var e_ = class {
|
|
|
4319
4319
|
});
|
|
4320
4320
|
}
|
|
4321
4321
|
input(e, t, n) {
|
|
4322
|
-
return this.#t("
|
|
4322
|
+
return this.#t("input.reply", {
|
|
4323
4323
|
params: { input_id: e },
|
|
4324
4324
|
body: t,
|
|
4325
4325
|
options: n
|
|
@@ -4629,7 +4629,7 @@ function v_(e) {
|
|
|
4629
4629
|
function S(t) {
|
|
4630
4630
|
t === void 0 && (x = [], v(r.initial));
|
|
4631
4631
|
let i = new t_(p, {
|
|
4632
|
-
|
|
4632
|
+
kinds: f_,
|
|
4633
4633
|
cursor: t,
|
|
4634
4634
|
signal: d,
|
|
4635
4635
|
onStatus: (t) => {
|
|
@@ -12945,7 +12945,7 @@ function AO(e, t) {
|
|
|
12945
12945
|
}
|
|
12946
12946
|
//#endregion
|
|
12947
12947
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
12948
|
-
var jO = J.lazy(() => import("./glide-data-editor-
|
|
12948
|
+
var jO = J.lazy(() => import("./glide-data-editor-CVFpoLXX.js").then((e) => e.t)), MO = fD("marimo-data-editor", { cssStyles: [FD, ID] }).withData(W({
|
|
12949
12949
|
initialValue: W({ edits: V(W({
|
|
12950
12950
|
rowIdx: G(),
|
|
12951
12951
|
columnId: K(),
|
|
@@ -32668,7 +32668,7 @@ function NU(e) {
|
|
|
32668
32668
|
}
|
|
32669
32669
|
//#endregion
|
|
32670
32670
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32671
|
-
var PU = J.lazy(() => import("./reveal-component-
|
|
32671
|
+
var PU = J.lazy(() => import("./reveal-component-DgaqXs6t.js")), FU = (e) => {
|
|
32672
32672
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = jo(Gs), s = a === "read" || o, c = jo(Ca) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32673
32673
|
t[0] !== i || t[1] !== n ? (d = jz(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32674
32674
|
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-BPCzCO3I.js";
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor-
|
|
3
|
+
import { a as n } from "./glide-data-editor-CVFpoLXX.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.3.1_57c124ac5a994dbbf13fd11838cf9ba9/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",
|
|
@@ -3,14 +3,14 @@ import { g as t, h as n, i as r, m as i, t as a } from "./button-qQhINE7z.js";
|
|
|
3
3
|
import { t as o } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { h as c, t as l } from "./tooltip-CiJ919pg.js";
|
|
6
|
-
import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-
|
|
6
|
+
import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-Bb7h6oRY.js";
|
|
7
7
|
import { M as w } from "./select-PQHWLm64.js";
|
|
8
8
|
import { X as T } from "./dropdown-menu-B12Nf3Zf.js";
|
|
9
9
|
import { t as E } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Rt as D, Vt as O, f as k, i as ee } from "./use-restore-focus-BLj45Ibw.js";
|
|
11
11
|
import { t as A } from "./useEvent-BoN7U38T.js";
|
|
12
12
|
import { o as te } from "./static-state-CWXd6dYX.js";
|
|
13
|
-
import { n as ne, t as re } from "./code-visibility-
|
|
13
|
+
import { n as ne, t as re } from "./code-visibility-CStA-vv8.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
var j = c("sticky-note", [["path", {
|
|
16
16
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type { unstable_NotebookCall } from "@marimo-team/client";
|
|
4
|
-
import {
|
|
4
|
+
import { EDITOR_EVENT_KINDS } from "@/core/notebook/replica";
|
|
5
5
|
import type { PyodideInterface } from "pyodide";
|
|
6
6
|
import {
|
|
7
7
|
createRPC,
|
|
@@ -148,7 +148,7 @@ async function follow(
|
|
|
148
148
|
(event) => {
|
|
149
149
|
rpc.send.notebookEvent({ event, sessionGeneration });
|
|
150
150
|
},
|
|
151
|
-
|
|
151
|
+
EDITOR_EVENT_KINDS.join(","),
|
|
152
152
|
);
|
|
153
153
|
} finally {
|
|
154
154
|
notebook.destroy();
|
|
@@ -40,7 +40,7 @@ import { runtime } from "./resources/runtime";
|
|
|
40
40
|
*
|
|
41
41
|
* Execution items provide the console, side-effect displays and input prompts.
|
|
42
42
|
*/
|
|
43
|
-
export const
|
|
43
|
+
export const EDITOR_EVENT_KINDS = [
|
|
44
44
|
"notebook",
|
|
45
45
|
"cell",
|
|
46
46
|
"document",
|
|
@@ -55,7 +55,7 @@ export const EDITOR_EVENT_TYPES = [
|
|
|
55
55
|
"marimo",
|
|
56
56
|
] as const;
|
|
57
57
|
|
|
58
|
-
type EditorEvent = NotebookStreamEvent<(typeof
|
|
58
|
+
type EditorEvent = NotebookStreamEvent<(typeof EDITOR_EVENT_KINDS)[number]>;
|
|
59
59
|
|
|
60
60
|
/** A native marimo notification, passed through without interpretation. */
|
|
61
61
|
const MarimoMessage = z.object({ marimo: z.unknown() });
|
|
@@ -299,7 +299,7 @@ export function createNotebookReplica(
|
|
|
299
299
|
const checkHealth = connected.checkHealth ?? (async () => true);
|
|
300
300
|
store.set(backendAtom, connected);
|
|
301
301
|
const { transport } = connected;
|
|
302
|
-
let events: NotebookEvents<(typeof
|
|
302
|
+
let events: NotebookEvents<(typeof EDITOR_EVENT_KINDS)[number]> | undefined;
|
|
303
303
|
let checkingHealth = false;
|
|
304
304
|
let pendingNotifications: unknown[] = [];
|
|
305
305
|
/** Mirror one stream into the atoms until it closes. */
|
|
@@ -309,7 +309,7 @@ export function createNotebookReplica(
|
|
|
309
309
|
setStream(reducer.initial);
|
|
310
310
|
}
|
|
311
311
|
const current = new NotebookEvents(transport, {
|
|
312
|
-
|
|
312
|
+
kinds: EDITOR_EVENT_KINDS,
|
|
313
313
|
cursor,
|
|
314
314
|
signal,
|
|
315
315
|
// TODO(MO-8051): Gate editing and running on the notebook's operations
|
|
@@ -97,7 +97,7 @@ describe.each(["getWsURL", "getSseURL"] as const)(
|
|
|
97
97
|
|
|
98
98
|
it("keeps notebook parameters out of the stream options", () => {
|
|
99
99
|
const notebookParams = new URLSearchParams([
|
|
100
|
-
["
|
|
100
|
+
["kinds", "scatter"],
|
|
101
101
|
["cursor", "page-2"],
|
|
102
102
|
["run_id", "experiment"],
|
|
103
103
|
["query_params", "nested=value&other=1"],
|
|
@@ -57,7 +57,7 @@ describe("RuntimeManager", () => {
|
|
|
57
57
|
expect(url.protocol).toBe("wss:");
|
|
58
58
|
expect(url.hostname).toBe("example.com");
|
|
59
59
|
expect(url.pathname).toBe("/ws");
|
|
60
|
-
expect(url.searchParams.has("
|
|
60
|
+
expect(url.searchParams.has("kinds")).toBe(false);
|
|
61
61
|
expect(url.searchParams.get("session_id")).toBe(sessionId);
|
|
62
62
|
});
|
|
63
63
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { renderHook } from "@testing-library/react";
|
|
4
|
+
import { Provider } from "jotai";
|
|
5
|
+
import type { PropsWithChildren } from "react";
|
|
6
|
+
import { expect, it, vi } from "vitest";
|
|
7
|
+
import { MockExecutions } from "@/__mocks__/executions";
|
|
8
|
+
import { MockNotebook } from "@/__mocks__/notebook";
|
|
9
|
+
import { MockRequestClient } from "@/__mocks__/requests";
|
|
10
|
+
import { notebookAtom } from "@/core/cells/cells";
|
|
11
|
+
import { CellId } from "@/core/cells/ids";
|
|
12
|
+
import { initialLayoutState, layoutStateAtom } from "@/core/layout/state";
|
|
13
|
+
import { connectionAtom } from "@/core/network/connection";
|
|
14
|
+
import { requestClientAtom } from "@/core/network/requests";
|
|
15
|
+
import { document } from "@/core/notebook/document/__tests__/fixtures";
|
|
16
|
+
import { ConnectionState } from "@/core/session/types";
|
|
17
|
+
import { store } from "@/core/state/jotai";
|
|
18
|
+
import { useNotebookDocumentSave } from "../document";
|
|
19
|
+
import { useSaveNotebook } from "../save-component";
|
|
20
|
+
import { needsSaveAtom, savedLayoutAtom } from "../state";
|
|
21
|
+
|
|
22
|
+
vi.mock("../document", () => ({ useNotebookDocumentSave: vi.fn() }));
|
|
23
|
+
|
|
24
|
+
function setup() {
|
|
25
|
+
const replica = MockExecutions.seed(store, [], null, document());
|
|
26
|
+
const save = vi.fn<() => Promise<void>>().mockResolvedValue(undefined);
|
|
27
|
+
vi.mocked(useNotebookDocumentSave).mockReturnValue(save);
|
|
28
|
+
store.set(replica.notebookAtom, {
|
|
29
|
+
...MockExecutions.notebook(),
|
|
30
|
+
operations: ["notebook.edit", "notebook.save"],
|
|
31
|
+
});
|
|
32
|
+
store.set(
|
|
33
|
+
notebookAtom,
|
|
34
|
+
MockNotebook.notebookState({ cellData: { [CellId.create()]: {} } }),
|
|
35
|
+
);
|
|
36
|
+
store.set(connectionAtom, { state: ConnectionState.OPEN });
|
|
37
|
+
const requests = MockRequestClient.create();
|
|
38
|
+
store.set(requestClientAtom, requests);
|
|
39
|
+
store.set(layoutStateAtom, initialLayoutState());
|
|
40
|
+
store.set(savedLayoutAtom, undefined);
|
|
41
|
+
const wrapper = ({ children }: PropsWithChildren) => (
|
|
42
|
+
<Provider store={store}>{children}</Provider>
|
|
43
|
+
);
|
|
44
|
+
const { result } = renderHook(useSaveNotebook, { wrapper });
|
|
45
|
+
return {
|
|
46
|
+
saveNotebook: result.current.saveNotebook,
|
|
47
|
+
save,
|
|
48
|
+
saveLayout: requests.saveLayout,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
it("saves cells without a layout endpoint for the default layout", async () => {
|
|
53
|
+
const { saveNotebook, save, saveLayout } = setup();
|
|
54
|
+
await saveNotebook(false);
|
|
55
|
+
expect(save).toHaveBeenCalled();
|
|
56
|
+
expect(saveLayout).not.toHaveBeenCalled();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("saves cells after a layout failure and retries clearing the sidecar", async () => {
|
|
60
|
+
const { saveNotebook, save, saveLayout } = setup();
|
|
61
|
+
store.set(savedLayoutAtom, { selectedLayout: "grid", layoutData: {} });
|
|
62
|
+
saveLayout.mockRejectedValueOnce(new Error("layout unavailable"));
|
|
63
|
+
await saveNotebook(false);
|
|
64
|
+
expect(save).toHaveBeenCalled();
|
|
65
|
+
expect(store.get(needsSaveAtom)).toBe(true);
|
|
66
|
+
await saveNotebook(false);
|
|
67
|
+
expect(saveLayout).toHaveBeenNthCalledWith(2, { layout: null });
|
|
68
|
+
expect(store.get(needsSaveAtom)).toBe(false);
|
|
69
|
+
});
|
|
@@ -21,6 +21,7 @@ import { Label } from "../../components/ui/label";
|
|
|
21
21
|
import { useEvent } from "../../hooks/useEvent";
|
|
22
22
|
import { Logger } from "../../utils/Logger";
|
|
23
23
|
import { toast } from "@/components/ui/use-toast";
|
|
24
|
+
import { prettyError } from "@/utils/errors";
|
|
24
25
|
import { getNotebook } from "../cells/cells";
|
|
25
26
|
import { notebookCells } from "../cells/utils";
|
|
26
27
|
import { formatAll } from "../codemirror/format";
|
|
@@ -131,22 +132,50 @@ export function useSaveNotebook() {
|
|
|
131
132
|
return;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
// The notebook is the host's document plus a layout the editor keeps
|
|
135
|
-
// beside it. TODO: fold the layout into the host document.
|
|
136
135
|
const layout = store.get(layoutStateAtom);
|
|
136
|
+
const saved = store.get(savedLayoutAtom);
|
|
137
|
+
let layoutError: string | undefined;
|
|
138
|
+
// A sidecar follows cell order. Write it before the document so the
|
|
139
|
+
// notebook's layout_file points to the new layout (or clears the old one).
|
|
140
|
+
const shouldWriteLayout =
|
|
141
|
+
layout.selectedLayout !== "vertical" ||
|
|
142
|
+
saved === "write-failed" ||
|
|
143
|
+
(saved !== undefined && saved.selectedLayout !== "vertical");
|
|
144
|
+
if (shouldWriteLayout) {
|
|
145
|
+
try {
|
|
146
|
+
await saveLayout({ layout: getSerializedLayout() });
|
|
147
|
+
} catch (error) {
|
|
148
|
+
layoutError = prettyError(error);
|
|
149
|
+
Logger.error("Failed to save layout", error);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
137
152
|
try {
|
|
138
|
-
await saveLayout({ layout: getSerializedLayout() });
|
|
139
153
|
await saveDocument();
|
|
140
154
|
} catch (error) {
|
|
155
|
+
if (shouldWriteLayout) {
|
|
156
|
+
store.set(savedLayoutAtom, "write-failed");
|
|
157
|
+
}
|
|
141
158
|
Logger.error("Failed to save notebook", error);
|
|
142
159
|
toast({
|
|
143
|
-
title: "Failed to save",
|
|
144
|
-
description:
|
|
160
|
+
title: "Failed to save cells",
|
|
161
|
+
description:
|
|
162
|
+
layoutError === undefined
|
|
163
|
+
? prettyError(error)
|
|
164
|
+
: `Cells: ${prettyError(error)}\nLayout: ${layoutError}`,
|
|
145
165
|
variant: "danger",
|
|
146
166
|
});
|
|
147
167
|
return;
|
|
148
168
|
}
|
|
149
|
-
|
|
169
|
+
if (layoutError !== undefined) {
|
|
170
|
+
store.set(savedLayoutAtom, "write-failed");
|
|
171
|
+
toast({
|
|
172
|
+
title: "Cells saved. Layout could not be saved.",
|
|
173
|
+
description: layoutError,
|
|
174
|
+
variant: "danger",
|
|
175
|
+
});
|
|
176
|
+
} else {
|
|
177
|
+
store.set(savedLayoutAtom, layout);
|
|
178
|
+
}
|
|
150
179
|
}),
|
|
151
180
|
);
|
|
152
181
|
|
package/src/core/saving/state.ts
CHANGED
|
@@ -18,8 +18,11 @@ export const documentVersionAtom = atom(
|
|
|
18
18
|
/**
|
|
19
19
|
* The layout as the file last had it. The host document does not carry
|
|
20
20
|
* the layout file, so this client compares it itself until it does.
|
|
21
|
+
* A failed write needs a retry even if only the cell order changed.
|
|
21
22
|
*/
|
|
22
|
-
export const savedLayoutAtom = atom<LayoutState | undefined>(
|
|
23
|
+
export const savedLayoutAtom = atom<LayoutState | "write-failed" | undefined>(
|
|
24
|
+
undefined,
|
|
25
|
+
);
|
|
23
26
|
|
|
24
27
|
/**
|
|
25
28
|
* Whether saving would change the file: the host's document differs from
|
|
@@ -42,6 +45,9 @@ export const needsSaveAtom = atom((get) => {
|
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
const saved = get(savedLayoutAtom);
|
|
48
|
+
if (saved === "write-failed") {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
45
51
|
const layout = get(layoutStateAtom);
|
|
46
52
|
return (
|
|
47
53
|
saved !== undefined &&
|
|
@@ -83,7 +83,7 @@ describe("createEditorBackend", () => {
|
|
|
83
83
|
const kinds =
|
|
84
84
|
networkUrl === undefined
|
|
85
85
|
? undefined
|
|
86
|
-
: new URL(String(networkUrl)).searchParams.get("
|
|
86
|
+
: new URL(String(networkUrl)).searchParams.get("kinds")?.split(",");
|
|
87
87
|
const executionKinds = [
|
|
88
88
|
"execution",
|
|
89
89
|
"console",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { NotebookClient, StreamStopped } from "@marimo-team/client";
|
|
6
6
|
import type { NotebookId } from "@marimo-team/client/protocol";
|
|
7
|
-
import {
|
|
7
|
+
import { EDITOR_EVENT_KINDS, type NotebookBackend } from "../notebook/replica";
|
|
8
8
|
import { PyodideBridge } from "../wasm/bridge";
|
|
9
9
|
import { isWasm } from "../wasm/utils";
|
|
10
10
|
import { sessionSse, websocket, withHeaders } from "../transports/server";
|
|
@@ -60,7 +60,7 @@ function afterStartup({
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
const target = new URL(url());
|
|
63
|
-
target.searchParams.set("
|
|
63
|
+
target.searchParams.set("kinds", EDITOR_EVENT_KINDS.join(","));
|
|
64
64
|
return target;
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -128,7 +128,7 @@ describe("websocket", () => {
|
|
|
128
128
|
vi.stubGlobal("WebSocket", FakeSocket);
|
|
129
129
|
const events = new NotebookEvents(
|
|
130
130
|
websocket(() => "ws://localhost/ws?session_id=s1&cursor=stale"),
|
|
131
|
-
{
|
|
131
|
+
{ kinds: ["marimo"] },
|
|
132
132
|
);
|
|
133
133
|
const received = collect(events);
|
|
134
134
|
await vi.waitFor(() => expect(FakeSocket.opened).toHaveLength(1));
|
|
@@ -271,7 +271,7 @@ describe("sessionSse", () => {
|
|
|
271
271
|
() => "http://localhost/sse",
|
|
272
272
|
() => ({}),
|
|
273
273
|
),
|
|
274
|
-
{
|
|
274
|
+
{ kinds: ["marimo"] },
|
|
275
275
|
);
|
|
276
276
|
const received = collect(events);
|
|
277
277
|
onTestFinished(() => events.close());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type { unstable_NotebookCall } from "@marimo-team/client";
|
|
4
|
-
import {
|
|
4
|
+
import { EDITOR_EVENT_KINDS } from "@/core/notebook/replica";
|
|
5
5
|
import type { PyodideInterface } from "pyodide";
|
|
6
6
|
import {
|
|
7
7
|
createRPC,
|
|
@@ -122,7 +122,7 @@ const requestHandler = createRPCRequestHandler({
|
|
|
122
122
|
(event) => {
|
|
123
123
|
rpc.send.notebookEvent({ id: request.id, event });
|
|
124
124
|
},
|
|
125
|
-
|
|
125
|
+
EDITOR_EVENT_KINDS.join(","),
|
|
126
126
|
);
|
|
127
127
|
if (!canceled) {
|
|
128
128
|
void session.start().catch((error: unknown) => {
|