@marimo-team/islands 0.25.3-dev266 → 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-C_hj7Poi.js → ConnectedDataExplorerComponent-eLHPh6uu.js} +9 -9
- package/dist/{ErrorBoundary-CvxlC3F1.js → ErrorBoundary-CQYAoD7X.js} +64 -69
- package/dist/{abnfDiagram-VCTEODGH-DzrZZXRD.js → abnfDiagram-VCTEODGH-hqd0IBtX.js} +2 -2
- package/dist/{any-language-editor-CFeWfC3o.js → any-language-editor-DnG26QXh.js} +1 -1
- package/dist/{architectureDiagram-5GKGNRK7-iF_snyFL.js → architectureDiagram-5GKGNRK7-BzLAFcc0.js} +1 -1
- package/dist/{strings-BCKpLFNU.js → assertNever-DIU3JJbt.js} +14 -14
- package/dist/{chat-ui-DFxNgzXF.js → chat-ui-BAnLgpTe.js} +1964 -1740
- package/dist/{chunk-IMKFNOWR-B7xytD4B.js → chunk-IMKFNOWR-DOeVvuyE.js} +1 -1
- package/dist/{chunk-SHT3W25Y-I8ZFP5L1.js → chunk-SHT3W25Y-DZoFI8wR.js} +1 -1
- package/dist/{chunk-SVP7TREG-Di-uAPdT.js → chunk-SVP7TREG-CWu86PSW.js} +1 -1
- package/dist/{chunk-TICWLB2K-BFpUy0ud.js → chunk-TICWLB2K-BrM0GoP3.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-Cqm4JGpx.js → classDiagram-ZZMXUADV-DYi4V2bB.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-DFHRJpN3.js → classDiagram-v2-VYDZK3BY-tN7FIk-m.js} +2 -2
- package/dist/{code-visibility-SRM1JiD_.js → code-visibility-DcZ_RwaH.js} +44 -47
- package/dist/{common-yiRhZ6ZZ.js → common-BGeQilvh.js} +5846 -5519
- 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-cuGOeTBC.js → cynefinDiagram-5FMLGOSQ-D5nCnDc-.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-DJ76aC4k.js → dagre-GXQ25YYZ-BHkd7f_i.js} +1 -1
- package/dist/{data-grid-overlay-editor-DLTzcQ4O.js → data-grid-overlay-editor-Dc4lW4A3.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-DLLc0sw7.js → diagram-S7CK7UJ4-D1ALppT2.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-Tz_d6qmk.js → diagram-UQ7AKVKN-DLv0b83L.js} +1 -1
- package/dist/{diagram-VX7I27RA-D7SzPrDN.js → diagram-VX7I27RA-7XJ7J6qg.js} +1 -1
- package/dist/{diagram-Z3DM3KII-qr37XV58.js → diagram-Z3DM3KII-7M7zbHp_.js} +1 -1
- package/dist/{dialog-BtprQCUw.js → dialog-DzCj1qQv.js} +1 -1
- package/dist/{dropdown-menu-CkJ7ErY6.js → dropdown-menu-CdXE15an.js} +1214 -1208
- package/dist/{ebnfDiagram-PWID7BFC-BKOQb4J0.js → ebnfDiagram-PWID7BFC-DHH1qlmV.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-CM15Vq68.js → erDiagram-RLTQ6QDP-fI_0dGef.js} +1 -1
- package/dist/{error-banner-DbRFOd2O.js → error-banner-DPc9eIw5.js} +3 -3
- package/dist/{error-entries-CMoaUX9V.js → error-entries-CxN-Nq3V.js} +524 -456
- package/dist/{feedback-button-DBUrE4OL.js → feedback-button-BqaeQcvX.js} +77 -77
- package/dist/{flowDiagram-HODETNUW-Dt3N5yFT.js → flowDiagram-HODETNUW-Brg9MA6i.js} +2 -2
- package/dist/{formats-gGospKWJ.js → formats-DbSvAPY-.js} +1 -1
- package/dist/{glide-data-editor-Cfv4HeOh.js → glide-data-editor-CiijPXA7.js} +2042 -2041
- package/dist/{glide-utils-Ba9WD2IN.js → glide-utils-BSw3SSHF.js} +29 -35
- package/dist/{globals-dIbBIR5-.js → globals-CpmSWKI_.js} +2 -2
- package/dist/{html-to-image-D_5CMreP.js → html-to-image-8sywF4my.js} +5452 -5751
- package/dist/{infoDiagram-27XIBGKW-C7axJMCl.js → infoDiagram-27XIBGKW-E9e403YT.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-CdC9Eur7.js → ishikawaDiagram-5VMMS53U-C-RlYDRo.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-BHnMIgD7.js → kanban-definition-UXKFOSKX-CLFl_uqK.js} +1 -1
- package/dist/main.js +6294 -6324
- package/dist/{mermaid-DFYN_PXd.js → mermaid-rd09e1JL.js} +35 -35
- package/dist/{mindmap-definition-YA3MSWOX-BagHoCGU.js → mindmap-definition-YA3MSWOX-BQ8TWtyB.js} +1 -1
- package/dist/{number-overlay-editor-CTiJp5Mj.js → number-overlay-editor-Ft4NiAEN.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-8IIZczip.js → pegDiagram-XKGWAZYB-CN8UHFPi.js} +2 -2
- package/dist/pencil-DcT8AE0h.js +10 -0
- package/dist/{pieDiagram-E7YTZNPT-CE6dKBIr.js → pieDiagram-E7YTZNPT-DGuJ0EBd.js} +1 -1
- package/dist/{process-output-CGFNVC60.js → process-output-Dku5POvm.js} +3 -3
- package/dist/{railroadDiagram-O6MQD6OU-CkexPq3b.js → railroadDiagram-O6MQD6OU-BPDA8wy8.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-B0-OkuAe.js → requirementDiagram-BXWQKSXE-ChzLGbGW.js} +1 -1
- package/dist/{reveal-component-DH09ygHo.js → reveal-component-D0cfwbbl.js} +1094 -1094
- package/dist/{select-C33FVPPN.js → select-OxgozOC8.js} +1 -1
- package/dist/{sequenceDiagram-WJ2MYXX4-Dxysg8DX.js → sequenceDiagram-WJ2MYXX4-DFX-bE6O.js} +1 -1
- package/dist/{spec-DH1lmF7Q.js → spec-oJn0RhpQ.js} +2 -2
- package/dist/{stateDiagram-D77RDMKH-DTEN3-OJ.js → stateDiagram-D77RDMKH-BR7cI3wK.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-vktk3Xc5.js → stateDiagram-v2-MP3YSRHH-oGqB5UDI.js} +2 -2
- package/dist/{static-state-BldGd99T.js → static-state-CuV6Pc3a.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-Cjveh9OM.js → swimlanes-42K2YHIH-DwSZl1yC.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-Bdr7Ev_2.js → swimlanesDiagram-VR7AAH4N-BHlcd-Ri.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-KIuDcefn.js → timeline-definition-24CTP7MA-DMmP-G2O.js} +1 -1
- package/dist/{toast-CY1_Qv41.js → toast-DbBHmxmB.js} +2 -2
- 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-C-lqjV0q.js → vega-component-rxIxAAh9.js} +7 -7
- package/dist/{vennDiagram-4TSXK5OY-DrIOUHfb.js → vennDiagram-4TSXK5OY-Db8GtH1G.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-CJNjf4OH.js → wardleyDiagram-VM6X3IG4-DmIiC3FU.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-DEshFho-.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/chat/__tests__/chat-display.test.tsx +157 -86
- package/src/components/chat/__tests__/chat-utils.test.ts +42 -0
- package/src/components/chat/__tests__/turn-timing.test.ts +84 -0
- package/src/components/chat/__tests__/use-assistant-turn.test.ts +95 -0
- package/src/components/chat/__tests__/user-message.test.tsx +27 -0
- package/src/components/chat/acp/agent-panel.tsx +2 -0
- package/src/components/chat/agent-activity.tsx +132 -0
- package/src/components/chat/chat-display.tsx +125 -96
- package/src/components/chat/chat-panel.tsx +123 -106
- package/src/components/chat/chat-utils.ts +12 -24
- package/src/components/chat/tool-call/__tests__/tool-labels.test.ts +76 -0
- package/src/components/chat/tool-call/__tests__/tool-step.test.tsx +57 -0
- package/src/components/chat/tool-call/shared.ts +6 -0
- package/src/components/chat/tool-call/tool-call-view.tsx +22 -76
- package/src/components/chat/tool-call/tool-labels.ts +172 -0
- package/src/components/chat/tool-call/tool-step.tsx +145 -0
- package/src/components/chat/turn-timing.ts +73 -0
- package/src/components/chat/use-assistant-turn.ts +65 -0
- package/src/components/chat/use-chat-generation.ts +5 -4
- package/src/components/chat/user-message.tsx +145 -0
- 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 +19 -1
- package/src/components/editor/actions/useCellActionButton.tsx +10 -3
- package/src/components/editor/ai/completion-handlers.tsx +0 -37
- 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/StagedAICell.tsx +51 -144
- 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/__tests__/pending-ai-cells.test.tsx +193 -32
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +2 -2
- package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +145 -81
- package/src/components/editor/chrome/wrapper/pending-ai-changes-badge.tsx +25 -0
- package/src/components/editor/chrome/wrapper/sidebar.tsx +8 -4
- package/src/components/editor/header/status.tsx +4 -2
- package/src/components/editor/links/cell-link.tsx +4 -4
- package/src/components/editor/navigation/navigation.ts +3 -2
- package/src/components/editor/notebook-cell.tsx +85 -94
- 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/components/ui/toast.tsx +1 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +74 -126
- package/src/core/ai/staged-cells.ts +48 -38
- 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/scrollCellIntoView.ts +6 -0
- package/src/core/cells/types.ts +13 -36
- package/src/core/cells/utils.ts +37 -68
- package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +59 -0
- package/src/core/codemirror/placeholder/extensions.ts +23 -0
- 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/__tests__/useNotebookSession.hook.test.tsx +34 -0
- package/src/core/session/useNotebookSession.tsx +10 -5
- package/src/core/wasm/bridge.ts +1 -1
- package/src/css/app/Cell.css +7 -36
- package/src/plugins/core/registerReactComponent.tsx +4 -13
- package/src/plugins/impl/chat/chat-ui.tsx +2 -3
- package/src/plugins/impl/common/error-banner.tsx +5 -3
- 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
- package/src/components/chat/reasoning-accordion.tsx +0 -61
- package/src/components/chat/tool-call/tool-activity-group.tsx +0 -49
- package/src/components/chat/tool-call/tool-error-card.tsx +0 -81
- package/src/components/chat/tool-call/tool-history-row.tsx +0 -147
- package/src/components/icons/loading-ellipsis.tsx +0 -46
|
@@ -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-Bdr7Ev_2.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-KIuDcefn.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";
|
|
@@ -405,7 +405,7 @@ var $ = a(), ve = I, ye = S.forwardRef((e, n) => {
|
|
|
405
405
|
ye.displayName = V.displayName;
|
|
406
406
|
var be = {
|
|
407
407
|
default: "bg-background border forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]",
|
|
408
|
-
danger: "group destructive text-
|
|
408
|
+
danger: "group destructive text-(--red-11) border-destructive bg-(--red-1) shadow-md-solid shadow-error forced-colors:border-[CanvasText] forced-colors:bg-[Canvas] forced-colors:text-[CanvasText]"
|
|
409
409
|
}, xe = r("data-[swipe=move]:transition-none group relative pointer-events-auto flex w-full items-start justify-between gap-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x) data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=open]:slide-in-from-top-full sm:data-[state=open]:slide-in-from-bottom-full data-[state=closed]:slide-out-to-right-full forced-color-adjust-none", {
|
|
410
410
|
variants: { variant: be },
|
|
411
411
|
defaultVariants: { variant: "default" }
|
|
@@ -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
|
-
import { n as d } from "./error-banner-
|
|
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
|
+
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { render } from "@testing-library/react";
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";
|
|
5
5
|
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
6
|
-
import { formatElapsedTime, type
|
|
6
|
+
import { formatElapsedTime, type Milliseconds } from "@/utils/time";
|
|
7
7
|
import {
|
|
8
8
|
CellStatusComponent,
|
|
9
9
|
ElapsedTime,
|
|
@@ -76,8 +76,8 @@ describe("CellStatusComponent", () => {
|
|
|
76
76
|
status: "idle" as const,
|
|
77
77
|
interrupted: false,
|
|
78
78
|
elapsedTime: null,
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
startedAt: null,
|
|
80
|
+
blocked: false,
|
|
81
81
|
uninstantiated: false,
|
|
82
82
|
};
|
|
83
83
|
|
|
@@ -95,7 +95,7 @@ describe("CellStatusComponent", () => {
|
|
|
95
95
|
...baseProps,
|
|
96
96
|
disabled: true,
|
|
97
97
|
staleInputs: true,
|
|
98
|
-
|
|
98
|
+
startedAt: 1_704_096_000_000 as Milliseconds, // Jan 1, 2024 12:00:00
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
const { container } = render(
|
|
@@ -110,7 +110,7 @@ describe("CellStatusComponent", () => {
|
|
|
110
110
|
const props = {
|
|
111
111
|
...baseProps,
|
|
112
112
|
disabled: true,
|
|
113
|
-
|
|
113
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
const { container } = render(
|
|
@@ -124,8 +124,8 @@ describe("CellStatusComponent", () => {
|
|
|
124
124
|
test("renders disabled transitively state", () => {
|
|
125
125
|
const props = {
|
|
126
126
|
...baseProps,
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
blocked: true,
|
|
128
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
const { container } = render(
|
|
@@ -139,9 +139,9 @@ describe("CellStatusComponent", () => {
|
|
|
139
139
|
test("renders stale and disabled transitively state", () => {
|
|
140
140
|
const props = {
|
|
141
141
|
...baseProps,
|
|
142
|
-
|
|
142
|
+
blocked: true,
|
|
143
143
|
staleInputs: true,
|
|
144
|
-
|
|
144
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
145
145
|
};
|
|
146
146
|
|
|
147
147
|
const { container } = render(
|
|
@@ -156,8 +156,7 @@ describe("CellStatusComponent", () => {
|
|
|
156
156
|
const props = {
|
|
157
157
|
...baseProps,
|
|
158
158
|
status: "running" as const,
|
|
159
|
-
|
|
160
|
-
lastRunStartTimestamp: 1_704_096_000 as Seconds,
|
|
159
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
161
160
|
};
|
|
162
161
|
|
|
163
162
|
const { container } = render(
|
|
@@ -172,7 +171,7 @@ describe("CellStatusComponent", () => {
|
|
|
172
171
|
const props = {
|
|
173
172
|
...baseProps,
|
|
174
173
|
status: "queued" as const,
|
|
175
|
-
|
|
174
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
176
175
|
};
|
|
177
176
|
|
|
178
177
|
const { container } = render(
|
|
@@ -201,8 +200,8 @@ describe("CellStatusComponent", () => {
|
|
|
201
200
|
const props = {
|
|
202
201
|
...baseProps,
|
|
203
202
|
interrupted: true,
|
|
204
|
-
elapsedTime: 1500,
|
|
205
|
-
|
|
203
|
+
elapsedTime: 1500 as Milliseconds,
|
|
204
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
206
205
|
};
|
|
207
206
|
|
|
208
207
|
const { container } = render(
|
|
@@ -217,8 +216,8 @@ describe("CellStatusComponent", () => {
|
|
|
217
216
|
const props = {
|
|
218
217
|
...baseProps,
|
|
219
218
|
edited: true,
|
|
220
|
-
elapsedTime: 1500,
|
|
221
|
-
|
|
219
|
+
elapsedTime: 1500 as Milliseconds,
|
|
220
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
222
221
|
};
|
|
223
222
|
|
|
224
223
|
const { container } = render(
|
|
@@ -233,8 +232,8 @@ describe("CellStatusComponent", () => {
|
|
|
233
232
|
const props = {
|
|
234
233
|
...baseProps,
|
|
235
234
|
staleInputs: true,
|
|
236
|
-
elapsedTime: 1500,
|
|
237
|
-
|
|
235
|
+
elapsedTime: 1500 as Milliseconds,
|
|
236
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
238
237
|
};
|
|
239
238
|
|
|
240
239
|
const { container } = render(
|
|
@@ -248,8 +247,8 @@ describe("CellStatusComponent", () => {
|
|
|
248
247
|
test("renders completed run with elapsed time", () => {
|
|
249
248
|
const props = {
|
|
250
249
|
...baseProps,
|
|
251
|
-
elapsedTime: 1500,
|
|
252
|
-
|
|
250
|
+
elapsedTime: 1500 as Milliseconds,
|
|
251
|
+
startedAt: 1_704_096_000_000 as Milliseconds,
|
|
253
252
|
};
|
|
254
253
|
|
|
255
254
|
const { container } = render(
|