@marimo-team/islands 0.22.1-dev38 → 0.22.1-dev39
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-DTOsfq2x.js → ConnectedDataExplorerComponent-DuD8BVl6.js} +2 -2
- package/dist/{Plot-WhbJAbBh.js → Plot-BxlSHo0G.js} +47 -38
- package/dist/{chat-ui-CJCTr1kq.js → chat-ui-Cel1kBfc.js} +1 -1
- package/dist/{glide-data-editor-BQPLhydy.js → glide-data-editor-BqnvTmDo.js} +1712 -1681
- package/dist/main.js +360 -354
- package/dist/{process-output-D0SEeV3t.js → process-output-DC1TOnIl.js} +1 -1
- package/dist/{spec-CiHus5Bb.js → spec-CD7QaCV-.js} +1 -1
- package/dist/useLifecycle-4fA1pHoh.js +177 -0
- package/package.json +1 -1
- package/src/__mocks__/common.ts +4 -4
- package/src/components/chat/acp/agent-panel.tsx +2 -2
- package/src/components/data-table/__tests__/columns.test.tsx +7 -7
- package/src/components/data-table/cell-hover-template/types.ts +1 -1
- package/src/components/data-table/cell-hover-text/types.ts +1 -1
- package/src/components/data-table/cell-selection/__tests__/feature.test.ts +1 -1
- package/src/components/data-table/cell-selection/types.ts +1 -1
- package/src/components/data-table/cell-styling/types.ts +1 -1
- package/src/components/data-table/charts/chart-spec/altair-generator.ts +2 -2
- package/src/components/data-table/column-formatting/types.ts +2 -2
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +1 -1
- package/src/components/data-table/column-wrapping/types.ts +1 -1
- package/src/components/data-table/copy-column/types.ts +1 -1
- package/src/components/data-table/focus-row/types.ts +1 -1
- package/src/components/data-table/loading-table.tsx +1 -1
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +2 -2
- package/src/components/data-table/range-focus/atoms.ts +2 -2
- package/src/components/dependency-graph/dependency-graph-tree.tsx +1 -1
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +1 -1
- package/src/components/editor/ai/ai-completion-editor.tsx +1 -1
- package/src/components/editor/app-container.tsx +1 -1
- package/src/components/editor/chrome/panels/empty-state.tsx +1 -0
- package/src/components/editor/controls/keyboard-shortcuts.tsx +1 -1
- package/src/components/editor/navigation/__tests__/navigation.test.ts +1 -1
- package/src/components/editor/navigation/navigation.ts +1 -1
- package/src/components/editor/notebook-cell.tsx +1 -1
- package/src/components/editor/output/JsonOutput.tsx +4 -4
- package/src/components/editor/output/ansi-reduce.ts +2 -2
- package/src/components/editor/output/console/ConsoleOutput.tsx +1 -1
- package/src/components/editor/renderers/cells-renderer.tsx +1 -1
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +1 -1
- package/src/components/editor/renderers/plugins.ts +1 -1
- package/src/components/editor/renderers/slides-layout/types.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +1 -1
- package/src/components/find-replace/find-replace.tsx +3 -1
- package/src/components/forms/form.tsx +1 -1
- package/src/components/forms/options.ts +1 -1
- package/src/components/static-html/static-banner.tsx +2 -2
- package/src/components/terminal/terminal.tsx +4 -4
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/command.tsx +1 -1
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/error.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/variable.test.ts +1 -1
- package/src/core/ai/context/registry.ts +2 -2
- package/src/core/ai/tools/registry.ts +1 -1
- package/src/core/cells/__tests__/cells.test.ts +2 -2
- package/src/core/cells/__tests__/scrollCellIntoView.test.ts +1 -1
- package/src/core/cells/__tests__/session.test.ts +1 -1
- package/src/core/cells/__tests__/utils.test.ts +1 -1
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/ids.ts +1 -1
- package/src/core/codemirror/ai/request.ts +1 -1
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +1 -1
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +1 -1
- package/src/core/codemirror/copilot/language-server.ts +1 -1
- package/src/core/codemirror/copilot/types.ts +1 -1
- package/src/core/codemirror/facet.ts +1 -1
- package/src/core/codemirror/language/__tests__/sql.test.ts +4 -4
- package/src/core/codemirror/language/languages/sql/completion-builder.ts +1 -1
- package/src/core/codemirror/language/metadata.ts +1 -1
- package/src/core/codemirror/language/types.ts +1 -1
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -1
- package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
- package/src/core/codemirror/misc/__tests__/dnd.test.ts +1 -1
- package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
- package/src/core/config/feature-flag.tsx +1 -1
- package/src/core/dom/outline.ts +1 -1
- package/src/core/export/__tests__/hooks.test.ts +1 -1
- package/src/core/hotkeys/__tests__/hotkeys.test.ts +1 -1
- package/src/core/hotkeys/shortcuts.ts +1 -1
- package/src/core/islands/__tests__/bridge.test.ts +2 -2
- package/src/core/islands/bridge.ts +2 -2
- package/src/core/islands/components/output-wrapper.tsx +1 -1
- package/src/core/islands/parse.ts +1 -1
- package/src/core/lsp/__tests__/transport.test.ts +1 -1
- package/src/core/network/DeferredRequestRegistry.ts +1 -1
- package/src/core/network/__tests__/requests-network.test.ts +1 -1
- package/src/core/network/api.ts +2 -2
- package/src/core/network/requests-lazy.ts +1 -1
- package/src/core/network/requests-toasting.tsx +1 -1
- package/src/core/static/files.ts +1 -1
- package/src/core/vscode/vscode-bindings.ts +1 -1
- package/src/core/wasm/bridge.ts +3 -3
- package/src/core/wasm/worker/tracer.ts +1 -1
- package/src/core/websocket/useWebSocket.tsx +2 -2
- package/src/css/globals.css +37 -61
- package/src/custom.d.ts +1 -1
- package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +2 -2
- package/src/hooks/debug.ts +3 -3
- package/src/hooks/useDebounce.ts +1 -1
- package/src/hooks/useEventListener.ts +1 -1
- package/src/hooks/useHotkey.ts +1 -1
- package/src/hooks/useLifecycle.ts +2 -2
- package/src/hooks/useNonce.ts +1 -1
- package/src/hooks/useResizeObserver.ts +2 -2
- package/src/main.tsx +1 -1
- package/src/plugins/core/RenderHTML.tsx +3 -3
- package/src/plugins/core/__test__/registerReactComponent.test.ts +1 -1
- package/src/plugins/core/registerReactComponent.tsx +4 -4
- package/src/plugins/core/rpc.ts +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +1 -1
- package/src/plugins/impl/FileBrowserPlugin.tsx +1 -1
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +1 -1
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +1 -1
- package/src/plugins/impl/anywidget/model.ts +1 -1
- package/src/plugins/impl/anywidget/types.ts +2 -2
- package/src/plugins/impl/anywidget/widget-binding.ts +1 -1
- package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
- package/src/plugins/impl/chat/chat-ui.tsx +1 -1
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +1 -1
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +2 -2
- package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
- package/src/plugins/impl/data-explorer/functions/function.ts +1 -1
- package/src/plugins/impl/data-explorer/queries/types.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
- package/src/plugins/impl/data-frames/forms/renderers.tsx +1 -1
- package/src/plugins/impl/data-frames/utils/operators.ts +1 -1
- package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +1 -1
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +1 -1
- package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
- package/src/plugins/impl/plotly/Plot.tsx +3 -3
- package/src/plugins/impl/vega/batched.ts +1 -1
- package/src/plugins/impl/vega/make-selectable.ts +1 -1
- package/src/plugins/impl/vega/types.ts +1 -1
- package/src/plugins/layout/DownloadPlugin.tsx +1 -1
- package/src/plugins/layout/LazyPlugin.tsx +1 -1
- package/src/plugins/layout/RoutesPlugin.tsx +1 -1
- package/src/plugins/layout/mermaid/mermaid.tsx +1 -1
- package/src/plugins/plugins.ts +1 -1
- package/src/stories/data-explorer.stories.tsx +1 -1
- package/src/stories/dataframe.stories.tsx +1 -1
- package/src/stories/editor.stories.tsx +1 -1
- package/src/stories/select.stories.tsx +1 -1
- package/src/stories/switchable-multi-select.stories.tsx +1 -1
- package/src/utils/Logger.ts +1 -1
- package/src/utils/__tests__/arrays.test.ts +1 -1
- package/src/utils/__tests__/blob.test.ts +1 -1
- package/src/utils/__tests__/dates.test.ts +1 -1
- package/src/utils/__tests__/errors.test.ts +1 -1
- package/src/utils/__tests__/objects.test.ts +3 -3
- package/src/utils/__tests__/waitForWs.test.ts +1 -1
- package/src/utils/arrays.ts +1 -1
- package/src/utils/assertNever.ts +1 -1
- package/src/utils/batch-requests.ts +2 -2
- package/src/utils/createReducer.ts +2 -2
- package/src/utils/id-tree.tsx +2 -2
- package/src/utils/idle.ts +1 -1
- package/src/utils/invariant.ts +1 -2
- package/src/utils/maps.ts +1 -1
- package/src/utils/math.ts +0 -1
- package/src/utils/multi-map.ts +1 -1
- package/src/utils/objects.ts +1 -1
- package/src/utils/once.ts +2 -2
- package/src/utils/staticImplements.ts +1 -1
- package/src/utils/storage/jotai.ts +1 -1
- package/src/utils/tracer.ts +2 -2
- package/dist/useLifecycle-DgDTfOLZ.js +0 -173
package/src/core/wasm/bridge.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import { toast } from "@/components/ui/use-toast";
|
|
5
5
|
import { userConfigAtom } from "@/core/config/config";
|
|
@@ -76,7 +76,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
|
|
|
76
76
|
|
|
77
77
|
// Create save worker
|
|
78
78
|
const saveWorker = new Worker(
|
|
79
|
-
//
|
|
79
|
+
// oxlint-disable-next-line unicorn/relative-url-style
|
|
80
80
|
new URL("./worker/save-worker.ts", import.meta.url),
|
|
81
81
|
{
|
|
82
82
|
type: "module",
|
|
@@ -96,7 +96,7 @@ export class PyodideBridge implements RunRequests, EditRequests {
|
|
|
96
96
|
|
|
97
97
|
// Create a worker
|
|
98
98
|
const worker = new Worker(
|
|
99
|
-
//
|
|
99
|
+
// oxlint-disable-next-line unicorn/relative-url-style
|
|
100
100
|
new URL("./worker/worker.ts", import.meta.url),
|
|
101
101
|
{
|
|
102
102
|
type: "module",
|
|
@@ -49,7 +49,7 @@ function createConnectionTransport(
|
|
|
49
49
|
export function useConnectionTransport(options: UseConnectionTransportOptions) {
|
|
50
50
|
const { onOpen, onMessage, onClose, onError, waitToConnect } = options;
|
|
51
51
|
|
|
52
|
-
//
|
|
52
|
+
// oxlint-disable-next-line react/hook-use-state
|
|
53
53
|
const [transport] = useState<IConnectionTransport>(() => {
|
|
54
54
|
const socket = createConnectionTransport(options);
|
|
55
55
|
|
|
@@ -83,7 +83,7 @@ export function useConnectionTransport(options: UseConnectionTransportOptions) {
|
|
|
83
83
|
transport.removeEventListener("error", onError);
|
|
84
84
|
transport.removeEventListener("message", onMessage);
|
|
85
85
|
};
|
|
86
|
-
//
|
|
86
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
87
87
|
}, [transport]);
|
|
88
88
|
|
|
89
89
|
return transport;
|
package/src/css/globals.css
CHANGED
|
@@ -147,73 +147,49 @@
|
|
|
147
147
|
--shadow-none: none;
|
|
148
148
|
--shadow-xxs: 0px 0px 2px 0px var(--base-shadow-darker);
|
|
149
149
|
|
|
150
|
-
/*
|
|
151
|
-
--shadow-xs:
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
/*
|
|
166
|
-
--shadow-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
/*
|
|
181
|
-
--shadow-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
186
|
-
--shadow-sm-solid:
|
|
187
|
-
2px 2px 0px 0px var(--base-shadow-darker),
|
|
188
|
-
0px 0px 2px 0px hsl(0deg 0% 50% / 20%);
|
|
189
|
-
|
|
190
|
-
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
191
|
-
--shadow-md-solid:
|
|
192
|
-
4px 4px 0px 0px var(--base-shadow-darker),
|
|
193
|
-
0 0px 2px 0px hsl(0deg 0% 60% / 50%);
|
|
194
|
-
|
|
195
|
-
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
196
|
-
--shadow-lg-solid:
|
|
197
|
-
5px 6px 0px 0px var(--base-shadow-darker),
|
|
198
|
-
0 0px 4px 0px hsl(0deg 0% 75% / 50%);
|
|
199
|
-
|
|
200
|
-
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
201
|
-
--shadow-xl-solid:
|
|
202
|
-
7px 8px 0px 0px var(--base-shadow-darker),
|
|
203
|
-
0 0px 4px 0px hsl(0deg 0% 85% / 50%);
|
|
204
|
-
|
|
205
|
-
/* biome-ignore format: definition needs to be oneline or breaks variants */
|
|
206
|
-
--shadow-2xl-solid:
|
|
207
|
-
10px 12px 0px 0px var(--base-shadow-darker),
|
|
208
|
-
0 0px 8px 0px hsl(0deg 0% 90% / 50%);
|
|
150
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
151
|
+
--shadow-xs: 1px 1px 2px 0px var(--base-shadow), 0px 0px 2px 0px hsl(0deg 0% 25% / var(--base-shadow-opacity));
|
|
152
|
+
|
|
153
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
154
|
+
--shadow-sm: 2px 2px 2px 0px var(--base-shadow), 0px 0px 2px 0px hsl(0deg 0% 25% / var(--base-shadow-opacity));
|
|
155
|
+
|
|
156
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
157
|
+
--shadow-md: 4px 4px 4px 0px var(--base-shadow), 0 0px 4px 0px hsl(0deg 0% 60% / var(--base-shadow-opacity));
|
|
158
|
+
|
|
159
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
160
|
+
--shadow-lg: 5px 6px 4px 0px var(--base-shadow), 0 0px 4px 0px hsl(0deg 0% 75% / var(--base-shadow-opacity));
|
|
161
|
+
|
|
162
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
163
|
+
--shadow-xl: 8px 9px 4px 0px var(--base-shadow), 0 0px 6px 0px hsl(0deg 0% 85% / var(--base-shadow-opacity));
|
|
164
|
+
|
|
165
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
166
|
+
--shadow-2xl: 10px 12px 10px 0px var(--base-shadow), 0 0px 8px 0px hsl(0deg 0% 90% / var(--base-shadow-opacity));
|
|
167
|
+
|
|
168
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
169
|
+
--shadow-xs-solid: 1px 1px 0px 0px var(--base-shadow-darker), 0px 0px 2px 0px hsl(0deg 0% 50% / 20%);
|
|
170
|
+
|
|
171
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
172
|
+
--shadow-sm-solid: 2px 2px 0px 0px var(--base-shadow-darker), 0px 0px 2px 0px hsl(0deg 0% 50% / 20%);
|
|
173
|
+
|
|
174
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
175
|
+
--shadow-md-solid: 4px 4px 0px 0px var(--base-shadow-darker), 0 0px 2px 0px hsl(0deg 0% 60% / 50%);
|
|
176
|
+
|
|
177
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
178
|
+
--shadow-lg-solid: 5px 6px 0px 0px var(--base-shadow-darker), 0 0px 4px 0px hsl(0deg 0% 75% / 50%);
|
|
179
|
+
|
|
180
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
181
|
+
--shadow-xl-solid: 7px 8px 0px 0px var(--base-shadow-darker), 0 0px 4px 0px hsl(0deg 0% 85% / 50%);
|
|
182
|
+
|
|
183
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
184
|
+
--shadow-2xl-solid: 10px 12px 0px 0px var(--base-shadow-darker), 0 0px 8px 0px hsl(0deg 0% 90% / 50%);
|
|
209
185
|
|
|
210
186
|
/* Solid shadows with lighter shade color */
|
|
211
187
|
|
|
212
|
-
/*
|
|
188
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
213
189
|
--shadow-sm-solid-shade:
|
|
214
190
|
2px 2px 0px 0px var(--base-shadow), 0px 0px 2px 0px hsl(0deg 0% 50% / 20%);
|
|
215
191
|
|
|
216
|
-
/*
|
|
192
|
+
/* oxfmt-ignore: definition needs to be oneline or breaks variants */
|
|
217
193
|
--shadow-md-solid-shade:
|
|
218
194
|
4px 4px 0px 0px var(--base-shadow), 0 0px 2px 0px hsl(0deg 0% 60% / 50%);
|
|
219
195
|
}
|
package/src/custom.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ function createHotkeys(
|
|
|
17
17
|
keys: Partial<Record<HotkeyAction, Hotkey>>,
|
|
18
18
|
): Record<HotkeyAction, Hotkey> {
|
|
19
19
|
return new Proxy(keys as Record<HotkeyAction, Hotkey>, {
|
|
20
|
-
//
|
|
20
|
+
// oxlint-ignore-next-line -- ok to have three arguments here (It's a web API)
|
|
21
21
|
get(target, p, receiver) {
|
|
22
22
|
const key = Reflect.get(target, p, receiver);
|
|
23
23
|
if (key === "undefined") {
|
|
@@ -402,7 +402,7 @@ describe("findDuplicateShortcuts", () => {
|
|
|
402
402
|
});
|
|
403
403
|
|
|
404
404
|
const provider = new HotkeyProvider(hotkeys, { platform: "mac" });
|
|
405
|
-
//
|
|
405
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
406
406
|
const result = findDuplicateShortcuts(provider, "NonExistent" as any);
|
|
407
407
|
|
|
408
408
|
// Should still work normally and detect the duplicate
|
package/src/hooks/debug.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable react-hooks/rules-of-hooks */
|
|
3
3
|
|
|
4
4
|
import { dequal } from "dequal";
|
|
5
5
|
import { useEffect, useMemo, useRef } from "react";
|
|
@@ -21,7 +21,7 @@ export function useDebugMounting(name: string) {
|
|
|
21
21
|
return () => {
|
|
22
22
|
Logger.debug(`🐛 [${name}] unmounted. Renders: ${renders.current}`);
|
|
23
23
|
};
|
|
24
|
-
//
|
|
24
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
25
25
|
}, []);
|
|
26
26
|
|
|
27
27
|
useEffect(() => {
|
|
@@ -111,6 +111,6 @@ export function useMemoDebugChanges<T>(
|
|
|
111
111
|
previousDeps.current = deps;
|
|
112
112
|
|
|
113
113
|
return fn();
|
|
114
|
-
//
|
|
114
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
115
115
|
}, deps);
|
|
116
116
|
}
|
package/src/hooks/useDebounce.ts
CHANGED
|
@@ -78,7 +78,7 @@ export function useDebounceControlledState<T>(opts: {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
//
|
|
81
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
82
82
|
export function useDebouncedCallback<T extends (...args: any[]) => unknown>(
|
|
83
83
|
callback: T,
|
|
84
84
|
delay: number,
|
|
@@ -57,7 +57,7 @@ export function useEventListener(
|
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
//
|
|
60
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
61
61
|
const eventListener = (event: any) => savedListener.current(event);
|
|
62
62
|
target.addEventListener(type, eventListener, options);
|
|
63
63
|
|
package/src/hooks/useHotkey.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { useEventListener } from "./useEventListener";
|
|
|
14
14
|
|
|
15
15
|
type HotkeyHandler = (
|
|
16
16
|
evt?: KeyboardEvent,
|
|
17
|
-
//
|
|
17
|
+
// oxlint-disable-next-line typescript/no-invalid-void-type
|
|
18
18
|
) => boolean | void | undefined | Promise<void>;
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -5,7 +5,7 @@ import { type EffectCallback, useEffect } from "react";
|
|
|
5
5
|
* Wrapper around useEffect that makes it clearer that the effect is run, just on mount.
|
|
6
6
|
*/
|
|
7
7
|
export function useOnMount(effect: EffectCallback) {
|
|
8
|
-
//
|
|
8
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
9
9
|
useEffect(effect, []);
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ export function useOnMount(effect: EffectCallback) {
|
|
|
13
13
|
* Wrapper around useEffect that makes it clearer that the effect is run, just on unmount.
|
|
14
14
|
*/
|
|
15
15
|
export function useOnUnmount(effect: EffectCallback) {
|
|
16
|
-
//
|
|
16
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
17
17
|
useEffect(() => {
|
|
18
18
|
return effect();
|
|
19
19
|
}, []);
|
package/src/hooks/useNonce.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
|
|
4
4
|
export function useNonce() {
|
|
5
|
-
//
|
|
5
|
+
// oxlint-disable-next-line react/hook-use-state
|
|
6
6
|
const [, setNonce] = useState(0);
|
|
7
7
|
return useCallback(() => {
|
|
8
8
|
setNonce((n) => n + 1);
|
|
@@ -28,10 +28,10 @@ export function useResizeObserver<T extends HTMLElement = HTMLElement>(
|
|
|
28
28
|
options: UseResizeObserverOptions<T>,
|
|
29
29
|
): void {
|
|
30
30
|
const { ref, box = "content-box", skip } = options;
|
|
31
|
-
//
|
|
31
|
+
// oxlint-disable-next-line react/hook-use-state
|
|
32
32
|
const previousSize = useRef<Size>({ ...initialSize });
|
|
33
33
|
const onResize = useRef<((size: Size) => void) | undefined>(undefined);
|
|
34
|
-
//
|
|
34
|
+
// oxlint-disable-next-line react-hooks/react-compiler
|
|
35
35
|
onResize.current = options.onResize;
|
|
36
36
|
|
|
37
37
|
useEffect(() => {
|
package/src/main.tsx
CHANGED
|
@@ -8,7 +8,7 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// oxlint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
|
12
12
|
const el = document.getElementById("root");
|
|
13
13
|
if (el) {
|
|
14
14
|
if (!window.__MARIMO_MOUNT_CONFIG__) {
|
|
@@ -47,7 +47,7 @@ const removeWrappingBodyTags: TransformFn = (
|
|
|
47
47
|
if (isValidElement(reactNode) && "props" in reactNode) {
|
|
48
48
|
const props = reactNode.props as { children?: ReactNode };
|
|
49
49
|
const children = props.children;
|
|
50
|
-
return <>{children}</>; //
|
|
50
|
+
return <>{children}</>; // oxlint-disable-line react/jsx-no-useless-fragment
|
|
51
51
|
}
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
@@ -62,7 +62,7 @@ const removeWrappingHtmlTags: TransformFn = (
|
|
|
62
62
|
if (isValidElement(reactNode) && "props" in reactNode) {
|
|
63
63
|
const props = reactNode.props as { children?: ReactNode };
|
|
64
64
|
const children = props.children;
|
|
65
|
-
return <>{children}</>; //
|
|
65
|
+
return <>{children}</>; // oxlint-disable-line react/jsx-no-useless-fragment
|
|
66
66
|
}
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
@@ -104,7 +104,7 @@ const replaceSrcScripts = (domNode: DOMNode): JSX.Element | undefined => {
|
|
|
104
104
|
script.src = src;
|
|
105
105
|
document.head.append(script);
|
|
106
106
|
}
|
|
107
|
-
//
|
|
107
|
+
// oxlint-disable-next-line react/jsx-no-useless-fragment
|
|
108
108
|
return <></>;
|
|
109
109
|
}
|
|
110
110
|
};
|
|
@@ -58,7 +58,7 @@ describe("isCustomMarimoElement", () => {
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
describe("connectedCallback - light DOM nesting detection", () => {
|
|
61
|
-
//
|
|
61
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
62
62
|
let createRootSpy: any;
|
|
63
63
|
const mockRoot = {
|
|
64
64
|
render: vi.fn(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
/*
|
|
3
|
+
/* oxlint-disable unicorn/prefer-spread */
|
|
4
4
|
/**
|
|
5
5
|
* WebComponent Factory for React Components
|
|
6
6
|
*
|
|
@@ -88,7 +88,7 @@ interface PluginSlotProps<T> {
|
|
|
88
88
|
|
|
89
89
|
/* Handles synchronization of value on behalf of the component */
|
|
90
90
|
|
|
91
|
-
//
|
|
91
|
+
// oxlint-disable-next-line react/function-component-definition
|
|
92
92
|
function PluginSlotInternal<T>(
|
|
93
93
|
{ hostElement, plugin, children, getInitialValue }: PluginSlotProps<T>,
|
|
94
94
|
ref: React.Ref<PluginSlotHandle>,
|
|
@@ -231,7 +231,7 @@ function PluginSlotInternal<T>(
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
return methods;
|
|
234
|
-
//
|
|
234
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
235
235
|
}, [plugin.functions, hostElement, resetNonce]);
|
|
236
236
|
|
|
237
237
|
// If we failed to parse the initial value, render an error
|
|
@@ -265,7 +265,7 @@ function PluginSlotInternal<T>(
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
const PluginSlot: React.ForwardRefExoticComponent<
|
|
268
|
-
//
|
|
268
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
269
269
|
PluginSlotProps<any> & React.RefAttributes<PluginSlotHandle>
|
|
270
270
|
> = React.forwardRef(PluginSlotInternal);
|
|
271
271
|
|
package/src/plugins/core/rpc.ts
CHANGED
|
@@ -205,7 +205,7 @@ interface Data<T> {
|
|
|
205
205
|
cellHoverTexts?: Record<string, Record<string, string | null>> | null;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
//
|
|
208
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
209
209
|
type DataTableFunctions = {
|
|
210
210
|
download_as: DownloadAsArgs;
|
|
211
211
|
get_column_summaries: <T>(opts: {}) => Promise<ColumnSummaries<T>>;
|
|
@@ -62,7 +62,7 @@ interface FileInfo {
|
|
|
62
62
|
is_directory: boolean;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
//
|
|
65
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
66
66
|
type PluginFunctions = {
|
|
67
67
|
list_directory: (req: { path: string }) => Promise<{
|
|
68
68
|
files: FileInfo[];
|
|
@@ -44,7 +44,7 @@ interface Data {
|
|
|
44
44
|
* is clicked, this plugin assumes the value of the associated plugin.
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
|
-
//
|
|
47
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
48
48
|
type Functions = {
|
|
49
49
|
validate: (req: { value?: unknown }) => Promise<string | undefined | null>;
|
|
50
50
|
};
|
|
@@ -52,7 +52,7 @@ beforeEach(() => {
|
|
|
52
52
|
|
|
53
53
|
// jsdom's PointerEvent doesn't properly inherit MouseEvent properties
|
|
54
54
|
// like clientX. Polyfill it so fireEvent.pointerDown/Move/Up work.
|
|
55
|
-
//
|
|
55
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
56
56
|
(globalThis as any).PointerEvent = class PointerEvent extends MouseEvent {
|
|
57
57
|
readonly pointerId: number;
|
|
58
58
|
constructor(type: string, init: PointerEventInit = {}) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Base64String } from "@/utils/json/base64";
|
|
3
3
|
import type { TypedString } from "@/utils/typed";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
6
6
|
export type EventHandler = (...args: any[]) => void;
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -13,7 +13,7 @@ export type WidgetModelId = TypedString<"WidgetModelId">;
|
|
|
13
13
|
/**
|
|
14
14
|
* AnyWidget model state with buffers.
|
|
15
15
|
*/
|
|
16
|
-
//
|
|
16
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
17
17
|
export type ModelState = Record<string | number, any>;
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import type { AnyWidget, Experimental } from "@anywidget/types";
|
|
5
5
|
import { asRemoteURL } from "@/core/runtime/config";
|
|
@@ -13,7 +13,7 @@ const LazyChatbot = React.lazy(() =>
|
|
|
13
13
|
import("./chat-ui").then((m) => ({ default: m.Chatbot })),
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
//
|
|
16
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
17
17
|
export type PluginFunctions = {
|
|
18
18
|
get_chat_history: (req: {}) => Promise<{ messages: UIMessage[] }>;
|
|
19
19
|
delete_chat_history: (req: {}) => Promise<null>;
|
|
@@ -469,7 +469,7 @@ export const Chatbot: React.FC<Props> = (props) => {
|
|
|
469
469
|
resetInput();
|
|
470
470
|
}}
|
|
471
471
|
ref={formRef}
|
|
472
|
-
//
|
|
472
|
+
// oxlint-ignore-next-line -- inert is used to disable the entire form
|
|
473
473
|
inert={props.disabled || undefined}
|
|
474
474
|
className={cn(
|
|
475
475
|
"flex w-full border-t border-(--slate-6) px-2 py-1 items-center",
|
|
@@ -227,7 +227,7 @@ export const GlideDataEditor = <T,>({
|
|
|
227
227
|
|
|
228
228
|
// Force re-render to update the total rows
|
|
229
229
|
rerender();
|
|
230
|
-
//
|
|
230
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
231
231
|
}, [data.length]);
|
|
232
232
|
|
|
233
233
|
const getCellContent = useCallback(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-base-to-string */
|
|
3
3
|
import * as cql from "compassql/build/src";
|
|
4
4
|
import { createStore, Provider, useAtomValue } from "jotai";
|
|
5
5
|
import { ListFilterIcon } from "lucide-react";
|
|
@@ -268,7 +268,7 @@ const HorizontalCarouselItem = ({
|
|
|
268
268
|
);
|
|
269
269
|
};
|
|
270
270
|
// Make the plot responsive
|
|
271
|
-
//
|
|
271
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
272
272
|
function makeResponsive(spec: any) {
|
|
273
273
|
// NOTE: for row/column, this applies to the inner plot
|
|
274
274
|
// so we tend to overflow due to the legends,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-base-to-string */
|
|
3
3
|
|
|
4
4
|
import { ExpandedType } from "compassql/build/src/query/expandedtype";
|
|
5
5
|
import { PrimitiveType, type Schema } from "compassql/build/src/schema";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-base-to-string */
|
|
3
3
|
import type { FieldQuery } from "compassql/build/src/query/encoding";
|
|
4
4
|
import { type FieldFunction, isAggregateOp, type TimeUnitOp } from "./types";
|
|
5
5
|
|
|
@@ -28,7 +28,7 @@ export interface Result {
|
|
|
28
28
|
limit: number;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// oxlint-disable-next-line typescript/no-explicit-any, typescript/no-redundant-type-constituents
|
|
32
32
|
export type TopLevelFacetedUnitSpec = TopLevel<FacetedUnitSpec<any, any>> & {
|
|
33
33
|
data: NamedData;
|
|
34
34
|
};
|
|
@@ -54,7 +54,7 @@ interface Data {
|
|
|
54
54
|
lazy: boolean;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
//
|
|
57
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
58
58
|
type PluginFunctions = {
|
|
59
59
|
get_dataframe: (req: {}) => Promise<{
|
|
60
60
|
url: string;
|
|
@@ -194,7 +194,7 @@ export function isConditionValueValid(operator: string, value: unknown) {
|
|
|
194
194
|
return possibleSchemas.some((schema) => schema.safeParse(value).success);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
//
|
|
197
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
198
198
|
const safeGet = (obj: any, key: string): [z.ZodType] | [] => {
|
|
199
199
|
if (obj[key]) {
|
|
200
200
|
return obj[key];
|
|
@@ -57,7 +57,7 @@ const MatplotlibComponent = (props: MatplotlibState) => {
|
|
|
57
57
|
controller.abort();
|
|
58
58
|
instance.current = null;
|
|
59
59
|
};
|
|
60
|
-
//
|
|
60
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
61
61
|
}, []);
|
|
62
62
|
|
|
63
63
|
// No dependency array: intentionally syncs all props into the imperative
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
5
5
|
import { z } from "zod";
|
|
@@ -74,7 +74,7 @@ interface PanelData {
|
|
|
74
74
|
|
|
75
75
|
type T = Record<string, unknown>;
|
|
76
76
|
|
|
77
|
-
//
|
|
77
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
78
78
|
type PluginFunctions = {
|
|
79
79
|
send_to_widget: <T>(req: {
|
|
80
80
|
message?: unknown;
|
|
@@ -4,7 +4,7 @@ import type * as PlotlyTypes from "plotly.js";
|
|
|
4
4
|
// Import the pre-built dist bundle, not the source entry point.
|
|
5
5
|
// The source entry point requires Node.js polyfills (e.g. `buffer/`)
|
|
6
6
|
// that are unavailable in the browser/bundler environment.
|
|
7
|
-
//
|
|
7
|
+
// oxlint-disable-next-line typescript/ban-ts-comment
|
|
8
8
|
// @ts-expect-error — no type declarations for dist path, we use PlotlyTypes above
|
|
9
9
|
import Plotly from "plotly.js/dist/plotly";
|
|
10
10
|
import { useEffect, useRef } from "react";
|
|
@@ -107,7 +107,7 @@ export const Plot = (props: PlotProps) => {
|
|
|
107
107
|
|
|
108
108
|
const plotlyEl = el as unknown as PlotlyElement;
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// oxlint-disable-next-line typescript/ban-types -- Plotly's event API uses generic function references
|
|
111
111
|
const attached: {
|
|
112
112
|
plotlyName: string;
|
|
113
113
|
handler: (...args: never[]) => void;
|
|
@@ -131,7 +131,7 @@ export const Plot = (props: PlotProps) => {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
// Re-sync whenever any event handler prop changes
|
|
134
|
-
//
|
|
134
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
135
135
|
},
|
|
136
136
|
EVENT_NAMES.map((name) => props[propName(name)]),
|
|
137
137
|
);
|