@marimo-team/islands 0.26.1-dev103 → 0.26.1-dev104

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.
@@ -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-CmNLxT5_.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-DhZotdzQ.js";
7
- import { n as h, t as ee } from "./globals-DyJvKfkF.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-BcAyFIeh.js";
7
+ import { n as h, t as ee } from "./globals-DorvG5dC.js";
8
8
  import { r as g } from "./assertNever-5vhHGKOK.js";
9
9
  import { t as _ } from "./jsx-runtime-D8btoEHk.js";
10
10
  import { Ct as te, Ut as v, m as y } from "./use-restore-focus-DJ_-uSn_.js";
11
11
  import { a as ne, i as re, n as ie, r as ae } from "./dialog-BvjfalZ9.js";
12
12
  import { t as oe } from "./useAsyncData-P5-Oovhq.js";
13
- import { t as se } from "./code-visibility-DLPZ_eYq.js";
13
+ import { t as se } from "./code-visibility-BhWW3jkv.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-DJ_-uSn_.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-B5MVsi73.js";
17
+ import { t as ce } from "./ErrorBoundary-DLR6xE2E.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-1bQ1lRk0.js")), hs = 0;
7064
+ var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-7durYJXa.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-BPSNY0UK.js")), Zs = {
9287
+ var Xs = W.lazy(async () => await import("./number-overlay-editor-DQAdvZrn.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-DyLdBIM4.js";
2
2
  import { Ct as t } from "./use-restore-focus-DJ_-uSn_.js";
3
- import { r as n } from "./code-visibility-DLPZ_eYq.js";
3
+ import { r as n } from "./code-visibility-BhWW3jkv.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-CEnB18uc.js";
10
10
  import { X as me, ht as he, p as ge } from "./dropdown-menu-D0DeN-aL.js";
11
11
  import { t as _e } from "./circle-question-mark-evCnVIut.js";
12
- import { $ as ve, A as ye, At as k, B as A, Bt as be, D as xe, E as Se, Gt as Ce, Ht as we, I as j, J as Te, Kt as Ee, M as De, Mt as Oe, N as ke, Ot as Ae, R as je, Rt as Me, St as Ne, Ut as Pe, Xt as Fe, Yt as Ie, Zt as Le, _ as Re, _t as ze, a as Be, at as Ve, c as He, ct as Ue, dt as We, et as Ge, f as Ke, ft as qe, gt as Je, h as Ye, in as Xe, it as Ze, k as Qe, lt as $e, nn as et, o as tt, ot as nt, p as rt, pt as it, q as at, qt as ot, s as st, st as ct, tt as lt, ut, v as dt, x as ft, z as pt } from "./error-entries-DhZotdzQ.js";
12
+ import { $ as ve, A as ye, At as k, B as A, Bt as be, D as xe, E as Se, Gt as Ce, Ht as we, I as j, J as Te, Kt as Ee, M as De, Mt as Oe, N as ke, Ot as Ae, R as je, Rt as Me, St as Ne, Ut as Pe, Xt as Fe, Yt as Ie, Zt as Le, _ as Re, _t as ze, a as Be, at as Ve, c as He, ct as Ue, dt as We, et as Ge, f as Ke, ft as qe, gt as Je, h as Ye, in as Xe, it as Ze, k as Qe, lt as $e, nn as et, o as tt, ot as nt, p as rt, pt as it, q as at, qt as ot, s as st, st as ct, tt as lt, ut, v as dt, x as ft, z as pt } from "./error-entries-BcAyFIeh.js";
13
13
  import { n as mt } from "./assertNever-5vhHGKOK.js";
14
14
  import { t as ht } from "./react-dom-DdqGVp5N.js";
15
15
  import { t as gt } 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-CmNLxT5_.js";
6
- import { $ as T, Bt as E, E as D, Et as O, F as k, Ft as A, G as j, I as M, It as N, K as P, L as F, Lt as I, M as L, Mt as R, Nt as z, O as B, P as ee, Pt as te, Q as ne, Rt as re, Tt as ie, Vt as ae, _ as oe, _t as se, a as ce, at as le, b as ue, bt as de, c as fe, dt as pe, ft as me, ht as he, i as ge, j as _e, kt as ve, lt as ye, n as be, nt as xe, o as Se, ot as Ce, rt as we, st as Te, tt as Ee, ut as De, yt as Oe } from "./html-to-image-B8erjaaD.js";
6
+ import { $ as T, Bt as E, E as D, Et as O, F as k, Ft as A, G as j, I as M, It as N, K as P, L as F, Lt as I, M as L, Mt as R, Nt as z, O as B, P as ee, Pt as te, Q as ne, Rt as re, Tt as ie, Vt as ae, _ as oe, _t as se, a as ce, at as le, b as ue, bt as de, c as fe, dt as pe, ft as me, ht as he, i as ge, j as _e, kt as ve, lt as ye, n as be, nt as xe, o as Se, ot as Ce, rt as we, st as Te, tt as Ee, ut as De, yt as Oe } from "./html-to-image-BmLTjaGw.js";
7
7
  import { a as ke, f as Ae, h as je, i as Me, m as Ne, n as Pe, o as Fe, r as Ie, t as Le } from "./tooltip-DyLdBIM4.js";
8
8
  import { D as Re, E as ze, S as Be, T as Ve, _ as He, a as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, w as ot, x as st, y as ct } from "./spec-Dz-Avv1m.js";
9
- import { $ as lt, $t as ut, A as dt, An as ft, At as pt, B as mt, Bt as ht, C as gt, D as _t, Dn as vt, Dt as yt, E as bt, En as xt, Et as St, F as Ct, Ft as wt, G as Tt, Gt as Et, H as Dt, Ht as Ot, I as kt, It as At, J as jt, Jt as Mt, K as Nt, Kt as Pt, L as Ft, Lt as It, M as Lt, Mn as Rt, Mt as zt, N as Bt, Nt as Vt, O as Ht, On as Ut, Ot as Wt, P as Gt, Pt as Kt, Q as qt, Qt as Jt, R as Yt, Rt as Xt, S as Zt, Sn as Qt, St as $t, T as en, Tn as tn, Tt as nn, U as rn, Ut as an, V as on, Vt as sn, W as cn, Wt as ln, X as un, Xt as dn, Y as fn, Yt as pn, Z as mn, Zt as hn, _ as gn, _n, _t as vn, an as yn, at as bn, b as xn, bn as Sn, bt as Cn, c as wn, cn as Tn, ct as En, d as Dn, dn as On, dt as kn, en as An, f as jn, fn as Mn, ft as Nn, g as Pn, gn as Fn, gt as In, h as Ln, hn as Rn, ht as zn, in as Bn, it as Vn, j as Hn, jn as Un, jt as Wn, k as Gn, kn as Kn, kt as qn, ln as Jn, lt as Yn, m as Xn, mn as Zn, mt as Qn, nn as $n, on as er, ot as tr, p as nr, pn as rr, pt as ir, q as ar, qt as or, r as sr, rn as cr, rt as lr, sn as ur, st as dr, t as fr, tn as pr, u as mr, un as hr, ut as gr, v as _r, vn as vr, vt as yr, w as br, wn as xr, x as Sr, xn as Cr, xt as wr, y as Tr, yn as Er, yt as Dr, z as Or, zt as kr } from "./common-B2K9WgcL.js";
9
+ import { $ as lt, $t as ut, A as dt, An as ft, At as pt, B as mt, Bt as ht, C as gt, D as _t, Dn as vt, Dt as yt, E as bt, En as xt, Et as St, F as Ct, Ft as wt, G as Tt, Gt as Et, H as Dt, Ht as Ot, I as kt, It as At, J as jt, Jt as Mt, K as Nt, Kt as Pt, L as Ft, Lt as It, M as Lt, Mn as Rt, Mt as zt, N as Bt, Nt as Vt, O as Ht, On as Ut, Ot as Wt, P as Gt, Pt as Kt, Q as qt, Qt as Jt, R as Yt, Rt as Xt, S as Zt, Sn as Qt, St as $t, T as en, Tn as tn, Tt as nn, U as rn, Ut as an, V as on, Vt as sn, W as cn, Wt as ln, X as un, Xt as dn, Y as fn, Yt as pn, Z as mn, Zt as hn, _ as gn, _n, _t as vn, an as yn, at as bn, b as xn, bn as Sn, bt as Cn, c as wn, cn as Tn, ct as En, d as Dn, dn as On, dt as kn, en as An, f as jn, fn as Mn, ft as Nn, g as Pn, gn as Fn, gt as In, h as Ln, hn as Rn, ht as zn, in as Bn, it as Vn, j as Hn, jn as Un, jt as Wn, k as Gn, kn as Kn, kt as qn, ln as Jn, lt as Yn, m as Xn, mn as Zn, mt as Qn, nn as $n, on as er, ot as tr, p as nr, pn as rr, pt as ir, q as ar, qt as or, r as sr, rn as cr, rt as lr, sn as ur, st as dr, t as fr, tn as pr, u as mr, un as hr, ut as gr, v as _r, vn as vr, vt as yr, w as br, wn as xr, x as Sr, xn as Cr, xt as wr, y as Tr, yn as Er, yt as Dr, z as Or, zt as kr } from "./common-i4mVHMGl.js";
10
10
  import { a as Ar, n as jr, s as Mr, t as Nr } from "./useLifecycle-tPpAt-OE.js";
11
11
  import { t as Pr } from "./check-DUIc04aK.js";
12
12
  import { A as Fr, C as Ir, D as Lr, M as Rr, O as zr, a as Br, c as Vr, d as Hr, i as Ur, k as Wr, l as Gr, n as Kr, o as qr, r as Jr, s as Yr, t as Xr, w as Zr, x as Qr } from "./select-CEnB18uc.js";
13
13
  import { $ as $r, At as ei, Cn as ti, E as ni, H as ri, K as ii, Nt as ai, Q as oi, Sn as si, T as ci, V as li, X as ui, Y as di, Z as fi, _ as pi, a as mi, b as hi, c as gi, f as _i, g as vi, h as yi, i as bi, m as xi, mt as Si, n as Ci, r as wi, rt as Ti, s as Ei, t as Di, v as Oi, vt as ki, w as Ai, x as ji, xn as Mi, y as Ni } from "./dropdown-menu-D0DeN-aL.js";
14
14
  import { t as Pi } from "./circle-question-mark-evCnVIut.js";
15
- import { $t as Fi, A as Ii, At as Li, Bt as Ri, C as zi, Ct as Bi, Dt as Vi, Ft as Hi, H as Ui, I as Wi, It as Gi, J as Ki, Jt as qi, Nt as Ji, Pt as Yi, Qt as Xi, S as Zi, St as Qi, T as $i, U as ea, V as ta, W as na, X as ra, Y as ia, Zt as aa, _ as oa, bt as sa, d as ca, en as la, g as ua, h as da, ht as fa, l as pa, m as ma, mt as ha, nt as ga, p as _a, rn as va, rt as ya, s as ba, tn as xa, vt as Sa, w as Ca, xt as wa } from "./error-entries-DhZotdzQ.js";
16
- import { a as Ta, d as Ea, i as Da, n as Oa, o as ka, r as Aa, s as ja, t as Ma, u as Na } from "./process-output-C-2_O5Ry.js";
15
+ import { $t as Fi, A as Ii, At as Li, Bt as Ri, C as zi, Ct as Bi, Dt as Vi, Ft as Hi, H as Ui, I as Wi, It as Gi, J as Ki, Jt as qi, Nt as Ji, Pt as Yi, Qt as Xi, S as Zi, St as Qi, T as $i, U as ea, V as ta, W as na, X as ra, Y as ia, Zt as aa, _ as oa, bt as sa, d as ca, en as la, g as ua, h as da, ht as fa, l as pa, m as ma, mt as ha, nt as ga, p as _a, rn as va, rt as ya, s as ba, tn as xa, vt as Sa, w as Ca, xt as wa } from "./error-entries-BcAyFIeh.js";
16
+ import { a as Ta, d as Ea, i as Da, n as Oa, o as ka, r as Aa, s as ja, t as Ma, u as Na } from "./process-output-CcNpl5Qu.js";
17
17
  import { t as Pa } from "./pencil-CxMgOe04.js";
18
18
  import { a as Fa, c as Ia, d as La, f as Ra, i as za, l as Ba, r as Va } from "./glide-utils-CD8BaFTm.js";
19
- import { n as Ha, t as Ua } from "./globals-DyJvKfkF.js";
19
+ import { n as Ha, t as Ua } from "./globals-DorvG5dC.js";
20
20
  import { a as Wa, i as Ga, n as Ka, r as qa, s as Ja, t as Ya } from "./assertNever-5vhHGKOK.js";
21
21
  import { t as Xa } from "./react-dom-DdqGVp5N.js";
22
22
  import { t as Za } from "./jsx-runtime-D8btoEHk.js";
@@ -42,9 +42,9 @@ import { p as ic } from "./dist-BidYR5m4.js";
42
42
  import { t as ac } from "./useAsyncData-P5-Oovhq.js";
43
43
  import { n as oc, r as sc, t as cc } from "./useDeepCompareMemoize-CHx-NxMl.js";
44
44
  import { o as lc, r as uc, s as dc } from "./loader-CGrYn73j.js";
45
- import { t as fc } from "./ErrorBoundary-B5MVsi73.js";
45
+ import { t as fc } from "./ErrorBoundary-DLR6xE2E.js";
46
46
  import { G as pc, W as mc } from "./vega-loader.browser-Co9gYE8Z.js";
47
- 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-DLPZ_eYq.js";
47
+ 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-BhWW3jkv.js";
48
48
  import { t as Sc } from "./esm-DY8dGAjJ.js";
49
49
  //#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
50
50
  var Cc = Object.freeze({
@@ -12629,7 +12629,7 @@ var VD = (e) => {
12629
12629
  output: t
12630
12630
  };
12631
12631
  } };
12632
- } }, qD = J.lazy(() => import("./chat-ui-BbJTFtyC.js").then((e) => ({ default: e.Chatbot }))), JD = V(G({
12632
+ } }, qD = J.lazy(() => import("./chat-ui-Bs3rgm2m.js").then((e) => ({ default: e.Chatbot }))), JD = V(G({
12633
12633
  id: K(),
12634
12634
  role: H([
12635
12635
  "system",
@@ -13098,7 +13098,7 @@ function KO(e, t) {
13098
13098
  }
13099
13099
  //#endregion
13100
13100
  //#region src/plugins/impl/DataEditorPlugin.tsx
13101
- var qO = J.lazy(() => import("./glide-data-editor-wPYhuqFs.js").then((e) => e.t)), JO = OD("marimo-data-editor", { cssStyles: [ZD, QD] }).withData(G({
13101
+ var qO = J.lazy(() => import("./glide-data-editor-BLGr2vQF.js").then((e) => e.t)), JO = OD("marimo-data-editor", { cssStyles: [ZD, QD] }).withData(G({
13102
13102
  initialValue: G({ edits: V(G({
13103
13103
  rowIdx: W(),
13104
13104
  columnId: K(),
@@ -32903,7 +32903,7 @@ function uW(e) {
32903
32903
  }
32904
32904
  //#endregion
32905
32905
  //#region src/components/editor/renderers/slides-layout/slides-layout.tsx
32906
- var dW = J.lazy(() => import("./reveal-component-CX1LQkT7.js")), fW = (e) => {
32906
+ var dW = J.lazy(() => import("./reveal-component-B6xeeht1.js")), fW = (e) => {
32907
32907
  let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = Ao(Bs), s = a === "read" || o, c = Ao(ha) > 1, [l, u] = (0, J.useState)(null), d;
32908
32908
  t[0] !== i || t[1] !== n ? (d = cB(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
32909
32909
  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-wPYhuqFs.js";
3
+ import { a as n } from "./glide-data-editor-BLGr2vQF.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-B8erjaaD.js";
1
+ import { T as e } from "./html-to-image-BmLTjaGw.js";
2
2
  import { h as t } from "./tooltip-DyLdBIM4.js";
3
- import { Tt as n, wt as r } from "./error-entries-DhZotdzQ.js";
3
+ import { Tt as n, wt as r } from "./error-entries-BcAyFIeh.js";
4
4
  import { r as i } from "./assertNever-5vhHGKOK.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-DyLdBIM4.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-B2K9WgcL.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-i4mVHMGl.js";
7
7
  import { M as w } from "./select-CEnB18uc.js";
8
8
  import { X as T } from "./dropdown-menu-D0DeN-aL.js";
9
9
  import { t as E } from "./jsx-runtime-D8btoEHk.js";
10
10
  import { Kt as D, Ut as O, f as k, i as ee } from "./use-restore-focus-DJ_-uSn_.js";
11
11
  import { t as A } from "./useEvent-BoN7U38T.js";
12
12
  import { o as te } from "./static-state-iw0PrHK4.js";
13
- import { n as ne, t as re } from "./code-visibility-DLPZ_eYq.js";
13
+ import { n as ne, t as re } from "./code-visibility-BhWW3jkv.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.26.1-dev103",
3
+ "version": "0.26.1-dev104",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -342,6 +342,38 @@ describe("cellExecutionView", () => {
342
342
  expect(cellExecutionView(over, C1).status).toBe("idle");
343
343
  });
344
344
 
345
+ it("indexes a requested cell list once across cell reads and run snapshots", () => {
346
+ const cellIds = [C1, C2];
347
+ const iterate = vi.spyOn(cellIds, Symbol.iterator);
348
+ onTestFinished(() => iterate.mockRestore());
349
+ const queued: Protocol.RunOutput = {
350
+ ...run([], "queued"),
351
+ origin: { kind: "cells", cell_ids: cellIds },
352
+ };
353
+ const running: Protocol.RunOutput = {
354
+ ...queued,
355
+ origin: { ...queued.origin },
356
+ state: { status: "running", started_at: T0 },
357
+ };
358
+
359
+ const before = inputs({ runs: [queued] });
360
+ const after = inputs({ runs: [running] });
361
+ expect(cellExecutionView(before, C1).status).toBe("queued");
362
+ expect(cellExecutionView(before, C2).status).toBe("queued");
363
+ expect(cellExecutionView(after, C2).status).toBe("queued");
364
+ expect(cellExecutionView(after, cellId("c3")).status).toBe("idle");
365
+ expect(iterate).toHaveBeenCalledTimes(1);
366
+ });
367
+
368
+ it("uses each snapshot's requested list when run IDs match", () => {
369
+ const first = inputs({ runs: [run(["c1"], "queued")] });
370
+ const second = inputs({ runs: [run(["c2"], "queued")] });
371
+ expect(cellExecutionView(first, C1).status).toBe("queued");
372
+ expect(cellExecutionView(second, C1).status).toBe("idle");
373
+ expect(cellExecutionView(second, C2).status).toBe("queued");
374
+ expect(cellExecutionView(first, C2).status).toBe("idle");
375
+ });
376
+
345
377
  it("does not read as queued a named cell a run cannot reach", () => {
346
378
  const runs = [run(["c1", "c9"], "queued")];
347
379
  expect(
@@ -184,6 +184,23 @@ function awaited(inputs: CellExecutionInputs, id: Protocol.CellId): boolean {
184
184
  );
185
185
  }
186
186
 
187
+ // The list is fixed when the run is accepted and can outlive a run snapshot.
188
+ const requestedCellSets = new WeakMap<
189
+ readonly Protocol.CellId[],
190
+ ReadonlySet<Protocol.CellId>
191
+ >();
192
+
193
+ function requestedCellSet(
194
+ cellIds: readonly Protocol.CellId[],
195
+ ): ReadonlySet<Protocol.CellId> {
196
+ let index = requestedCellSets.get(cellIds);
197
+ if (index === undefined) {
198
+ index = new Set(cellIds);
199
+ requestedCellSets.set(cellIds, index);
200
+ }
201
+ return index;
202
+ }
203
+
187
204
  export function awaitingRun(
188
205
  runs: Executions["runs"],
189
206
  id: Protocol.CellId,
@@ -194,7 +211,7 @@ export function awaitingRun(
194
211
  run.state.status !== "completed" &&
195
212
  run.id !== planned &&
196
213
  run.origin.kind === "cells" &&
197
- run.origin.cell_ids.includes(id)
214
+ requestedCellSet(run.origin.cell_ids).has(id)
198
215
  ) {
199
216
  return true;
200
217
  }