@marimo-team/islands 0.26.1-dev49 → 0.26.1-dev53
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-CLB3hXa4.js → ErrorBoundary-C_3e_GUY.js} +1 -1
- package/dist/{chat-ui-NC4Kn150.js → chat-ui-D1mRz9h6.js} +3 -3
- package/dist/{code-visibility-DxGMKLDC.js → code-visibility-BMm7YFnk.js} +2 -2
- package/dist/{common-DB1vkI7_.js → common-vsX0IBbM.js} +3 -3
- package/dist/{data-grid-overlay-editor-BNS8q3hF.js → data-grid-overlay-editor-C0SMkFuM.js} +1 -1
- package/dist/{error-entries--aUBuKcQ.js → error-entries-P6Qpq6wP.js} +788 -746
- package/dist/{feedback-button-PZHN3_Sv.js → feedback-button-hlR4d6sc.js} +3 -3
- package/dist/{glide-data-editor-BQtLyR6B.js → glide-data-editor-DQt5ZvmQ.js} +3 -3
- package/dist/{globals-CxKBnTba.js → globals-p3PihXWg.js} +1 -1
- package/dist/{html-to-image-Cig4c8LO.js → html-to-image-DhrFZL7t.js} +1 -1
- package/dist/main.js +11 -11
- package/dist/{number-overlay-editor-C8dWSXhU.js → number-overlay-editor-B-2VIWQF.js} +1 -1
- package/dist/{process-output-GwRODOnr.js → process-output-CBPqVQBu.js} +2 -2
- package/dist/{reveal-component-CoX-9hW5.js → reveal-component-BciImC6F.js} +2 -2
- package/package.json +1 -1
- package/src/core/executions/__tests__/output-lifecycle.test.ts +10 -8
- package/src/core/notebook/replica/__tests__/executions.test.ts +41 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +39 -0
- package/src/core/notebook/replica/replica.ts +12 -0
- package/src/core/notebook/replica/resources/executions.ts +136 -47
- package/src/core/notebook/replica/resources/results.ts +2 -3
|
@@ -3,14 +3,14 @@ import { h as t, t as n } from "./button-Z2R2272J.js";
|
|
|
3
3
|
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-DuxRkh7T.js";
|
|
6
|
-
import { A as o, L as s, Y as c, i as l, j as u, n as d, on as f, tn as p, z as m } from "./error-entries
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
6
|
+
import { A as o, L as s, Y as c, i as l, j as u, n as d, on as f, tn as p, z as m } from "./error-entries-P6Qpq6wP.js";
|
|
7
|
+
import { n as h, t as ee } from "./globals-p3PihXWg.js";
|
|
8
8
|
import { r as g } from "./assertNever-473SFxLt.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Ct as te, Vt as v, m as y } from "./use-restore-focus-DT1TZACX.js";
|
|
11
11
|
import { a as ne, i as re, n as ie, r as ae } from "./dialog-CvyFEwby.js";
|
|
12
12
|
import { t as oe } from "./useAsyncData-P5-Oovhq.js";
|
|
13
|
-
import { t as se } from "./code-visibility-
|
|
13
|
+
import { t as se } from "./code-visibility-BMm7YFnk.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var b = /* @__PURE__ */ e(r(), 1), x = i(), S = _(), ce = (e) => {
|
|
16
16
|
let n = (0, x.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-DT1TZACX.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-C_3e_GUY.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-DBNnjiYJ.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.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/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-C0SMkFuM.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.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/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-B-2VIWQF.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-BQZ-Bm6h.js";
|
|
2
2
|
import { Ct as t } from "./use-restore-focus-DT1TZACX.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-BMm7YFnk.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",
|
|
@@ -9,7 +9,7 @@ import { a as E, i as re, o as ie, r as D, s as O, t as ae } from "./useLifecycl
|
|
|
9
9
|
import { a as oe, c as se, i as ce, n as le, o as ue, r as de, s as fe, t as pe } from "./select-BszV-bbI.js";
|
|
10
10
|
import { X as me, ht as he, p as ge } from "./dropdown-menu-BiXHfje7.js";
|
|
11
11
|
import { c as _e, l as ve, n as ye } from "./config-D-lhQq-h.js";
|
|
12
|
-
import { $ as k, A, At as be, B as xe, Bt as Se, D as Ce, E as we, Gt as j, Ht as Te, I as Ee, J as De, Kt as Oe, M as ke, Mt as Ae, N as je, Ot as Me, R as Ne, Rt as Pe, St as Fe, Ut as Ie, Xt as Le, Yt as Re, Zt as ze, _ as Be, _t as Ve, a as He, at as Ue, c as We, ct as Ge, dt as Ke, et as qe, f as Je, ft as Ye, gt as Xe, h as Ze, in as Qe, it as $e, k as et, lt as tt, nn as nt, o as rt, ot as it, p as at, pt as ot, q as st, qt as ct, s as lt, st as ut, tt as dt, ut as ft, v as pt, x as mt, z as ht } from "./error-entries
|
|
12
|
+
import { $ as k, A, At as be, B as xe, Bt as Se, D as Ce, E as we, Gt as j, Ht as Te, I as Ee, J as De, Kt as Oe, M as ke, Mt as Ae, N as je, Ot as Me, R as Ne, Rt as Pe, St as Fe, Ut as Ie, Xt as Le, Yt as Re, Zt as ze, _ as Be, _t as Ve, a as He, at as Ue, c as We, ct as Ge, dt as Ke, et as qe, f as Je, ft as Ye, gt as Xe, h as Ze, in as Qe, it as $e, k as et, lt as tt, nn as nt, o as rt, ot as it, p as at, pt as ot, q as st, qt as ct, s as lt, st as ut, tt as dt, ut as ft, v as pt, x as mt, z as ht } from "./error-entries-P6Qpq6wP.js";
|
|
13
13
|
import { n as gt } from "./assertNever-473SFxLt.js";
|
|
14
14
|
import { t as _t } from "./react-dom-DdqGVp5N.js";
|
|
15
15
|
import { t as vt } from "./jsx-runtime-D8btoEHk.js";
|
package/dist/main.js
CHANGED
|
@@ -3,20 +3,20 @@ import { _ as a, a as o, d as s, g as c, h as l, i as u, l as d, m as f, n as p,
|
|
|
3
3
|
import { t as y } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as b } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { i as x, n as S, r as C, t as w } from "./copy-icon-DuxRkh7T.js";
|
|
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, J as N, L as P, Lt as F, M as I, Mt as L, O as R, Ot as z, P as B, R as ee, Rt as te, St as ne, Ut as re, Vt as ie, Wt as ae, Y as oe, _ as se, a as ce, at as le, b as ue, bt as de, c as fe, ct as pe, ft as me, ht as he, i as ge, it as _e, j as ve, kt as ye, lt as be, mt as xe, n as Se, nt as Ce, o as we, ot as Te, pt as Ee, tt as De, ut as Oe, vt as ke, z as Ae, zt as je } from "./html-to-image-
|
|
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, J as N, L as P, Lt as F, M as I, Mt as L, O as R, Ot as z, P as B, R as ee, Rt as te, St as ne, Ut as re, Vt as ie, Wt as ae, Y as oe, _ as se, a as ce, at as le, b as ue, bt as de, c as fe, ct as pe, ft as me, ht as he, i as ge, it as _e, j as ve, kt as ye, lt as be, mt as xe, n as Se, nt as Ce, o as we, ot as Te, pt as Ee, tt as De, ut as Oe, vt as ke, z as Ae, zt as je } from "./html-to-image-DhrFZL7t.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-BQZ-Bm6h.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-CRfw-lOm.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-vsX0IBbM.js";
|
|
10
10
|
import { a as Nr, n as Pr, s as Fr, t as Ir } from "./useLifecycle-C9UTzCY8.js";
|
|
11
11
|
import { t as Lr } from "./check-DmTIavbZ.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-BszV-bbI.js";
|
|
13
13
|
import { $ as ni, At as ri, Cn as ii, E as ai, H as oi, K as si, Nt as ci, Q as li, Sn as ui, T as di, V as fi, X as pi, Y as mi, Z as hi, _ as gi, a as _i, b as vi, c as yi, f as bi, g as xi, h as Si, i as Ci, m as wi, mt as Ti, n as Ei, r as Di, rt as Oi, s as ki, t as Ai, v as ji, vt as Mi, w as Ni, x as Pi, xn as Fi, y as Ii } from "./dropdown-menu-BiXHfje7.js";
|
|
14
14
|
import { a as Li, c as Ri, l as zi, r as Bi, s as Vi, t as Hi } from "./config-D-lhQq-h.js";
|
|
15
|
-
import { $t as Ui, A as Wi, At as Gi, Bt as Ki, C as qi, Ct as Ji, Dt as Yi, Ft as Xi, H as Zi, I as Qi, It as $i, J as ea, Jt as ta, Nt as na, Pt as ra, Qt as ia, S as aa, St as oa, T as sa, U as ca, V as la, W as ua, X as da, Y as fa, Zt as pa, _ as ma, bt as ha, d as ga, en as _a, g as va, h as ya, ht as ba, l as xa, m as Sa, mt as Ca, nt as wa, p as Ta, rn as Ea, rt as Da, s as Oa, tn as ka, vt as Aa, w as ja, xt as Ma } from "./error-entries
|
|
16
|
-
import { a as Na, d as Pa, i as Fa, n as Ia, o as La, r as Ra, s as za, t as Ba, u as Va } from "./process-output-
|
|
15
|
+
import { $t as Ui, A as Wi, At as Gi, Bt as Ki, C as qi, Ct as Ji, Dt as Yi, Ft as Xi, H as Zi, I as Qi, It as $i, J as ea, Jt as ta, Nt as na, Pt as ra, Qt as ia, S as aa, St as oa, T as sa, U as ca, V as la, W as ua, X as da, Y as fa, Zt as pa, _ as ma, bt as ha, d as ga, en as _a, g as va, h as ya, ht as ba, l as xa, m as Sa, mt as Ca, nt as wa, p as Ta, rn as Ea, rt as Da, s as Oa, tn as ka, vt as Aa, w as ja, xt as Ma } from "./error-entries-P6Qpq6wP.js";
|
|
16
|
+
import { a as Na, d as Pa, i as Fa, n as Ia, o as La, r as Ra, s as za, t as Ba, u as Va } from "./process-output-CBPqVQBu.js";
|
|
17
17
|
import { t as Ha } from "./pencil-FAv6JUvp.js";
|
|
18
18
|
import { a as Ua, c as Wa, d as Ga, f as Ka, i as qa, l as Ja, r as Ya } from "./glide-utils-iHKKQPJ8.js";
|
|
19
|
-
import { n as Xa, t as Za } from "./globals-
|
|
19
|
+
import { n as Xa, t as Za } from "./globals-p3PihXWg.js";
|
|
20
20
|
import { a as Qa, i as $a, n as eo, r as to, s as no, t as ro } from "./assertNever-473SFxLt.js";
|
|
21
21
|
import { t as io } from "./react-dom-DdqGVp5N.js";
|
|
22
22
|
import { t as ao } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -40,10 +40,10 @@ import { i as ac } from "./dist-BG-7Qpaj.js";
|
|
|
40
40
|
import { p as oc } from "./dist-BidYR5m4.js";
|
|
41
41
|
import { t as sc } from "./useAsyncData-P5-Oovhq.js";
|
|
42
42
|
import { n as cc, r as lc, t as uc } from "./useDeepCompareMemoize-CO6rO5Mq.js";
|
|
43
|
-
import { t as dc } from "./ErrorBoundary-
|
|
43
|
+
import { t as dc } from "./ErrorBoundary-C_3e_GUY.js";
|
|
44
44
|
import { G as fc, W as pc } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
45
45
|
import { a as mc, n as hc } from "./loader-qPmiRXZd.js";
|
|
46
|
-
import { a as gc, c as _c, i as vc, l as yc, o as bc, s as xc, t as Sc } from "./code-visibility-
|
|
46
|
+
import { a as gc, c as _c, i as vc, l as yc, o as bc, s as xc, t as Sc } from "./code-visibility-BMm7YFnk.js";
|
|
47
47
|
import { t as Cc } from "./esm-DY8dGAjJ.js";
|
|
48
48
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
49
49
|
var wc = Object.freeze({
|
|
@@ -4835,7 +4835,7 @@ function L_(e) {
|
|
|
4835
4835
|
return;
|
|
4836
4836
|
}
|
|
4837
4837
|
let f = e.get(a);
|
|
4838
|
-
if (o.event === "ready" && l.phase === "snapshot") {
|
|
4838
|
+
if (o.event === "ready" && l.resources.executions.pendingItems?.size && c.warn("Dropped notebook items at ready because their executions were missing", { missingExecutionCount: l.resources.executions.pendingItems.size }), o.event === "ready" && l.phase === "snapshot") {
|
|
4839
4839
|
for (let e of f.resources.executions.executions.values()) if (w(e.record, !0), e.output && T(e.output, e.record), s) for (let t of e.items.values()) t.kind === "console" && t.content.kind === "media" && s(e.record, t, !1);
|
|
4840
4840
|
let e = g;
|
|
4841
4841
|
g = [];
|
|
@@ -12640,7 +12640,7 @@ var GD = (e) => {
|
|
|
12640
12640
|
output: t
|
|
12641
12641
|
};
|
|
12642
12642
|
} };
|
|
12643
|
-
} }, ZD = J.lazy(() => import("./chat-ui-
|
|
12643
|
+
} }, ZD = J.lazy(() => import("./chat-ui-D1mRz9h6.js").then((e) => ({ default: e.Chatbot }))), QD = V(G({
|
|
12644
12644
|
id: K(),
|
|
12645
12645
|
role: H([
|
|
12646
12646
|
"system",
|
|
@@ -13109,7 +13109,7 @@ function XO(e, t) {
|
|
|
13109
13109
|
}
|
|
13110
13110
|
//#endregion
|
|
13111
13111
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
13112
|
-
var ZO = J.lazy(() => import("./glide-data-editor-
|
|
13112
|
+
var ZO = J.lazy(() => import("./glide-data-editor-DQt5ZvmQ.js").then((e) => e.t)), QO = MD("marimo-data-editor", { cssStyles: [tO, nO] }).withData(G({
|
|
13113
13113
|
initialValue: G({ edits: V(G({
|
|
13114
13114
|
rowIdx: W(),
|
|
13115
13115
|
columnId: K(),
|
|
@@ -32833,7 +32833,7 @@ function $U(e) {
|
|
|
32833
32833
|
}
|
|
32834
32834
|
//#endregion
|
|
32835
32835
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32836
|
-
var eW = J.lazy(() => import("./reveal-component-
|
|
32836
|
+
var eW = J.lazy(() => import("./reveal-component-BciImC6F.js")), tW = (e) => {
|
|
32837
32837
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = Io(Ys), s = a === "read" || o, c = Io(Ca) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32838
32838
|
t[0] !== i || t[1] !== n ? (d = Zz(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32839
32839
|
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-DQt5ZvmQ.js";
|
|
4
4
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as e } from "./html-to-image-
|
|
1
|
+
import { T as e } from "./html-to-image-DhrFZL7t.js";
|
|
2
2
|
import { h as t } from "./tooltip-BQZ-Bm6h.js";
|
|
3
|
-
import { Tt as n, wt as r } from "./error-entries
|
|
3
|
+
import { Tt as n, wt as r } from "./error-entries-P6Qpq6wP.js";
|
|
4
4
|
import { r as i } from "./assertNever-473SFxLt.js";
|
|
5
5
|
var a = t("file", [["path", {
|
|
6
6
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
@@ -3,14 +3,14 @@ import { g as t, h as n, m as r, r as i, t as a } from "./button-Z2R2272J.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-BQZ-Bm6h.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-vsX0IBbM.js";
|
|
7
7
|
import { M as w } from "./select-BszV-bbI.js";
|
|
8
8
|
import { X as T } from "./dropdown-menu-BiXHfje7.js";
|
|
9
9
|
import { t as E } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Vt as D, Wt as O, f as k, i as ee } from "./use-restore-focus-DT1TZACX.js";
|
|
11
11
|
import { t as A } from "./useEvent-BoN7U38T.js";
|
|
12
12
|
import { o as te } from "./static-state-BtDNJuc2.js";
|
|
13
|
-
import { n as ne, t as re } from "./code-visibility-
|
|
13
|
+
import { n as ne, t as re } from "./code-visibility-BMm7YFnk.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
|
@@ -169,17 +169,19 @@ describe("output lifetime", () => {
|
|
|
169
169
|
},
|
|
170
170
|
);
|
|
171
171
|
|
|
172
|
-
it.each([
|
|
173
|
-
"
|
|
174
|
-
|
|
172
|
+
it.each([
|
|
173
|
+
["previous", "output", "running"],
|
|
174
|
+
["running", "previous", "output"],
|
|
175
|
+
["running", "output", "previous"],
|
|
176
|
+
["output", "previous", "running"],
|
|
177
|
+
] as const)(
|
|
178
|
+
"recovers the display from a snapshot ordered %s, %s, %s",
|
|
179
|
+
async (...order) => {
|
|
175
180
|
const { store, replica, snapshot, emit, remove } = await setup();
|
|
176
181
|
const [previous, output] = MockExecutions.shown(C1, text("42"));
|
|
177
182
|
const running = MockExecutions.running(C1);
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
? [previous, output, running]
|
|
181
|
-
: [running, previous, output],
|
|
182
|
-
);
|
|
183
|
+
const records = { previous, output, running };
|
|
184
|
+
snapshot(order.map((key) => records[key]));
|
|
183
185
|
expect(store.get(cellOutputAtom(C1))?.data).toBe("42");
|
|
184
186
|
expect(store.get(replica.executionsAtom).latest.get(C1)).toBe(running.id);
|
|
185
187
|
|
|
@@ -178,6 +178,47 @@ describe("executions resource", () => {
|
|
|
178
178
|
expect(resource(cleared).latest.get(C3)).toBe("e12");
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
+
it("resolves execution items across an interrupted replay, even before the cell arrives", () => {
|
|
182
|
+
const events = fixtureEvents("items-before-execution.sse");
|
|
183
|
+
const parent = events.findIndex((e) => e.event === "execution");
|
|
184
|
+
const ready = events.at(-1)!;
|
|
185
|
+
const expected = resource(replay(events));
|
|
186
|
+
const partial = replay(
|
|
187
|
+
events.slice(0, parent),
|
|
188
|
+
reducer.resume(replay([ready])),
|
|
189
|
+
);
|
|
190
|
+
const resumed = resource(
|
|
191
|
+
replay(events.slice(parent), reducer.resume(partial)),
|
|
192
|
+
);
|
|
193
|
+
expect(expected.results.get(C3)?.output?.media?.data).toBe("42");
|
|
194
|
+
expect(expected.variables.get(C3)?.size).toBe(1);
|
|
195
|
+
expect(ids(expected.executions.get("e12")!)).toEqual(["log", "prompt"]);
|
|
196
|
+
expect(expected.executions.get("e12")?.append).toBeUndefined();
|
|
197
|
+
expect(resumed.results.get(C3)).toEqual(expected.results.get(C3));
|
|
198
|
+
expect(resumed.variables.get(C3)).toEqual(expected.variables.get(C3));
|
|
199
|
+
expect(itemsInOrder(resumed.executions.get("e12")!)).toEqual(
|
|
200
|
+
itemsInOrder(expected.executions.get("e12")!),
|
|
201
|
+
);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it("discards pending items on removal, reset, or ready", () => {
|
|
205
|
+
const variable = runCells.find((e) => e.event === "variable")!;
|
|
206
|
+
const consoleEntry = snapshot.find((e) => e.event === "console")!;
|
|
207
|
+
const ready = event({ event: "ready", id: "200", data: {} });
|
|
208
|
+
const pending = replay([variable, consoleEntry]);
|
|
209
|
+
expect(resource(replay([ready], pending)).pendingItems).toBeUndefined();
|
|
210
|
+
const reset = reducer.reduce(pending, { event: "reset", data: {} });
|
|
211
|
+
expect(resource(replay([ready], reset))).toBe(executions.initial);
|
|
212
|
+
const cleared = replay(
|
|
213
|
+
[
|
|
214
|
+
removed("variable", variable.data.variable.id, "101"),
|
|
215
|
+
removed("execution", consoleEntry.data.console.execution_id, "102"),
|
|
216
|
+
],
|
|
217
|
+
pending,
|
|
218
|
+
);
|
|
219
|
+
expect(resource(cleared).pendingItems?.size).toBe(0);
|
|
220
|
+
});
|
|
221
|
+
|
|
181
222
|
it("orders items by seq, replaces them by id, and drops orphans", () => {
|
|
182
223
|
const start = replay(snapshot);
|
|
183
224
|
const prompted = resource(replay(inputs.slice(0, -1), start));
|
|
@@ -5,6 +5,7 @@ import { runId } from "@/__tests__/branded";
|
|
|
5
5
|
import { type NotebookTransport, StreamStopped } from "@marimo-team/client";
|
|
6
6
|
import { createStore } from "jotai";
|
|
7
7
|
import { afterEach, describe, expect, it, onTestFinished, vi } from "vitest";
|
|
8
|
+
import { Logger } from "@/utils/Logger";
|
|
8
9
|
import { Deferred } from "@/utils/Deferred";
|
|
9
10
|
import { ConnectionState } from "../../../session/types";
|
|
10
11
|
import type { ConnectionStatus } from "../connection";
|
|
@@ -135,6 +136,44 @@ describe("NotebookReplica lifetime", () => {
|
|
|
135
136
|
expect(store.get(client.backendAtom)).toBe(other);
|
|
136
137
|
});
|
|
137
138
|
|
|
139
|
+
it("warns once at ready about missing executions and keeps following the notebook", async () => {
|
|
140
|
+
const { connect, opened, client, store } = setup();
|
|
141
|
+
connect(lifetime().signal);
|
|
142
|
+
const { receive } = await opened();
|
|
143
|
+
const warn = vi.spyOn(Logger, "warn").mockImplementation(() => undefined);
|
|
144
|
+
onTestFinished(() => warn.mockRestore());
|
|
145
|
+
const events = fixtureEvents("notebook-events.sse");
|
|
146
|
+
const ready = events.findIndex((e) => e.event === "ready");
|
|
147
|
+
events.slice(0, ready).forEach(receive);
|
|
148
|
+
const output = events.find((e) => e.event === "output")!.data.output;
|
|
149
|
+
for (const id of ["missing-1", "missing-2"]) {
|
|
150
|
+
receive({
|
|
151
|
+
event: "output",
|
|
152
|
+
data: { output: { ...output, id, execution_id: id } },
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
expect(warn).not.toHaveBeenCalled();
|
|
156
|
+
receive(events[ready]);
|
|
157
|
+
expect(warn).toHaveBeenCalledExactlyOnceWith(
|
|
158
|
+
expect.stringContaining("missing"),
|
|
159
|
+
{ missingExecutionCount: 2 },
|
|
160
|
+
);
|
|
161
|
+
expect(
|
|
162
|
+
store.get(client.executionsAtom).executions.get(output.execution_id)
|
|
163
|
+
?.output,
|
|
164
|
+
).toEqual(output);
|
|
165
|
+
|
|
166
|
+
const next = {
|
|
167
|
+
...output,
|
|
168
|
+
media: { mimetype: "text/plain", data: "still connected" },
|
|
169
|
+
};
|
|
170
|
+
receive({ event: "output", id: "99", data: { output: next } });
|
|
171
|
+
expect(
|
|
172
|
+
store.get(client.executionsAtom).executions.get(output.execution_id)
|
|
173
|
+
?.output,
|
|
174
|
+
).toEqual(next);
|
|
175
|
+
});
|
|
176
|
+
|
|
138
177
|
it("exposes identity and capabilities only after the notebook is ready", async () => {
|
|
139
178
|
const { connect, opened, client, store } = setup();
|
|
140
179
|
connect(lifetime().signal);
|
|
@@ -459,6 +459,18 @@ export function createNotebookReplica(
|
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
const after = store.get(streamAtom);
|
|
462
|
+
if (
|
|
463
|
+
event.event === "ready" &&
|
|
464
|
+
before.resources.executions.pendingItems?.size
|
|
465
|
+
) {
|
|
466
|
+
Logger.warn(
|
|
467
|
+
"Dropped notebook items at ready because their executions were missing",
|
|
468
|
+
{
|
|
469
|
+
missingExecutionCount:
|
|
470
|
+
before.resources.executions.pendingItems.size,
|
|
471
|
+
},
|
|
472
|
+
);
|
|
473
|
+
}
|
|
462
474
|
if (event.event === "ready" && before.phase === "snapshot") {
|
|
463
475
|
for (const execution of after.resources.executions.executions.values()) {
|
|
464
476
|
observeExecution(execution.record, true);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type * as Protocol from "@marimo-team/client/protocol";
|
|
4
|
-
import type { NotebookResource } from "@marimo-team/client";
|
|
4
|
+
import type { HandlerContext, NotebookResource } from "@marimo-team/client";
|
|
5
5
|
import {
|
|
6
6
|
type Result,
|
|
7
7
|
type Results,
|
|
@@ -18,6 +18,8 @@ type ProducedItem =
|
|
|
18
18
|
/** Time the host published the item, when included in a live event. */
|
|
19
19
|
export type Item = ProducedItem & { readonly time?: string };
|
|
20
20
|
|
|
21
|
+
type ExecutionItem = Protocol.Output | Protocol.Variable | Item;
|
|
22
|
+
|
|
21
23
|
/** An execution on the stream, with the items it has produced. */
|
|
22
24
|
export interface Execution extends Result {
|
|
23
25
|
/** Items by id. `itemsInOrder` sorts them by `seq`. */
|
|
@@ -44,6 +46,11 @@ export interface Executions {
|
|
|
44
46
|
Protocol.CellId,
|
|
45
47
|
ReadonlyMap<Protocol.ItemId, Protocol.Variable>
|
|
46
48
|
>;
|
|
49
|
+
/** Items received during snapshot or replay before their owning execution. */
|
|
50
|
+
readonly pendingItems?: ReadonlyMap<
|
|
51
|
+
Protocol.ExecutionId,
|
|
52
|
+
readonly ExecutionItem[]
|
|
53
|
+
>;
|
|
47
54
|
readonly results: Results;
|
|
48
55
|
readonly scratch: Result | null;
|
|
49
56
|
/** The latest scratch execution to start, including one that printed nothing. */
|
|
@@ -131,7 +138,9 @@ function set(state: Executions, execution: Execution): Executions {
|
|
|
131
138
|
function remove(state: Executions, id: Protocol.ExecutionId): Executions {
|
|
132
139
|
const execution = state.executions.get(id);
|
|
133
140
|
if (execution === undefined) {
|
|
134
|
-
return state
|
|
141
|
+
return state.pendingItems?.has(id)
|
|
142
|
+
? { ...state, pendingItems: without(state.pendingItems, id) }
|
|
143
|
+
: state;
|
|
135
144
|
}
|
|
136
145
|
const cellId = execution.record.cell_id;
|
|
137
146
|
const isLatest = cellId !== null && state.latest.get(cellId) === id;
|
|
@@ -154,25 +163,22 @@ function remove(state: Executions, id: Protocol.ExecutionId): Executions {
|
|
|
154
163
|
};
|
|
155
164
|
}
|
|
156
165
|
|
|
157
|
-
function
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
function withRows(execution: Execution, entries: readonly Item[]): Execution {
|
|
167
|
+
const items = new Map(execution.items);
|
|
168
|
+
let lastSeq = execution.lastSeq ?? -1;
|
|
169
|
+
let append: Execution["append"];
|
|
170
|
+
for (let item of entries) {
|
|
171
|
+
const original = items.get(item.id);
|
|
172
|
+
if (original) {
|
|
173
|
+
// An input keeps the position and time of its first prompt.
|
|
174
|
+
item = { ...item, time: original.time };
|
|
175
|
+
} else if (entries.length === 1 && item.seq > lastSeq) {
|
|
176
|
+
append = { before: new WeakRef(execution.items), item };
|
|
177
|
+
}
|
|
178
|
+
items.set(item.id, item);
|
|
179
|
+
lastSeq = Math.max(lastSeq, item.seq);
|
|
166
180
|
}
|
|
167
|
-
return
|
|
168
|
-
...execution,
|
|
169
|
-
append:
|
|
170
|
-
!original && item.seq > (execution.lastSeq ?? -1)
|
|
171
|
-
? { before: new WeakRef(execution.items), item }
|
|
172
|
-
: undefined,
|
|
173
|
-
lastSeq: Math.max(execution.lastSeq ?? -1, item.seq),
|
|
174
|
-
items: new Map(execution.items).set(item.id, item),
|
|
175
|
-
});
|
|
181
|
+
return { ...execution, append, lastSeq, items };
|
|
176
182
|
}
|
|
177
183
|
|
|
178
184
|
function detach(state: Executions, itemId: Protocol.ItemId): Executions {
|
|
@@ -185,12 +191,16 @@ function detach(state: Executions, itemId: Protocol.ItemId): Executions {
|
|
|
185
191
|
});
|
|
186
192
|
}
|
|
187
193
|
}
|
|
188
|
-
return state;
|
|
194
|
+
return removePendingItem(state, itemId);
|
|
189
195
|
}
|
|
190
196
|
|
|
191
|
-
function bind(
|
|
192
|
-
|
|
193
|
-
|
|
197
|
+
function bind(
|
|
198
|
+
state: Executions,
|
|
199
|
+
execution: Execution,
|
|
200
|
+
variable: Protocol.Variable,
|
|
201
|
+
): Executions {
|
|
202
|
+
const cellId = execution.record.cell_id;
|
|
203
|
+
if (cellId === null) {
|
|
194
204
|
return state;
|
|
195
205
|
}
|
|
196
206
|
const bindings = new Map(state.variables.get(cellId)).set(
|
|
@@ -215,6 +225,25 @@ function unbind(state: Executions, itemId: Protocol.ItemId): Executions {
|
|
|
215
225
|
return { ...state, variables };
|
|
216
226
|
}
|
|
217
227
|
}
|
|
228
|
+
return removePendingItem(state, itemId);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function removePendingItem(
|
|
232
|
+
state: Executions,
|
|
233
|
+
itemId: Protocol.ItemId,
|
|
234
|
+
): Executions {
|
|
235
|
+
for (const [id, items] of state.pendingItems ?? []) {
|
|
236
|
+
if (items.some((item) => item.id === itemId)) {
|
|
237
|
+
const remaining = items.filter((item) => item.id !== itemId);
|
|
238
|
+
const pendingItems = new Map(state.pendingItems);
|
|
239
|
+
if (remaining.length === 0) {
|
|
240
|
+
pendingItems.delete(id);
|
|
241
|
+
} else {
|
|
242
|
+
pendingItems.set(id, remaining);
|
|
243
|
+
}
|
|
244
|
+
return { ...state, pendingItems };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
218
247
|
return state;
|
|
219
248
|
}
|
|
220
249
|
|
|
@@ -234,6 +263,37 @@ function update(state: Executions, execution: Execution): Executions {
|
|
|
234
263
|
};
|
|
235
264
|
}
|
|
236
265
|
|
|
266
|
+
function receiveItem(
|
|
267
|
+
state: Executions,
|
|
268
|
+
item: ExecutionItem,
|
|
269
|
+
phase: HandlerContext["phase"],
|
|
270
|
+
): Executions {
|
|
271
|
+
const id = item.execution_id;
|
|
272
|
+
const execution = state.executions.get(id);
|
|
273
|
+
if (execution === undefined) {
|
|
274
|
+
if (phase === "live") {
|
|
275
|
+
return state;
|
|
276
|
+
}
|
|
277
|
+
const items = state.pendingItems?.get(id) ?? [];
|
|
278
|
+
return {
|
|
279
|
+
...state,
|
|
280
|
+
pendingItems: new Map(state.pendingItems).set(id, [...items, item]),
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
if ("kind" in item) {
|
|
284
|
+
return set(state, withRows(execution, [item]));
|
|
285
|
+
}
|
|
286
|
+
if ("revision" in item) {
|
|
287
|
+
return bind(state, execution, item);
|
|
288
|
+
}
|
|
289
|
+
const next = { ...execution, output: item };
|
|
290
|
+
return update(state, {
|
|
291
|
+
...next,
|
|
292
|
+
outputVersion:
|
|
293
|
+
execution.outputVersion + (sameShown(execution, next) ? 0 : 1),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
|
|
237
297
|
/** Carry displayed results and their revisions through a replacement snapshot. */
|
|
238
298
|
export function resumeResults(
|
|
239
299
|
next: Executions,
|
|
@@ -301,10 +361,20 @@ export const executions: NotebookResource<Executions, Kind> = {
|
|
|
301
361
|
scratch: null,
|
|
302
362
|
},
|
|
303
363
|
on: {
|
|
304
|
-
cell: (state, { data }) =>
|
|
305
|
-
state.results.has(
|
|
306
|
-
|
|
307
|
-
|
|
364
|
+
cell: (state, { data: { cell } }, { phase }) => {
|
|
365
|
+
if (state.results.has(cell.id)) {
|
|
366
|
+
return state;
|
|
367
|
+
}
|
|
368
|
+
let results: Results = new Map(state.results).set(cell.id, null);
|
|
369
|
+
if (phase !== "live" && state.latest.has(cell.id)) {
|
|
370
|
+
for (const execution of state.executions.values()) {
|
|
371
|
+
if (execution.record.cell_id === cell.id) {
|
|
372
|
+
results = retainResult(results, execution);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return { ...state, results };
|
|
377
|
+
},
|
|
308
378
|
"cell.removed": (state, { data }) => ({
|
|
309
379
|
...state,
|
|
310
380
|
results: without(state.results, data.id),
|
|
@@ -325,7 +395,7 @@ export const executions: NotebookResource<Executions, Kind> = {
|
|
|
325
395
|
execution: (state, { data: { execution: record } }, { phase }) => {
|
|
326
396
|
const previous = state.executions.get(record.id);
|
|
327
397
|
const next = { record, output: previous?.output ?? null };
|
|
328
|
-
const
|
|
398
|
+
const execution: Execution = {
|
|
329
399
|
...next,
|
|
330
400
|
outputVersion:
|
|
331
401
|
previous === undefined
|
|
@@ -334,7 +404,25 @@ export const executions: NotebookResource<Executions, Kind> = {
|
|
|
334
404
|
append: previous?.append,
|
|
335
405
|
lastSeq: previous?.lastSeq,
|
|
336
406
|
items: previous?.items ?? new Map(),
|
|
337
|
-
}
|
|
407
|
+
};
|
|
408
|
+
const items = state.pendingItems?.get(record.id);
|
|
409
|
+
// All buffered console rows and prompts appear in this single update.
|
|
410
|
+
const rows = items?.filter((item) => "kind" in item);
|
|
411
|
+
let updated = update(
|
|
412
|
+
state,
|
|
413
|
+
rows?.length ? withRows(execution, rows) : execution,
|
|
414
|
+
);
|
|
415
|
+
if (items && state.pendingItems) {
|
|
416
|
+
updated = {
|
|
417
|
+
...updated,
|
|
418
|
+
pendingItems: without(state.pendingItems, record.id),
|
|
419
|
+
};
|
|
420
|
+
for (const item of items) {
|
|
421
|
+
if (!("kind" in item)) {
|
|
422
|
+
updated = receiveItem(updated, item, phase);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
338
426
|
const cellId = record.cell_id;
|
|
339
427
|
if (cellId === null || previous !== undefined) {
|
|
340
428
|
return updated;
|
|
@@ -355,24 +443,25 @@ export const executions: NotebookResource<Executions, Kind> = {
|
|
|
355
443
|
};
|
|
356
444
|
},
|
|
357
445
|
"execution.removed": (state, { data }) => remove(state, data.id),
|
|
358
|
-
output: (state, { data
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
outputVersion:
|
|
367
|
-
execution.outputVersion + (sameShown(execution, next) ? 0 : 1),
|
|
368
|
-
});
|
|
369
|
-
},
|
|
370
|
-
console: (state, { data }) =>
|
|
371
|
-
attach(state, { ...data.console, kind: "console", time: data.time }),
|
|
446
|
+
output: (state, { data }, { phase }) =>
|
|
447
|
+
receiveItem(state, data.output, phase),
|
|
448
|
+
console: (state, { data }, { phase }) =>
|
|
449
|
+
receiveItem(
|
|
450
|
+
state,
|
|
451
|
+
{ ...data.console, kind: "console", time: data.time },
|
|
452
|
+
phase,
|
|
453
|
+
),
|
|
372
454
|
"console.removed": (state, { data }) => detach(state, data.id),
|
|
373
|
-
input: (state, { data }) =>
|
|
374
|
-
|
|
375
|
-
|
|
455
|
+
input: (state, { data }, { phase }) =>
|
|
456
|
+
receiveItem(
|
|
457
|
+
state,
|
|
458
|
+
{ ...data.input, kind: "input", time: data.time },
|
|
459
|
+
phase,
|
|
460
|
+
),
|
|
461
|
+
variable: (state, { data }, { phase }) =>
|
|
462
|
+
receiveItem(state, data.variable, phase),
|
|
376
463
|
"variable.removed": (state, { data }) => unbind(state, data.id),
|
|
464
|
+
ready: (state) =>
|
|
465
|
+
state.pendingItems ? { ...state, pendingItems: undefined } : state,
|
|
377
466
|
},
|
|
378
467
|
};
|
|
@@ -20,9 +20,8 @@ export interface Result {
|
|
|
20
20
|
* output revision. Other items stay with the stream's copy of the execution.
|
|
21
21
|
*
|
|
22
22
|
* A cell has an entry from its `cell` event until its removal, null until
|
|
23
|
-
* it has a result.
|
|
24
|
-
*
|
|
25
|
-
* no longer has.
|
|
23
|
+
* it has a result. If the cell arrives after its execution during catch-up,
|
|
24
|
+
* the replica fills its entry from the execution it has already received.
|
|
26
25
|
*/
|
|
27
26
|
export type Results = ReadonlyMap<Protocol.CellId, Result | null>;
|
|
28
27
|
|