@marimo-team/islands 0.26.1-dev102 → 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.
Files changed (21) hide show
  1. package/dist/{ErrorBoundary-BKEnwpNS.js → ErrorBoundary-DLR6xE2E.js} +1 -1
  2. package/dist/{chat-ui-BbJTFtyC.js → chat-ui-Bs3rgm2m.js} +3 -3
  3. package/dist/{code-visibility-C0y2uQ5I.js → code-visibility-BhWW3jkv.js} +2 -2
  4. package/dist/{common-umUW2Aaj.js → common-i4mVHMGl.js} +3 -3
  5. package/dist/{data-grid-overlay-editor-_toXAWar.js → data-grid-overlay-editor-7durYJXa.js} +1 -1
  6. package/dist/{error-entries-DhZotdzQ.js → error-entries-BcAyFIeh.js} +382 -377
  7. package/dist/{feedback-button-B8h11wos.js → feedback-button-CeuzSBrq.js} +3 -3
  8. package/dist/{glide-data-editor-DTYsy8_7.js → glide-data-editor-BLGr2vQF.js} +3 -3
  9. package/dist/{globals-EZS7lTul.js → globals-DorvG5dC.js} +1 -1
  10. package/dist/{html-to-image-B8erjaaD.js → html-to-image-BmLTjaGw.js} +1 -1
  11. package/dist/main.js +10 -10
  12. package/dist/{number-overlay-editor-DK1pWbJu.js → number-overlay-editor-DQAdvZrn.js} +1 -1
  13. package/dist/{process-output-C-2_O5Ry.js → process-output-CcNpl5Qu.js} +2 -2
  14. package/dist/{reveal-component-BRoxPCNK.js → reveal-component-B6xeeht1.js} +2 -2
  15. package/package.json +1 -1
  16. package/src/components/editor/cell/code/__tests__/code-placeholder.test.tsx +2 -2
  17. package/src/components/editor/cell/code/cell-editor.tsx +16 -1
  18. package/src/components/editor/cell/code/code-placeholder.css +2 -44
  19. package/src/components/editor/cell/code/code-placeholder.tsx +7 -34
  20. package/src/core/executions/__tests__/select.test.ts +32 -0
  21. package/src/core/executions/select.ts +18 -1
@@ -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-EZS7lTul.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-C0y2uQ5I.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-BKEnwpNS.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-_toXAWar.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-DK1pWbJu.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-C0y2uQ5I.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-umUW2Aaj.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-EZS7lTul.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-BKEnwpNS.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-C0y2uQ5I.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-DTYsy8_7.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-BRoxPCNK.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-DTYsy8_7.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-umUW2Aaj.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-C0y2uQ5I.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-dev102",
3
+ "version": "0.26.1-dev104",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -5,13 +5,13 @@ import { CodePlaceholder } from "../code-placeholder";
5
5
 
6
6
  afterEach(cleanup);
7
7
 
8
- it("keeps every line searchable, highlighted, and escaped without an editor", () => {
8
+ it("renders searchable, escaped text without token spans or an editor", () => {
9
9
  const code = Array.from({ length: 100 }, (_, i) => `x${i} = "<script>"`).join(
10
10
  "\n",
11
11
  );
12
12
  const { container } = render(<CodePlaceholder code={code} />);
13
13
  expect(container.textContent).toBe(code);
14
- expect(container.querySelector(".tok-string")).not.toBeNull();
14
+ expect(container.querySelector("span")).toBeNull();
15
15
  expect(container.querySelector("script")).toBeNull();
16
16
  expect(container.querySelector(".cm-editor")).toBeNull();
17
17
  });
@@ -45,6 +45,7 @@ import { invariant } from "@/utils/invariant";
45
45
  import { mergeRefs } from "@/utils/mergeRefs";
46
46
  import { useAskAiAboutCell } from "../../chrome/wrapper/useAskAiAboutCell";
47
47
  import { AiCompletionEditor } from "../../ai/ai-completion-editor";
48
+ import { focusEditor } from "../../navigation/focus-utils";
48
49
  import {
49
50
  closeSignatureHelp,
50
51
  useCellEditorNavigationProps,
@@ -434,7 +435,21 @@ const CellEditorInternal = ({
434
435
  className="relative w-full"
435
436
  ref={intersectionRef}
436
437
  {...navigationProps}
437
- onPointerDownCapture={promote}
438
+ onPointerDownCapture={(event) => {
439
+ promote();
440
+ if (
441
+ !isEditorMounted &&
442
+ event.button === 0 &&
443
+ event.pointerType === "mouse" &&
444
+ event.target instanceof Element &&
445
+ event.target.closest(".mo-code-placeholder") &&
446
+ editorViewRef.current
447
+ ) {
448
+ // Mounting replaces the pointer target before the browser can focus it.
449
+ event.preventDefault();
450
+ focusEditor(editorViewRef.current);
451
+ }
452
+ }}
438
453
  onFocusCapture={promote}
439
454
  onDoubleClick={(e) => {
440
455
  if (hidden) {
@@ -1,7 +1,5 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
- /* Colors mirror core/codemirror/theme/{light,dark}.ts so building the editor does not recolor the code. */
4
-
5
3
  /* The editor's line-number gutter pushes its text right; leave the same room so the code does not jump. */
6
4
  .mo-code-placeholder {
7
5
  --mo-gutter-digits: 2;
@@ -9,8 +7,8 @@
9
7
  cursor: text;
10
8
  padding: 8px 29px 8px
11
9
  calc(
12
- 53.5px + min(var(--mo-gutter-digits) - 1, 1) * 3.1px + max(var(--mo-gutter-digits) - 2, 0) *
13
- 7.56px
10
+ 53.5px + min(var(--mo-gutter-digits) - 1, 1) * 3.1px +
11
+ max(var(--mo-gutter-digits) - 2, 0) * 7.56px
14
12
  );
15
13
  font-size: var(--marimo-code-editor-font-size, 0.9rem);
16
14
  font-family: var(--monospace-font);
@@ -26,43 +24,3 @@
26
24
  var(--mo-hidden-lines) * 1.4 * var(--marimo-code-editor-font-size, 0.9rem)
27
25
  );
28
26
  }
29
-
30
- .mo-code-placeholder .tok-keyword {
31
- color: light-dark(#708, #c678dd);
32
- font-weight: 500;
33
- }
34
-
35
- .mo-code-placeholder .tok-string,
36
- .mo-code-placeholder .tok-string2 {
37
- color: light-dark(#a11, #98c379);
38
- }
39
-
40
- .mo-code-placeholder .tok-number {
41
- color: light-dark(#164, #d19a66);
42
- }
43
-
44
- .mo-code-placeholder .tok-bool,
45
- .mo-code-placeholder .tok-atom {
46
- color: light-dark(#219, #d19a66);
47
- }
48
-
49
- .mo-code-placeholder .tok-operator {
50
- color: light-dark(#a2f, #56b6c2);
51
- font-weight: 500;
52
- }
53
-
54
- .mo-code-placeholder .tok-className {
55
- color: light-dark(#00f, #61afef);
56
- }
57
-
58
- .mo-code-placeholder .tok-typeName {
59
- color: light-dark(#085, #56b6c2);
60
- }
61
-
62
- .mo-code-placeholder .tok-propertyName {
63
- color: light-dark(#05a, #e5c07b);
64
- }
65
-
66
- .mo-code-placeholder .tok-comment {
67
- color: var(--cm-comment);
68
- }
@@ -1,10 +1,6 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
  import "./code-placeholder.css";
3
- import { markdownLanguage } from "@codemirror/lang-markdown";
4
- import { pythonLanguage } from "@codemirror/lang-python";
5
- import { SQLDialect } from "@codemirror/lang-sql";
6
- import { classHighlighter, highlightTree } from "@lezer/highlight";
7
- import { type CSSProperties, type ReactNode, useMemo } from "react";
3
+ import { type CSSProperties, useMemo } from "react";
8
4
  import { parseCellCode } from "@/core/codemirror/language/cell-code";
9
5
  import { cn } from "@/utils/cn";
10
6
 
@@ -13,43 +9,18 @@ interface CodePlaceholderProps {
13
9
  className?: string;
14
10
  }
15
11
 
16
- const parsers = {
17
- python: pythonLanguage.parser,
18
- markdown: markdownLanguage.parser,
19
- sql: SQLDialect.define({}).language.parser,
20
- };
21
-
22
12
  // Rendering every line of every offscreen cell is unbounded work. The rest of a
23
13
  // long cell is a spacer, so the layout still matches the editor.
24
14
  const MAX_RENDERED_LINES = 200;
25
15
 
26
16
  export const CodePlaceholder = ({ code, className }: CodePlaceholderProps) => {
27
- const { content, gutterDigits, hiddenLines } = useMemo(() => {
28
- const { adapter, text: fullText } = parseCellCode(code);
17
+ const { text, gutterDigits, hiddenLines } = useMemo(() => {
18
+ const { text: fullText } = parseCellCode(code);
29
19
  const lines = fullText.split("\n");
30
20
  const text = lines.slice(0, MAX_RENDERED_LINES).join("\n");
31
21
  const hiddenLines = Math.max(0, lines.length - MAX_RENDERED_LINES);
32
- const parser = parsers[adapter.type];
33
- const nodes: ReactNode[] = [];
34
- let position = 0;
35
- highlightTree(parser.parse(text), classHighlighter, (from, to, classes) => {
36
- if (from > position) {
37
- nodes.push(text.slice(position, from));
38
- }
39
- nodes.push(
40
- <span key={from} className={classes}>
41
- {text.slice(from, to)}
42
- </span>,
43
- );
44
- position = to;
45
- });
46
- nodes.push(text.slice(position));
47
- // A final newline needs a following character to occupy its own line.
48
- if (!text || text.endsWith("\n")) {
49
- nodes.push("\u200b");
50
- }
51
22
  return {
52
- content: nodes,
23
+ text,
53
24
  gutterDigits: String(lines.length).length,
54
25
  hiddenLines,
55
26
  };
@@ -65,7 +36,9 @@ export const CodePlaceholder = ({ code, className }: CodePlaceholderProps) => {
65
36
  } as CSSProperties
66
37
  }
67
38
  >
68
- {content}
39
+ {text}
40
+ {/* A final newline needs a following character to occupy its own line. */}
41
+ {(!text || text.endsWith("\n")) && "\u200b"}
69
42
  {hiddenLines > 0 && <div className="mo-code-placeholder-rest" />}
70
43
  </div>
71
44
  );
@@ -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
  }