@marimo-team/islands 0.23.11-dev3 → 0.23.11-dev32
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-Z3RP7Vmm.js → ConnectedDataExplorerComponent-WqG-xX4l.js} +13 -13
- package/dist/{ErrorBoundary-DpbaKVv7.js → ErrorBoundary-BNx_OSVo.js} +2 -2
- package/dist/{any-language-editor-CAgFD4Kd.js → any-language-editor-rPSlOll9.js} +5 -5
- package/dist/assets/__vite-browser-external-DAm_YW43.js +1 -0
- package/dist/assets/{worker-CC0Oul9k.js → worker-DEDLIQQV.js} +2 -2
- package/dist/{button-C5K9fIPF.js → button-vQhauTmO.js} +20 -0
- package/dist/{capabilities-BceAxrAW.js → capabilities-BEHzIS99.js} +1 -1
- package/dist/{chat-ui-c1FdlK-C.js → chat-ui-k2kqhCv5.js} +135 -106
- package/dist/{check-BCaJeT-J.js → check-nrzHDi45.js} +1 -1
- package/dist/{code-visibility-Csek3T1q.js → code-visibility-vP4YMX-2.js} +81 -68
- package/dist/{copy-UqRYxiOg.js → copy-UhDed7D4.js} +2 -2
- package/dist/{dist-Dk6PV_d3.js → dist-DYGLrbYQ.js} +2 -2
- package/dist/{error-banner-CJXYJ6Sb.js → error-banner-BHAkVFc2.js} +2 -2
- package/dist/{esm-BaH2eg5-.js → esm-Bqu9AE2K.js} +1 -1
- package/dist/{extends-D_hDsj6R.js → extends-9Yl5BEcg.js} +4 -4
- package/dist/{formats-C4wO47tk.js → formats-BV4bOfMI.js} +3 -3
- package/dist/{glide-data-editor-BPkCPs7L.js → glide-data-editor-BDTq6YUb.js} +9 -9
- package/dist/{html-to-image-D5-EpALB.js → html-to-image-C86pQALH.js} +16 -16
- package/dist/{input-OdWHkobi.js → input-AKkGXdyV.js} +6 -6
- package/dist/{label-CC4ytI1X.js → label-E3ZJXHu8.js} +2 -2
- package/dist/{loader-BWLPpjKK.js → loader-YPuQvn1Y.js} +1 -1
- package/dist/main.js +981 -978
- package/dist/{mermaid-BotvIKg9.js → mermaid-QFAR9YgY.js} +5 -5
- package/dist/{process-output-WDZE0cyS.js → process-output-nNw4OpSj.js} +3 -3
- package/dist/{reveal-component-D7GJ7KT7.js → reveal-component-DL7bkggE.js} +10 -10
- package/dist/{spec-X7FwLJni.js → spec-B45_YCNI.js} +4 -4
- package/dist/{strings-J57tzLr3.js → strings-Cq2s9_EQ.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/{swiper-component-B2t5sN1q.js → swiper-component-BNa_4kh2.js} +2 -2
- package/dist/{toDate-d8RCRrRd.js → toDate-Do1xRzAo.js} +3 -3
- package/dist/{tooltip-DpcyNkQ2.js → tooltip-Bz3OAwrU.js} +3 -3
- package/dist/{types-ChtMFmZ2.js → types-D8gEGs4R.js} +1 -1
- package/dist/{useAsyncData-PonK__yh.js → useAsyncData-CL3o2p4i.js} +1 -1
- package/dist/{useDateFormatter-QB-3MpYr.js → useDateFormatter-BC6iSz9g.js} +2 -2
- package/dist/{useDeepCompareMemoize-D3NGWke6.js → useDeepCompareMemoize-BPx2MuOK.js} +1 -1
- package/dist/{useIframeCapabilities-C4JTXTIh.js → useIframeCapabilities-C6Ta3EyP.js} +1 -1
- package/dist/{useLifecycle-00mO3OSS.js → useLifecycle-C3Ec71q0.js} +3 -3
- package/dist/{useTheme-DEhDzATN.js → useTheme-ZhT6uIu3.js} +4 -3
- package/dist/{vega-component-DGPUhbDs.js → vega-component-C3AWYGAL.js} +10 -10
- package/dist/{zod-aLSua2NL.js → zod-DXqkaI_w.js} +1 -1
- package/package.json +1 -1
- package/src/components/ai/ai-model-dropdown.tsx +6 -0
- package/src/components/app-config/ai-config.tsx +73 -55
- package/src/components/app-config/data-form.tsx +33 -43
- package/src/components/app-config/is-overridden.tsx +125 -58
- package/src/components/app-config/user-config-form.tsx +178 -227
- package/src/components/chat/chat-display.tsx +5 -0
- package/src/components/chat/chat-panel.tsx +21 -8
- package/src/components/chat/tool-call/tool-call-view.tsx +4 -0
- package/src/components/chat/tool-call/tool-history-row.tsx +26 -5
- package/src/components/data-table/TableTopBar.tsx +4 -4
- package/src/components/data-table/__tests__/columns.test.tsx +20 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +28 -0
- package/src/components/data-table/columns.tsx +16 -1
- package/src/components/data-table/data-table.tsx +3 -3
- package/src/components/data-table/filters/types.ts +1 -0
- package/src/components/data-table/renderers.tsx +5 -1
- package/src/components/datasources/__tests__/column-preview.test.tsx +97 -0
- package/src/components/datasources/__tests__/install-package-button.test.tsx +11 -0
- package/src/components/datasources/__tests__/utils.test.ts +127 -2
- package/src/components/datasources/column-preview.tsx +2 -4
- package/src/components/datasources/datasources.tsx +44 -17
- package/src/components/datasources/install-package-button.tsx +3 -1
- package/src/components/datasources/utils.ts +45 -0
- package/src/components/editor/actions/useNotebookActions.tsx +62 -21
- package/src/components/editor/actions/useSetCodeVisibility.ts +57 -0
- package/src/components/editor/connections/components.tsx +13 -0
- package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +4 -4
- package/src/components/editor/connections/storage/as-code.ts +11 -4
- package/src/components/editor/header/__tests__/status.test.tsx +0 -4
- package/src/components/editor/header/status.tsx +2 -3
- package/src/core/cells/__tests__/cells.test.ts +33 -0
- package/src/core/cells/cells.ts +1 -1
- package/src/core/config/config-schema.ts +6 -1
- package/src/core/edit-app.tsx +14 -0
- package/src/core/hotkeys/hotkeys.ts +20 -0
- package/src/core/websocket/__tests__/useMarimoKernelConnection.test.ts +0 -13
- package/src/core/websocket/types.ts +0 -1
- package/src/core/websocket/useMarimoKernelConnection.tsx +0 -14
- package/src/css/md.css +12 -0
- package/src/plugins/impl/DataTablePlugin.tsx +12 -5
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +1 -1
- package/src/plugins/impl/chat/chat-ui.tsx +1 -0
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
- package/dist/assets/__vite-browser-external-eshhtsgZ.js +0 -1
- package/src/components/editor/actions/useHideAllMarkdownCode.ts +0 -53
|
@@ -370,6 +370,26 @@ const DEFAULT_HOT_KEY = {
|
|
|
370
370
|
group: "Other",
|
|
371
371
|
key: "Mod-j",
|
|
372
372
|
},
|
|
373
|
+
"global.showAllCode": {
|
|
374
|
+
name: "Show all code",
|
|
375
|
+
group: "Editing",
|
|
376
|
+
key: NOT_SET,
|
|
377
|
+
},
|
|
378
|
+
"global.hideAllCode": {
|
|
379
|
+
name: "Hide all code",
|
|
380
|
+
group: "Editing",
|
|
381
|
+
key: NOT_SET,
|
|
382
|
+
},
|
|
383
|
+
"global.showAllMarkdownCode": {
|
|
384
|
+
name: "Show all markdown code",
|
|
385
|
+
group: "Editing",
|
|
386
|
+
key: NOT_SET,
|
|
387
|
+
},
|
|
388
|
+
"global.hideAllMarkdownCode": {
|
|
389
|
+
name: "Hide all markdown code",
|
|
390
|
+
group: "Editing",
|
|
391
|
+
key: NOT_SET,
|
|
392
|
+
},
|
|
373
393
|
"global.collapseAllSections": {
|
|
374
394
|
name: "Collapse all sections",
|
|
375
395
|
group: "Editing",
|
|
@@ -32,7 +32,6 @@ describe("classifyCloseEvent", () => {
|
|
|
32
32
|
|
|
33
33
|
describe("terminal closes (server-initiated)", () => {
|
|
34
34
|
it.each([
|
|
35
|
-
"MARIMO_WRONG_KERNEL_ID",
|
|
36
35
|
"MARIMO_NO_FILE_KEY",
|
|
37
36
|
"MARIMO_NO_SESSION_ID",
|
|
38
37
|
"MARIMO_NO_SESSION",
|
|
@@ -49,18 +48,6 @@ describe("classifyCloseEvent", () => {
|
|
|
49
48
|
}
|
|
50
49
|
});
|
|
51
50
|
|
|
52
|
-
it("MARIMO_MALFORMED_QUERY → terminal but does NOT close transport", () => {
|
|
53
|
-
const decision = classify("MARIMO_MALFORMED_QUERY");
|
|
54
|
-
expect(decision.kind).toBe("terminal");
|
|
55
|
-
expect(decision.status).toMatchObject({
|
|
56
|
-
state: WebSocketState.CLOSED,
|
|
57
|
-
code: WebSocketClosedReason.MALFORMED_QUERY,
|
|
58
|
-
});
|
|
59
|
-
if (decision.kind === "terminal") {
|
|
60
|
-
expect(decision.closeTransport).toBe(false);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
51
|
it("MARIMO_KERNEL_STARTUP_ERROR → terminal + closeTransport", () => {
|
|
65
52
|
const decision = classify("MARIMO_KERNEL_STARTUP_ERROR");
|
|
66
53
|
expect(decision.kind).toBe("terminal");
|
|
@@ -82,12 +82,10 @@ const SUPPORTS_LAZY_KERNELS = true;
|
|
|
82
82
|
// (marimo/_server/api/endpoints/ws_endpoint.py and ws/*.py). Keep in sync with
|
|
83
83
|
// the backend literals.
|
|
84
84
|
export type CloseReason =
|
|
85
|
-
| "MARIMO_WRONG_KERNEL_ID"
|
|
86
85
|
| "MARIMO_NO_FILE_KEY"
|
|
87
86
|
| "MARIMO_NO_SESSION_ID"
|
|
88
87
|
| "MARIMO_NO_SESSION"
|
|
89
88
|
| "MARIMO_SHUTDOWN"
|
|
90
|
-
| "MARIMO_MALFORMED_QUERY"
|
|
91
89
|
| "MARIMO_KERNEL_STARTUP_ERROR"
|
|
92
90
|
| typeof TRANSPORT_EXHAUSTED_REASON;
|
|
93
91
|
|
|
@@ -107,7 +105,6 @@ export function classifyCloseEvent(event: { reason?: string }): CloseDecision {
|
|
|
107
105
|
reason: "kernel not found",
|
|
108
106
|
},
|
|
109
107
|
};
|
|
110
|
-
case "MARIMO_WRONG_KERNEL_ID":
|
|
111
108
|
case "MARIMO_NO_FILE_KEY":
|
|
112
109
|
case "MARIMO_NO_SESSION_ID":
|
|
113
110
|
case "MARIMO_NO_SESSION":
|
|
@@ -121,17 +118,6 @@ export function classifyCloseEvent(event: { reason?: string }): CloseDecision {
|
|
|
121
118
|
},
|
|
122
119
|
closeTransport: true,
|
|
123
120
|
};
|
|
124
|
-
case "MARIMO_MALFORMED_QUERY":
|
|
125
|
-
return {
|
|
126
|
-
kind: "terminal",
|
|
127
|
-
status: {
|
|
128
|
-
state: WebSocketState.CLOSED,
|
|
129
|
-
code: WebSocketClosedReason.MALFORMED_QUERY,
|
|
130
|
-
reason:
|
|
131
|
-
"the kernel did not recognize a request; please file a bug with marimo",
|
|
132
|
-
},
|
|
133
|
-
closeTransport: false,
|
|
134
|
-
};
|
|
135
121
|
case "MARIMO_KERNEL_STARTUP_ERROR":
|
|
136
122
|
return {
|
|
137
123
|
kind: "terminal",
|
package/src/css/md.css
CHANGED
|
@@ -49,6 +49,18 @@
|
|
|
49
49
|
.markdown h6 {
|
|
50
50
|
font-weight: inherit;
|
|
51
51
|
font-family: var(--heading-font);
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
Anchor heading spacing to GitHub's markdown rhythm (Primer): a uniform
|
|
55
|
+
24px top / 16px bottom margin and 1.25 line-height across every level,
|
|
56
|
+
letting font-size — not margin — carry the hierarchy. Tailwind Typography's
|
|
57
|
+
prose defaults scale heading margins per-level up to ~2em (≈48px on h2),
|
|
58
|
+
which is tuned for long-form articles and reads as too airy in a notebook.
|
|
59
|
+
Ref: https://github.com/sindresorhus/github-markdown-css
|
|
60
|
+
*/
|
|
61
|
+
margin-top: 1.5rem;
|
|
62
|
+
margin-bottom: 1rem;
|
|
63
|
+
line-height: 1.25;
|
|
52
64
|
}
|
|
53
65
|
|
|
54
66
|
.markdown hr {
|
|
@@ -181,6 +181,7 @@ interface Data<T> {
|
|
|
181
181
|
maxHeight?: number;
|
|
182
182
|
selection: DataTableSelection;
|
|
183
183
|
showDownload: boolean;
|
|
184
|
+
showSearch: boolean;
|
|
184
185
|
showFilters: boolean;
|
|
185
186
|
showColumnSummaries: boolean | "stats" | "chart";
|
|
186
187
|
showDataTypes: boolean;
|
|
@@ -195,6 +196,7 @@ interface Data<T> {
|
|
|
195
196
|
hiddenColumns?: string[];
|
|
196
197
|
textJustifyColumns?: Record<string, "left" | "center" | "right">;
|
|
197
198
|
wrappedColumns?: string[];
|
|
199
|
+
columnWidths?: Record<string, number>;
|
|
198
200
|
headerTooltip?: Record<string, string>;
|
|
199
201
|
totalColumns: number;
|
|
200
202
|
maxColumns: number | "all";
|
|
@@ -266,6 +268,7 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
|
|
|
266
268
|
showColumnExplorer: z.boolean().default(true),
|
|
267
269
|
showRowExplorer: z.boolean().default(true),
|
|
268
270
|
showChartBuilder: z.boolean().default(true),
|
|
271
|
+
showSearch: z.boolean().default(true),
|
|
269
272
|
rowHeaders: columnToFieldTypesSchema,
|
|
270
273
|
freezeColumnsLeft: z.array(z.string()).optional(),
|
|
271
274
|
freezeColumnsRight: z.array(z.string()).optional(),
|
|
@@ -274,6 +277,9 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
|
|
|
274
277
|
.record(z.string(), z.enum(["left", "center", "right"]))
|
|
275
278
|
.optional(),
|
|
276
279
|
wrappedColumns: z.array(z.string()).optional(),
|
|
280
|
+
columnWidths: z
|
|
281
|
+
.record(z.string(), z.number().int().positive())
|
|
282
|
+
.optional(),
|
|
277
283
|
headerTooltip: z.record(z.string(), z.string()).optional(),
|
|
278
284
|
fieldTypes: columnToFieldTypesSchema.nullish(),
|
|
279
285
|
totalColumns: z.number(),
|
|
@@ -381,7 +387,6 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
|
|
|
381
387
|
{...props.data}
|
|
382
388
|
{...props.functions}
|
|
383
389
|
host={props.host}
|
|
384
|
-
enableSearch={true}
|
|
385
390
|
data={props.data.data}
|
|
386
391
|
value={props.value}
|
|
387
392
|
setValue={props.setValue}
|
|
@@ -466,8 +471,6 @@ interface DataTableProps<T> extends Data<T>, DataTableFunctions {
|
|
|
466
471
|
// Selection
|
|
467
472
|
value: S;
|
|
468
473
|
setValue: (value: S) => void;
|
|
469
|
-
// Search
|
|
470
|
-
enableSearch: boolean;
|
|
471
474
|
// Filters
|
|
472
475
|
enableFilters?: boolean;
|
|
473
476
|
cellStyles?: CellStyleState | null;
|
|
@@ -837,7 +840,7 @@ const DataTableComponent = ({
|
|
|
837
840
|
setValue,
|
|
838
841
|
sorting,
|
|
839
842
|
setSorting,
|
|
840
|
-
|
|
843
|
+
showSearch,
|
|
841
844
|
searchQuery,
|
|
842
845
|
setSearchQuery,
|
|
843
846
|
filters,
|
|
@@ -848,6 +851,7 @@ const DataTableComponent = ({
|
|
|
848
851
|
hiddenColumns,
|
|
849
852
|
textJustifyColumns,
|
|
850
853
|
wrappedColumns,
|
|
854
|
+
columnWidths,
|
|
851
855
|
headerTooltip,
|
|
852
856
|
totalColumns,
|
|
853
857
|
get_row_ids,
|
|
@@ -935,6 +939,7 @@ const DataTableComponent = ({
|
|
|
935
939
|
const memoizedRowHeaders = useDeepCompareMemoize(rowHeaders);
|
|
936
940
|
const memoizedTextJustifyColumns = useDeepCompareMemoize(textJustifyColumns);
|
|
937
941
|
const memoizedWrappedColumns = useDeepCompareMemoize(wrappedColumns);
|
|
942
|
+
const memoizedColumnWidths = useDeepCompareMemoize(columnWidths);
|
|
938
943
|
const memoizedChartSpecModel = useDeepCompareMemoize(chartSpecModel);
|
|
939
944
|
const fractionDigitsByColumn = useDeepCompareMemoize(computedFractionDigits);
|
|
940
945
|
const shownColumns = memoizedClampedFieldTypes.length;
|
|
@@ -953,6 +958,7 @@ const DataTableComponent = ({
|
|
|
953
958
|
fieldTypes: memoizedClampedFieldTypes,
|
|
954
959
|
textJustifyColumns: memoizedTextJustifyColumns,
|
|
955
960
|
wrappedColumns: memoizedWrappedColumns,
|
|
961
|
+
columnWidths: memoizedColumnWidths,
|
|
956
962
|
headerTooltip: headerTooltip,
|
|
957
963
|
// Only show data types if they are explicitly set
|
|
958
964
|
showDataTypes: showDataTypes,
|
|
@@ -967,6 +973,7 @@ const DataTableComponent = ({
|
|
|
967
973
|
memoizedClampedFieldTypes,
|
|
968
974
|
memoizedTextJustifyColumns,
|
|
969
975
|
memoizedWrappedColumns,
|
|
976
|
+
memoizedColumnWidths,
|
|
970
977
|
headerTooltip,
|
|
971
978
|
calculate_top_k_rows,
|
|
972
979
|
fractionDigitsByColumn,
|
|
@@ -1138,7 +1145,7 @@ const DataTableComponent = ({
|
|
|
1138
1145
|
hoverTemplate={hoverTemplate}
|
|
1139
1146
|
cellHoverTexts={cellHoverTexts}
|
|
1140
1147
|
downloadAs={showDownload ? downloadAs : undefined}
|
|
1141
|
-
|
|
1148
|
+
showSearch={showSearch}
|
|
1142
1149
|
searchQuery={searchQuery}
|
|
1143
1150
|
onSearchQueryChange={setSearchQuery}
|
|
1144
1151
|
showFilters={showFilters}
|
|
@@ -94,7 +94,7 @@ describe("LoadingDataTableComponent", () => {
|
|
|
94
94
|
hasStableRowId: false,
|
|
95
95
|
lazy: false,
|
|
96
96
|
host,
|
|
97
|
-
|
|
97
|
+
showSearch: true,
|
|
98
98
|
value: [] as (number | string | { rowId: string; columnName?: string })[],
|
|
99
99
|
setValue,
|
|
100
100
|
download_as: vi.fn() as DownloadAsArgs,
|
|
@@ -338,7 +338,7 @@ export const DataFrameComponent = memo(
|
|
|
338
338
|
showDownload={showDownload}
|
|
339
339
|
download_as={download_as}
|
|
340
340
|
get_size_bytes={get_size_bytes}
|
|
341
|
-
|
|
341
|
+
showSearch={false}
|
|
342
342
|
showFilters={false}
|
|
343
343
|
search={search}
|
|
344
344
|
showColumnSummaries={false}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./worker-CC0Oul9k.js";var t=e(((e,t)=>{t.exports={}}));export default t();
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
|
|
3
|
-
import { useCallback } from "react"; /* Copyright 2026 Marimo. All rights reserved. */
|
|
4
|
-
import { getNotebook, useCellActions } from "@/core/cells/cells";
|
|
5
|
-
import type { CellId } from "@/core/cells/ids";
|
|
6
|
-
import { MarkdownLanguageAdapter } from "@/core/codemirror/language/languages/markdown";
|
|
7
|
-
import { useRequestClient } from "@/core/network/requests";
|
|
8
|
-
import type { CellConfig } from "@/core/network/types";
|
|
9
|
-
import { Objects } from "@/utils/objects";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Hook to hide all markdown code cells
|
|
13
|
-
*/
|
|
14
|
-
export const useHideAllMarkdownCode = () => {
|
|
15
|
-
const { updateCellConfig } = useCellActions();
|
|
16
|
-
const { saveCellConfig } = useRequestClient();
|
|
17
|
-
|
|
18
|
-
return useCallback(async () => {
|
|
19
|
-
const markdownAdapter = new MarkdownLanguageAdapter();
|
|
20
|
-
const notebook = getNotebook();
|
|
21
|
-
const cellIds = notebook.cellIds.inOrderIds;
|
|
22
|
-
|
|
23
|
-
const newConfigs: Record<CellId, Partial<CellConfig>> = {};
|
|
24
|
-
|
|
25
|
-
// Find all markdown cells that aren't already hidden
|
|
26
|
-
for (const cellId of cellIds) {
|
|
27
|
-
if (notebook.cellData[cellId] === undefined) {
|
|
28
|
-
continue;
|
|
29
|
-
}
|
|
30
|
-
const { code, config } = notebook.cellData[cellId];
|
|
31
|
-
if (config.hide_code) {
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
if (markdownAdapter.isSupported(code)) {
|
|
35
|
-
newConfigs[cellId] = { hide_code: true };
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const entries = Objects.entries(newConfigs);
|
|
40
|
-
|
|
41
|
-
if (entries.length === 0) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Save to backend
|
|
46
|
-
await saveCellConfig({ configs: newConfigs });
|
|
47
|
-
|
|
48
|
-
// Update on frontend
|
|
49
|
-
for (const [cellId, config] of entries) {
|
|
50
|
-
updateCellConfig({ cellId, config });
|
|
51
|
-
}
|
|
52
|
-
}, [updateCellConfig]);
|
|
53
|
-
};
|