@marimo-team/islands 0.26.1-dev20 → 0.26.1-dev25
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-CR9WyiEc.js → ConnectedDataExplorerComponent-jtTaDisw.js} +16 -16
- package/dist/{ErrorBoundary-Cx-CwafE.js → ErrorBoundary-Bs2ehxEI.js} +6 -6
- package/dist/{abnfDiagram-VCTEODGH-DGAbsdXT.js → abnfDiagram-VCTEODGH-cUj3Gnnh.js} +2 -2
- package/dist/{any-language-editor-DzGF1ll-.js → any-language-editor-BHgkY7jY.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-D4DnIo7R.js → architectureDiagram-5GKGNRK7-CIAZgn9d.js} +1 -1
- package/dist/{assertNever-CqwxSD_2.js → assertNever-BHnIohkX.js} +13 -13
- package/dist/{chat-ui-qZdDDrzU.js → chat-ui-DOvIzlMA.js} +46 -46
- package/dist/{check-D9vf6LYF.js → check-LtjuWmNn.js} +1 -1
- package/dist/{chunk-IMKFNOWR-Bc_i6jWx.js → chunk-IMKFNOWR-CB9N3qYR.js} +1 -1
- package/dist/{chunk-SHT3W25Y-CGML5pnF.js → chunk-SHT3W25Y-D9njV7TI.js} +1 -1
- package/dist/{chunk-SVP7TREG-ZpeFKfFT.js → chunk-SVP7TREG-CUCE0BFm.js} +1 -1
- package/dist/{chunk-TICWLB2K-C6cLmcg8.js → chunk-TICWLB2K-iQB6ttkI.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV--q40NTXr.js → classDiagram-ZZMXUADV-BI1VBNIo.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-Dt_Pp94L.js → classDiagram-v2-VYDZK3BY-BYL3asWh.js} +2 -2
- package/dist/{code-visibility-CVfXV6fG.js → code-visibility-BnMkbydx.js} +19 -19
- package/dist/{common-BXRJCkJO.js → common-CQur5dRA.js} +156 -156
- package/dist/{config-B8JCQMby.js → config-DL9e-OWE.js} +3 -3
- package/dist/{copy-icon-BLig0ZKb.js → copy-icon-rYV2znAe.js} +2 -2
- package/dist/{createReducer-BIUQ3TbG.js → createReducer-BdiSrxHu.js} +5 -5
- package/dist/{cynefinDiagram-5FMLGOSQ-2FtF_-cc.js → cynefinDiagram-5FMLGOSQ-DpGtYvnZ.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-Cymu2SPS.js → dagre-GXQ25YYZ-B5GDC2kN.js} +1 -1
- package/dist/{data-grid-overlay-editor-Mbtx3F9C.js → data-grid-overlay-editor-BXEY35Xl.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-OwDa8kAa.js → diagram-S7CK7UJ4-B2T25t1t.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-CzRDwZwd.js → diagram-UQ7AKVKN-Dy3B5L_z.js} +1 -1
- package/dist/{diagram-VX7I27RA-XRIcgMDs.js → diagram-VX7I27RA-tOptWvNh.js} +1 -1
- package/dist/{diagram-Z3DM3KII-DdRDYAs6.js → diagram-Z3DM3KII-DsgZAokO.js} +1 -1
- package/dist/{dialog-DGh2HNAO.js → dialog-vs6x3On9.js} +19 -19
- package/dist/{dropdown-menu-ChH3oiqI.js → dropdown-menu-DYN2RV5d.js} +193 -193
- package/dist/{ebnfDiagram-PWID7BFC-CZMNMGNP.js → ebnfDiagram-PWID7BFC-CGWECzS1.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-ByxHAN4b.js → erDiagram-RLTQ6QDP-CZLi87y3.js} +1 -1
- package/dist/{error-banner-BvRaQnGH.js → error-banner-D-AC7pQx.js} +70 -70
- package/dist/{error-entries-DhI0hGvj.js → error-entries-CncQR572.js} +443 -436
- package/dist/{feedback-button-zx4NcNDn.js → feedback-button-BAOp7zqu.js} +120 -120
- package/dist/{flowDiagram-HODETNUW-BQpzWx5O.js → flowDiagram-HODETNUW-CS86WYbX.js} +2 -2
- package/dist/{formats-BxP8k8Un.js → formats-BUFLQJXY.js} +1 -1
- package/dist/{glide-data-editor-CvezoJKg.js → glide-data-editor-Ce94qTW7.js} +11 -11
- package/dist/{glide-utils-bKdvDwwo.js → glide-utils-CZ-O-CB_.js} +2 -2
- package/dist/{globals-CQuPaxzy.js → globals-Uqg4j5z5.js} +3 -3
- package/dist/{html-to-image-B803aaWE.js → html-to-image-BU7H-AM1.js} +4323 -4318
- package/dist/{infoDiagram-27XIBGKW-C9EWHkak.js → infoDiagram-27XIBGKW-C9JBFfpC.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-D67SGFvp.js → ishikawaDiagram-5VMMS53U-Eh3iuw2D.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-CTMTiazR.js → kanban-definition-UXKFOSKX-DYtuVwYD.js} +1 -1
- package/dist/main.js +401 -400
- package/dist/{mermaid-DE_tvTGF.js → mermaid--k1o49nH.js} +34 -34
- package/dist/{mindmap-definition-YA3MSWOX-LzNgDy8O.js → mindmap-definition-YA3MSWOX-Dn1Cnqys.js} +1 -1
- package/dist/{number-overlay-editor-DxM7vsCk.js → number-overlay-editor-Br_Vp3Ws.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DFMS6feI.js → pegDiagram-XKGWAZYB-DiY7rITR.js} +2 -2
- package/dist/{pencil-CHkdsX07.js → pencil-AWgwbH4D.js} +1 -1
- package/dist/{pieDiagram-E7YTZNPT-C0MSBop-.js → pieDiagram-E7YTZNPT-BL6InbDs.js} +1 -1
- package/dist/{process-output-CnCLfvnL.js → process-output-xJm8T5-E.js} +4 -4
- package/dist/{railroadDiagram-O6MQD6OU-mbdav2pV.js → railroadDiagram-O6MQD6OU-DterenMu.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-C1HNBBO6.js → requirementDiagram-BXWQKSXE-Vb5_9LHC.js} +1 -1
- package/dist/{reveal-component-BefmhjJF.js → reveal-component-B7TgfbYJ.js} +1008 -1008
- package/dist/{select-CvorIE3l.js → select-CKLRKIzB.js} +298 -298
- package/dist/{sequenceDiagram-WJ2MYXX4-D6gBHifq.js → sequenceDiagram-WJ2MYXX4-BWsq8hMt.js} +1 -1
- package/dist/{spec-ayzaXGVq.js → spec-C4uOz0Em.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-Bx-fTtRZ.js → stateDiagram-D77RDMKH-nfKKy6aQ.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-Cec8T2yO.js → stateDiagram-v2-MP3YSRHH-DMUHA_9A.js} +2 -2
- package/dist/{static-state-CqwW3B_X.js → static-state-DZ1nSa6e.js} +9 -9
- package/dist/{swimlanes-42K2YHIH-C2bAgnov.js → swimlanes-42K2YHIH-N4qHIMoc.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-CzeG-Mnb.js → swimlanesDiagram-VR7AAH4N-DQpDDjQb.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-DTJ0Rx8X.js → timeline-definition-24CTP7MA-Od8dY9F5.js} +1 -1
- package/dist/{toast-6V8Og7d5.js → toast-bhZHUEal.js} +187 -187
- package/dist/{tooltip-D0h-ZJ6j.js → tooltip-DSWC_Td_.js} +40 -40
- package/dist/{use-restore-focus-BFvwj2Hj.js → use-restore-focus-ocw7t85i.js} +1371 -1373
- package/dist/{useDateFormatter-D6o9PsWt.js → useDateFormatter-BiDS8uXQ.js} +2 -2
- package/dist/{useDeepCompareMemoize-D-Pbv7dN.js → useDeepCompareMemoize-BsaXfZ8C.js} +1 -1
- package/dist/{useLifecycle-CE0yGTMF.js → useLifecycle-CCV7yZ-v.js} +1 -1
- package/dist/{vega-component-DTf7GHQe.js → vega-component-DpTyTrz3.js} +6 -6
- package/dist/{vennDiagram-4TSXK5OY-lIM3SAjl.js → vennDiagram-4TSXK5OY-Di3T2YMb.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-Bw_t7uvA.js → wardleyDiagram-VM6X3IG4-CKOF5DTi.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-BXwkLYKj.js → xychartDiagram-S5SC5T6Z-GYLPWSeb.js} +1 -1
- package/package.json +1 -1
- package/src/__mocks__/executions.ts +27 -5
- package/src/__tests__/branded.ts +4 -0
- package/src/__tests__/notebook-analysis.ts +48 -0
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +28 -61
- package/src/components/editor/cell/__tests__/useRunCells.test.tsx +2 -2
- package/src/components/editor/navigation/__tests__/navigation.test.ts +0 -4
- package/src/components/tracing/tracing-keyboard.test.tsx +4 -3
- package/src/core/cells/__tests__/add-missing-import.test.ts +14 -9
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +4 -11
- package/src/core/cells/__tests__/runs.test.ts +11 -11
- package/src/core/cells/add-missing-import.ts +2 -3
- package/src/core/cells/runs.ts +6 -4
- package/src/core/cells/session.ts +4 -1
- package/src/core/codemirror/code-lens/__tests__/entities.test.ts +7 -11
- package/src/core/codemirror/code-lens/__tests__/extension.test.ts +8 -13
- package/src/core/codemirror/code-lens/__tests__/perf.test.ts +7 -9
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +9 -13
- package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +16 -35
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +2 -18
- package/src/core/codemirror/reactive-references/__tests__/extension.test.ts +8 -14
- package/src/core/datasets/__tests__/data-source.test.ts +15 -17
- package/src/core/datasets/data-source-connections.ts +8 -11
- package/src/core/datasets/state.ts +7 -12
- package/src/core/executions/__tests__/atoms.test.ts +2 -2
- package/src/core/executions/__tests__/freshness.test.ts +10 -5
- package/src/core/executions/__tests__/interrupt.test.ts +3 -1
- package/src/core/executions/__tests__/output-lifecycle.test.ts +3 -3
- package/src/core/executions/__tests__/output.test.ts +2 -2
- package/src/core/executions/__tests__/run.test.ts +2 -2
- package/src/core/executions/__tests__/select.test.ts +10 -10
- package/src/core/executions/atoms.ts +2 -1
- package/src/core/executions/freshness.ts +2 -2
- package/src/core/islands/bootstrap.ts +0 -2
- package/src/core/notebook/replica/__tests__/executions.test.ts +13 -9
- package/src/core/notebook/replica/__tests__/replica.test.ts +7 -2
- package/src/core/notebook/replica/replica.ts +11 -2
- package/src/core/notebook/replica/resources/executions.ts +29 -20
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +192 -1
- package/src/core/session/useNotebookSession.tsx +37 -37
- package/src/core/storage/__tests__/state.test.ts +6 -9
- package/src/core/storage/state.ts +5 -8
- package/src/core/transports/__tests__/static.test.ts +2 -1
- package/src/core/variables/state.ts +73 -68
- package/src/core/variables/types.ts +2 -2
- package/src/core/wasm/bridge.ts +5 -4
- package/src/core/variables/__tests__/state.test.ts +0 -148
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
import { beforeEach, describe, expect, it } from "vitest";
|
|
3
|
-
import { cellId, variableName } from "@/__tests__/branded";
|
|
4
|
-
import { exportedForTesting } from "../state";
|
|
5
|
-
import type { Variables } from "../types";
|
|
6
|
-
|
|
7
|
-
const { initialState, reducer, createActions } = exportedForTesting;
|
|
8
|
-
|
|
9
|
-
const CellIds = {
|
|
10
|
-
a: cellId("a"),
|
|
11
|
-
b: cellId("b"),
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const Names = {
|
|
15
|
-
x: variableName("x"),
|
|
16
|
-
y: variableName("y"),
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
describe("cell reducer", () => {
|
|
20
|
-
let state: Variables;
|
|
21
|
-
|
|
22
|
-
const actions = createActions((action) => {
|
|
23
|
-
state = reducer(state, action);
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
beforeEach(() => {
|
|
27
|
-
state = initialState();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("should set variables", () => {
|
|
31
|
-
const x = {
|
|
32
|
-
name: Names.x,
|
|
33
|
-
declaredBy: [CellIds.a],
|
|
34
|
-
usedBy: [CellIds.b],
|
|
35
|
-
};
|
|
36
|
-
const variables: Variables = {
|
|
37
|
-
[Names.x]: x,
|
|
38
|
-
};
|
|
39
|
-
actions.setVariables([x]);
|
|
40
|
-
expect(state).toEqual(variables);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it("should clear variables", () => {
|
|
44
|
-
const x = {
|
|
45
|
-
name: Names.x,
|
|
46
|
-
declaredBy: [CellIds.a],
|
|
47
|
-
usedBy: [CellIds.b],
|
|
48
|
-
};
|
|
49
|
-
const variables: Variables = {
|
|
50
|
-
[Names.x]: x,
|
|
51
|
-
};
|
|
52
|
-
actions.setVariables([x]);
|
|
53
|
-
expect(state).toEqual(variables);
|
|
54
|
-
|
|
55
|
-
actions.setVariables([]);
|
|
56
|
-
expect(state).toEqual({});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it("should add variables", () => {
|
|
60
|
-
const x = {
|
|
61
|
-
name: Names.x,
|
|
62
|
-
declaredBy: [CellIds.a],
|
|
63
|
-
usedBy: [CellIds.b],
|
|
64
|
-
};
|
|
65
|
-
const y = {
|
|
66
|
-
name: Names.y,
|
|
67
|
-
declaredBy: [CellIds.a],
|
|
68
|
-
usedBy: [CellIds.b],
|
|
69
|
-
};
|
|
70
|
-
actions.addVariables([x, y]);
|
|
71
|
-
expect(state).toEqual({
|
|
72
|
-
[Names.x]: x,
|
|
73
|
-
[Names.y]: y,
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it("should set metadata", () => {
|
|
78
|
-
const x = {
|
|
79
|
-
name: Names.x,
|
|
80
|
-
declaredBy: [CellIds.a],
|
|
81
|
-
usedBy: [CellIds.b],
|
|
82
|
-
};
|
|
83
|
-
const variables: Variables = {
|
|
84
|
-
[Names.x]: x,
|
|
85
|
-
};
|
|
86
|
-
actions.setVariables([x]);
|
|
87
|
-
expect(state).toEqual(variables);
|
|
88
|
-
|
|
89
|
-
// add metadata
|
|
90
|
-
actions.setMetadata([
|
|
91
|
-
{
|
|
92
|
-
name: Names.x,
|
|
93
|
-
value: "1",
|
|
94
|
-
dataType: "number",
|
|
95
|
-
},
|
|
96
|
-
]);
|
|
97
|
-
expect(state).toEqual({
|
|
98
|
-
[Names.x]: {
|
|
99
|
-
name: Names.x,
|
|
100
|
-
declaredBy: [CellIds.a],
|
|
101
|
-
usedBy: [CellIds.b],
|
|
102
|
-
value: "1",
|
|
103
|
-
dataType: "number",
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
// drop unknown metadata
|
|
108
|
-
actions.setMetadata([
|
|
109
|
-
{
|
|
110
|
-
name: Names.x,
|
|
111
|
-
value: "2",
|
|
112
|
-
dataType: "number",
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
name: Names.y,
|
|
116
|
-
value: "3",
|
|
117
|
-
dataType: "number",
|
|
118
|
-
},
|
|
119
|
-
]);
|
|
120
|
-
expect(state).toEqual({
|
|
121
|
-
[Names.x]: {
|
|
122
|
-
name: Names.x,
|
|
123
|
-
declaredBy: [CellIds.a],
|
|
124
|
-
usedBy: [CellIds.b],
|
|
125
|
-
value: "2",
|
|
126
|
-
dataType: "number",
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
// can re-add variables
|
|
131
|
-
actions.addVariables([
|
|
132
|
-
{
|
|
133
|
-
name: Names.x,
|
|
134
|
-
declaredBy: [CellIds.a],
|
|
135
|
-
usedBy: [],
|
|
136
|
-
},
|
|
137
|
-
]);
|
|
138
|
-
expect(state).toEqual({
|
|
139
|
-
[Names.x]: {
|
|
140
|
-
name: Names.x,
|
|
141
|
-
declaredBy: [CellIds.a],
|
|
142
|
-
usedBy: [],
|
|
143
|
-
value: "2",
|
|
144
|
-
dataType: "number",
|
|
145
|
-
},
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
});
|