@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.
Files changed (59) hide show
  1. package/dist/{ConnectedDataExplorerComponent-Dhf5EGs5.js → ConnectedDataExplorerComponent-CFzqIsUg.js} +1 -1
  2. package/dist/{ErrorBoundary-CkptjJEU.js → ErrorBoundary-CILqxxrK.js} +1 -1
  3. package/dist/assets/__vite-browser-external-i0Yx485j.js +1 -0
  4. package/dist/assets/{worker-Dq8y-WM5.js → worker-CzXd-kc-.js} +2 -2
  5. package/dist/{chat-ui-BjFJNtik.js → chat-ui-DA8zEZ1I.js} +3 -3
  6. package/dist/{code-visibility-Djtm07c9.js → code-visibility-BDTmXLwS.js} +2 -2
  7. package/dist/{common-B_mI5VC0.js → common-D-K67Qyg.js} +12 -5
  8. package/dist/{data-grid-overlay-editor-CDoqD-jC.js → data-grid-overlay-editor-BgGa6I4S.js} +1 -1
  9. package/dist/{error-entries-m7wjcSR-.js → error-entries-g9iQiVIT.js} +54 -34
  10. package/dist/{feedback-button-0HAIFve4.js → feedback-button-ChFF2xIe.js} +3 -3
  11. package/dist/{glide-data-editor-q0CzLqHy.js → glide-data-editor-CwbAb-mZ.js} +3 -3
  12. package/dist/{globals-XxWFgM2b.js → globals-C_258pE7.js} +1 -1
  13. package/dist/{html-to-image-DQn1HTpP.js → html-to-image-Bg5ZoSO-.js} +1 -1
  14. package/dist/main.js +95 -70
  15. package/dist/{number-overlay-editor-C41yshYb.js → number-overlay-editor-gXz5p6Jl.js} +1 -1
  16. package/dist/{process-output-DIMk7xHI.js → process-output-BtVPCGeI.js} +2 -2
  17. package/dist/{reveal-component-gMNFwxnS.js → reveal-component-wc8CB-37.js} +3 -3
  18. package/dist/{spec-CcT0slVc.js → spec-DTiOPKyk.js} +37 -7
  19. package/package.json +2 -2
  20. package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
  21. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
  22. package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
  23. package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
  24. package/src/components/data-table/charts/charts.tsx +5 -5
  25. package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
  26. package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
  27. package/src/components/dependency-graph/elements.ts +24 -21
  28. package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
  29. package/src/components/editor/output/ansi-reduce.ts +30 -23
  30. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
  31. package/src/core/ai/tools/base.ts +16 -7
  32. package/src/core/ai/tools/edit-notebook-tool.ts +47 -45
  33. package/src/core/ai/tools/registry.ts +13 -8
  34. package/src/core/ai/tools/sample-tool.ts +6 -7
  35. package/src/core/cells/__tests__/session.test.ts +117 -36
  36. package/src/core/codemirror/__tests__/setup.test.ts +28 -28
  37. package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
  38. package/src/core/codemirror/language/extension.ts +8 -8
  39. package/src/core/codemirror/language/languages/markdown.ts +8 -6
  40. package/src/core/codemirror/language/languages/python.ts +13 -7
  41. package/src/core/codemirror/language/languages/sql/sql.ts +9 -7
  42. package/src/core/codemirror/language/types.ts +7 -7
  43. package/src/core/codemirror/rtc/extension.ts +24 -12
  44. package/src/core/codemirror/rtc/loro/awareness.ts +34 -19
  45. package/src/core/codemirror/rtc/loro/sync.ts +1 -0
  46. package/src/core/codemirror/utils.ts +1 -0
  47. package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
  48. package/src/core/static/__tests__/files.test.ts +38 -10
  49. package/src/hooks/useDebounce.ts +1 -2
  50. package/src/hooks/useEventListener.ts +1 -2
  51. package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
  52. package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
  53. package/src/plugins/impl/DataTablePlugin.tsx +15 -18
  54. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
  55. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
  56. package/src/plugins/impl/plotly/selection.ts +25 -19
  57. package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
  58. package/src/utils/tracer.ts +9 -5
  59. 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.object({}).passthrough())]),
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
- .object({})
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: string,
213
- title: string,
214
- svg: string,
215
- dragmode: Plotly.Layout["dragmode"],
216
- setDragmode: (dragmode: Plotly.Layout["dragmode"]) => void,
217
- ): ModeBarButton {
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
- .object({})
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.object({}).passthrough().default({}),
25
+ embedOptions: z.looseObject({}).default({}),
27
26
  });
28
27
 
29
28
  public render(props: IPluginProps<VegaComponentState, Data>): JSX.Element {
@@ -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: any[]) => Promise<any>>(
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
- ): T {
69
- return (async (...args) => {
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
- }) as T;
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();