@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
|
@@ -329,7 +329,7 @@ export const GridLayoutRenderer: React.FC<Props> = ({
|
|
|
329
329
|
<div
|
|
330
330
|
key={cell.id}
|
|
331
331
|
draggable={true}
|
|
332
|
-
//
|
|
332
|
+
// oxlint-disable-next-line react/no-unknown-property
|
|
333
333
|
unselectable="on"
|
|
334
334
|
data-cell-id={cell.id}
|
|
335
335
|
// Firefox requires some kind of initialization which we can do by adding this attribute
|
|
@@ -7,7 +7,7 @@ import type { ICellRendererPlugin, LayoutType } from "./types";
|
|
|
7
7
|
import { VerticalLayoutPlugin } from "./vertical-layout/vertical-layout";
|
|
8
8
|
|
|
9
9
|
// If more renderers are added, we may want to consider lazy loading them.
|
|
10
|
-
//
|
|
10
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
11
11
|
export const cellRendererPlugins: ICellRendererPlugin<any, any>[] = [
|
|
12
12
|
GridLayoutPlugin,
|
|
13
13
|
SlidesLayoutPlugin,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-empty-object-type */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The serialized form of a slides layout.
|
|
6
6
|
* This must be backwards-compatible as it is stored on the user's disk.
|
|
7
7
|
*/
|
|
8
|
-
//
|
|
8
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
9
9
|
export type SerializedSlidesLayout = {};
|
|
10
10
|
|
|
11
11
|
export interface SlidesLayout extends SerializedSlidesLayout {
|
package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts
CHANGED
|
@@ -110,9 +110,9 @@ describe("useFocusFirstEditor", () => {
|
|
|
110
110
|
expect(querySelectorSpy).toHaveBeenCalledWith(
|
|
111
111
|
'[data-cell-name="testCell"]',
|
|
112
112
|
);
|
|
113
|
-
//
|
|
113
|
+
// oxlint-disable-next-line typescript/unbound-method
|
|
114
114
|
expect(mockElement.scrollIntoView).toHaveBeenCalled();
|
|
115
|
-
//
|
|
115
|
+
// oxlint-disable-next-line typescript/unbound-method
|
|
116
116
|
expect(mockElement.focus).toHaveBeenCalled();
|
|
117
117
|
expect(mockEditor.focus).toHaveBeenCalled();
|
|
118
118
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
import { describe, expect, it } from "vitest";
|
|
4
4
|
import type { OutputMessage } from "@/core/kernel/messages";
|
|
5
5
|
import { groupCellsByColumn, shouldHideCode } from "../vertical-layout";
|
|
@@ -221,7 +221,9 @@ export const FindReplace: React.FC = () => {
|
|
|
221
221
|
variant="outline"
|
|
222
222
|
className="h-6 text-xs"
|
|
223
223
|
onClick={() => {
|
|
224
|
-
replaceNext()
|
|
224
|
+
if (replaceNext()) {
|
|
225
|
+
resetMatches();
|
|
226
|
+
}
|
|
225
227
|
}}
|
|
226
228
|
disabled={state.findText === ""}
|
|
227
229
|
>
|
|
@@ -35,7 +35,7 @@ export interface FieldOptions {
|
|
|
35
35
|
optionRegex?: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//
|
|
38
|
+
// oxlint-disable-next-line typescript/no-redeclare
|
|
39
39
|
export const FieldOptions = {
|
|
40
40
|
of(options: FieldOptions): string {
|
|
41
41
|
return JSON.stringify(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
3
|
-
/*
|
|
2
|
+
/* oxlint-disable react/jsx-no-comment-textnodes */
|
|
3
|
+
/* oxlint-disable react/jsx-no-target-blank */
|
|
4
4
|
|
|
5
5
|
import { useAtomValue } from "jotai";
|
|
6
6
|
import { CopyIcon, DownloadIcon } from "lucide-react";
|
|
@@ -143,7 +143,7 @@ const TerminalComponent: React.FC<TerminalComponentProps> = ({
|
|
|
143
143
|
const terminalRef = useRef<HTMLDivElement>(null);
|
|
144
144
|
const wsRef = useRef<WebSocket | null>(null);
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// oxlint-disable-next-line react/hook-use-state
|
|
147
147
|
const [{ terminal, fitAddon, searchAddon }] = useState(() => {
|
|
148
148
|
// Create a new terminal instance
|
|
149
149
|
const term = new Terminal({
|
|
@@ -300,7 +300,7 @@ const TerminalComponent: React.FC<TerminalComponentProps> = ({
|
|
|
300
300
|
return () => {
|
|
301
301
|
// noop
|
|
302
302
|
};
|
|
303
|
-
//
|
|
303
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
304
304
|
}, [initialized]);
|
|
305
305
|
|
|
306
306
|
// Process pending commands when terminal is ready
|
|
@@ -335,7 +335,7 @@ const TerminalComponent: React.FC<TerminalComponentProps> = ({
|
|
|
335
335
|
}
|
|
336
336
|
|
|
337
337
|
return;
|
|
338
|
-
//
|
|
338
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
339
339
|
}, [visible]);
|
|
340
340
|
|
|
341
341
|
// On mount
|
|
@@ -373,7 +373,7 @@ const TerminalComponent: React.FC<TerminalComponentProps> = ({
|
|
|
373
373
|
return () => {
|
|
374
374
|
abortController.abort();
|
|
375
375
|
};
|
|
376
|
-
//
|
|
376
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
377
377
|
}, []);
|
|
378
378
|
|
|
379
379
|
return (
|
|
@@ -108,7 +108,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
108
108
|
|
|
109
109
|
React.useImperativeHandle(
|
|
110
110
|
ref,
|
|
111
|
-
//
|
|
111
|
+
// oxlint-disable-next-line typescript/non-nullable-type-assertion-style
|
|
112
112
|
() => buttonRef.current as HTMLButtonElement,
|
|
113
113
|
);
|
|
114
114
|
|
|
@@ -61,7 +61,7 @@ const CommandInput = React.forwardRef<
|
|
|
61
61
|
>(({ className, icon, rootClassName, ...props }, ref) => (
|
|
62
62
|
<div
|
|
63
63
|
className={cn("flex items-center border-b px-3", rootClassName)}
|
|
64
|
-
//
|
|
64
|
+
// oxlint-disable-next-line react/no-unknown-property
|
|
65
65
|
cmdk-input-wrapper=""
|
|
66
66
|
>
|
|
67
67
|
{icon === null ? null : (
|
|
@@ -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 { beforeEach, describe, expect, it } from "vitest";
|
|
5
5
|
import { cellId, variableName } from "@/__tests__/branded";
|
|
@@ -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 { describe, expect, it, vi } from "vitest";
|
|
5
5
|
import { cellId, variableName } from "@/__tests__/branded";
|
|
@@ -98,7 +98,7 @@ export abstract class AIContextProvider<
|
|
|
98
98
|
* Registry for managing different AI context providers
|
|
99
99
|
*/
|
|
100
100
|
export class AIContextRegistry<T extends AIContextItem> {
|
|
101
|
-
//
|
|
101
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
102
102
|
private providers = new Set<AIContextProvider<any>>();
|
|
103
103
|
|
|
104
104
|
/**
|
|
@@ -106,7 +106,7 @@ export class AIContextRegistry<T extends AIContextItem> {
|
|
|
106
106
|
*/
|
|
107
107
|
register<U extends AIContextItem>(
|
|
108
108
|
provider: AIContextProvider<U>,
|
|
109
|
-
//
|
|
109
|
+
// oxlint-disable-next-line typescript/prefer-return-this-type
|
|
110
110
|
): AIContextRegistry<U | T> {
|
|
111
111
|
this.providers.add(provider);
|
|
112
112
|
return this;
|
|
@@ -14,7 +14,7 @@ import { formatToolDescription } from "./utils";
|
|
|
14
14
|
|
|
15
15
|
export type AnyZodObject = ZodObject<z.ZodRawShape>;
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
18
18
|
type StoredTool = AiTool<any, any>;
|
|
19
19
|
|
|
20
20
|
interface InvokeResult<TName> {
|
|
@@ -45,7 +45,7 @@ vi.mock("@/core/codemirror/editing/commands", () => ({
|
|
|
45
45
|
vi.mock("../scrollCellIntoView", async (importOriginal) => {
|
|
46
46
|
const actual = await importOriginal();
|
|
47
47
|
return {
|
|
48
|
-
//
|
|
48
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
49
49
|
...(actual as any),
|
|
50
50
|
scrollToTop: vi.fn(),
|
|
51
51
|
scrollToBottom: vi.fn(),
|
|
@@ -1023,7 +1023,7 @@ describe("cell reducer", () => {
|
|
|
1023
1023
|
});
|
|
1024
1024
|
cell = cells[0];
|
|
1025
1025
|
expect(cell.status).toBe("idle");
|
|
1026
|
-
//
|
|
1026
|
+
// oxlint-disable-next-line typescript/no-explicit-any no-unsafe-optional-chaining
|
|
1027
1027
|
expect((cell.output?.data as any)[0].msg).toBe(
|
|
1028
1028
|
"This cell wasn't run because an ancestor was stopped with `mo.stop`: ",
|
|
1029
1029
|
);
|
|
@@ -40,7 +40,7 @@ describe("scrollCellIntoView", () => {
|
|
|
40
40
|
|
|
41
41
|
it("should scroll active line when editor has focus", () => {
|
|
42
42
|
const mockEditor = { hasFocus: true };
|
|
43
|
-
//
|
|
43
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
44
44
|
mockGetCellEditorView.mockReturnValue(mockEditor as any);
|
|
45
45
|
|
|
46
46
|
scrollCellIntoView(cid);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type * as api from "@marimo-team/marimo-api";
|
|
4
|
-
/*
|
|
4
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
5
5
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
6
6
|
import { Mocks } from "@/__mocks__/common";
|
|
7
7
|
import { cellId } from "@/__tests__/branded";
|
package/src/core/cells/cells.ts
CHANGED
|
@@ -80,7 +80,7 @@ export interface NotebookState {
|
|
|
80
80
|
*/
|
|
81
81
|
history: {
|
|
82
82
|
name: string;
|
|
83
|
-
//
|
|
83
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
84
84
|
serializedEditorState: any;
|
|
85
85
|
column: CellColumnId;
|
|
86
86
|
index: CellIndex;
|
package/src/core/cells/ids.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-redeclare */
|
|
3
3
|
|
|
4
4
|
import type { components } from "@marimo-team/marimo-api";
|
|
5
5
|
import { OBJECT_ID_ATTR } from "@/core/dom/ui-element-constants";
|
|
@@ -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 { Transport } from "@open-rpc/client-js/build/transports/Transport";
|
|
5
5
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
@@ -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 { WebSocketTransport } from "@open-rpc/client-js";
|
|
5
5
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
@@ -121,7 +121,7 @@ export class CopilotLanguageServerClient extends LanguageServerClient {
|
|
|
121
121
|
).request(method, params);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
//
|
|
124
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
125
125
|
override async notify(method: any, params: any): Promise<any> {
|
|
126
126
|
logger.debug("#notify", method, params);
|
|
127
127
|
return super.notify(method, params);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-empty-object-type */
|
|
3
3
|
|
|
4
4
|
export interface GitHubCopilotSignInInitiateResult {
|
|
5
5
|
verificationUri: string; // https://github.com/login/device
|
|
@@ -15,7 +15,7 @@ import { Facet } from "@codemirror/state";
|
|
|
15
15
|
export function singleFacet<T>() {
|
|
16
16
|
return Facet.define<T, T>({
|
|
17
17
|
combine: (values) => {
|
|
18
|
-
//
|
|
18
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
19
19
|
return values.find((v) => v !== undefined)!;
|
|
20
20
|
},
|
|
21
21
|
});
|
|
@@ -1722,9 +1722,9 @@ describe("tablesCompletionSource", () => {
|
|
|
1722
1722
|
};
|
|
1723
1723
|
|
|
1724
1724
|
const getCompletion = (extensions: Extension[]) => {
|
|
1725
|
-
//
|
|
1725
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
1726
1726
|
const ext = extensions.find((ext) => (ext as any).facet === undefined);
|
|
1727
|
-
//
|
|
1727
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
1728
1728
|
return (ext as any)?.value?.override?.[0];
|
|
1729
1729
|
};
|
|
1730
1730
|
|
|
@@ -2140,7 +2140,7 @@ describe("tablesCompletionSource", () => {
|
|
|
2140
2140
|
...mockStore.get(dataSourceConnectionsAtom),
|
|
2141
2141
|
connectionsMap: new Map([
|
|
2142
2142
|
[TEST_ENGINE, newConnection],
|
|
2143
|
-
//
|
|
2143
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
2144
2144
|
]) as any,
|
|
2145
2145
|
latestEngineSelected: TEST_ENGINE,
|
|
2146
2146
|
});
|
|
@@ -2153,7 +2153,7 @@ describe("tablesCompletionSource", () => {
|
|
|
2153
2153
|
mockStore.set(dataSourceConnectionsAtom, {
|
|
2154
2154
|
connectionsMap: new Map([
|
|
2155
2155
|
[TEST_ENGINE, mockConnection],
|
|
2156
|
-
//
|
|
2156
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
2157
2157
|
]) as any,
|
|
2158
2158
|
latestEngineSelected: TEST_ENGINE,
|
|
2159
2159
|
});
|
|
@@ -76,7 +76,7 @@ export class CompletionBuilder {
|
|
|
76
76
|
* Set a value at a nested path, creating intermediate objects as needed
|
|
77
77
|
*/
|
|
78
78
|
private setAt(path: string[], value: SQLNamespace): void {
|
|
79
|
-
//
|
|
79
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
80
80
|
let current: any = this.schema;
|
|
81
81
|
for (const key of path.slice(0, -1)) {
|
|
82
82
|
if (!current[key]) {
|
|
@@ -5,7 +5,7 @@ import type { EditorView } from "@codemirror/view";
|
|
|
5
5
|
/**
|
|
6
6
|
* Metadata for language adapters
|
|
7
7
|
*/
|
|
8
|
-
//
|
|
8
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
9
9
|
export type LanguageMetadata = Record<string, any>;
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -815,7 +815,7 @@ export class NotebookLanguageServerClient implements ILanguageServerClient {
|
|
|
815
815
|
...diag,
|
|
816
816
|
range: lens.reverseRange(diag.range, cellId),
|
|
817
817
|
};
|
|
818
|
-
//
|
|
818
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
819
819
|
diagnosticsByCellId.get(cellId)!.push(cellDiag);
|
|
820
820
|
break; // Exit inner loop once we find the matching cell
|
|
821
821
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
import { EditorView } from "@codemirror/view";
|
|
4
4
|
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
5
|
import { dndBundle } from "../dnd";
|
|
@@ -185,7 +185,7 @@ export const createSelectionLayer = (): Extension =>
|
|
|
185
185
|
.flatMap(([, state]) => {
|
|
186
186
|
const selectionRange = EditorSelection.range(
|
|
187
187
|
state.cursor.anchor,
|
|
188
|
-
//
|
|
188
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
189
189
|
state.cursor.head!,
|
|
190
190
|
);
|
|
191
191
|
const markers = RectangleMarker.forRange(
|
|
@@ -4,7 +4,7 @@ import { repl } from "@/utils/repl";
|
|
|
4
4
|
import { getRequestClient } from "../network/requests";
|
|
5
5
|
import { getResolvedMarimoConfig } from "./config";
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// oxlint-disable-next-line typescript/no-empty-object-type
|
|
8
8
|
export interface ExperimentalFeatures {
|
|
9
9
|
markdown: boolean; // Used in playground (community cloud)
|
|
10
10
|
wasm_layouts: boolean; // Used in playground (community cloud)
|
package/src/core/dom/outline.ts
CHANGED
|
@@ -39,7 +39,7 @@ function getOutline(html: string): Outline | null {
|
|
|
39
39
|
const document = parser.parseFromString(html, "text/html");
|
|
40
40
|
|
|
41
41
|
const headings = document.querySelectorAll(HEADER_TAGS);
|
|
42
|
-
//
|
|
42
|
+
// oxlint-disable-next-line unicorn/prefer-spread
|
|
43
43
|
for (const heading of Array.from(headings)) {
|
|
44
44
|
const name = heading.textContent;
|
|
45
45
|
// Check if the heading is within any of the excluded tags
|
|
@@ -55,7 +55,7 @@ describe("useEnrichCellOutputs", () => {
|
|
|
55
55
|
|
|
56
56
|
// Helper to set the mocked atom (cast to any to work around type mismatch)
|
|
57
57
|
const setCellsRuntime = (value: Record<CellId, CellRuntimeState>) => {
|
|
58
|
-
//
|
|
58
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
59
59
|
store.set(cellsRuntimeAtom as any, value);
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -15,7 +15,7 @@ function createHotkeys(
|
|
|
15
15
|
keys: Partial<Record<HotkeyAction, Hotkey>>,
|
|
16
16
|
): Record<HotkeyAction, Hotkey> {
|
|
17
17
|
return new Proxy(keys as Record<HotkeyAction, Hotkey>, {
|
|
18
|
-
//
|
|
18
|
+
// oxlint-ignore-next-line -- ok to have three arguments here (It's a web API)
|
|
19
19
|
get(target, p, receiver) {
|
|
20
20
|
const key = Reflect.get(target, p, receiver);
|
|
21
21
|
if (key === "undefined") {
|
|
@@ -73,7 +73,7 @@ function areKeysPressed(keys: string[], e: IKeyboardEvent): boolean {
|
|
|
73
73
|
// - US keyboards: "&"
|
|
74
74
|
// - Some layouts: "7"
|
|
75
75
|
// Using e.code (physical key) instead of e.key (produced character)
|
|
76
|
-
//
|
|
76
|
+
// oxlint-disable-next-line unicorn/prefer-ternary
|
|
77
77
|
if (/^\d$/.test(key) && e.shiftKey) {
|
|
78
78
|
satisfied &&= e.code === `Digit${key}`;
|
|
79
79
|
} else {
|
|
@@ -84,7 +84,7 @@ describe("IslandsPyodideBridge", () => {
|
|
|
84
84
|
beforeEach(() => {
|
|
85
85
|
vi.clearAllMocks();
|
|
86
86
|
// Reset the singleton by clearing the window property
|
|
87
|
-
//
|
|
87
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
88
88
|
delete (window as any)._marimo_private_IslandsPyodideBridge;
|
|
89
89
|
// Access the singleton - creates a fresh instance
|
|
90
90
|
bridge = IslandsPyodideBridge.INSTANCE;
|
|
@@ -92,7 +92,7 @@ describe("IslandsPyodideBridge", () => {
|
|
|
92
92
|
|
|
93
93
|
afterEach(() => {
|
|
94
94
|
// Clean up singleton
|
|
95
|
-
//
|
|
95
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
96
96
|
delete (window as any)._marimo_private_IslandsPyodideBridge;
|
|
97
97
|
});
|
|
98
98
|
|
|
@@ -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 { getWorkerRPC } from "@/core/wasm/rpc";
|
|
5
5
|
import { Deferred } from "@/utils/Deferred";
|
|
@@ -47,7 +47,7 @@ export class IslandsPyodideBridge implements RunRequests, EditRequests {
|
|
|
47
47
|
const blob = new Blob([js], { type: "application/javascript" });
|
|
48
48
|
const objURL = URL.createObjectURL(blob);
|
|
49
49
|
const worker = new Worker(
|
|
50
|
-
//
|
|
50
|
+
// oxlint-disable-next-line unicorn/relative-url-style
|
|
51
51
|
objURL,
|
|
52
52
|
{
|
|
53
53
|
type: "module",
|
|
@@ -65,7 +65,7 @@ export const MarimoOutputWrapper: React.FC<Props> = ({
|
|
|
65
65
|
// Lint still wants use to have the same event listeners per instance (which
|
|
66
66
|
// makes sense), so noop is used.
|
|
67
67
|
const maybeNoop = (fn: (e: KeyboardEvent) => void) =>
|
|
68
|
-
//
|
|
68
|
+
// oxlint-disable-next-line typescript/no-empty-function
|
|
69
69
|
alwaysShowRun ? () => {} : fn;
|
|
70
70
|
|
|
71
71
|
useEventListener(
|
|
@@ -72,7 +72,7 @@ export function parseMarimoIslandApps(): MarimoIslandApp[] {
|
|
|
72
72
|
if (!apps.has(id)) {
|
|
73
73
|
apps.set(id, { id, cells: [] });
|
|
74
74
|
}
|
|
75
|
-
//
|
|
75
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
76
76
|
const app = apps.get(id)!;
|
|
77
77
|
const idx = app.cells.length;
|
|
78
78
|
app.cells.push({
|
|
@@ -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 { WebSocketTransport } from "@open-rpc/client-js";
|
|
5
5
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-redeclare */
|
|
3
3
|
import type { components } from "@marimo-team/marimo-api";
|
|
4
4
|
import { Deferred } from "@/utils/Deferred";
|
|
5
5
|
import { generateUUID } from "@/utils/uuid";
|
package/src/core/network/api.ts
CHANGED
|
@@ -108,7 +108,7 @@ export const API = {
|
|
|
108
108
|
response: Response;
|
|
109
109
|
}): Promise<T> => {
|
|
110
110
|
if (response.error) {
|
|
111
|
-
//
|
|
111
|
+
// oxlint-disable-next-line typescript/prefer-promise-reject-errors
|
|
112
112
|
return Promise.reject(response.error);
|
|
113
113
|
}
|
|
114
114
|
return Promise.resolve(response.data as T);
|
|
@@ -118,7 +118,7 @@ export const API = {
|
|
|
118
118
|
response: Response;
|
|
119
119
|
}): Promise<null> => {
|
|
120
120
|
if (response.error) {
|
|
121
|
-
//
|
|
121
|
+
// oxlint-disable-next-line typescript/prefer-promise-reject-errors
|
|
122
122
|
return Promise.reject(response.error);
|
|
123
123
|
}
|
|
124
124
|
return Promise.resolve(null);
|
|
@@ -138,7 +138,7 @@ export function createLazyRequests(
|
|
|
138
138
|
await runtimeManager.init();
|
|
139
139
|
});
|
|
140
140
|
|
|
141
|
-
//
|
|
141
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
142
142
|
function wrapRequest<T extends (...args: any[]) => Promise<any>>(
|
|
143
143
|
request: T,
|
|
144
144
|
key: keyof AllRequests,
|
package/src/core/static/files.ts
CHANGED
|
@@ -18,7 +18,7 @@ export function patchFetch(
|
|
|
18
18
|
|
|
19
19
|
// Override the global fetch so when /@file/ is used, it returns the blob data
|
|
20
20
|
window.fetch = async (input, init) => {
|
|
21
|
-
//
|
|
21
|
+
// oxlint-disable-next-line typescript/no-base-to-string
|
|
22
22
|
const urlString = input instanceof Request ? input.url : input.toString();
|
|
23
23
|
|
|
24
24
|
if (urlString.startsWith("data:")) {
|
|
@@ -6,7 +6,7 @@ import { isPlatformMac } from "../hotkeys/shortcuts";
|
|
|
6
6
|
import { isWasm } from "../wasm/utils";
|
|
7
7
|
|
|
8
8
|
export const isEmbedded =
|
|
9
|
-
//
|
|
9
|
+
// oxlint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
|
|
10
10
|
typeof window !== "undefined" && window.parent !== window;
|
|
11
11
|
|
|
12
12
|
// To enable keyboard shortcuts of VS Code when the iframe is focused,
|