@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
|
@@ -160,7 +160,7 @@ function findCommonParams(
|
|
|
160
160
|
if (!signatureCounts.has(signature)) {
|
|
161
161
|
signatureCounts.set(signature, { count: 0, param });
|
|
162
162
|
}
|
|
163
|
-
//
|
|
163
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
164
164
|
signatureCounts.get(signature)!.count++;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -25,7 +25,7 @@ export type {
|
|
|
25
25
|
} from "vega-lite/types_unstable/spec/unit.js";
|
|
26
26
|
|
|
27
27
|
export type VegaLiteUnitSpec = TopLevelUnitSpec<Field>;
|
|
28
|
-
//
|
|
28
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
29
29
|
export type GenericVegaSpec = GenericUnitSpec<any, any, any>;
|
|
30
30
|
export type EncodingType = keyof Encoding<Field>;
|
|
31
31
|
export type Encodings = Encoding<Field>;
|
|
@@ -14,7 +14,7 @@ interface Data {
|
|
|
14
14
|
showLoadingIndicator: boolean;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
//
|
|
17
|
+
// oxlint-disable-next-line typescript/consistent-type-definitions
|
|
18
18
|
type PluginFunctions = {
|
|
19
19
|
load: (req: {}) => Promise<{
|
|
20
20
|
html: string;
|
|
@@ -63,7 +63,7 @@ function randomAlpha() {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
const Mermaid: React.FC<Props> = ({ diagram }) => {
|
|
66
|
-
//
|
|
66
|
+
// oxlint-disable-next-line react/hook-use-state
|
|
67
67
|
const [id] = useState(() => randomAlpha());
|
|
68
68
|
|
|
69
69
|
const darkMode = useTheme().theme === "dark";
|
package/src/plugins/plugins.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 { NavigationMenuPlugin } from "@/plugins/layout/NavigationMenuPlugin";
|
|
5
5
|
import { initializeUIElement } from "../core/dom/ui-element";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable react-hooks/rules-of-hooks */
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { DataFrameComponent } from "@/plugins/impl/data-frames/DataFramePlugin";
|
|
@@ -52,7 +52,7 @@ const Editor = (opts: { extensions?: Extension[] }): React.ReactNode => {
|
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
return () => view.destroy();
|
|
55
|
-
//
|
|
55
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
56
56
|
}, [ref.current]);
|
|
57
57
|
|
|
58
58
|
return <div className="cm" ref={ref} />;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable react-hooks/rules-of-hooks */
|
|
3
3
|
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { SwitchableMultiSelect } from "@/components/forms/switchable-multi-select";
|
package/src/utils/Logger.ts
CHANGED
|
@@ -124,7 +124,7 @@ describe("arrays", () => {
|
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
it("should handle undefined/null array", () => {
|
|
127
|
-
//
|
|
127
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
128
128
|
expect(arrayToggle(undefined as any, 1)).toEqual([1]);
|
|
129
129
|
});
|
|
130
130
|
|
|
@@ -30,7 +30,7 @@ describe("Blob serialization and deserialization", () => {
|
|
|
30
30
|
const serialized = await serializeBlob(testBlob);
|
|
31
31
|
const deserialized = deserializeBlob(serialized);
|
|
32
32
|
const reader = new FileReader();
|
|
33
|
-
//
|
|
33
|
+
// oxlint-disable-next-line unicorn/prefer-blob-reading-methods
|
|
34
34
|
reader.readAsText(deserialized);
|
|
35
35
|
await new Promise((resolve) => {
|
|
36
36
|
reader.onload = () => {
|
|
@@ -73,7 +73,7 @@ describe("dates", () => {
|
|
|
73
73
|
|
|
74
74
|
describe("with different locales", () => {
|
|
75
75
|
// Save original implementation
|
|
76
|
-
//
|
|
76
|
+
// oxlint-disable-next-line typescript/unbound-method
|
|
77
77
|
const originalToLocaleDateString = Date.prototype.toLocaleDateString;
|
|
78
78
|
|
|
79
79
|
afterAll(() => {
|
|
@@ -46,7 +46,7 @@ describe("prettyError", () => {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it("handles circular references", () => {
|
|
49
|
-
//
|
|
49
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
50
50
|
const circular: any = { foo: "bar" };
|
|
51
51
|
circular.self = circular;
|
|
52
52
|
expect(prettyError(circular)).toBe("[object Object]");
|
|
@@ -29,9 +29,9 @@ describe("Objects", () => {
|
|
|
29
29
|
});
|
|
30
30
|
|
|
31
31
|
it("should return falsy input unchanged", () => {
|
|
32
|
-
//
|
|
32
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
33
33
|
expect(Objects.mapValues(null as any, (v) => v)).toBe(null);
|
|
34
|
-
//
|
|
34
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
35
35
|
expect(Objects.mapValues(undefined as any, (v) => v)).toBe(undefined);
|
|
36
36
|
});
|
|
37
37
|
});
|
|
@@ -249,7 +249,7 @@ describe("Objects", () => {
|
|
|
249
249
|
|
|
250
250
|
it("should handle omitting non-existent keys", () => {
|
|
251
251
|
const obj = { a: 1, b: 2 };
|
|
252
|
-
//
|
|
252
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
253
253
|
const result = Objects.omit(obj, ["c" as any]);
|
|
254
254
|
expect(result).toEqual({ a: 1, b: 2 });
|
|
255
255
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
4
|
import { waitForWs } from "../waitForWs";
|
|
5
5
|
|
package/src/utils/arrays.ts
CHANGED
|
@@ -53,7 +53,7 @@ export function arrayShallowEquals<T>(a: T[], b: T[]): boolean {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export const Arrays = {
|
|
56
|
-
//
|
|
56
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
57
57
|
EMPTY: [] as any,
|
|
58
58
|
zip: <T, U>(a: T[], b: U[]): [T, U][] => {
|
|
59
59
|
invariant(a.length === b.length, "Arrays must be the same length");
|
package/src/utils/assertNever.ts
CHANGED
|
@@ -15,6 +15,6 @@ export function assertNever(x: never): never {
|
|
|
15
15
|
*/
|
|
16
16
|
export function logNever(x: never): void {
|
|
17
17
|
Logger.warn(`Unexpected object: ${JSON.stringify(x)}`);
|
|
18
|
-
//
|
|
18
|
+
// oxlint-ignore-next-line -- noVoidTypeReturn: function returns void but value is needed for exhaustiveness
|
|
19
19
|
return x;
|
|
20
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
/*
|
|
2
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Debounces multiple calls to a loader function, returning the same promise for
|
|
@@ -14,7 +14,7 @@ export function batch<T, REQ extends unknown[]>(
|
|
|
14
14
|
return (...args: REQ): Promise<T> => {
|
|
15
15
|
const key = toKey(...args);
|
|
16
16
|
if (requestCache.has(key)) {
|
|
17
|
-
//
|
|
17
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
18
18
|
return requestCache.get(key)!;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -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 { atom, useSetAtom } from "jotai";
|
|
5
5
|
import type { Reducer } from "react";
|
|
@@ -139,7 +139,7 @@ export function createReducerAndAtoms<
|
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
//
|
|
142
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
143
143
|
return actionsMap.get(setState)!;
|
|
144
144
|
}
|
|
145
145
|
|
package/src/utils/id-tree.tsx
CHANGED
|
@@ -43,7 +43,7 @@ export class TreeNode<T> {
|
|
|
43
43
|
const stack = [...this.children];
|
|
44
44
|
|
|
45
45
|
while (stack.length > 0) {
|
|
46
|
-
//
|
|
46
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
47
47
|
const node = stack.pop()!;
|
|
48
48
|
count++;
|
|
49
49
|
|
|
@@ -62,7 +62,7 @@ export class TreeNode<T> {
|
|
|
62
62
|
const stack = [...this.children];
|
|
63
63
|
|
|
64
64
|
while (stack.length > 0) {
|
|
65
|
-
//
|
|
65
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
66
66
|
const node = stack.pop()!;
|
|
67
67
|
result.push(node.value);
|
|
68
68
|
|
package/src/utils/idle.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function onIdle(callback: () => void) {
|
|
9
9
|
if ("scheduler" in window) {
|
|
10
|
-
//
|
|
10
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
11
11
|
(window as any).scheduler.postTask(callback, {
|
|
12
12
|
priority: "background",
|
|
13
13
|
});
|
package/src/utils/invariant.ts
CHANGED
|
@@ -29,8 +29,7 @@ export function invariant(
|
|
|
29
29
|
if (!expression) {
|
|
30
30
|
if (import.meta.env.DEV) {
|
|
31
31
|
// Triggers a breakpoint in development; stripped out in production builds.
|
|
32
|
-
//
|
|
33
|
-
debugger; // eslint-disable-line no-debugger
|
|
32
|
+
debugger; // oxlint-disable-line no-debugger -- stripped out in production builds
|
|
34
33
|
}
|
|
35
34
|
throw new Error(msg);
|
|
36
35
|
}
|
package/src/utils/maps.ts
CHANGED
package/src/utils/math.ts
CHANGED
package/src/utils/multi-map.ts
CHANGED
|
@@ -16,7 +16,7 @@ export class MultiMap<K, V> {
|
|
|
16
16
|
|
|
17
17
|
add(key: K, value: V): void {
|
|
18
18
|
if (this.map.has(key)) {
|
|
19
|
-
//
|
|
19
|
+
// oxlint-disable-next-line typescript/no-non-null-assertion
|
|
20
20
|
this.map.get(key)!.push(value);
|
|
21
21
|
} else {
|
|
22
22
|
this.map.set(key, [value]);
|
package/src/utils/objects.ts
CHANGED
|
@@ -106,7 +106,7 @@ export const Objects = {
|
|
|
106
106
|
return Objects.filter(obj, (_, key) => !set.has(key));
|
|
107
107
|
},
|
|
108
108
|
|
|
109
|
-
//
|
|
109
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
110
110
|
pick<V extends Record<string, any>, K extends string>(
|
|
111
111
|
obj: V,
|
|
112
112
|
keys: readonly K[],
|
package/src/utils/once.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { arrayShallowEquals } from "./arrays";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
6
6
|
export function once<T extends (...args: any[]) => any>(fn: T): T {
|
|
7
7
|
let result: ReturnType<T>;
|
|
8
8
|
let called = false;
|
|
@@ -18,7 +18,7 @@ export function once<T extends (...args: any[]) => any>(fn: T): T {
|
|
|
18
18
|
} as T;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
22
22
|
export function memoizeLastValue<T extends (...args: any[]) => any>(fn: T): T {
|
|
23
23
|
let result: ReturnType<T>;
|
|
24
24
|
let lastArgs: Parameters<T> | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
export function staticImplements<T>() {
|
|
3
3
|
return <U extends T>(_constructor: U) => {
|
|
4
|
-
//
|
|
4
|
+
// oxlint-disable-next-line typescript/no-unused-expressions
|
|
5
5
|
_constructor;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
@@ -46,5 +46,5 @@ export function adaptForLocalStorage<Value, Serializable>(opts: {
|
|
|
46
46
|
/**
|
|
47
47
|
* A JSON storage adapter that uses the best available storage.
|
|
48
48
|
*/
|
|
49
|
-
//
|
|
49
|
+
// oxlint-disable-next-line typescript/no-explicit-any
|
|
50
50
|
export const jotaiJsonStorage = createJSONStorage<any>(() => availableStorage);
|
package/src/utils/tracer.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
|
|
3
|
+
/* oxlint-disable typescript/no-explicit-any */
|
|
4
|
+
/* oxlint-disable no-console -- for debugging */
|
|
5
5
|
|
|
6
6
|
import { Logger } from "./Logger";
|
|
7
7
|
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
|
-
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
3
|
-
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
4
|
-
import { l as createLucideIcon } from "./dist-D_UjpfOY.js";
|
|
5
|
-
import { g as Logger, r as cva, y as cn } from "./button-DNlNlZY_.js";
|
|
6
|
-
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
7
|
-
import { _ as useSetAtom, y as atom } from "./useTheme-MWfxn4oz.js";
|
|
8
|
-
var Calendar = createLucideIcon("calendar", [
|
|
9
|
-
["path", {
|
|
10
|
-
d: "M8 2v4",
|
|
11
|
-
key: "1cmpym"
|
|
12
|
-
}],
|
|
13
|
-
["path", {
|
|
14
|
-
d: "M16 2v4",
|
|
15
|
-
key: "4m81vk"
|
|
16
|
-
}],
|
|
17
|
-
["rect", {
|
|
18
|
-
width: "18",
|
|
19
|
-
height: "18",
|
|
20
|
-
x: "3",
|
|
21
|
-
y: "4",
|
|
22
|
-
rx: "2",
|
|
23
|
-
key: "1hopcy"
|
|
24
|
-
}],
|
|
25
|
-
["path", {
|
|
26
|
-
d: "M3 10h18",
|
|
27
|
-
key: "8toen8"
|
|
28
|
-
}]
|
|
29
|
-
]), Hash = createLucideIcon("hash", [
|
|
30
|
-
["line", {
|
|
31
|
-
x1: "4",
|
|
32
|
-
x2: "20",
|
|
33
|
-
y1: "9",
|
|
34
|
-
y2: "9",
|
|
35
|
-
key: "4lhtct"
|
|
36
|
-
}],
|
|
37
|
-
["line", {
|
|
38
|
-
x1: "4",
|
|
39
|
-
x2: "20",
|
|
40
|
-
y1: "15",
|
|
41
|
-
y2: "15",
|
|
42
|
-
key: "vyu0kd"
|
|
43
|
-
}],
|
|
44
|
-
["line", {
|
|
45
|
-
x1: "10",
|
|
46
|
-
x2: "8",
|
|
47
|
-
y1: "3",
|
|
48
|
-
y2: "21",
|
|
49
|
-
key: "1ggp8o"
|
|
50
|
-
}],
|
|
51
|
-
["line", {
|
|
52
|
-
x1: "16",
|
|
53
|
-
x2: "14",
|
|
54
|
-
y1: "3",
|
|
55
|
-
y2: "21",
|
|
56
|
-
key: "weycgp"
|
|
57
|
-
}]
|
|
58
|
-
]), ToggleLeft = createLucideIcon("toggle-left", [["circle", {
|
|
59
|
-
cx: "9",
|
|
60
|
-
cy: "12",
|
|
61
|
-
r: "3",
|
|
62
|
-
key: "u3jwor"
|
|
63
|
-
}], ["rect", {
|
|
64
|
-
width: "20",
|
|
65
|
-
height: "14",
|
|
66
|
-
x: "2",
|
|
67
|
-
y: "5",
|
|
68
|
-
rx: "7",
|
|
69
|
-
key: "g7kal2"
|
|
70
|
-
}]]), Type = createLucideIcon("type", [
|
|
71
|
-
["path", {
|
|
72
|
-
d: "M12 4v16",
|
|
73
|
-
key: "1654pz"
|
|
74
|
-
}],
|
|
75
|
-
["path", {
|
|
76
|
-
d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",
|
|
77
|
-
key: "e0r10z"
|
|
78
|
-
}],
|
|
79
|
-
["path", {
|
|
80
|
-
d: "M9 20h6",
|
|
81
|
-
key: "s66wpe"
|
|
82
|
-
}]
|
|
83
|
-
]), import_compiler_runtime$1 = require_compiler_runtime();
|
|
84
|
-
function createReducer(e, p) {
|
|
85
|
-
return {
|
|
86
|
-
reducer: (m, h) => (m || (m = e()), h.type in p ? p[h.type](m, h.payload) : (Logger.error(`Action type ${h.type} is not defined in reducers.`), m)),
|
|
87
|
-
createActions: (e2) => {
|
|
88
|
-
let m = {};
|
|
89
|
-
for (let h in p) m[h] = (p2) => {
|
|
90
|
-
e2({
|
|
91
|
-
type: h,
|
|
92
|
-
payload: p2
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
return m;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function createReducerAndAtoms(e, p, m) {
|
|
100
|
-
let h = [...m ?? []], _ = (e2) => {
|
|
101
|
-
h.push(e2);
|
|
102
|
-
}, { reducer: v, createActions: y } = createReducer(e, p), b = (e2, p2) => {
|
|
103
|
-
try {
|
|
104
|
-
let m2 = v(e2, p2);
|
|
105
|
-
for (let _2 of h) try {
|
|
106
|
-
_2(e2, m2, p2);
|
|
107
|
-
} catch (e3) {
|
|
108
|
-
Logger.error(`Error in middleware for action ${p2.type}:`, e3);
|
|
109
|
-
}
|
|
110
|
-
return m2;
|
|
111
|
-
} catch (m2) {
|
|
112
|
-
return Logger.error(`Error in reducer for action ${p2.type}:`, m2), e2;
|
|
113
|
-
}
|
|
114
|
-
}, x = atom(e()), S = /* @__PURE__ */ new WeakMap();
|
|
115
|
-
function C(e2) {
|
|
116
|
-
let p2 = (0, import_compiler_runtime$1.c)(4), m2 = e2 === void 0 ? {} : e2, h2 = useSetAtom(x);
|
|
117
|
-
if (m2.skipMiddleware === true) {
|
|
118
|
-
let e3;
|
|
119
|
-
return p2[0] === h2 ? e3 = p2[1] : (e3 = y((e4) => {
|
|
120
|
-
h2((p3) => v(p3, e4));
|
|
121
|
-
}), p2[0] = h2, p2[1] = e3), e3;
|
|
122
|
-
}
|
|
123
|
-
S.has(h2) || S.set(h2, y((e3) => {
|
|
124
|
-
h2((p3) => b(p3, e3));
|
|
125
|
-
}));
|
|
126
|
-
let g;
|
|
127
|
-
return p2[2] === h2 ? g = p2[3] : (g = S.get(h2), p2[2] = h2, p2[3] = g), g;
|
|
128
|
-
}
|
|
129
|
-
return {
|
|
130
|
-
reducer: b,
|
|
131
|
-
addMiddleware: _,
|
|
132
|
-
createActions: y,
|
|
133
|
-
valueAtom: x,
|
|
134
|
-
useActions: C
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1), badgeVariants = cva("inline-flex items-center border rounded-full px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
138
|
-
variants: { variant: {
|
|
139
|
-
default: "bg-primary hover:bg-primary/60 border-transparent text-primary-foreground",
|
|
140
|
-
defaultOutline: "bg-(--blue-2) border-(--blue-8) text-(--blue-11)",
|
|
141
|
-
secondary: "bg-secondary hover:bg-secondary/80 border-transparent text-secondary-foreground",
|
|
142
|
-
destructive: "bg-(--red-2) border-(--red-6) text-(--red-9) hover:bg-(--red-3)",
|
|
143
|
-
success: "bg-(--grass-2) border-(--grass-5) text-(--grass-9) hover:bg-(--grass-3)",
|
|
144
|
-
outline: "text-foreground"
|
|
145
|
-
} },
|
|
146
|
-
defaultVariants: { variant: "default" }
|
|
147
|
-
}), Badge = (e) => {
|
|
148
|
-
let p = (0, import_compiler_runtime.c)(10), m, h, g;
|
|
149
|
-
p[0] === e ? (m = p[1], h = p[2], g = p[3]) : ({ className: m, variant: g, ...h } = e, p[0] = e, p[1] = m, p[2] = h, p[3] = g);
|
|
150
|
-
let _;
|
|
151
|
-
p[4] !== m || p[5] !== g ? (_ = cn(badgeVariants({ variant: g }), m), p[4] = m, p[5] = g, p[6] = _) : _ = p[6];
|
|
152
|
-
let y;
|
|
153
|
-
return p[7] !== h || p[8] !== _ ? (y = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
154
|
-
className: _,
|
|
155
|
-
...h
|
|
156
|
-
}), p[7] = h, p[8] = _, p[9] = y) : y = p[9], y;
|
|
157
|
-
};
|
|
158
|
-
function useOnMount(e) {
|
|
159
|
-
(0, import_react.useEffect)(e, []);
|
|
160
|
-
}
|
|
161
|
-
function useOnUnmount(e) {
|
|
162
|
-
(0, import_react.useEffect)(() => e(), []);
|
|
163
|
-
}
|
|
164
|
-
export {
|
|
165
|
-
Type as a,
|
|
166
|
-
Calendar as c,
|
|
167
|
-
createReducerAndAtoms as i,
|
|
168
|
-
useOnUnmount as n,
|
|
169
|
-
ToggleLeft as o,
|
|
170
|
-
Badge as r,
|
|
171
|
-
Hash as s,
|
|
172
|
-
useOnMount as t
|
|
173
|
-
};
|