@marimo-team/islands 0.25.3-dev482 → 0.25.3-dev485

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 (38) hide show
  1. package/dist/{ErrorBoundary-Tw4GGoit.js → ErrorBoundary-CodLzVG5.js} +1 -1
  2. package/dist/assets/__vite-browser-external-DZv_7F5P.js +1 -0
  3. package/dist/assets/{worker-DFvnFhLF.js → worker-cHYZNFD4.js} +2 -2
  4. package/dist/{chat-ui-LeUI9zli.js → chat-ui-Covffkhg.js} +7 -7
  5. package/dist/{code-visibility-CWrFAfrs.js → code-visibility-BauZWifR.js} +11 -11
  6. package/dist/{common-DZARFS07.js → common-DeBx86ld.js} +14 -14
  7. package/dist/{data-grid-overlay-editor-C1ZVcFjq.js → data-grid-overlay-editor-BzEmIb3z.js} +1 -1
  8. package/dist/{error-entries--YT1ZOUW.js → error-entries-C4OopOce.js} +81 -62
  9. package/dist/{feedback-button-Cypq285l.js → feedback-button-BTYGJiow.js} +135 -135
  10. package/dist/{glide-data-editor-BQHo_8OJ.js → glide-data-editor-Bcy2IE3H.js} +3 -3
  11. package/dist/{globals-DQXC3L6D.js → globals-9AyCoAnh.js} +1 -1
  12. package/dist/{html-to-image-BMt1erSy.js → html-to-image-95V1hWZu.js} +32 -32
  13. package/dist/main.js +6048 -6020
  14. package/dist/{number-overlay-editor-B6VKb3LS.js → number-overlay-editor-aEdDUAzH.js} +1 -1
  15. package/dist/{process-output-CNBGRz3r.js → process-output-DPHxrq7D.js} +2 -2
  16. package/dist/{reveal-component-BlB1yXJU.js → reveal-component-_1Vpg1lV.js} +2 -2
  17. package/package.json +1 -1
  18. package/src/__mocks__/executions.ts +2 -0
  19. package/src/__tests__/CellStatus.test.tsx +3 -3
  20. package/src/components/editor/cell/CellStatus.tsx +23 -38
  21. package/src/components/editor/notebook-cell.tsx +1 -1
  22. package/src/components/slides/slide-cell-view.tsx +1 -1
  23. package/src/core/executions/__tests__/atoms.test.ts +1 -41
  24. package/src/core/executions/__tests__/output-lifecycle.test.ts +1 -5
  25. package/src/core/executions/__tests__/select.test.ts +34 -2
  26. package/src/core/executions/atoms.ts +16 -31
  27. package/src/core/executions/hooks.ts +2 -3
  28. package/src/core/executions/index.ts +0 -1
  29. package/src/core/executions/select.ts +55 -2
  30. package/src/core/islands/bootstrap.ts +0 -8
  31. package/src/core/notebook/replica/replica.ts +50 -3
  32. package/src/core/notebook/replica/resources/analysis.ts +9 -0
  33. package/src/core/session/__tests__/backend.test.ts +3 -12
  34. package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +84 -0
  35. package/src/core/session/backend.ts +4 -4
  36. package/src/core/session/useNotebookSession.tsx +0 -8
  37. package/src/stories/cell-status.stories.tsx +6 -6
  38. package/dist/assets/__vite-browser-external-DoIBUY2I.js +0 -1
@@ -9,7 +9,7 @@ import { a as D, i as ne, o as re, r as O, s as k, t as ie } from "./useLifecycl
9
9
  import { a as ae, c as oe, i as se, n as ce, o as le, r as ue, s as de, t as fe } from "./select-PQHWLm64.js";
10
10
  import { J as pe, X as me, ht as he } from "./dropdown-menu-B12Nf3Zf.js";
11
11
  import { c as ge, l as _e, n as ve } from "./config-C8TXSDmC.js";
12
- import { $ as A, A as j, At as ye, Bt as be, C as xe, D as Se, E as Ce, F as we, G as Te, Gt as Ee, I as De, Jt as Oe, L as ke, Lt as Ae, Mt as je, N as Me, Ot as Ne, Rt as Pe, S as Fe, St as Ie, Ut as Le, Vt as Re, W as ze, Wt as Be, Xt as Ve, Yt as He, _t as Ue, a as We, at as Ge, c as Ke, ct as qe, dt as Je, et as Ye, ft as Xe, g as Ze, gt as Qe, it as $e, k as et, lt as tt, m as nt, o as rt, ot as it, p as at, pt as ot, rn as st, s as ct, st as lt, tn as ut, tt as dt, ut as ft, v as pt, w as mt, y as ht } from "./error-entries--YT1ZOUW.js";
12
+ import { $ as A, A as j, At as ye, Bt as be, C as xe, D as Se, E as Ce, F as we, G as Te, Gt as Ee, I as De, Jt as Oe, L as ke, Lt as Ae, Mt as je, N as Me, Ot as Ne, Rt as Pe, S as Fe, St as Ie, Ut as Le, Vt as Re, W as ze, Wt as Be, Yt as Ve, _t as He, a as Ue, at as We, c as Ge, ct as Ke, dt as qe, en as Je, et as Ye, ft as Xe, g as Ze, gt as Qe, it as $e, k as et, lt as tt, m as nt, nn as rt, o as it, ot as at, p as ot, pt as st, qt as ct, s as lt, st as ut, tt as dt, ut as ft, v as pt, w as mt, y as ht } from "./error-entries-C4OopOce.js";
13
13
  import { n as gt } from "./assertNever-DOTNJ2Y4.js";
14
14
  import { t as _t } from "./react-dom-DdqGVp5N.js";
15
15
  import { t as vt } from "./jsx-runtime-D8btoEHk.js";
@@ -2117,10 +2117,10 @@ async function $i(e, t) {
2117
2117
  }
2118
2118
  let r = Ee(e, t);
2119
2119
  try {
2120
- if (await Oe(e), r ??= Ee(e, t), r === null) throw Error("No notebook is shown");
2120
+ if (await ct(e), r ??= Ee(e, t), r === null) throw Error("No notebook is shown");
2121
2121
  let { notebook_id: i } = await Qi(n);
2122
2122
  if (e.get(Dt) !== n || !Be(e, r) || i !== r.notebook.id) {
2123
- He(e, r);
2123
+ Oe(e, r);
2124
2124
  return;
2125
2125
  }
2126
2126
  let o = e.get(r.notebook.replica.backendAtom);
@@ -2130,7 +2130,7 @@ async function $i(e, t) {
2130
2130
  Ae(e, r, s.data);
2131
2131
  return;
2132
2132
  }
2133
- if (He(e, r), s.status === 403) {
2133
+ if (Oe(e, r), s.status === 403) {
2134
2134
  a.warn("Run refused, connection is read-only", s.problem);
2135
2135
  return;
2136
2136
  }
@@ -2140,7 +2140,7 @@ async function $i(e, t) {
2140
2140
  variant: "danger"
2141
2141
  });
2142
2142
  } catch (t) {
2143
- r !== null && He(e, r), a.error("Failed to run cells", t), m({
2143
+ r !== null && Oe(e, r), a.error("Failed to run cells", t), m({
2144
2144
  title: "Failed to run",
2145
2145
  description: nn(t),
2146
2146
  variant: "danger"
@@ -20812,7 +20812,7 @@ function rf(e) {
20812
20812
  //#endregion
20813
20813
  //#region src/core/codemirror/lsp/utils.ts
20814
20814
  function af(e) {
20815
- return tf.is(e) ? M.get(ct).includes(tf.parse(e)) : !1;
20815
+ return tf.is(e) ? M.get(lt).includes(tf.parse(e)) : !1;
20816
20816
  }
20817
20817
  function of() {
20818
20818
  return M.get(ke)?.rootUri ?? "file:///";
@@ -25679,7 +25679,7 @@ var fv = class {
25679
25679
  function vv(e, t) {
25680
25680
  if (!("method" in t) || t.method !== "window/logMessage") return;
25681
25681
  let n = t.params;
25682
- hf(n) && typeof n.message == "string" && We({ logs: [{
25682
+ hf(n) && typeof n.message == "string" && Ue({ logs: [{
25683
25683
  timestamp: Date.now() / 1e3,
25684
25684
  level: _v.has(n.type) ? "stderr" : "stdout",
25685
25685
  message: n.message,
@@ -26263,7 +26263,7 @@ function Cy(e) {
26263
26263
  }
26264
26264
  function wy(e, t, n) {
26265
26265
  let r = t.map((e) => e.id);
26266
- e(Ge, r.slice(0, n)), e(lt, r.slice(n));
26266
+ e(We, r.slice(0, n)), e(ut, r.slice(n));
26267
26267
  }
26268
26268
  function Ty(e, t, n) {
26269
26269
  let r = Cy(n);
@@ -26272,7 +26272,7 @@ function Ty(e, t, n) {
26272
26272
  i !== null && t(my(e).editAtom, i);
26273
26273
  }
26274
26274
  function Ey(e, t, n, r) {
26275
- let i = e(Xe), a = it(i, n), o = a.visible.indexOf(n);
26275
+ let i = e(Xe), a = at(i, n), o = a.visible.indexOf(n);
26276
26276
  if (o === -1) return !1;
26277
26277
  let s = r(o, a.visible);
26278
26278
  if (s < 0 || s >= a.visible.length || s === o) return !1;
@@ -26281,7 +26281,7 @@ function Ey(e, t, n, r) {
26281
26281
  }
26282
26282
  var Dy = N(null, (e, t, { cellId: n, before: r, direction: i }) => {
26283
26283
  if (i) {
26284
- let r = e(Xe), a = it(r, n), o = r.columns.indexOf(a), s = yy(r), c = i === "left" ? o - 1 : o + 1;
26284
+ let r = e(Xe), a = at(r, n), o = r.columns.indexOf(a), s = yy(r), c = i === "left" ? o - 1 : o + 1;
26285
26285
  if (c < 0 || c >= s.length) return;
26286
26286
  let l = _y(a, n), u = by(s, new Set(l));
26287
26287
  u[c].ids.unshift(...l), Ty(e, t, u), gy(t, n);
@@ -26291,7 +26291,7 @@ function Oy(e, t, { cellId: n, scroll: r = !0 }, i) {
26291
26291
  Ey(e, t, n, (e, t) => i === "top" ? 0 : t.length - 1) && r && gy(t, n);
26292
26292
  }
26293
26293
  var ky = N(null, (e, t, n) => Oy(e, t, n, "top")), Ay = N(null, (e, t, n) => Oy(e, t, n, "bottom")), jy = N(null, (e, t, { cellId: n, overCellId: r }) => {
26294
- let i = e(Xe), a = it(i, n), o = it(i, r);
26294
+ let i = e(Xe), a = at(i, n), o = at(i, r);
26295
26295
  if (a === o) {
26296
26296
  Ey(e, t, n, (e, t) => t.indexOf(r));
26297
26297
  return;
@@ -26299,18 +26299,18 @@ var ky = N(null, (e, t, n) => Oy(e, t, n, "top")), Ay = N(null, (e, t, n) => Oy(
26299
26299
  let s = _y(a, n), c = by(yy(i), new Set(s)), l = c[i.columns.indexOf(o)].ids, u = l.indexOf(r);
26300
26300
  l.splice(u, 0, ...s), Ty(e, t, c);
26301
26301
  }), My = N(null, (e, t, { cellId: n, columnId: r }) => {
26302
- let i = e(Xe), a = qe(i, r);
26302
+ let i = e(Xe), a = Ke(i, r);
26303
26303
  if (a === void 0) return;
26304
- let o = _y(it(i, n), n), s = by(yy(i), new Set(o));
26304
+ let o = _y(at(i, n), n), s = by(yy(i), new Set(o));
26305
26305
  s[i.columns.indexOf(a)].ids.unshift(...o), Ty(e, t, s);
26306
26306
  }), Ny = N(null, (e, t, { cellId: n, columnId: r, index: i }) => {
26307
- let a = e(Xe), o = qe(a, r);
26307
+ let a = e(Xe), o = Ke(a, r);
26308
26308
  if (o === void 0) return;
26309
- let s = it(a, n), c = _y(s, n), l = yy(a), u = s.ids.indexOf(n), d = by(l, new Set(c)), f = d[a.columns.indexOf(o)].ids, p = Math.max(0, Math.min(i, o.ids.length));
26309
+ let s = at(a, n), c = _y(s, n), l = yy(a), u = s.ids.indexOf(n), d = by(l, new Set(c)), f = d[a.columns.indexOf(o)].ids, p = Math.max(0, Math.min(i, o.ids.length));
26310
26310
  s === o && u < p && (p -= c.length), f.splice(Math.max(0, Math.min(p, f.length)), 0, ...c), Ty(e, t, d);
26311
26311
  }), Py = N(null, (e, t, { cellIds: n, targetCellId: r, position: i, previousPlacements: a }) => {
26312
26312
  if (n.length === 0) return;
26313
- let o = e(Xe), s = new Set(n), c = by(yy(o), s), l = c[o.columns.indexOf(it(o, r))].ids, u = l.indexOf(r);
26313
+ let o = e(Xe), s = new Set(n), c = by(yy(o), s), l = c[o.columns.indexOf(at(o, r))].ids, u = l.indexOf(r);
26314
26314
  if (u === -1 ? u = l.length : i === "after" && (u += 1), l.splice(u, 0, ...n), Ty(e, t, c), a && a.length === n.length) {
26315
26315
  let e = {
26316
26316
  type: "move",
@@ -26343,7 +26343,7 @@ var Iy = N(null, (e, t, { columnId: n }) => {
26343
26343
  if (i === -1) return;
26344
26344
  let a = Ne.create(), o = yy(r);
26345
26345
  o.splice(i + 1, 0, {
26346
- id: ot(),
26346
+ id: st(),
26347
26347
  ids: [a]
26348
26348
  });
26349
26349
  let s = hy(e), c = r.columns[i].ids.at(-1), l = Cy(o);
@@ -26355,9 +26355,9 @@ var Iy = N(null, (e, t, { columnId: n }) => {
26355
26355
  }, c === void 0 ? {} : { after: c }), Sy(s, o.slice(0, l))?.(e);
26356
26356
  }), gy(t, a);
26357
26357
  }), Ly = N(null, (e, t, { cellId: n }) => {
26358
- let r = e(Xe), i = it(r, n), a = r.columns.indexOf(i), o = i.ids.indexOf(n);
26358
+ let r = e(Xe), i = at(r, n), a = r.columns.indexOf(i), o = i.ids.indexOf(n);
26359
26359
  if (a === 0 && o === 0) return;
26360
- let s = yy(r), c = ot();
26360
+ let s = yy(r), c = st();
26361
26361
  s.splice(a, 1, {
26362
26362
  id: o === 0 ? c : i.id,
26363
26363
  ids: i.ids.slice(0, o)
@@ -26396,10 +26396,10 @@ var Uy = N(null, (e, t, n = {}) => {
26396
26396
  let o = e(Xe), s = {}, c = null, l;
26397
26397
  if (n.after) l = tt(o, n.after)?.at(-1) ?? n.after, s = { after: l };
26398
26398
  else if (n.before) {
26399
- let e = it(o, n.before), t = o.columns.indexOf(e);
26399
+ let e = at(o, n.before), t = o.columns.indexOf(e);
26400
26400
  s = { before: n.before }, l = e.ids[e.ids.indexOf(n.before) - 1], t > 0 && e.ids[0] === n.before && (c = t);
26401
26401
  } else {
26402
- let e = (n.endOf && qe(o, n.endOf)) ?? o.columns[0], t = e.ids.at(-1);
26402
+ let e = (n.endOf && Ke(o, n.endOf)) ?? o.columns[0], t = e.ids.at(-1);
26403
26403
  t === void 0 ? o.columns.length > 1 && (c = o.columns.indexOf(e)) : (l = t, s = { after: t });
26404
26404
  }
26405
26405
  let u = n.id ?? Ne.create(), d = {
@@ -26447,7 +26447,7 @@ function Jy(e, t) {
26447
26447
  for (let n of t) e.set(Yy, { cellId: n });
26448
26448
  }
26449
26449
  var Yy = N(null, (e, t, { cellId: n }) => {
26450
- let r = Ue(e, n), i = r && {
26450
+ let r = He(e, n), i = r && {
26451
26451
  executionId: r.record.id,
26452
26452
  seq: r.lastSeq ?? -1,
26453
26453
  prompts: new Set([...r.items.values()].filter((e) => e.kind === "input" && e.status === "pending").map((e) => e.id))
@@ -26471,7 +26471,7 @@ var Yy = N(null, (e, t, { cellId: n }) => {
26471
26471
  }, e(Ze).cellIds);
26472
26472
  }), Qy = N(null, (e, t, { cellId: n, before: r, create: i = !0 }) => {
26473
26473
  if (n === "__scratch__") return;
26474
- let { visible: a } = it(e(Xe), n), o = a.indexOf(n), s = r ? o - 1 : o + 1;
26474
+ let { visible: a } = at(e(Xe), n), o = a.indexOf(n), s = r ? o - 1 : o + 1;
26475
26475
  o === -1 || s < 0 || s >= a.length ? i && t(Uy, r ? { before: n } : { after: n }) : $y(e, a[s], r ? "bottom" : "top");
26476
26476
  });
26477
26477
  function $y(e, t, n) {
@@ -26485,7 +26485,7 @@ function $y(e, t, n) {
26485
26485
  });
26486
26486
  }
26487
26487
  var eb = N(null, (e, t, { cellId: n, where: r }) => {
26488
- let { visible: i } = it(e(Xe), n), a = i.indexOf(n);
26488
+ let { visible: i } = at(e(Xe), n), a = i.indexOf(n);
26489
26489
  a !== -1 && $y(e, i[na(a + (r === "before" ? -1 : +(r === "after")), 0, i.length - 1)], r === "after" ? "top" : "bottom");
26490
26490
  }), tb = N(null, (e) => {
26491
26491
  let t = e(Xe).columns[0]?.visible[0];
@@ -26502,15 +26502,15 @@ function rb(e, t) {
26502
26502
  });
26503
26503
  }
26504
26504
  var ib = N(null, (e, t, { cellId: n }) => {
26505
- ut(e(be(n))) && (t($e, (e) => /* @__PURE__ */ new Set([...e, n])), gy(t, n));
26505
+ Je(e(be(n))) && (t($e, (e) => /* @__PURE__ */ new Set([...e, n])), gy(t, n));
26506
26506
  }), ab = N(null, (e, t, { cellId: n }) => {
26507
26507
  rb(t, [n]), gy(t, n);
26508
26508
  }), ob = N(null, (e, t) => {
26509
- t($e, new Set(e(Ze).cellIds.filter((t) => ut(e(be(t))))));
26509
+ t($e, new Set(e(Ze).cellIds.filter((t) => Je(e(be(t))))));
26510
26510
  }), sb = N(null, (e, t) => {
26511
26511
  t($e, /* @__PURE__ */ new Set());
26512
26512
  }), cb = N(null, (e, t, { cellId: n }) => {
26513
- rb(t, Je(e(Xe), n));
26513
+ rb(t, qe(e(Xe), n));
26514
26514
  }), lb = N(null, (e, t, { code: n } = {}) => {
26515
26515
  let { cellIds: r } = e(Ze);
26516
26516
  if (r.includes("setup")) {
@@ -26555,7 +26555,7 @@ var ib = N(null, (e, t, { cellId: n }) => {
26555
26555
  placement: n > 0 ? { after: s[n - 1] } : { before: u },
26556
26556
  serializedEditorState: a
26557
26557
  };
26558
- }), f = c[0].id, p = it(e(Xe), f), m = p.visible.includes(f) ? p.visible : p.ids, h = m.indexOf(f), g = m.slice(0, h).findLast((e) => !l.has(e)) ?? m.slice(h + 1).find((e) => !l.has(e)) ?? null, _ = Qe(r);
26558
+ }), f = c[0].id, p = at(e(Xe), f), m = p.visible.includes(f) ? p.visible : p.ids, h = m.indexOf(f), g = m.slice(0, h).findLast((e) => !l.has(e)) ?? m.slice(h + 1).find((e) => !l.has(e)) ?? null, _ = Qe(r);
26559
26559
  t(my(e).editAtom, (e) => {
26560
26560
  let t = null, n = !1;
26561
26561
  for (let i of s) {
@@ -26689,7 +26689,7 @@ function xb(e, t) {
26689
26689
  blocked: s.blocked,
26690
26690
  getEditorView: o,
26691
26691
  hasOutput: e(Re(t)) !== null,
26692
- hasConsoleOutput: e(Ke(t)).consoleOutputs.length > 0
26692
+ hasConsoleOutput: e(Ge(t)).consoleOutputs.length > 0
26693
26693
  };
26694
26694
  }
26695
26695
  //#endregion
@@ -27377,7 +27377,7 @@ async function hx(e) {
27377
27377
  //#endregion
27378
27378
  //#region src/core/documentation/doc-lookup.ts
27379
27379
  async function gx(e) {
27380
- let t = at().at(0);
27380
+ let t = ot().at(0);
27381
27381
  if (t) try {
27382
27382
  let n = await Ko.request({
27383
27383
  document: e,
@@ -27542,7 +27542,7 @@ var Tx = [], Ex = (e) => {
27542
27542
  bb0: {
27543
27543
  if (i || o) {
27544
27544
  let e;
27545
- t[0] === n ? e = t[1] : (e = st(n), t[0] = n, t[1] = e), s = e;
27545
+ t[0] === n ? e = t[1] : (e = rt(n), t[0] = n, t[1] = e), s = e;
27546
27546
  break bb0;
27547
27547
  }
27548
27548
  s = n;
@@ -28097,7 +28097,7 @@ var wS = {
28097
28097
  }
28098
28098
  };
28099
28099
  function OS(e, t) {
28100
- let n = t.get(rt(e))?.code;
28100
+ let n = t.get(it(e))?.code;
28101
28101
  if (!n || n.trim() === "") return null;
28102
28102
  let [r, i, a] = Fv.sql.transformIn(n), o = t.get(Hh).connectionsMap.get(a.engine);
28103
28103
  return o ? `@${ES}://${o.name}` : null;