@marimo-team/islands 0.25.3-dev494 → 0.25.3-dev495

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-BVrZVD9S.js";
3
+ import { a as n } from "./glide-data-editor-7bQDy20u.js";
4
4
  //#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/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",
@@ -3,14 +3,14 @@ import { g as t, h as n, i as r, m as i, t as a } from "./button-qQhINE7z.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-CwQmweEz.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-Dml-NyjK.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-Xvq292Uz.js";
7
7
  import { M as w } from "./select-BcEi9lad.js";
8
8
  import { X as T } from "./dropdown-menu-218IIk7S.js";
9
9
  import { t as E } from "./jsx-runtime-D8btoEHk.js";
10
10
  import { Rt as D, Vt as O, f as k, i as ee } from "./use-restore-focus-DlX1CSiq.js";
11
11
  import { t as A } from "./useEvent-BoN7U38T.js";
12
12
  import { o as te } from "./static-state-CqzVppxA.js";
13
- import { n as ne, t as re } from "./code-visibility-BtY7YxTm.js";
13
+ import { n as ne, t as re } from "./code-visibility-DIz5xy_r.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.25.3-dev494",
3
+ "version": "0.25.3-dev495",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -11,7 +11,7 @@ const snapshot = fixtureEvents("notebook-events.sse");
11
11
  const edits = fixtureEvents("edits.sse");
12
12
 
13
13
  function replay(
14
- events: readonly Protocol.EventOutput[],
14
+ events: readonly Protocol.NotebookStreamEventOutput[],
15
15
  from = reducer.initial,
16
16
  ) {
17
17
  return events.reduce((state, event) => reducer.reduce(state, event), from);
@@ -13,7 +13,7 @@ const inputs = fixtureEvents("inputs.sse");
13
13
  const time = "2026-10-01T09:30:00Z";
14
14
 
15
15
  function replay(
16
- events: readonly Protocol.EventOutput[],
16
+ events: readonly Protocol.NotebookStreamEventOutput[],
17
17
  from = reducer.initial,
18
18
  ) {
19
19
  return events.reduce(reducer.reduce, from);
@@ -23,7 +23,7 @@ const resource = (state: ReturnType<typeof replay>) =>
23
23
  state.resources.executions;
24
24
 
25
25
  /** Build one event as the stream would deliver it. */
26
- const event = (message: unknown) => Protocol.Event.parse(message);
26
+ const event = (message: unknown) => Protocol.NotebookStreamEvent.parse(message);
27
27
 
28
28
  const removed = (kind: string, id: string, cursor: string) =>
29
29
  event({ event: `${kind}.removed`, id: cursor, data: { id, time } });
@@ -96,8 +96,8 @@ export function fixtureMessages(name: string) {
96
96
  }
97
97
 
98
98
  /** Read the protocol's portable examples as decoded protocol events. */
99
- export function fixtureEvents(name: string): Protocol.EventOutput[] {
99
+ export function fixtureEvents(name: string): Protocol.NotebookStreamEventOutput[] {
100
100
  return fixtureMessages(name).map(({ id, ...message }) =>
101
- Protocol.Event.parse(id === undefined ? message : { ...message, id }),
101
+ Protocol.NotebookStreamEvent.parse(id === undefined ? message : { ...message, id }),
102
102
  );
103
103
  }
@@ -12,7 +12,7 @@ const runCells = fixtureEvents("run-cells.sse");
12
12
  const time = "2026-10-01T09:30:00Z";
13
13
 
14
14
  function replay(
15
- events: readonly Protocol.EventOutput[],
15
+ events: readonly Protocol.NotebookStreamEventOutput[],
16
16
  from = reducer.initial,
17
17
  ) {
18
18
  return events.reduce(reducer.reduce, from);
@@ -22,7 +22,7 @@ const resource = (state: ReturnType<typeof replay>) =>
22
22
  state.resources.executions.results;
23
23
 
24
24
  /** Build one event as the stream would deliver it. */
25
- const event = (message: unknown) => Protocol.Event.parse(message);
25
+ const event = (message: unknown) => Protocol.NotebookStreamEvent.parse(message);
26
26
 
27
27
  const removed = (kind: string, id: string, cursor: string) =>
28
28
  event({ event: `${kind}.removed`, id: cursor, data: { id, time } });
@@ -1,7 +1,7 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
3
  import { createNotebookReducer, NotebookEvents } from "@marimo-team/client";
4
- import * as Protocol from "@marimo-team/client/protocol";
4
+ import type * as Protocol from "@marimo-team/client/protocol";
5
5
  import { afterEach, assert, describe, expect, it, vi } from "vitest";
6
6
  import type { NotebookBackend } from "../../notebook/replica";
7
7
  import { document as documentResource } from "../../notebook/replica/resources/document";
@@ -40,11 +40,13 @@ afterEach(async () => {
40
40
  });
41
41
 
42
42
  /** Collect a stream's events up to and including its next `ready`. */
43
- function untilReady(stream: NotebookEvents): Promise<Protocol.EventOutput[]> {
44
- const events: Protocol.EventOutput[] = [];
43
+ function untilReady(
44
+ stream: NotebookEvents,
45
+ ): Promise<Protocol.NotebookStreamEventOutput[]> {
46
+ const events: Protocol.NotebookStreamEventOutput[] = [];
45
47
  return new Promise((resolve, reject) => {
46
48
  stream.subscribe((event) => {
47
- events.push(Protocol.Event.parse(event));
49
+ events.push(event);
48
50
  if (event.event === "ready") {
49
51
  resolve(events);
50
52
  }