@marimo-team/islands 0.25.3-dev105 → 0.25.3-dev111
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-Dhf5EGs5.js → ConnectedDataExplorerComponent-CFzqIsUg.js} +1 -1
- package/dist/{ErrorBoundary-CkptjJEU.js → ErrorBoundary-CILqxxrK.js} +1 -1
- package/dist/assets/__vite-browser-external-i0Yx485j.js +1 -0
- package/dist/assets/{worker-Dq8y-WM5.js → worker-CzXd-kc-.js} +2 -2
- package/dist/{chat-ui-BjFJNtik.js → chat-ui-DA8zEZ1I.js} +3 -3
- package/dist/{code-visibility-Djtm07c9.js → code-visibility-BDTmXLwS.js} +2 -2
- package/dist/{common-B_mI5VC0.js → common-D-K67Qyg.js} +12 -5
- package/dist/{data-grid-overlay-editor-CDoqD-jC.js → data-grid-overlay-editor-BgGa6I4S.js} +1 -1
- package/dist/{error-entries-m7wjcSR-.js → error-entries-g9iQiVIT.js} +54 -34
- package/dist/{feedback-button-0HAIFve4.js → feedback-button-ChFF2xIe.js} +3 -3
- package/dist/{glide-data-editor-q0CzLqHy.js → glide-data-editor-CwbAb-mZ.js} +3 -3
- package/dist/{globals-XxWFgM2b.js → globals-C_258pE7.js} +1 -1
- package/dist/{html-to-image-DQn1HTpP.js → html-to-image-Bg5ZoSO-.js} +1 -1
- package/dist/main.js +95 -70
- package/dist/{number-overlay-editor-C41yshYb.js → number-overlay-editor-gXz5p6Jl.js} +1 -1
- package/dist/{process-output-DIMk7xHI.js → process-output-BtVPCGeI.js} +2 -2
- package/dist/{reveal-component-gMNFwxnS.js → reveal-component-wc8CB-37.js} +3 -3
- package/dist/{spec-CcT0slVc.js → spec-DTiOPKyk.js} +37 -7
- package/package.json +2 -2
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
- package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
- package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
- package/src/components/data-table/charts/charts.tsx +5 -5
- package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
- package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
- package/src/components/dependency-graph/elements.ts +24 -21
- package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
- package/src/components/editor/output/ansi-reduce.ts +30 -23
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
- package/src/core/ai/tools/base.ts +16 -7
- package/src/core/ai/tools/edit-notebook-tool.ts +47 -45
- package/src/core/ai/tools/registry.ts +13 -8
- package/src/core/ai/tools/sample-tool.ts +6 -7
- package/src/core/cells/__tests__/session.test.ts +117 -36
- package/src/core/codemirror/__tests__/setup.test.ts +28 -28
- package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
- package/src/core/codemirror/language/extension.ts +8 -8
- package/src/core/codemirror/language/languages/markdown.ts +8 -6
- package/src/core/codemirror/language/languages/python.ts +13 -7
- package/src/core/codemirror/language/languages/sql/sql.ts +9 -7
- package/src/core/codemirror/language/types.ts +7 -7
- package/src/core/codemirror/rtc/extension.ts +24 -12
- package/src/core/codemirror/rtc/loro/awareness.ts +34 -19
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- package/src/core/codemirror/utils.ts +1 -0
- package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
- package/src/core/static/__tests__/files.test.ts +38 -10
- package/src/hooks/useDebounce.ts +1 -2
- package/src/hooks/useEventListener.ts +1 -2
- package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
- package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +15 -18
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
- package/src/plugins/impl/plotly/selection.ts +25 -19
- package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
- package/src/utils/tracer.ts +9 -5
- package/dist/assets/__vite-browser-external-35VXYmnw.js +0 -1
|
@@ -154,7 +154,7 @@ export const DataFramePlugin = createPlugin<S>("marimo-dataframe")
|
|
|
154
154
|
)
|
|
155
155
|
.output(
|
|
156
156
|
z.object({
|
|
157
|
-
data: z.union([z.string(), z.array(z.
|
|
157
|
+
data: z.union([z.string(), z.array(z.looseObject({}))]),
|
|
158
158
|
total_rows: z.number(),
|
|
159
159
|
}),
|
|
160
160
|
),
|
|
@@ -58,11 +58,8 @@ export class PlotlyPlugin implements IPlugin<T, Data> {
|
|
|
58
58
|
public tagName = "marimo-plotly";
|
|
59
59
|
|
|
60
60
|
public validator = z.object({
|
|
61
|
-
figure: z
|
|
62
|
-
|
|
63
|
-
.passthrough()
|
|
64
|
-
.transform((spec) => spec as unknown as Figure),
|
|
65
|
-
config: z.object({}).passthrough(),
|
|
61
|
+
figure: z.looseObject({}).transform((spec) => spec as unknown as Figure),
|
|
62
|
+
config: z.looseObject({}),
|
|
66
63
|
});
|
|
67
64
|
|
|
68
65
|
public render(props: IPluginProps<T, Data>): JSX.Element {
|
|
@@ -208,13 +208,19 @@ export function hasAreaTrace(
|
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
function createDragmodeButton(
|
|
212
|
-
name
|
|
213
|
-
title
|
|
214
|
-
svg
|
|
215
|
-
dragmode
|
|
216
|
-
setDragmode
|
|
217
|
-
|
|
211
|
+
function createDragmodeButton({
|
|
212
|
+
name,
|
|
213
|
+
title,
|
|
214
|
+
svg,
|
|
215
|
+
dragmode,
|
|
216
|
+
setDragmode,
|
|
217
|
+
}: {
|
|
218
|
+
name: string;
|
|
219
|
+
title: string;
|
|
220
|
+
svg: string;
|
|
221
|
+
dragmode: Plotly.Layout["dragmode"];
|
|
222
|
+
setDragmode: (dragmode: Plotly.Layout["dragmode"]) => void;
|
|
223
|
+
}): ModeBarButton {
|
|
218
224
|
return {
|
|
219
225
|
name,
|
|
220
226
|
title,
|
|
@@ -227,27 +233,27 @@ export function lineSelectionButtons(
|
|
|
227
233
|
setDragmode: (dragmode: Plotly.Layout["dragmode"]) => void,
|
|
228
234
|
): ModeBarButton[] {
|
|
229
235
|
return [
|
|
230
|
-
createDragmodeButton(
|
|
231
|
-
"line-box-select",
|
|
232
|
-
"Box select",
|
|
233
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
236
|
+
createDragmodeButton({
|
|
237
|
+
name: "line-box-select",
|
|
238
|
+
title: "Box select",
|
|
239
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
234
240
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
235
241
|
<rect x="4" y="4" width="16" height="16" stroke-dasharray="2 2" />
|
|
236
242
|
</svg>`,
|
|
237
|
-
"select",
|
|
243
|
+
dragmode: "select",
|
|
238
244
|
setDragmode,
|
|
239
|
-
),
|
|
240
|
-
createDragmodeButton(
|
|
241
|
-
"line-lasso-select",
|
|
242
|
-
"Lasso select",
|
|
243
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
245
|
+
}),
|
|
246
|
+
createDragmodeButton({
|
|
247
|
+
name: "line-lasso-select",
|
|
248
|
+
title: "Lasso select",
|
|
249
|
+
svg: `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
244
250
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
245
251
|
<path d="M6 8c0-2.2 2.2-4 5-4s5 1.8 5 4-2.2 4-5 4-5 1.8-5 4 2.2 4 5 4" />
|
|
246
252
|
<circle cx="17.5" cy="16.5" r="1.5" />
|
|
247
253
|
</svg>`,
|
|
248
|
-
"lasso",
|
|
254
|
+
dragmode: "lasso",
|
|
249
255
|
setDragmode,
|
|
250
|
-
),
|
|
256
|
+
}),
|
|
251
257
|
];
|
|
252
258
|
}
|
|
253
259
|
|
|
@@ -16,14 +16,13 @@ export class VegaPlugin implements IPlugin<VegaComponentState, Data> {
|
|
|
16
16
|
|
|
17
17
|
public validator = z.object({
|
|
18
18
|
spec: z
|
|
19
|
-
.
|
|
20
|
-
.passthrough()
|
|
19
|
+
.looseObject({})
|
|
21
20
|
.transform((spec) => spec as unknown as VegaLiteSpec),
|
|
22
21
|
chartSelection: z
|
|
23
22
|
.union([z.boolean(), z.literal("point"), z.literal("interval")])
|
|
24
23
|
.default(true),
|
|
25
24
|
fieldSelection: z.union([z.boolean(), z.array(z.string())]).default(true),
|
|
26
|
-
embedOptions: z.
|
|
25
|
+
embedOptions: z.looseObject({}).default({}),
|
|
27
26
|
});
|
|
28
27
|
|
|
29
28
|
public render(props: IPluginProps<VegaComponentState, Data>): JSX.Element {
|
package/src/utils/tracer.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
|
-
/* oxlint-disable typescript/no-explicit-any */
|
|
4
3
|
/* oxlint-disable no-console -- for debugging */
|
|
5
4
|
|
|
6
5
|
import { Logger } from "./Logger";
|
|
@@ -61,12 +60,17 @@ export class Tracer {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
public wrapAsync<T extends (...args:
|
|
63
|
+
public wrapAsync<T extends (...args: never[]) => Promise<unknown>>(
|
|
65
64
|
fn: T,
|
|
66
65
|
name?: string,
|
|
66
|
+
attributes?: Record<string, unknown>,
|
|
67
|
+
): T;
|
|
68
|
+
public wrapAsync<Args extends unknown[], Result>(
|
|
69
|
+
fn: (...args: Args) => Promise<Result>,
|
|
70
|
+
name?: string,
|
|
67
71
|
attributes: Record<string, unknown> = {},
|
|
68
|
-
):
|
|
69
|
-
return
|
|
72
|
+
): (...args: Args) => Promise<Result> {
|
|
73
|
+
return async (...args) => {
|
|
70
74
|
const span = this.startSpan(name || fn.name, attributes);
|
|
71
75
|
try {
|
|
72
76
|
const result = await fn(...args);
|
|
@@ -76,7 +80,7 @@ export class Tracer {
|
|
|
76
80
|
this.endSpan(span, "error");
|
|
77
81
|
throw error;
|
|
78
82
|
}
|
|
79
|
-
}
|
|
83
|
+
};
|
|
80
84
|
}
|
|
81
85
|
|
|
82
86
|
public logSpans(): void {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./worker-Dq8y-WM5.js";var t=e(((e,t)=>{t.exports={}}));export default t();
|