@marimo-team/islands 0.24.3-dev44 → 0.24.3-dev46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ErrorBoundary-B8zFTxbg.js → ErrorBoundary-Ed3R74Le.js} +1 -1
- package/dist/{code-visibility-DJMykDiZ.js → code-visibility-BrmZa3GL.js} +1 -1
- package/dist/{common-DwuXIXKo.js → common-CdyYKtGI.js} +1 -1
- package/dist/{data-grid-overlay-editor-CBeFm3ij.js → data-grid-overlay-editor-COSkNOTX.js} +1 -1
- package/dist/{feedback-button-pHrRIOGJ.js → feedback-button-lx_Q96s6.js} +2 -2
- package/dist/{glide-data-editor-WDFK7XBG.js → glide-data-editor-DnLRltP6.js} +3 -3
- package/dist/{globals-D2J_5491.js → globals-CMUaLxbY.js} +1 -1
- package/dist/main.js +6 -6
- package/dist/{number-overlay-editor-DJkc-jq6.js → number-overlay-editor-DdltDX81.js} +1 -1
- package/dist/{reveal-component-DhxGQ6gA.js → reveal-component-BWQjL85X.js} +2 -2
- package/package.json +1 -1
- package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +98 -98
- package/src/components/editor/connections/database/__tests__/as-code.test.ts +11 -5
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +259 -259
- package/src/core/cells/__tests__/cells.test.ts +37 -37
|
@@ -797,7 +797,7 @@ describe("cell reducer", () => {
|
|
|
797
797
|
expect(cell.status).toBe("idle");
|
|
798
798
|
expect(cell.lastCodeRun).toBe(null);
|
|
799
799
|
expect(cell.edited).toBe(false);
|
|
800
|
-
expect(cell).toMatchSnapshot();
|
|
800
|
+
expect(cell).toMatchSnapshot("initial state");
|
|
801
801
|
|
|
802
802
|
// Update code
|
|
803
803
|
actions.updateCellCode({
|
|
@@ -809,7 +809,7 @@ describe("cell reducer", () => {
|
|
|
809
809
|
expect(cell.status).toBe("idle");
|
|
810
810
|
expect(cell.lastCodeRun).toBe(null);
|
|
811
811
|
expect(cell.edited).toBe(true);
|
|
812
|
-
expect(cell).toMatchSnapshot();
|
|
812
|
+
expect(cell).toMatchSnapshot("code edited");
|
|
813
813
|
|
|
814
814
|
// Prepare for run
|
|
815
815
|
actions.prepareForRun({
|
|
@@ -819,7 +819,7 @@ describe("cell reducer", () => {
|
|
|
819
819
|
expect(cell.status).toBe("queued");
|
|
820
820
|
expect(cell.lastCodeRun).toBe("import marimo as mo");
|
|
821
821
|
expect(cell.edited).toBe(false);
|
|
822
|
-
expect(cell).toMatchSnapshot();
|
|
822
|
+
expect(cell).toMatchSnapshot("prepared for run");
|
|
823
823
|
|
|
824
824
|
// Receive queued messages
|
|
825
825
|
actions.handleCellMessage({
|
|
@@ -837,7 +837,7 @@ describe("cell reducer", () => {
|
|
|
837
837
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
838
838
|
expect(cell.runStartTimestamp).toBe(null);
|
|
839
839
|
expect(cell.lastRunStartTimestamp).toBe(null);
|
|
840
|
-
expect(cell).toMatchSnapshot();
|
|
840
|
+
expect(cell).toMatchSnapshot("queued message received");
|
|
841
841
|
|
|
842
842
|
// Receive running messages
|
|
843
843
|
actions.handleCellMessage({
|
|
@@ -855,7 +855,7 @@ describe("cell reducer", () => {
|
|
|
855
855
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
856
856
|
expect(cell.runStartTimestamp).toBe(20);
|
|
857
857
|
expect(cell.lastRunStartTimestamp).toBe(20);
|
|
858
|
-
expect(cell).toMatchSnapshot();
|
|
858
|
+
expect(cell).toMatchSnapshot("running message received");
|
|
859
859
|
|
|
860
860
|
// Console messages shouldn't transition status
|
|
861
861
|
actions.handleCellMessage({
|
|
@@ -877,7 +877,7 @@ describe("cell reducer", () => {
|
|
|
877
877
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
878
878
|
expect(cell.runStartTimestamp).toBe(20);
|
|
879
879
|
expect(cell.lastRunStartTimestamp).toBe(20);
|
|
880
|
-
expect(cell).toMatchSnapshot();
|
|
880
|
+
expect(cell).toMatchSnapshot("console message received");
|
|
881
881
|
|
|
882
882
|
// Receive output messages
|
|
883
883
|
actions.handleCellMessage({
|
|
@@ -904,7 +904,7 @@ describe("cell reducer", () => {
|
|
|
904
904
|
expect(cell.runElapsedTimeMs).toBe(13_000);
|
|
905
905
|
expect(cell.runStartTimestamp).toBe(null);
|
|
906
906
|
expect(cell.lastRunStartTimestamp).toBe(20);
|
|
907
|
-
expect(cell).toMatchSnapshot();
|
|
907
|
+
expect(cell).toMatchSnapshot("output received");
|
|
908
908
|
|
|
909
909
|
// EDITING BACK AND FORTH
|
|
910
910
|
/////////////////
|
|
@@ -917,7 +917,7 @@ describe("cell reducer", () => {
|
|
|
917
917
|
cell = cells[0];
|
|
918
918
|
expect(cell.status).toBe("idle");
|
|
919
919
|
expect(cell.edited).toBe(true);
|
|
920
|
-
expect(cell).toMatchSnapshot();
|
|
920
|
+
expect(cell).toMatchSnapshot("code edited again");
|
|
921
921
|
|
|
922
922
|
// Update code should be unedited
|
|
923
923
|
actions.updateCellCode({
|
|
@@ -927,7 +927,7 @@ describe("cell reducer", () => {
|
|
|
927
927
|
});
|
|
928
928
|
cell = cells[0];
|
|
929
929
|
expect(cell.edited).toBe(false);
|
|
930
|
-
expect(cell).toMatchSnapshot();
|
|
930
|
+
expect(cell).toMatchSnapshot("code reverted");
|
|
931
931
|
|
|
932
932
|
// Update code should be edited again
|
|
933
933
|
actions.updateCellCode({
|
|
@@ -939,7 +939,7 @@ describe("cell reducer", () => {
|
|
|
939
939
|
expect(cell.status).toBe("idle");
|
|
940
940
|
expect(cell.lastCodeRun).toBe("import marimo as mo");
|
|
941
941
|
expect(cell.edited).toBe(true);
|
|
942
|
-
expect(cell).toMatchSnapshot(
|
|
942
|
+
expect(cell).toMatchSnapshot("code changed after revert");
|
|
943
943
|
|
|
944
944
|
// ERROR RESPONSE
|
|
945
945
|
/////////////////
|
|
@@ -994,7 +994,7 @@ describe("cell reducer", () => {
|
|
|
994
994
|
expect(cell.edited).toBe(false);
|
|
995
995
|
expect(cell.runElapsedTimeMs).toBe(11_000);
|
|
996
996
|
expect(cell.runStartTimestamp).toBe(null);
|
|
997
|
-
expect(cell).toMatchSnapshot();
|
|
997
|
+
expect(cell).toMatchSnapshot("error response received");
|
|
998
998
|
|
|
999
999
|
// INTERRUPT RESPONSE
|
|
1000
1000
|
/////////////////
|
|
@@ -1046,7 +1046,7 @@ describe("cell reducer", () => {
|
|
|
1046
1046
|
expect(cell.edited).toBe(false);
|
|
1047
1047
|
expect(cell.runElapsedTimeMs).toBe(11_000);
|
|
1048
1048
|
expect(cell.runStartTimestamp).toBe(null);
|
|
1049
|
-
expect(cell).toMatchSnapshot();
|
|
1049
|
+
expect(cell).toMatchSnapshot("interruption response received");
|
|
1050
1050
|
});
|
|
1051
1051
|
|
|
1052
1052
|
it("errors reset status to idle", () => {
|
|
@@ -1055,7 +1055,7 @@ describe("cell reducer", () => {
|
|
|
1055
1055
|
expect(cell.status).toBe("idle");
|
|
1056
1056
|
expect(cell.lastCodeRun).toBe(null);
|
|
1057
1057
|
expect(cell.edited).toBe(false);
|
|
1058
|
-
expect(cell).toMatchSnapshot();
|
|
1058
|
+
expect(cell).toMatchSnapshot("initial state");
|
|
1059
1059
|
|
|
1060
1060
|
// Update code
|
|
1061
1061
|
actions.updateCellCode({
|
|
@@ -1067,7 +1067,7 @@ describe("cell reducer", () => {
|
|
|
1067
1067
|
expect(cell.status).toBe("idle");
|
|
1068
1068
|
expect(cell.lastCodeRun).toBe(null);
|
|
1069
1069
|
expect(cell.edited).toBe(true);
|
|
1070
|
-
expect(cell).toMatchSnapshot();
|
|
1070
|
+
expect(cell).toMatchSnapshot("code edited");
|
|
1071
1071
|
|
|
1072
1072
|
// Prepare for run
|
|
1073
1073
|
actions.prepareForRun({
|
|
@@ -1077,7 +1077,7 @@ describe("cell reducer", () => {
|
|
|
1077
1077
|
expect(cell.status).toBe("queued");
|
|
1078
1078
|
expect(cell.lastCodeRun).toBe("import marimo as mo");
|
|
1079
1079
|
expect(cell.edited).toBe(false);
|
|
1080
|
-
expect(cell).toMatchSnapshot();
|
|
1080
|
+
expect(cell).toMatchSnapshot("prepared for run");
|
|
1081
1081
|
|
|
1082
1082
|
// ERROR RESPONSE
|
|
1083
1083
|
//
|
|
@@ -1109,7 +1109,7 @@ describe("cell reducer", () => {
|
|
|
1109
1109
|
expect(cell.edited).toBe(false);
|
|
1110
1110
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
1111
1111
|
expect(cell.runStartTimestamp).toBe(null);
|
|
1112
|
-
expect(cell).toMatchSnapshot();
|
|
1112
|
+
expect(cell).toMatchSnapshot("error response received");
|
|
1113
1113
|
});
|
|
1114
1114
|
|
|
1115
1115
|
it("can run a stale cell", () => {
|
|
@@ -1152,7 +1152,7 @@ describe("cell reducer", () => {
|
|
|
1152
1152
|
expect(cell.edited).toBe(false);
|
|
1153
1153
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
1154
1154
|
expect(cell.runStartTimestamp).toBe(null);
|
|
1155
|
-
expect(cell).toMatchSnapshot();
|
|
1155
|
+
expect(cell).toMatchSnapshot("queued message received");
|
|
1156
1156
|
|
|
1157
1157
|
// Receive stale message
|
|
1158
1158
|
actions.handleCellMessage({
|
|
@@ -1169,7 +1169,7 @@ describe("cell reducer", () => {
|
|
|
1169
1169
|
expect(cell.edited).toBe(false);
|
|
1170
1170
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
1171
1171
|
expect(cell.runStartTimestamp).toBe(null);
|
|
1172
|
-
expect(cell).toMatchSnapshot();
|
|
1172
|
+
expect(cell).toMatchSnapshot("stale inputs received");
|
|
1173
1173
|
});
|
|
1174
1174
|
|
|
1175
1175
|
it("can format code and update cell", () => {
|
|
@@ -1281,7 +1281,7 @@ describe("cell reducer", () => {
|
|
|
1281
1281
|
expect(cell.edited).toBe(false);
|
|
1282
1282
|
expect(cell.runElapsedTimeMs).toBe(null);
|
|
1283
1283
|
expect(cell.runStartTimestamp).toBe(null);
|
|
1284
|
-
expect(cell).toMatchSnapshot();
|
|
1284
|
+
expect(cell).toMatchSnapshot("queued message received");
|
|
1285
1285
|
|
|
1286
1286
|
// Receive idle message
|
|
1287
1287
|
actions.handleCellMessage({
|
|
@@ -1293,7 +1293,7 @@ describe("cell reducer", () => {
|
|
|
1293
1293
|
timestamp: new Date(20).getTime() as Seconds,
|
|
1294
1294
|
});
|
|
1295
1295
|
cell = cells[0];
|
|
1296
|
-
expect(cell).toMatchSnapshot();
|
|
1296
|
+
expect(cell).toMatchSnapshot("idle message received");
|
|
1297
1297
|
|
|
1298
1298
|
// Receive stop output
|
|
1299
1299
|
actions.handleCellMessage({
|
|
@@ -1322,7 +1322,7 @@ describe("cell reducer", () => {
|
|
|
1322
1322
|
"This cell wasn't run because an ancestor was stopped with `mo.stop`: ",
|
|
1323
1323
|
);
|
|
1324
1324
|
expect(cell.stopped).toBe(true);
|
|
1325
|
-
expect(cell).toMatchSnapshot();
|
|
1325
|
+
expect(cell).toMatchSnapshot("ancestor stopped");
|
|
1326
1326
|
|
|
1327
1327
|
// Receive queued message
|
|
1328
1328
|
actions.handleCellMessage({
|
|
@@ -1336,7 +1336,7 @@ describe("cell reducer", () => {
|
|
|
1336
1336
|
cell = cells[0];
|
|
1337
1337
|
expect(cell.status).toBe("queued");
|
|
1338
1338
|
expect(cell.stopped).toBe(true);
|
|
1339
|
-
expect(cell).toMatchSnapshot();
|
|
1339
|
+
expect(cell).toMatchSnapshot("queued after stop");
|
|
1340
1340
|
|
|
1341
1341
|
// Receive running message
|
|
1342
1342
|
actions.handleCellMessage({
|
|
@@ -1351,7 +1351,7 @@ describe("cell reducer", () => {
|
|
|
1351
1351
|
expect(cell.status).toBe("running");
|
|
1352
1352
|
expect(cell.stopped).toBe(false);
|
|
1353
1353
|
expect(cell.output).toBe(null);
|
|
1354
|
-
expect(cell).toMatchSnapshot();
|
|
1354
|
+
expect(cell).toMatchSnapshot("running after stop");
|
|
1355
1355
|
});
|
|
1356
1356
|
|
|
1357
1357
|
it("can initialize stdin", () => {
|
|
@@ -1378,7 +1378,7 @@ describe("cell reducer", () => {
|
|
|
1378
1378
|
let cell = cells[0];
|
|
1379
1379
|
expect(cell.status).toBe("idle");
|
|
1380
1380
|
expect(cell.consoleOutputs).toEqual([]);
|
|
1381
|
-
expect(cell).toMatchSnapshot();
|
|
1381
|
+
expect(cell).toMatchSnapshot("initial state");
|
|
1382
1382
|
|
|
1383
1383
|
// Prepare for run
|
|
1384
1384
|
actions.prepareForRun({
|
|
@@ -1387,7 +1387,7 @@ describe("cell reducer", () => {
|
|
|
1387
1387
|
cell = cells[0];
|
|
1388
1388
|
expect(cell.status).toBe("queued");
|
|
1389
1389
|
expect(cell.consoleOutputs).toEqual([]);
|
|
1390
|
-
expect(cell).toMatchSnapshot();
|
|
1390
|
+
expect(cell).toMatchSnapshot("prepared for run");
|
|
1391
1391
|
|
|
1392
1392
|
// Receive queued messages
|
|
1393
1393
|
actions.handleCellMessage({
|
|
@@ -1400,7 +1400,7 @@ describe("cell reducer", () => {
|
|
|
1400
1400
|
});
|
|
1401
1401
|
cell = cells[0];
|
|
1402
1402
|
expect(cell.status).toBe("queued");
|
|
1403
|
-
expect(cell).toMatchSnapshot();
|
|
1403
|
+
expect(cell).toMatchSnapshot("queued message received");
|
|
1404
1404
|
|
|
1405
1405
|
// Receive running messages
|
|
1406
1406
|
actions.handleCellMessage({
|
|
@@ -1413,7 +1413,7 @@ describe("cell reducer", () => {
|
|
|
1413
1413
|
});
|
|
1414
1414
|
cell = cells[0];
|
|
1415
1415
|
expect(cell.status).toBe("running");
|
|
1416
|
-
expect(cell).toMatchSnapshot();
|
|
1416
|
+
expect(cell).toMatchSnapshot("running message received");
|
|
1417
1417
|
|
|
1418
1418
|
// Add console
|
|
1419
1419
|
actions.handleCellMessage({
|
|
@@ -1426,12 +1426,12 @@ describe("cell reducer", () => {
|
|
|
1426
1426
|
});
|
|
1427
1427
|
cell = cells[0];
|
|
1428
1428
|
expect(cell.status).toBe("running");
|
|
1429
|
-
expect(cell).toMatchSnapshot();
|
|
1429
|
+
expect(cell).toMatchSnapshot("stdout received");
|
|
1430
1430
|
|
|
1431
1431
|
cell = cells[0];
|
|
1432
1432
|
expect(cell.consoleOutputs[0]).toMatchObject(STDOUT);
|
|
1433
1433
|
expect(cell.status).toBe("running");
|
|
1434
|
-
expect(cell).toMatchSnapshot();
|
|
1434
|
+
expect(cell).toMatchSnapshot("stdout verified");
|
|
1435
1435
|
|
|
1436
1436
|
// Ask via stdin
|
|
1437
1437
|
actions.handleCellMessage({
|
|
@@ -1446,7 +1446,7 @@ describe("cell reducer", () => {
|
|
|
1446
1446
|
expect(cell.consoleOutputs[0]).toMatchObject(STDOUT);
|
|
1447
1447
|
expect(cell.consoleOutputs[1]).toMatchObject(STD_IN_1);
|
|
1448
1448
|
expect(cell.status).toBe("running");
|
|
1449
|
-
expect(cell).toMatchSnapshot();
|
|
1449
|
+
expect(cell).toMatchSnapshot("stdin requested");
|
|
1450
1450
|
|
|
1451
1451
|
// Response to stdin
|
|
1452
1452
|
actions.setStdinResponse({
|
|
@@ -1460,7 +1460,7 @@ describe("cell reducer", () => {
|
|
|
1460
1460
|
response: "Marimo!",
|
|
1461
1461
|
});
|
|
1462
1462
|
expect(cell.status).toBe("running");
|
|
1463
|
-
expect(cell).toMatchSnapshot();
|
|
1463
|
+
expect(cell).toMatchSnapshot("stdin answered");
|
|
1464
1464
|
|
|
1465
1465
|
// Ask via stdin, again
|
|
1466
1466
|
actions.handleCellMessage({
|
|
@@ -1478,7 +1478,7 @@ describe("cell reducer", () => {
|
|
|
1478
1478
|
STD_IN_2,
|
|
1479
1479
|
]);
|
|
1480
1480
|
expect(cell.status).toBe("running");
|
|
1481
|
-
expect(cell).toMatchSnapshot();
|
|
1481
|
+
expect(cell).toMatchSnapshot("second stdin requested");
|
|
1482
1482
|
|
|
1483
1483
|
// Interrupt, so we respond with ""
|
|
1484
1484
|
actions.handleCellMessage({
|
|
@@ -1562,7 +1562,7 @@ describe("cell reducer", () => {
|
|
|
1562
1562
|
let cell = cells[0];
|
|
1563
1563
|
expect(cell.status).toBe("idle");
|
|
1564
1564
|
expect(cell.consoleOutputs).toEqual([]);
|
|
1565
|
-
expect(cell).toMatchSnapshot();
|
|
1565
|
+
expect(cell).toMatchSnapshot("initial state");
|
|
1566
1566
|
|
|
1567
1567
|
// Add console
|
|
1568
1568
|
actions.handleCellMessage({
|
|
@@ -1581,7 +1581,7 @@ describe("cell reducer", () => {
|
|
|
1581
1581
|
cell = cells[0];
|
|
1582
1582
|
expect(cell.status).toBe("queued");
|
|
1583
1583
|
expect(cell.consoleOutputs).toMatchObject([OLD_STDOUT]); // Old stays there until it starts running
|
|
1584
|
-
expect(cell).toMatchSnapshot();
|
|
1584
|
+
expect(cell).toMatchSnapshot("prepared for run");
|
|
1585
1585
|
|
|
1586
1586
|
// Receive queued messages
|
|
1587
1587
|
actions.handleCellMessage({
|
|
@@ -1595,7 +1595,7 @@ describe("cell reducer", () => {
|
|
|
1595
1595
|
cell = cells[0];
|
|
1596
1596
|
expect(cell.status).toBe("queued");
|
|
1597
1597
|
expect(cell.consoleOutputs).toMatchObject([OLD_STDOUT]); // Old stays there until it starts running
|
|
1598
|
-
expect(cell).toMatchSnapshot();
|
|
1598
|
+
expect(cell).toMatchSnapshot("queued message received");
|
|
1599
1599
|
|
|
1600
1600
|
// Receive running messages
|
|
1601
1601
|
actions.handleCellMessage({
|
|
@@ -1609,7 +1609,7 @@ describe("cell reducer", () => {
|
|
|
1609
1609
|
cell = cells[0];
|
|
1610
1610
|
expect(cell.status).toBe("running");
|
|
1611
1611
|
expect(cell.consoleOutputs).toMatchObject([]);
|
|
1612
|
-
expect(cell).toMatchSnapshot(
|
|
1612
|
+
expect(cell).toMatchSnapshot("console cleared while running");
|
|
1613
1613
|
|
|
1614
1614
|
// Add console
|
|
1615
1615
|
actions.handleCellMessage({
|
|
@@ -1623,7 +1623,7 @@ describe("cell reducer", () => {
|
|
|
1623
1623
|
cell = cells[0];
|
|
1624
1624
|
expect(cell.consoleOutputs).toMatchObject([STDOUT]);
|
|
1625
1625
|
expect(cell.status).toBe("idle");
|
|
1626
|
-
expect(cell).toMatchSnapshot(
|
|
1626
|
+
expect(cell).toMatchSnapshot("console received while idle");
|
|
1627
1627
|
});
|
|
1628
1628
|
|
|
1629
1629
|
it("can send a cell to the top", () => {
|