@marimo-team/islands 0.26.1-dev43 → 0.26.1-dev46

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.
@@ -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-DdyqdPXc.js";
3
+ import { a as n } from "./glide-data-editor-oQ3lCfvU.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-R7PUQb3h.js";
1
+ import { T as e } from "./html-to-image-BIom70fW.js";
2
2
  import { h as t } from "./tooltip-BQZ-Bm6h.js";
3
- import { Tt as n, wt as r } from "./error-entries-DJXufUac.js";
3
+ import { Tt as n, wt as r } from "./error-entries-8CPw0aYH.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-DfQQ4A9M.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-CXvbAyqO.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-BWkMC88N.js";
13
+ import { n as ne, t as re } from "./code-visibility-DNUnnMY_.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-dev43",
3
+ "version": "0.26.1-dev46",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -31,12 +31,6 @@ const event = (message: unknown) => Protocol.NotebookStreamEvent.parse(message);
31
31
  const removed = (kind: string, id: string, cursor: string) =>
32
32
  event({ event: `${kind}.removed`, id: cursor, data: { id, time } });
33
33
 
34
- /** How the host retires a cell execution: its items first, then itself. */
35
- const retire = (executionId: string, variableId: string) => [
36
- removed("variable", variableId, "111"),
37
- removed("execution", executionId, "112"),
38
- ];
39
-
40
34
  const ids = (holder: Parameters<typeof itemsInOrder>[0]) =>
41
35
  itemsInOrder(holder).map((item) => item.id);
42
36
 
@@ -90,9 +84,13 @@ describe("executions resource", () => {
90
84
  outcome: { kind: "succeeded" },
91
85
  });
92
86
 
93
- const retired = replay(retire("e12", "e12-x"), done);
87
+ const retired = reducer.reduce(done, removed("execution", "e12", "112"));
94
88
  expect(resource(retired).executions.has("e12")).toBe(false);
95
89
  expect(resource(retired).latest.has(C3)).toBe(false);
90
+ expect(resource(retired).variables.has(C3)).toBe(false);
91
+ expect(resource(retired).variables.get(cellId("k7f2"))).toBe(
92
+ resource(done).variables.get(cellId("k7f2")),
93
+ );
96
94
  const queued = reducer.reduce(
97
95
  retired,
98
96
  event({
@@ -202,11 +200,9 @@ describe("executions resource", () => {
202
200
  });
203
201
 
204
202
  it("ignores removals delivered again", () => {
205
- const retired = replay(
206
- retire("e12", "e12-x"),
207
- replay(runCells, replay(snapshot)),
208
- );
209
- const again = replay(retire("e12", "e12-x"), retired);
203
+ const removal = removed("execution", "e12", "112");
204
+ const retired = reducer.reduce(replay(runCells, replay(snapshot)), removal);
205
+ const again = reducer.reduce(retired, removal);
210
206
  expect(again.resources).toBe(retired.resources);
211
207
  });
212
208
 
@@ -31,12 +31,6 @@ const event = (message: unknown) => Protocol.NotebookStreamEvent.parse(message);
31
31
  const removed = (kind: string, id: string, cursor: string) =>
32
32
  event({ event: `${kind}.removed`, id: cursor, data: { id, time } });
33
33
 
34
- /** How the host retires a cell execution: its items first, then itself. */
35
- const retire = (executionId: string, variableId: string) => [
36
- removed("variable", variableId, "111"),
37
- removed("execution", executionId, "112"),
38
- ];
39
-
40
34
  const restored = {
41
35
  id: "e-restored",
42
36
  run_id: null,
@@ -94,7 +88,7 @@ describe("retained results", () => {
94
88
  const done = replay(runCells, replay(snapshot));
95
89
  const result = resource(done).get(C3)!;
96
90
  const superseded = reducer.reduce(
97
- replay(retire("e12", "e12-x"), done),
91
+ reducer.reduce(done, removed("execution", "e12", "112")),
98
92
  event({
99
93
  event: "execution",
100
94
  id: "113",
@@ -125,7 +119,7 @@ describe("retained results", () => {
125
119
  it("keeps a result while the host replaces it", () => {
126
120
  const done = replay(runCells, replay(snapshot));
127
121
  const result = resource(done).get(C3)!;
128
- const retired = replay(retire("e12", "e12-x"), done);
122
+ const retired = reducer.reduce(done, removed("execution", "e12", "112"));
129
123
  expect(resource(retired).get(C3)).toBe(result);
130
124
 
131
125
  const again = {
@@ -179,7 +173,7 @@ describe("retained results", () => {
179
173
  };
180
174
  const cancelled = replay(
181
175
  [
182
- ...retire("e12", "e12-x"),
176
+ removed("execution", "e12", "112"),
183
177
  event({
184
178
  event: "execution",
185
179
  id: "113",
@@ -344,8 +344,6 @@ export const executions: NotebookResource<Executions, Kind> = {
344
344
  execution.outputVersion + (sameShown(execution, next) ? 0 : 1),
345
345
  });
346
346
  },
347
- // The output leaves with its execution, and a retained result keeps its copy.
348
- "output.removed": (state) => state,
349
347
  console: (state, { data }) =>
350
348
  attach(state, { ...data.console, kind: "console", time: data.time }),
351
349
  "console.removed": (state, { data }) => detach(state, data.id),