@marimo-team/islands 0.23.9-dev17 → 0.23.9-dev19
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/{code-visibility-Bx9sVDMN.js → code-visibility-BF06tHE4.js} +1 -1
- package/dist/main.js +2 -2
- package/dist/{reveal-component-2Yl05c4Y.js → reveal-component-CpgdCN8f.js} +1 -1
- package/package.json +1 -1
- package/src/core/cells/__tests__/actions.test.ts +48 -0
- package/src/core/cells/actions.ts +5 -6
|
@@ -34996,7 +34996,7 @@ ${d}`,
|
|
|
34996
34996
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
34997
34997
|
}
|
|
34998
34998
|
}
|
|
34999
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.9-
|
|
34999
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.9-dev19");
|
|
35000
35000
|
showCodeInRunModeAtom = atom(true);
|
|
35001
35001
|
atom(null);
|
|
35002
35002
|
var import_compiler_runtime = require_compiler_runtime();
|
package/dist/main.js
CHANGED
|
@@ -26,7 +26,7 @@ import { $ as useCellActions, At as DeferredRequestRegistry, B as safeExtractSet
|
|
|
26
26
|
import { __tla as __tla_1 } from "./chunk-5FQGJX7Z-BNjes6Yx.js";
|
|
27
27
|
import { o as useSize, s as Root$2, u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
28
28
|
import { A as SquareFunction, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, O as TIME_UNIT_DESCRIPTIONS, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as ChartColumn, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON } from "./spec-CyLiCjSf.js";
|
|
29
|
-
import { $ as TableBody, $t as ChevronLeft, A as ComboboxItem, At as ChartErrorState, B as contextAwarePanelOpen, Bt as $fae977aafc393c5c$export$6b862160d295c8e, C as prettifyRowColumnCount, Ct as dateToLocalISODate, D as DatePicker, Dt as TabsContent, E as useInternalStateWithSync, Et as Tabs, F as CommandList, Ft as RenderTextWithLinks, G as slotsController, H as contextAwarePanelType, Ht as GripHorizontal, I as CommandSeparator, It as Kbd, Jt as Code, K as Toggle, Kt as Ellipsis, L as smartMatch, Lt as HtmlOutput, M as CommandEmpty, Mt as ChartLoadingState, N as CommandInput, Nt as LazyVegaEmbed, O as DateRangePicker, Ot as TabsList, P as CommandItem, Pt as useOverflowDetection, Q as Table, Qt as ChevronsDownUp, R as ContextAwarePanelItem, Rt as EmotionCacheProvider, S as downloadSizeLimitAtom, St as Maps, T as getColumnCountForDisplay, Tt as dateToLocalISOTime, U as isCellAwareAtom, Ut as Funnel, V as contextAwarePanelOwner, Vt as TextWrap, W as SlotNames, Wt as EyeOff, X as Fill, Xt as ChevronsRight, Yt as ChevronsUpDown, Z as Provider$1, Zt as ChevronsLeft, _ as downloadBlob, _t as SELECT_COLUMN_ID, at as generateColumns, b as Progress, bt as getMimeValues, c as Slide, ct as ColumnChartContext, d as JsonOutput, dt as useIntersectionObserver, en as ArrowDownWideNarrow, et as TableCell, f as OutputArea, ft as usePrevious$1, g as ADD_PRINTING_CLASS, gt as INDEX_COLUMN_NAME, h as InstallPackageButton, ht as loadTableData, it as NAMELESS_COLUMN_PREFIX, j as Command, jt as ChartInfoState, k as Combobox, kt as TabsTrigger, l as RadioGroup, lt as ColumnChartSpecModel, m as DataTable, mt as loadTableAndRawData, n as marimoVersionAtom, nt as TableHeader, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as inferFieldTypes, p as OutputRenderer, pt as getPageIndexForRow, qt as Download, r as showCodeInRunModeAtom, rt as TableRow, st as renderCellValue, t as useNotebookCodeAvailable, tt as TableHead, u as RadioGroupItem, ut as DelayMount, v as downloadByURL, vt as TOO_MANY_ROWS, w as prettifyRowCount, wt as dateToLocalISODateTime, x as Filenames, xt as isNullishFilter, y as downloadHTMLAsImage, yt as toFieldTypes, z as PANEL_TYPES, zt as $fae977aafc393c5c$export$588937bcd60ade55, __tla as __tla_2 } from "./code-visibility-
|
|
29
|
+
import { $ as TableBody, $t as ChevronLeft, A as ComboboxItem, At as ChartErrorState, B as contextAwarePanelOpen, Bt as $fae977aafc393c5c$export$6b862160d295c8e, C as prettifyRowColumnCount, Ct as dateToLocalISODate, D as DatePicker, Dt as TabsContent, E as useInternalStateWithSync, Et as Tabs, F as CommandList, Ft as RenderTextWithLinks, G as slotsController, H as contextAwarePanelType, Ht as GripHorizontal, I as CommandSeparator, It as Kbd, Jt as Code, K as Toggle, Kt as Ellipsis, L as smartMatch, Lt as HtmlOutput, M as CommandEmpty, Mt as ChartLoadingState, N as CommandInput, Nt as LazyVegaEmbed, O as DateRangePicker, Ot as TabsList, P as CommandItem, Pt as useOverflowDetection, Q as Table, Qt as ChevronsDownUp, R as ContextAwarePanelItem, Rt as EmotionCacheProvider, S as downloadSizeLimitAtom, St as Maps, T as getColumnCountForDisplay, Tt as dateToLocalISOTime, U as isCellAwareAtom, Ut as Funnel, V as contextAwarePanelOwner, Vt as TextWrap, W as SlotNames, Wt as EyeOff, X as Fill, Xt as ChevronsRight, Yt as ChevronsUpDown, Z as Provider$1, Zt as ChevronsLeft, _ as downloadBlob, _t as SELECT_COLUMN_ID, at as generateColumns, b as Progress, bt as getMimeValues, c as Slide, ct as ColumnChartContext, d as JsonOutput, dt as useIntersectionObserver, en as ArrowDownWideNarrow, et as TableCell, f as OutputArea, ft as usePrevious$1, g as ADD_PRINTING_CLASS, gt as INDEX_COLUMN_NAME, h as InstallPackageButton, ht as loadTableData, it as NAMELESS_COLUMN_PREFIX, j as Command, jt as ChartInfoState, k as Combobox, kt as TabsTrigger, l as RadioGroup, lt as ColumnChartSpecModel, m as DataTable, mt as loadTableAndRawData, n as marimoVersionAtom, nt as TableHeader, o as SLIDE_TYPE_OPTIONS_BY_VALUE, ot as inferFieldTypes, p as OutputRenderer, pt as getPageIndexForRow, qt as Download, r as showCodeInRunModeAtom, rt as TableRow, st as renderCellValue, t as useNotebookCodeAvailable, tt as TableHead, u as RadioGroupItem, ut as DelayMount, v as downloadByURL, vt as TOO_MANY_ROWS, w as prettifyRowCount, wt as dateToLocalISODateTime, x as Filenames, xt as isNullishFilter, y as downloadHTMLAsImage, yt as toFieldTypes, z as PANEL_TYPES, zt as $fae977aafc393c5c$export$588937bcd60ade55, __tla as __tla_2 } from "./code-visibility-BF06tHE4.js";
|
|
30
30
|
import { c as Calendar, i as createReducerAndAtoms, n as useOnUnmount, o as ToggleLeft, t as useOnMount } from "./useLifecycle-B81PFEja.js";
|
|
31
31
|
import { t as Check } from "./check-DTbrK0zt.js";
|
|
32
32
|
import { A as Trigger$1, C as $a916eb452884faea$export$b7a616150fdb9f44, E as $18f2051aff69b9bf$export$a54013f0d02a8f82, F as X, L as ChevronDown, M as usePrevious$2, N as useDirection, P as createCollection, S as logNever, T as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, a as SelectGroup, c as SelectSeparator, d as NativeSelect, i as SelectContent, j as clamp$2, k as Icon, l as SelectTrigger, n as capitalize, o as SelectItem, r as Select, s as SelectLabel, t as Strings, u as SelectValue, x as assertNever } from "./strings-Bu3vlb6W.js";
|
|
@@ -36093,7 +36093,7 @@ ${c}
|
|
|
36093
36093
|
if (l && l !== "slide") return l;
|
|
36094
36094
|
if (c == null ? void 0 : c.has(e)) return "skip";
|
|
36095
36095
|
}
|
|
36096
|
-
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-
|
|
36096
|
+
var LazySlidesComponent = import_react.lazy(() => import("./reveal-component-CpgdCN8f.js"));
|
|
36097
36097
|
const SlidesLayoutRenderer = ({ layout: e, setLayout: r, cells: c, mode: l }) => {
|
|
36098
36098
|
var _a3;
|
|
36099
36099
|
let u = useAtomValue(kioskModeAtom), d = l === "read" || u, f = useAtomValue(numColumnsAtom) > 1, [p, m] = (0, import_react.useState)(null), { cellsWithOutput: h, skippedIds: g, slideTypes: _, startCellIndex: v } = (0, import_react.useMemo)(() => computeSlideCellsInfo(c, e), [
|
|
@@ -9,7 +9,7 @@ import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
|
9
9
|
import { ct as kioskModeAtom } from "./html-to-image-CTU_-PnW.js";
|
|
10
10
|
import "./chunk-5FQGJX7Z-BNjes6Yx.js";
|
|
11
11
|
import { u as createLucideIcon } from "./dist-C1BYNeCR.js";
|
|
12
|
-
import { Gt as Expand, J as PanelGroup, Jt as Code, Wt as EyeOff, Y as PanelResizeHandle, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, q as Panel, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-
|
|
12
|
+
import { Gt as Expand, J as PanelGroup, Jt as Code, Wt as EyeOff, Y as PanelResizeHandle, a as DEFAULT_SLIDE_TYPE, c as Slide, i as DEFAULT_DECK_TRANSITION, q as Panel, s as SlideSidebar, t as useNotebookCodeAvailable } from "./code-visibility-BF06tHE4.js";
|
|
13
13
|
import { q as useDebouncedCallback } from "./input-BwcGY_X1.js";
|
|
14
14
|
import "./toDate-DNWCUEQp.js";
|
|
15
15
|
import "./react-dom-BTJzcVJ9.js";
|
package/package.json
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { MockNotebook } from "@/__mocks__/notebook";
|
|
5
|
+
import { scrollAndHighlightCell } from "@/components/editor/links/cell-link";
|
|
6
|
+
import { notebookAtom } from "@/core/cells/cells";
|
|
7
|
+
import type { CellId } from "@/core/cells/ids";
|
|
8
|
+
import { createCellRuntimeState } from "@/core/cells/types";
|
|
9
|
+
import { store } from "@/core/state/jotai";
|
|
10
|
+
import { notebookScrollToRunning } from "../actions";
|
|
11
|
+
|
|
12
|
+
vi.mock("@/components/editor/links/cell-link", () => ({
|
|
13
|
+
scrollAndHighlightCell: vi.fn(),
|
|
14
|
+
}));
|
|
15
|
+
|
|
16
|
+
describe("notebookScrollToRunning", () => {
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
vi.clearAllMocks();
|
|
19
|
+
store.set(notebookAtom, MockNotebook.notebookState({ cellData: {} }));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("scrolls to the first running cell in notebook order", () => {
|
|
23
|
+
const runtimeOnlyCellId = "runtime-only" as CellId;
|
|
24
|
+
const idleCellId = "idle-cell" as CellId;
|
|
25
|
+
const runningCellId = "running-cell" as CellId;
|
|
26
|
+
|
|
27
|
+
const notebook = MockNotebook.notebookState({
|
|
28
|
+
cellData: {
|
|
29
|
+
[idleCellId]: {},
|
|
30
|
+
[runningCellId]: {},
|
|
31
|
+
},
|
|
32
|
+
cellRuntime: {
|
|
33
|
+
[idleCellId]: { status: "idle" },
|
|
34
|
+
[runningCellId]: { status: "running" },
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
notebook.cellRuntime = {
|
|
38
|
+
[runtimeOnlyCellId]: createCellRuntimeState({ status: "running" }),
|
|
39
|
+
...notebook.cellRuntime,
|
|
40
|
+
};
|
|
41
|
+
store.set(notebookAtom, notebook);
|
|
42
|
+
|
|
43
|
+
notebookScrollToRunning();
|
|
44
|
+
|
|
45
|
+
expect(scrollAndHighlightCell).toHaveBeenCalledOnce();
|
|
46
|
+
expect(scrollAndHighlightCell).toHaveBeenCalledWith(runningCellId, "focus");
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { scrollAndHighlightCell } from "@/components/editor/links/cell-link";
|
|
4
|
-
import { Objects } from "@/utils/objects";
|
|
5
4
|
import { store } from "../state/jotai";
|
|
6
5
|
import { notebookAtom } from "./cells";
|
|
7
6
|
|
|
@@ -10,12 +9,12 @@ import { notebookAtom } from "./cells";
|
|
|
10
9
|
*/
|
|
11
10
|
export function notebookScrollToRunning() {
|
|
12
11
|
// find cell that is currently in "running" state
|
|
13
|
-
const { cellRuntime } = store.get(notebookAtom);
|
|
14
|
-
const
|
|
15
|
-
(
|
|
12
|
+
const { cellIds, cellRuntime } = store.get(notebookAtom);
|
|
13
|
+
const cellId = cellIds.inOrderIds.find(
|
|
14
|
+
(id) => cellRuntime[id]?.status === "running",
|
|
16
15
|
);
|
|
17
|
-
if (!
|
|
16
|
+
if (!cellId) {
|
|
18
17
|
return;
|
|
19
18
|
}
|
|
20
|
-
scrollAndHighlightCell(
|
|
19
|
+
scrollAndHighlightCell(cellId, "focus");
|
|
21
20
|
}
|