@marimo-team/islands 0.25.3-dev267 → 0.25.3-dev268
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.
- package/dist/{ConnectedDataExplorerComponent-C4yCN38h.js → ConnectedDataExplorerComponent-eLHPh6uu.js} +8 -8
- package/dist/{ErrorBoundary-CewXPyL5.js → ErrorBoundary-CQYAoD7X.js} +4 -4
- package/dist/{abnfDiagram-VCTEODGH-o6Ay6Q63.js → abnfDiagram-VCTEODGH-hqd0IBtX.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-BhiwwlVg.js → architectureDiagram-5GKGNRK7-BzLAFcc0.js} +1 -1
- package/dist/{strings-BCKpLFNU.js → assertNever-DIU3JJbt.js} +14 -14
- package/dist/{chat-ui-CbgR5ivy.js → chat-ui-BAnLgpTe.js} +17 -17
- package/dist/{chunk-IMKFNOWR-WMSMf4Nj.js → chunk-IMKFNOWR-DOeVvuyE.js} +1 -1
- package/dist/{chunk-SHT3W25Y-BRfADrzD.js → chunk-SHT3W25Y-DZoFI8wR.js} +1 -1
- package/dist/{chunk-SVP7TREG-CuK5QFre.js → chunk-SVP7TREG-CWu86PSW.js} +1 -1
- package/dist/{chunk-TICWLB2K-Bcun_jhJ.js → chunk-TICWLB2K-BrM0GoP3.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-CgWDbUDT.js → classDiagram-ZZMXUADV-DYi4V2bB.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-DYmc9SFU.js → classDiagram-v2-VYDZK3BY-tN7FIk-m.js} +2 -2
- package/dist/{code-visibility-BKBl9Rh6.js → code-visibility-DcZ_RwaH.js} +44 -47
- package/dist/{common-N3Jd_6m9.js → common-BGeQilvh.js} +4866 -4857
- package/dist/{config-CmeG_Pb6.js → config-BsPruWMR.js} +2 -2
- package/dist/{createReducer-C_syF8Td.js → createReducer-DdtT_7ji.js} +1 -1
- package/dist/{cynefinDiagram-5FMLGOSQ-PPKWipjT.js → cynefinDiagram-5FMLGOSQ-D5nCnDc-.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-niRBZh--.js → dagre-GXQ25YYZ-BHkd7f_i.js} +1 -1
- package/dist/{data-grid-overlay-editor-Cp59CrqZ.js → data-grid-overlay-editor-Dc4lW4A3.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-DPiP9rot.js → diagram-S7CK7UJ4-D1ALppT2.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-B0WZuaxV.js → diagram-UQ7AKVKN-DLv0b83L.js} +1 -1
- package/dist/{diagram-VX7I27RA-Rn42WBuN.js → diagram-VX7I27RA-7XJ7J6qg.js} +1 -1
- package/dist/{diagram-Z3DM3KII-BB93--ry.js → diagram-Z3DM3KII-7M7zbHp_.js} +1 -1
- package/dist/{dialog-BtprQCUw.js → dialog-DzCj1qQv.js} +1 -1
- package/dist/{dropdown-menu-BpImEfn3.js → dropdown-menu-CdXE15an.js} +3 -3
- package/dist/{ebnfDiagram-PWID7BFC-V4t5h6mZ.js → ebnfDiagram-PWID7BFC-DHH1qlmV.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-C1MsAKXd.js → erDiagram-RLTQ6QDP-fI_0dGef.js} +1 -1
- package/dist/{error-entries-CJGdD2ky.js → error-entries-CxN-Nq3V.js} +519 -458
- package/dist/{feedback-button-Qc1f9iPq.js → feedback-button-BqaeQcvX.js} +22 -22
- package/dist/{flowDiagram-HODETNUW-DHjeJP96.js → flowDiagram-HODETNUW-Brg9MA6i.js} +2 -2
- package/dist/{formats-gGospKWJ.js → formats-DbSvAPY-.js} +1 -1
- package/dist/{glide-data-editor-hCq3K0sd.js → glide-data-editor-CiijPXA7.js} +11 -11
- package/dist/{glide-utils-DC3sk6EX.js → glide-utils-BSw3SSHF.js} +1 -1
- package/dist/{globals-B2_uMYDY.js → globals-CpmSWKI_.js} +2 -2
- package/dist/{html-to-image-S7spRQCi.js → html-to-image-8sywF4my.js} +5120 -5117
- package/dist/{infoDiagram-27XIBGKW-Dovv6iKx.js → infoDiagram-27XIBGKW-E9e403YT.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-D2nyygsc.js → ishikawaDiagram-5VMMS53U-C-RlYDRo.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-KyVx0uTY.js → kanban-definition-UXKFOSKX-CLFl_uqK.js} +1 -1
- package/dist/main.js +5972 -6003
- package/dist/{mermaid-B-jKSwGt.js → mermaid-rd09e1JL.js} +34 -34
- package/dist/{mindmap-definition-YA3MSWOX-Bz9tKQFl.js → mindmap-definition-YA3MSWOX-BQ8TWtyB.js} +1 -1
- package/dist/{number-overlay-editor-CfNYvbdz.js → number-overlay-editor-Ft4NiAEN.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-C_qpq6Tv.js → pegDiagram-XKGWAZYB-CN8UHFPi.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-Bp9ucgI4.js → pieDiagram-E7YTZNPT-DGuJ0EBd.js} +1 -1
- package/dist/{process-output-f34bkXTm.js → process-output-Dku5POvm.js} +3 -3
- package/dist/{railroadDiagram-O6MQD6OU-tq-VEH6j.js → railroadDiagram-O6MQD6OU-BPDA8wy8.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-DW-vHadb.js → requirementDiagram-BXWQKSXE-ChzLGbGW.js} +1 -1
- package/dist/{reveal-component-CUxv-kkP.js → reveal-component-D0cfwbbl.js} +1094 -1094
- package/dist/{select-C33FVPPN.js → select-OxgozOC8.js} +1 -1
- package/dist/{sequenceDiagram-WJ2MYXX4-Dv9U9qRP.js → sequenceDiagram-WJ2MYXX4-DFX-bE6O.js} +1 -1
- package/dist/{spec-DH1lmF7Q.js → spec-oJn0RhpQ.js} +2 -2
- package/dist/{stateDiagram-D77RDMKH-DTmPQ0EB.js → stateDiagram-D77RDMKH-BR7cI3wK.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-CkCif0Iw.js → stateDiagram-v2-MP3YSRHH-oGqB5UDI.js} +2 -2
- package/dist/{static-state-BldGd99T.js → static-state-CuV6Pc3a.js} +1 -1
- package/dist/{swimlanes-42K2YHIH-21kCq6l8.js → swimlanes-42K2YHIH-DwSZl1yC.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-BpRJP6KU.js → swimlanesDiagram-VR7AAH4N-BHlcd-Ri.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-Ckgh4lS4.js → timeline-definition-24CTP7MA-DMmP-G2O.js} +1 -1
- package/dist/{toast-DpczUryP.js → toast-DbBHmxmB.js} +1 -1
- package/dist/{useAsyncData-DsZMvNXn.js → useAsyncData-BYIAoMqn.js} +1 -1
- package/dist/{useDateFormatter-Dk_xFci4.js → useDateFormatter-ButWkdcK.js} +1 -1
- package/dist/{useDeepCompareMemoize-KMBBux8C.js → useDeepCompareMemoize-Bz0c5GN6.js} +1 -1
- package/dist/{useTheme-BZ2GGLgm.js → useTheme-DPLobSFs.js} +7 -7
- package/dist/{utils-DXkj82sK.js → utils-EBklsC5R.js} +31 -31
- package/dist/{vega-component-CF9kI6C4.js → vega-component-rxIxAAh9.js} +6 -6
- package/dist/{vennDiagram-4TSXK5OY-CDei2Bt3.js → vennDiagram-4TSXK5OY-Db8GtH1G.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-CXavT601.js → wardleyDiagram-VM6X3IG4-DmIiC3FU.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CvJhcZri.js → xychartDiagram-S5SC5T6Z-DS9OPrNq.js} +1 -1
- package/package.json +1 -1
- package/src/__mocks__/executions.ts +195 -0
- package/src/__mocks__/notebook.ts +0 -1
- package/src/__tests__/CellStatus.test.tsx +19 -20
- package/src/components/dependency-graph/minimap-content.tsx +3 -2
- package/src/components/editor/__tests__/data-attributes.test.tsx +0 -7
- package/src/components/editor/__tests__/output-persistence.test.tsx +2 -2
- package/src/components/editor/actions/__tests__/useCellActionButton.test.tsx +1 -0
- package/src/components/editor/actions/useCellActionButton.tsx +7 -3
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +3 -1
- package/src/components/editor/cell/CellStatus.tsx +23 -19
- package/src/components/editor/cell/RunButton.tsx +16 -6
- package/src/components/editor/cell/__tests__/useRunCells.test.ts +45 -0
- package/src/components/editor/cell/cell-context-menu.tsx +4 -1
- package/src/components/editor/cell/code/cell-editor.tsx +7 -5
- package/src/components/editor/cell/collapse.tsx +4 -0
- package/src/components/editor/cell/useRunCells.ts +18 -3
- package/src/components/editor/chrome/wrapper/sidebar.tsx +2 -4
- package/src/components/editor/header/status.tsx +4 -2
- package/src/components/editor/navigation/navigation.ts +3 -2
- package/src/components/editor/notebook-cell.tsx +82 -83
- package/src/components/editor/renderers/grid-layout/__tests__/grid-layout.test.tsx +75 -0
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +22 -16
- package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +0 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +12 -33
- package/src/components/editor/stdin-blocking-alert.tsx +3 -1
- package/src/components/scratchpad/scratchpad.tsx +4 -1
- package/src/components/slides/minimap.tsx +4 -2
- package/src/components/slides/reveal-component.tsx +14 -10
- package/src/components/slides/slide-cell-view.tsx +28 -24
- package/src/components/slides/slide.tsx +3 -4
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +0 -389
- package/src/core/cells/__tests__/cell.test.ts +49 -154
- package/src/core/cells/__tests__/cells.test.ts +18 -127
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +11 -20
- package/src/core/cells/__tests__/utils.test.ts +75 -247
- package/src/core/cells/actions.ts +5 -2
- package/src/core/cells/cell.ts +31 -133
- package/src/core/cells/cells.ts +14 -29
- package/src/core/cells/document.ts +3 -3
- package/src/core/cells/focus.ts +27 -6
- package/src/core/cells/layout.ts +1 -1
- package/src/core/cells/pending-delete-service.ts +5 -7
- package/src/core/cells/types.ts +13 -36
- package/src/core/cells/utils.ts +37 -68
- package/src/core/edit-app.tsx +2 -1
- package/src/core/executions/__tests__/atoms.test.ts +99 -0
- package/src/core/executions/__tests__/select.test.ts +268 -0
- package/src/core/executions/atoms.ts +206 -0
- package/src/core/executions/hooks.ts +31 -0
- package/src/core/executions/index.ts +31 -0
- package/src/core/executions/select.ts +175 -0
- package/src/core/export/__tests__/hooks.test.ts +0 -5
- package/src/core/islands/bootstrap.ts +4 -1
- package/src/core/islands/components/output-wrapper.tsx +5 -5
- package/src/core/kernel/handlers.ts +2 -11
- package/src/core/kernel/state.ts +0 -15
- package/src/core/lifecycle/render-policy.ts +12 -26
- package/src/core/network/__tests__/requests-lazy.test.ts +5 -5
- package/src/core/network/requests-lazy.ts +3 -3
- package/src/core/notebook/operations.ts +1 -1
- package/src/core/run-app.tsx +2 -1
- package/src/core/runtime/__tests__/adapter.test.ts +3 -3
- package/src/core/runtime/adapter.ts +4 -4
- package/src/core/session/useNotebookSession.tsx +3 -3
- package/src/core/wasm/bridge.ts +1 -1
- package/src/plugins/core/registerReactComponent.tsx +4 -13
- package/src/stories/cell-status.stories.tsx +17 -10
- package/src/stories/cell.stories.tsx +0 -31
- package/src/stories/layout/vertical/one-column.stories.tsx +0 -9
- package/src/utils/time.ts +10 -0
|
@@ -4,7 +4,7 @@ import { t as o } from "./react-sHtZdjeP.js";
|
|
|
4
4
|
import { t as s } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { c, h as l, l as u, p as d, s as f, u as p } from "./tooltip-BfcDQd2j.js";
|
|
6
6
|
import { t as m } from "./check-gUSZbRsl.js";
|
|
7
|
-
import { a as h, s as g } from "./
|
|
7
|
+
import { a as h, s as g } from "./assertNever-DIU3JJbt.js";
|
|
8
8
|
import { t as _ } from "./react-dom-DUmH0GXv.js";
|
|
9
9
|
import { t as v } from "./jsx-runtime-3BD1kT0s.js";
|
|
10
10
|
import { A as y, C as b, D as x, F as S, I as C, M as w, N as T, P as E, S as ee, a as D, c as O, j as k, k as A, o as j, v as te, x as ne, y as re } from "./use-restore-focus-CmflVLWJ.js";
|
|
@@ -3,7 +3,7 @@ import { n, t as r } from "./src-CA_m4ONl.js";
|
|
|
3
3
|
import { n as i } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { A as a, F as o, G as s, H as c, K as l, O as u, U as d, a as f, b as p, c as m, i as h, r as g, s as _, v, w as y, x as b, y as x, z as S } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
5
|
import { t as C } from "./dist-DUAh96QY.js";
|
|
6
|
-
import { a as w, i as T } from "./mermaid-
|
|
6
|
+
import { a as w, i as T } from "./mermaid-rd09e1JL.js";
|
|
7
7
|
import { a as E, c as D, i as O, n as k, r as A, s as j } from "./chunk-F27PBJKO-ufseIn5y.js";
|
|
8
8
|
import { t as M } from "./chunk-2Q5K7J3B-BMkUkeuy.js";
|
|
9
9
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WJ2MYXX4.mjs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-BfcDQd2j.js";
|
|
2
2
|
import { o as t } from "./useLifecycle-JjxCC7Vu.js";
|
|
3
|
-
import { i as n, o as r } from "./useDateFormatter-
|
|
4
|
-
import { i } from "./
|
|
3
|
+
import { i as n, o as r } from "./useDateFormatter-ButWkdcK.js";
|
|
4
|
+
import { n as i } from "./assertNever-DIU3JJbt.js";
|
|
5
5
|
var a = e("align-center-vertical", [
|
|
6
6
|
["path", {
|
|
7
7
|
d: "M12 2v20",
|
|
@@ -12,11 +12,11 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
|
12
12
|
import "./chunk-GVQU2GXP-Cwbt-lF0.js";
|
|
13
13
|
import "./chunk-L3NEJ4N5-n-zgIVSy.js";
|
|
14
14
|
import "./chunk-OSK3NFVY-DXa-Cxbn.js";
|
|
15
|
-
import "./mermaid-
|
|
15
|
+
import "./mermaid-rd09e1JL.js";
|
|
16
16
|
import "./chunk-F27PBJKO-ufseIn5y.js";
|
|
17
17
|
import "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
18
18
|
import "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
19
|
-
import { i as f, n as p, t as m } from "./chunk-IMKFNOWR-
|
|
19
|
+
import { i as f, n as p, t as m } from "./chunk-IMKFNOWR-DOeVvuyE.js";
|
|
20
20
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-D77RDMKH.mjs
|
|
21
21
|
var h = /* @__PURE__ */ s((e) => e.append("circle").attr("class", "start-state").attr("r", d().state.sizeUnit).attr("cx", d().state.padding + d().state.sizeUnit).attr("cy", d().state.padding + d().state.sizeUnit), "drawStartState"), g = /* @__PURE__ */ s((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", d().state.textHeight).attr("class", "divider").attr("x2", d().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), _ = /* @__PURE__ */ s((e, t) => {
|
|
22
22
|
let n = e.append("text").attr("x", 2 * d().state.padding).attr("y", d().state.textHeight + 2 * d().state.padding).attr("font-size", d().state.fontSize).attr("class", "state-title").text(t.id), r = n.node().getBBox();
|
|
@@ -9,11 +9,11 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-Cwbt-lF0.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-n-zgIVSy.js";
|
|
11
11
|
import "./chunk-OSK3NFVY-DXa-Cxbn.js";
|
|
12
|
-
import "./mermaid-
|
|
12
|
+
import "./mermaid-rd09e1JL.js";
|
|
13
13
|
import "./chunk-F27PBJKO-ufseIn5y.js";
|
|
14
14
|
import "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
15
15
|
import "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
16
|
-
import { i as t, n, r, t as i } from "./chunk-IMKFNOWR-
|
|
16
|
+
import { i as t, n, r, t as i } from "./chunk-IMKFNOWR-DOeVvuyE.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-MP3YSRHH.mjs
|
|
18
18
|
var a = {
|
|
19
19
|
parser: n,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./compiler-runtime-CldRdSsv.js";
|
|
2
|
-
import { i as t,
|
|
2
|
+
import { i as t, o as n, t as r, w as i, x as a } from "./utils-EBklsC5R.js";
|
|
3
3
|
import { t as o } from "./invariant-DLmrl-hA.js";
|
|
4
4
|
//#region src/core/wasm/utils.ts
|
|
5
5
|
function s() {
|
|
@@ -9,7 +9,7 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-Cwbt-lF0.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-n-zgIVSy.js";
|
|
11
11
|
import { o as n } from "./chunk-OSK3NFVY-DXa-Cxbn.js";
|
|
12
|
-
import { c as r } from "./mermaid-
|
|
12
|
+
import { c as r } from "./mermaid-rd09e1JL.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanes-42K2YHIH.mjs
|
|
14
14
|
var i = 5, a = 1e-5, o = 1e-6;
|
|
15
15
|
function s(e) {
|
package/dist/{swimlanesDiagram-VR7AAH4N-BpRJP6KU.js → swimlanesDiagram-VR7AAH4N-BHlcd-Ri.js}
RENAMED
|
@@ -9,11 +9,11 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-Cwbt-lF0.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-n-zgIVSy.js";
|
|
11
11
|
import "./chunk-OSK3NFVY-DXa-Cxbn.js";
|
|
12
|
-
import "./mermaid-
|
|
12
|
+
import "./mermaid-rd09e1JL.js";
|
|
13
13
|
import "./chunk-F27PBJKO-ufseIn5y.js";
|
|
14
14
|
import "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
15
15
|
import "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
16
|
-
import { r as t, t as n } from "./chunk-SHT3W25Y-
|
|
16
|
+
import { r as t, t as n } from "./chunk-SHT3W25Y-DZoFI8wR.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-VR7AAH4N.mjs
|
|
18
18
|
var r = n({
|
|
19
19
|
defaultLayout: "swimlane",
|
package/dist/{timeline-definition-24CTP7MA-Ckgh4lS4.js → timeline-definition-24CTP7MA-DMmP-G2O.js}
RENAMED
|
@@ -3,7 +3,7 @@ import { p as t } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
3
3
|
import { n, t as r } from "./src-CA_m4ONl.js";
|
|
4
4
|
import { n as i, t as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
5
5
|
import { $ as o, J as s, a as c, b as l, et as u, nt as d, o as f, x as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
6
|
-
import { p as m } from "./mermaid-
|
|
6
|
+
import { p as m } from "./mermaid-rd09e1JL.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-24CTP7MA.mjs
|
|
8
8
|
var h = (function() {
|
|
9
9
|
var e = /* @__PURE__ */ i(function(e, t, n, r) {
|
|
@@ -3,7 +3,7 @@ import { h as t, p as n, s as r } from "./button-0-RqY1DW.js";
|
|
|
3
3
|
import { t as i } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as a } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { m as o } from "./tooltip-BfcDQd2j.js";
|
|
6
|
-
import { a as s, s as c } from "./
|
|
6
|
+
import { a as s, s as c } from "./assertNever-DIU3JJbt.js";
|
|
7
7
|
import { t as l } from "./react-dom-DUmH0GXv.js";
|
|
8
8
|
import { t as u } from "./jsx-runtime-3BD1kT0s.js";
|
|
9
9
|
import { D as d, F as f, I as p, L as m, M as h, N as g, O as _, P as v, S as y, j as b, k as x } from "./use-restore-focus-CmflVLWJ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
3
|
import { t as n } from "./compiler-runtime-CldRdSsv.js";
|
|
4
|
-
import { D as r } from "./utils-
|
|
4
|
+
import { D as r } from "./utils-EBklsC5R.js";
|
|
5
5
|
import { t as i } from "./invariant-DLmrl-hA.js";
|
|
6
6
|
//#region src/hooks/useAsyncData.ts
|
|
7
7
|
var a = n(), o = /* @__PURE__ */ e(t(), 1), s = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
3
|
import { h as n } from "./tooltip-BfcDQd2j.js";
|
|
4
|
-
import { C as r } from "./select-
|
|
4
|
+
import { C as r } from "./select-OxgozOC8.js";
|
|
5
5
|
var i = n("chart-pie", [["path", {
|
|
6
6
|
d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
|
|
7
7
|
key: "pzmjnu"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
-
import {
|
|
3
|
+
import { l as n } from "./utils-EBklsC5R.js";
|
|
4
4
|
//#region src/hooks/useDeepCompareMemoize.ts
|
|
5
5
|
var r = /* @__PURE__ */ e(t(), 1);
|
|
6
6
|
function i(e) {
|
|
@@ -2,7 +2,7 @@ import { g as e, i as t, o as n } from "./button-0-RqY1DW.js";
|
|
|
2
2
|
import { t as r } from "./compiler-runtime-CldRdSsv.js";
|
|
3
3
|
import { m as i } from "./isArrayLikeObject-B-HXCsex.js";
|
|
4
4
|
import { a, i as o, n as s, r as ee, s as te, t as ne } from "./_baseSet-BfI5FjBM.js";
|
|
5
|
-
import { S as re, _ as ie, f as c, i as l, l as u,
|
|
5
|
+
import { S as re, _ as ie, f as c, i as l, l as u, o as d, t as ae, w as f, x as p } from "./utils-EBklsC5R.js";
|
|
6
6
|
import { C as m, F as h, I as g, M as _, N as v, R as y, S as b, k as x, v as S } from "./schemas-CdscWNy_.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/mergeWith.js
|
|
8
8
|
var oe = te(function(e, t, n, r) {
|
|
@@ -250,7 +250,7 @@ function K() {
|
|
|
250
250
|
return e[0] !== t || e[1] !== n ? (r = [t, n], e[0] = t, e[1] = n, e[2] = r) : r = e[2], r;
|
|
251
251
|
}
|
|
252
252
|
function ce() {
|
|
253
|
-
return
|
|
253
|
+
return d.get(V);
|
|
254
254
|
}
|
|
255
255
|
f((e) => q(e(V)));
|
|
256
256
|
var le = f((e) => J(e(V))), ue = f((e) => fe(e(V)));
|
|
@@ -265,7 +265,7 @@ function J(e) {
|
|
|
265
265
|
function fe(e) {
|
|
266
266
|
return q(e) && J(e);
|
|
267
267
|
}
|
|
268
|
-
var pe = f({}), me = ie(f((e) => e(
|
|
268
|
+
var pe = f({}), me = ie(f((e) => e(c)?.revision.app_config ?? e(pe)), (e) => e, u), he = f((e) => I(e(me)));
|
|
269
269
|
f((e) => e(he).width), f((e) => {
|
|
270
270
|
let t = e(V), n = t.snippets?.custom_paths ?? [], r = t.snippets?.include_default_snippets;
|
|
271
271
|
return n.length > 0 || r === !0;
|
|
@@ -299,8 +299,8 @@ var Y = f((e) => {
|
|
|
299
299
|
function ve() {
|
|
300
300
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
301
301
|
let e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
302
|
-
|
|
303
|
-
|
|
302
|
+
d.set(X, e.matches), e.addEventListener("change", (e) => {
|
|
303
|
+
d.set(X, e.matches);
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
ve();
|
|
@@ -315,7 +315,7 @@ var Q = f(Z());
|
|
|
315
315
|
function ye() {
|
|
316
316
|
let e = new MutationObserver(() => {
|
|
317
317
|
let e = Z();
|
|
318
|
-
|
|
318
|
+
d.set(Q, e);
|
|
319
319
|
});
|
|
320
320
|
return e.observe(document.body, {
|
|
321
321
|
attributes: !0,
|
|
@@ -331,7 +331,7 @@ var $ = f((e) => {
|
|
|
331
331
|
});
|
|
332
332
|
function be() {
|
|
333
333
|
let e = (0, w.c)(3), t;
|
|
334
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = { store:
|
|
334
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = { store: d }, e[0] = t) : t = e[0];
|
|
335
335
|
let n = p($, t), r;
|
|
336
336
|
return e[1] === n ? r = e[2] : (r = { theme: n }, e[1] = n, e[2] = r), r;
|
|
337
337
|
}
|
|
@@ -698,29 +698,37 @@ function Oe(e, t, n = De, r) {
|
|
|
698
698
|
});
|
|
699
699
|
}
|
|
700
700
|
//#endregion
|
|
701
|
-
//#region
|
|
702
|
-
var
|
|
703
|
-
|
|
704
|
-
|
|
701
|
+
//#region src/core/session/active-notebook.ts
|
|
702
|
+
var Z = R(null), ke = R(null);
|
|
703
|
+
R((e) => {
|
|
704
|
+
let t = e(Z);
|
|
705
|
+
return t === null ? null : e(t.backendAtom);
|
|
706
|
+
});
|
|
707
|
+
var Ae = R((e) => {
|
|
708
|
+
let t = e(Z);
|
|
709
|
+
return t === null ? null : e(t.documentAtom);
|
|
710
|
+
}), je = r(), Me = Object.prototype.hasOwnProperty;
|
|
711
|
+
function Ne(e, t, n) {
|
|
712
|
+
for (n of e.keys()) if (Q(n, t)) return n;
|
|
705
713
|
}
|
|
706
|
-
function
|
|
714
|
+
function Q(e, t) {
|
|
707
715
|
var n, r, i;
|
|
708
716
|
if (e === t) return !0;
|
|
709
717
|
if (e && t && (n = e.constructor) === t.constructor) {
|
|
710
718
|
if (n === Date) return e.getTime() === t.getTime();
|
|
711
719
|
if (n === RegExp) return e.toString() === t.toString();
|
|
712
720
|
if (n === Array) {
|
|
713
|
-
if ((r = e.length) === t.length) for (; r-- &&
|
|
721
|
+
if ((r = e.length) === t.length) for (; r-- && Q(e[r], t[r]););
|
|
714
722
|
return r === -1;
|
|
715
723
|
}
|
|
716
724
|
if (n === Set) {
|
|
717
725
|
if (e.size !== t.size) return !1;
|
|
718
|
-
for (r of e) if (i = r, i && typeof i == "object" && (i =
|
|
726
|
+
for (r of e) if (i = r, i && typeof i == "object" && (i = Ne(t, i), !i) || !t.has(i)) return !1;
|
|
719
727
|
return !0;
|
|
720
728
|
}
|
|
721
729
|
if (n === Map) {
|
|
722
730
|
if (e.size !== t.size) return !1;
|
|
723
|
-
for (r of e) if (i = r[0], i && typeof i == "object" && (i =
|
|
731
|
+
for (r of e) if (i = r[0], i && typeof i == "object" && (i = Ne(t, i), !i) || !Q(r[1], t.get(i))) return !1;
|
|
724
732
|
return !0;
|
|
725
733
|
}
|
|
726
734
|
if (n === ArrayBuffer) e = new Uint8Array(e), t = new Uint8Array(t);
|
|
@@ -733,7 +741,7 @@ function Z(e, t) {
|
|
|
733
741
|
return r === -1;
|
|
734
742
|
}
|
|
735
743
|
if (!n || typeof e == "object") {
|
|
736
|
-
for (n in r = 0, e) if (
|
|
744
|
+
for (n in r = 0, e) if (Me.call(e, n) && ++r && !Me.call(t, n) || !(n in t) || !Q(e[n], t[n])) return !1;
|
|
737
745
|
return Object.keys(t).length === r;
|
|
738
746
|
}
|
|
739
747
|
}
|
|
@@ -741,17 +749,17 @@ function Z(e, t) {
|
|
|
741
749
|
}
|
|
742
750
|
//#endregion
|
|
743
751
|
//#region src/core/state/jotai.ts
|
|
744
|
-
var
|
|
745
|
-
async function
|
|
746
|
-
return t(
|
|
747
|
-
let r =
|
|
748
|
-
let i =
|
|
752
|
+
var $ = z();
|
|
753
|
+
async function Pe(e, t) {
|
|
754
|
+
return t($.get(e)) ? $.get(e) : new Promise((n) => {
|
|
755
|
+
let r = $.sub(e, () => {
|
|
756
|
+
let i = $.get(e);
|
|
749
757
|
t(i) && (r(), n(i));
|
|
750
758
|
});
|
|
751
759
|
});
|
|
752
760
|
}
|
|
753
|
-
function
|
|
754
|
-
let n = (0,
|
|
761
|
+
function Fe(e, t) {
|
|
762
|
+
let n = (0, je.c)(5), r = V(), a, o;
|
|
755
763
|
n[0] !== e || n[1] !== t || n[2] !== r ? (a = () => {
|
|
756
764
|
let n = r.get(e);
|
|
757
765
|
return r.sub(e, () => {
|
|
@@ -764,25 +772,17 @@ function Ne(e, t) {
|
|
|
764
772
|
r
|
|
765
773
|
], n[0] = e, n[1] = t, n[2] = r, n[3] = a, n[4] = o) : (a = n[3], o = n[4]), (0, i.useEffect)(a, o);
|
|
766
774
|
}
|
|
767
|
-
var
|
|
768
|
-
function
|
|
769
|
-
let n =
|
|
775
|
+
var Ie = Symbol("sentinel");
|
|
776
|
+
function Le(e, t = Q) {
|
|
777
|
+
let n = Ie;
|
|
770
778
|
return R((r) => {
|
|
771
779
|
let i = r(e);
|
|
772
|
-
return (n ===
|
|
780
|
+
return (n === Ie || !t(n, i)) && (n = i), n;
|
|
773
781
|
});
|
|
774
782
|
}
|
|
775
783
|
//#endregion
|
|
776
|
-
//#region src/core/
|
|
777
|
-
var
|
|
778
|
-
R((e) => {
|
|
779
|
-
let t = e($);
|
|
780
|
-
return t === null ? null : e(t.backendAtom);
|
|
781
|
-
});
|
|
782
|
-
var Le = R((e) => {
|
|
783
|
-
let t = e($);
|
|
784
|
-
return t === null ? null : e(t.documentAtom);
|
|
785
|
-
}), Re = {
|
|
784
|
+
//#region src/core/constants.ts
|
|
785
|
+
var Re = {
|
|
786
786
|
githubPage: "https://github.com/marimo-team/marimo",
|
|
787
787
|
releasesPage: "https://github.com/marimo-team/marimo/releases",
|
|
788
788
|
issuesPage: "https://github.com/marimo-team/marimo/issues",
|
|
@@ -810,4 +810,4 @@ function Ve() {
|
|
|
810
810
|
return !0;
|
|
811
811
|
}
|
|
812
812
|
//#endregion
|
|
813
|
-
export { V as C, o as D, c as E, q as S, z as T, ye as _,
|
|
813
|
+
export { V as C, o as D, c as E, q as S, z as T, ye as _, Le as a, pe as b, Pe as c, Z as d, Ae as f, Ee as g, Oe as h, ze as i, Q as l, he as m, Be as n, $ as o, ge as p, Re as r, Fe as s, Ve as t, ke as u, we as v, R as w, K as x, de as y };
|
|
@@ -3,21 +3,21 @@ import { a as t, g as n, h as r, m as i } from "./button-0-RqY1DW.js";
|
|
|
3
3
|
import { t as a } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as o } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { t as s } from "./tooltip-BfcDQd2j.js";
|
|
6
|
-
import { l as c, t as l } from "./config-
|
|
6
|
+
import { l as c, t as l } from "./config-BsPruWMR.js";
|
|
7
7
|
import { t as u } from "./jsx-runtime-3BD1kT0s.js";
|
|
8
8
|
import { n as d } from "./error-banner-DPc9eIw5.js";
|
|
9
9
|
import { t as f } from "./debounce-DrhhziJv.js";
|
|
10
|
-
import { n as p } from "./useTheme-
|
|
11
|
-
import { D as ee } from "./utils-
|
|
10
|
+
import { n as p } from "./useTheme-DPLobSFs.js";
|
|
11
|
+
import { D as ee } from "./utils-EBklsC5R.js";
|
|
12
12
|
import { t as te } from "./objects-DCmMvZtn.js";
|
|
13
|
-
import { a as ne, i as re, n as ie, t as m } from "./formats-
|
|
13
|
+
import { a as ne, i as re, n as ie, t as m } from "./formats-DbSvAPY-.js";
|
|
14
14
|
import { a as h, t as g } from "./arrays-DoQ-AILx.js";
|
|
15
|
-
import { t as ae } from "./useAsyncData-
|
|
15
|
+
import { t as ae } from "./useAsyncData-BYIAoMqn.js";
|
|
16
16
|
import { t as _ } from "./semaphore-89jsoHtS.js";
|
|
17
17
|
import { D as oe, n as se } from "./vega-loader.browser-B9Pz0EGP.js";
|
|
18
18
|
import { t as ce } from "./react-vega-C4T9Rb_w.js";
|
|
19
19
|
import { a as le, n as v } from "./loader-BVEtQ4F3.js";
|
|
20
|
-
import { t as ue } from "./useDeepCompareMemoize-
|
|
20
|
+
import { t as ue } from "./useDeepCompareMemoize-Bz0c5GN6.js";
|
|
21
21
|
import { t as de } from "./use-vega-container-remeasure-Bz4PZMtt.js";
|
|
22
22
|
//#region src/plugins/impl/vega/fix-relative-url.ts
|
|
23
23
|
var fe = /* @__PURE__ */ e(a(), 1), pe = o();
|
|
@@ -3,7 +3,7 @@ import { t } from "./src-CA_m4ONl.js";
|
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
5
|
import { t as _ } from "./rough.esm-CtV9AnV1.js";
|
|
6
|
-
import { p as v } from "./mermaid-
|
|
6
|
+
import { p as v } from "./mermaid-rd09e1JL.js";
|
|
7
7
|
//#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
|
|
8
8
|
var y = (e, t) => p(e, "a", -t), b = 1e-10;
|
|
9
9
|
function x(e, t) {
|
|
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
2
2
|
import { n as t } from "./src-CA_m4ONl.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
4
4
|
import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
5
|
-
import { p as m } from "./mermaid-
|
|
5
|
+
import { p as m } from "./mermaid-rd09e1JL.js";
|
|
6
6
|
import { n as h } from "./mermaid-parser.core-DxuSfYwJ.js";
|
|
7
7
|
import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
|
|
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
|
9
9
|
import { D as c, H as l, K as u, U as d, a as f, b as p, c as m, f as h, v as g, w as _, y as v, z as y } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
10
10
|
import "./chunk-PWAF6VOD-CQw5qATZ.js";
|
|
11
11
|
import { t as b } from "./chunk-GMAD6QVW-BhaJx0X3.js";
|
|
12
|
-
import { p as x } from "./mermaid-
|
|
12
|
+
import { p as x } from "./mermaid-rd09e1JL.js";
|
|
13
13
|
//#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
|
|
14
14
|
function S() {
|
|
15
15
|
var e = t().unknown(void 0), r = e.domain, i = e.range, o = 0, s = 1, c, l, u = !1, d = 0, f = 0, p = .5;
|
package/package.json
CHANGED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
/** Executions as the host would report them, for tests that read cell status. */
|
|
4
|
+
|
|
5
|
+
import type * as Protocol from "@marimo-team/client/protocol";
|
|
6
|
+
import { atom, type createStore } from "jotai";
|
|
7
|
+
import type { CellExecutionInputs } from "@/core/executions";
|
|
8
|
+
import {
|
|
9
|
+
ConnectionState,
|
|
10
|
+
type ConnectionStatus,
|
|
11
|
+
type Execution,
|
|
12
|
+
type Executions,
|
|
13
|
+
type NotebookReplica,
|
|
14
|
+
type Results,
|
|
15
|
+
} from "@/core/notebook/replica";
|
|
16
|
+
import { activeNotebookReplicaAtom } from "@/core/session/active-notebook";
|
|
17
|
+
|
|
18
|
+
type Store = ReturnType<typeof createStore>;
|
|
19
|
+
|
|
20
|
+
const T0 = "2026-10-01T09:20:11Z";
|
|
21
|
+
const T1 = "2026-10-01T09:20:12.500Z";
|
|
22
|
+
|
|
23
|
+
let sequence = 0;
|
|
24
|
+
|
|
25
|
+
function completed(
|
|
26
|
+
cellId: string,
|
|
27
|
+
overrides: Partial<Protocol.Execution> = {},
|
|
28
|
+
): Protocol.Execution {
|
|
29
|
+
sequence += 1;
|
|
30
|
+
return {
|
|
31
|
+
id: `e${sequence}`,
|
|
32
|
+
run_id: "run-1",
|
|
33
|
+
runtime_id: "r1",
|
|
34
|
+
caused_by: null,
|
|
35
|
+
cell_id: cellId,
|
|
36
|
+
code: null,
|
|
37
|
+
code_fingerprint: "0f71456db2ea83f4",
|
|
38
|
+
depends_on: {},
|
|
39
|
+
status: "completed",
|
|
40
|
+
outcome: { kind: "value", display: null },
|
|
41
|
+
started_at: T0,
|
|
42
|
+
completed_at: T1,
|
|
43
|
+
...overrides,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function mirror(records: Protocol.Execution[]): Executions {
|
|
48
|
+
const executions = new Map<Protocol.ExecutionId, Execution>();
|
|
49
|
+
const latest = new Map<Protocol.CellId, Protocol.ExecutionId>();
|
|
50
|
+
for (const record of records) {
|
|
51
|
+
if (record.cell_id !== null) {
|
|
52
|
+
// The host retains one execution per cell on the stream.
|
|
53
|
+
const previous = latest.get(record.cell_id);
|
|
54
|
+
if (previous !== undefined) {
|
|
55
|
+
executions.delete(previous);
|
|
56
|
+
}
|
|
57
|
+
latest.set(record.cell_id, record.id);
|
|
58
|
+
}
|
|
59
|
+
executions.set(record.id, {
|
|
60
|
+
record,
|
|
61
|
+
items: new Map(),
|
|
62
|
+
variables: new Map(),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return { runs: new Map(), executions, latest };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function results(records: Protocol.Execution[]): Results {
|
|
69
|
+
const results = new Map<Protocol.CellId, Protocol.Execution>();
|
|
70
|
+
for (const record of records) {
|
|
71
|
+
if (record.cell_id !== null && record.status === "completed") {
|
|
72
|
+
results.set(record.cell_id, record);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return results;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const MockExecutions = {
|
|
79
|
+
T0,
|
|
80
|
+
T1,
|
|
81
|
+
completed,
|
|
82
|
+
|
|
83
|
+
/** A completed execution that took `elapsedMs`. */
|
|
84
|
+
took(cellId: string, elapsedMs: number): Protocol.Execution {
|
|
85
|
+
return completed(cellId, {
|
|
86
|
+
completed_at: new Date(Date.parse(T0) + elapsedMs).toISOString(),
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
errored(cellId: string): Protocol.Execution {
|
|
91
|
+
return completed(cellId, {
|
|
92
|
+
outcome: {
|
|
93
|
+
kind: "error",
|
|
94
|
+
error: {
|
|
95
|
+
kind: "exception",
|
|
96
|
+
message: "boom",
|
|
97
|
+
name: "ValueError",
|
|
98
|
+
traceback: null,
|
|
99
|
+
source: "marimo",
|
|
100
|
+
severity: "error",
|
|
101
|
+
range: null,
|
|
102
|
+
related: [],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
interrupted(cellId: string): Protocol.Execution {
|
|
109
|
+
return completed(cellId, { outcome: { kind: "interrupted" } });
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
skipped(cellId: string): Protocol.Execution {
|
|
113
|
+
return completed(cellId, {
|
|
114
|
+
outcome: {
|
|
115
|
+
kind: "skipped",
|
|
116
|
+
reason: "ancestor-stopped",
|
|
117
|
+
message: "",
|
|
118
|
+
related: [],
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
running(cellId: string): Protocol.Execution {
|
|
124
|
+
return completed(cellId, {
|
|
125
|
+
status: "running",
|
|
126
|
+
outcome: null,
|
|
127
|
+
completed_at: null,
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
queued(cellId: string): Protocol.Execution {
|
|
132
|
+
return completed(cellId, {
|
|
133
|
+
status: "queued",
|
|
134
|
+
outcome: null,
|
|
135
|
+
started_at: null,
|
|
136
|
+
completed_at: null,
|
|
137
|
+
});
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
runtime(status: Protocol.RuntimeStatus): Protocol.Runtime {
|
|
141
|
+
return {
|
|
142
|
+
id: "r1",
|
|
143
|
+
notebook_id: "n1",
|
|
144
|
+
status,
|
|
145
|
+
message: null,
|
|
146
|
+
marimo_version: null,
|
|
147
|
+
started_at: T0,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
/** What the selectors read, with `latest` and the results derived from `records`. */
|
|
152
|
+
inputs(
|
|
153
|
+
records: Protocol.Execution[],
|
|
154
|
+
extra: Partial<Pick<CellExecutionInputs, "submissions" | "blocked">> = {},
|
|
155
|
+
): CellExecutionInputs {
|
|
156
|
+
return {
|
|
157
|
+
executions: mirror(records),
|
|
158
|
+
results: results(records),
|
|
159
|
+
submissions: new Map(),
|
|
160
|
+
blocked: new Set(),
|
|
161
|
+
...extra,
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
/** Make the store's active replica report `records` and `runtime`. */
|
|
166
|
+
seed(
|
|
167
|
+
store: Store,
|
|
168
|
+
records: Protocol.Execution[],
|
|
169
|
+
runtime: Protocol.Runtime | null = null,
|
|
170
|
+
) {
|
|
171
|
+
const current = store.get(activeNotebookReplicaAtom);
|
|
172
|
+
const replica = {
|
|
173
|
+
connectionAtom: atom<ConnectionStatus>({ state: ConnectionState.OPEN }),
|
|
174
|
+
documentAtom: atom(null),
|
|
175
|
+
backendAtom: atom(null),
|
|
176
|
+
attachmentsAtom: atom([]),
|
|
177
|
+
connect: () => () => undefined,
|
|
178
|
+
reconnect: () => Promise.resolve(),
|
|
179
|
+
...current,
|
|
180
|
+
notebookAtom: atom<Protocol.Notebook>({
|
|
181
|
+
id: "n1",
|
|
182
|
+
project_id: "p1",
|
|
183
|
+
path: null,
|
|
184
|
+
name: "Notebook",
|
|
185
|
+
operations: [],
|
|
186
|
+
updated_at: null,
|
|
187
|
+
}),
|
|
188
|
+
runtimeAtom: atom(runtime),
|
|
189
|
+
executionsAtom: atom(mirror(records)),
|
|
190
|
+
resultsAtom: atom(results(records)),
|
|
191
|
+
} satisfies NotebookReplica;
|
|
192
|
+
store.set(activeNotebookReplicaAtom, replica);
|
|
193
|
+
return replica;
|
|
194
|
+
},
|
|
195
|
+
};
|