@marimo-team/islands 0.25.2-dev27 → 0.25.2-dev30

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 (95) hide show
  1. package/dist/{ErrorBoundary-B7xAB7tc.js → ErrorBoundary-Siz68Nx-.js} +1 -1
  2. package/dist/{abnfDiagram-VCTEODGH-aLGD44M7.js → abnfDiagram-VCTEODGH-Bd5MYz7g.js} +3 -3
  3. package/dist/{architectureDiagram-5GKGNRK7-BGL5P81u.js → architectureDiagram-5GKGNRK7-12FmGgo8.js} +5 -5
  4. package/dist/{blockDiagram-I7D4REHJ-CvBmppdy.js → blockDiagram-I7D4REHJ-BeHOjyDk.js} +9 -9
  5. package/dist/{c4Diagram-7LVT6UL2-EceL4_jH.js → c4Diagram-7LVT6UL2-Bao10t_O.js} +7 -7
  6. package/dist/{cells-5ppES-Un.js → cells-BUbzm9iX.js} +1 -1
  7. package/dist/{channel-z7HZXHwv.js → channel-BxCkvUgE.js} +1 -1
  8. package/dist/{chat-ui-Dv2V95k6.js → chat-ui-DJpsSmlB.js} +7 -7
  9. package/dist/{chunk-4HAMMTFA-BPTTOOC5.js → chunk-4HAMMTFA-CH7Gpamd.js} +5 -5
  10. package/dist/{chunk-75Z2AOVW-C4AOleKf.js → chunk-75Z2AOVW-AI7CvgKn.js} +1 -1
  11. package/dist/{chunk-DU6HZSFF-1TwWR6gh.js → chunk-DU6HZSFF-BSvuTkX4.js} +1 -1
  12. package/dist/{chunk-F27PBJKO-DMI1PBe4.js → chunk-F27PBJKO-CLshwT9T.js} +1 -1
  13. package/dist/{chunk-GMAD6QVW-vStrMz2P.js → chunk-GMAD6QVW-wnHcn-lH.js} +3 -3
  14. package/dist/{chunk-GVQU2GXP-2HwWgs4u.js → chunk-GVQU2GXP-7O2p8hut.js} +2 -2
  15. package/dist/{chunk-IMKFNOWR-Cm3RgLDj.js → chunk-IMKFNOWR-BlsbbLiS.js} +6 -6
  16. package/dist/{chunk-L3NEJ4N5-RhC7i0I2.js → chunk-L3NEJ4N5-B9_Alrxb.js} +5 -5
  17. package/dist/{chunk-OSK3NFVY-CZV09N-U.js → chunk-OSK3NFVY-PeQPH2fD.js} +6 -6
  18. package/dist/{chunk-P2QGCYS3-0TAWai9C.js → chunk-P2QGCYS3-D9twiFuU.js} +1 -1
  19. package/dist/{chunk-POPQ4Y6H-Cc3_56GX.js → chunk-POPQ4Y6H-BUiNs18s.js} +1 -1
  20. package/dist/{chunk-PWAF6VOD-lNxB9k8z.js → chunk-PWAF6VOD-D8S9NPCy.js} +1 -1
  21. package/dist/{chunk-SHT3W25Y-DedDYSP5.js → chunk-SHT3W25Y-DoIB7Bub.js} +8 -8
  22. package/dist/{chunk-SVP7TREG-B2SFkCAL.js → chunk-SVP7TREG-B0dScloT.js} +2 -2
  23. package/dist/{chunk-TICWLB2K-DB6hjNOL.js → chunk-TICWLB2K-C-lzn2th.js} +6 -6
  24. package/dist/classDiagram-ZZMXUADV-C5vpBHoS.js +30 -0
  25. package/dist/classDiagram-v2-VYDZK3BY-BS2Wadt0.js +30 -0
  26. package/dist/{code-visibility-BKuHUlSp.js → code-visibility-CP3A3ANH.js} +2 -2
  27. package/dist/{common-CB96Vrh1.js → common-DYbUXmkS.js} +3 -3
  28. package/dist/{cynefinDiagram-5FMLGOSQ-DzaZEqgD.js → cynefinDiagram-5FMLGOSQ-fxnL4mfp.js} +3 -3
  29. package/dist/{dagre-GXQ25YYZ-Cjf5GjU3.js → dagre-GXQ25YYZ-D5NkGE9i.js} +10 -10
  30. package/dist/{data-grid-overlay-editor-DkwfVJ5C.js → data-grid-overlay-editor-BgExvd3Z.js} +1 -1
  31. package/dist/{diagram-S7CK7UJ4-IhLt_khx.js → diagram-S7CK7UJ4-CATbk1XK.js} +4 -4
  32. package/dist/{diagram-UQ7AKVKN-CQc6KLPB.js → diagram-UQ7AKVKN-Cjha5vrC.js} +3 -3
  33. package/dist/{diagram-VSXAHHWV-CR7BJygZ.js → diagram-VSXAHHWV-DPAWJ9Nw.js} +2 -2
  34. package/dist/{diagram-VX7I27RA-DHmW9N1T.js → diagram-VX7I27RA-BHfAjgGw.js} +5 -5
  35. package/dist/{diagram-Z3DM3KII-zVKsg-Ty.js → diagram-Z3DM3KII-eAoDps6E.js} +3 -3
  36. package/dist/{ebnfDiagram-PWID7BFC-DDd5hCRC.js → ebnfDiagram-PWID7BFC-D8RYnIZC.js} +3 -3
  37. package/dist/{erDiagram-RLTQ6QDP-D10NP0eI.js → erDiagram-RLTQ6QDP-BfmoNNce.js} +12 -12
  38. package/dist/{error-entries-B2Ux3Z2X.js → error-entries-B9WBDeky.js} +1 -1
  39. package/dist/{feedback-button-DHTBJriu.js → feedback-button-CwhEpI_T.js} +4 -4
  40. package/dist/flowDiagram-HODETNUW-Du_I0oTA.js +16 -0
  41. package/dist/{ganttDiagram-EL5Y4UJY-cRRaDt88.js → ganttDiagram-EL5Y4UJY-B4m_YsKa.js} +2 -2
  42. package/dist/{gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js → gitGraphDiagram-WWUBYQGX-QRBbvWXh.js} +2 -2
  43. package/dist/{glide-data-editor-28V-XtsS.js → glide-data-editor-CrSi-w0o.js} +3 -3
  44. package/dist/{globals-DM822_E_.js → globals-BfBZlRMW.js} +1 -1
  45. package/dist/{html-to-image-BZBwkkDG.js → html-to-image-Btymxku9.js} +1 -1
  46. package/dist/{infoDiagram-27XIBGKW-DrYu3UZC.js → infoDiagram-27XIBGKW-CHsocw1z.js} +2 -2
  47. package/dist/{ishikawaDiagram-5VMMS53U-pmkGQJsA.js → ishikawaDiagram-5VMMS53U-DZdZJdsT.js} +3 -3
  48. package/dist/{journeyDiagram-3NMN7TZE-EPJDPlt0.js → journeyDiagram-3NMN7TZE-BeeJdJo3.js} +2 -2
  49. package/dist/{kanban-definition-UXKFOSKX-wWGD9VLW.js → kanban-definition-UXKFOSKX-B1rrJRmN.js} +9 -9
  50. package/dist/main.js +122 -115
  51. package/dist/{mermaid-Dfvntf3s.js → mermaid-CEceCleL.js} +50 -50
  52. package/dist/{mindmap-definition-YA3MSWOX-C2f1VIBR.js → mindmap-definition-YA3MSWOX-C6-S9h9O.js} +11 -11
  53. package/dist/{number-overlay-editor-rRWcORH5.js → number-overlay-editor-BfFyQUmB.js} +1 -1
  54. package/dist/{pegDiagram-XKGWAZYB-D6v5dz4M.js → pegDiagram-XKGWAZYB-BL-R6P57.js} +3 -3
  55. package/dist/{pieDiagram-E7YTZNPT-BwFAhpYD.js → pieDiagram-E7YTZNPT-DuAOxSRy.js} +3 -3
  56. package/dist/{process-output-BSsWzfnY.js → process-output-CTQmCUD0.js} +2 -2
  57. package/dist/purify.es-DMv5zIkJ.js +866 -0
  58. package/dist/{quadrantDiagram-AXDQQJYC--kqzFC3w.js → quadrantDiagram-AXDQQJYC-keLfFx9f.js} +1 -1
  59. package/dist/{railroadDiagram-O6MQD6OU-D6eOFr6Z.js → railroadDiagram-O6MQD6OU-f-sfFoX9.js} +3 -3
  60. package/dist/{requirementDiagram-BXWQKSXE-CHYsMgDR.js → requirementDiagram-BXWQKSXE-BICupkaf.js} +11 -11
  61. package/dist/{reveal-component-b8UCRAp7.js → reveal-component-BJG6YrPy.js} +3 -3
  62. package/dist/{sankeyDiagram-P5KCCOFB-BdzhT0BM.js → sankeyDiagram-P5KCCOFB-Bh4EsJox.js} +1 -1
  63. package/dist/{sequenceDiagram-WJ2MYXX4-BPAknhBp.js → sequenceDiagram-WJ2MYXX4-DBFRnNGU.js} +4 -4
  64. package/dist/{stateDiagram-D77RDMKH-Cq249IQ4.js → stateDiagram-D77RDMKH-CUP7QQW8.js} +13 -13
  65. package/dist/stateDiagram-v2-MP3YSRHH-B5mAItmH.js +30 -0
  66. package/dist/{swimlanes-42K2YHIH-Bh_S_HKD.js → swimlanes-42K2YHIH-BtIMdg7b.js} +10 -10
  67. package/dist/swimlanesDiagram-VR7AAH4N-CGnrrHpw.js +30 -0
  68. package/dist/{timeline-definition-24CTP7MA-ByNMgBE7.js → timeline-definition-24CTP7MA-UwihiSH2.js} +3 -3
  69. package/dist/{vennDiagram-4TSXK5OY-DY8CySdO.js → vennDiagram-4TSXK5OY-D5LNVIRI.js} +3 -3
  70. package/dist/{wardleyDiagram-VM6X3IG4-DYC1AFni.js → wardleyDiagram-VM6X3IG4-BwKf-b0_.js} +3 -3
  71. package/dist/{xychartDiagram-S5SC5T6Z-Df8LLnuY.js → xychartDiagram-S5SC5T6Z-Cg_vyuW2.js} +5 -5
  72. package/package.json +2 -2
  73. package/src/components/chat/tool-call/__tests__/tool-result.test.tsx +56 -0
  74. package/src/components/chat/tool-call/tool-result.tsx +3 -3
  75. package/src/plugins/impl/CheckboxPlugin.tsx +1 -1
  76. package/src/plugins/impl/DatePickerPlugin.tsx +5 -3
  77. package/src/plugins/impl/DateRangePlugin.tsx +5 -3
  78. package/src/plugins/impl/DateTimePickerPlugin.tsx +5 -3
  79. package/src/plugins/impl/DropdownPlugin.tsx +1 -1
  80. package/src/plugins/impl/MultiselectPlugin.tsx +1 -1
  81. package/src/plugins/impl/NumberPlugin.tsx +1 -1
  82. package/src/plugins/impl/RadioPlugin.tsx +5 -1
  83. package/src/plugins/impl/RangeSliderPlugin.tsx +1 -1
  84. package/src/plugins/impl/SearchableSelect.tsx +1 -1
  85. package/src/plugins/impl/SliderPlugin.tsx +1 -1
  86. package/src/plugins/impl/SwitchPlugin.tsx +6 -1
  87. package/src/plugins/impl/__tests__/widget-labels.test.tsx +122 -0
  88. package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
  89. package/src/plugins/impl/common/labeled.tsx +9 -3
  90. package/dist/classDiagram-ZZMXUADV-BwYhrSEX.js +0 -30
  91. package/dist/classDiagram-v2-VYDZK3BY-HecM04TM.js +0 -30
  92. package/dist/flowDiagram-HODETNUW-DgcjSdPV.js +0 -16
  93. package/dist/purify.es-DgKyQviY.js +0 -805
  94. package/dist/stateDiagram-v2-MP3YSRHH-Dk5QgdXF.js +0 -30
  95. package/dist/swimlanesDiagram-VR7AAH4N-CbztusY8.js +0 -30
@@ -0,0 +1,122 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+
3
+ import { render } from "@testing-library/react";
4
+ import { beforeEach, describe, expect, it, vi } from "vitest";
5
+ import { initialModeAtom } from "@/core/mode";
6
+ import { store } from "@/core/state/jotai";
7
+ import { DatePickerPlugin } from "../DatePickerPlugin";
8
+ import { DateRangePickerPlugin } from "../DateRangePlugin";
9
+ import { DateTimePickerPlugin } from "../DateTimePickerPlugin";
10
+
11
+ const sharedProps = () => ({
12
+ host: document.createElement("div"),
13
+ setValue: vi.fn(),
14
+ functions: {},
15
+ });
16
+
17
+ const widgets = [
18
+ {
19
+ name: "date",
20
+ role: "group",
21
+ fallback: "date picker",
22
+ render: (label: string | null, disabled = false) =>
23
+ new DatePickerPlugin().render({
24
+ ...sharedProps(),
25
+ value: "2026-10-02",
26
+ data: {
27
+ label,
28
+ disabled,
29
+ start: "2026-01-01",
30
+ stop: "2026-12-31",
31
+ fullWidth: false,
32
+ },
33
+ }),
34
+ },
35
+ {
36
+ name: "datetime",
37
+ role: "group",
38
+ fallback: "date time picker",
39
+ render: (label: string | null, disabled = false) =>
40
+ new DateTimePickerPlugin().render({
41
+ ...sharedProps(),
42
+ value: "2026-10-02T12:00:00",
43
+ data: {
44
+ label,
45
+ disabled,
46
+ start: "2026-01-01T00:00:00",
47
+ stop: "2026-12-31T23:59:59",
48
+ precision: "minute",
49
+ fullWidth: false,
50
+ },
51
+ }),
52
+ },
53
+ {
54
+ name: "date range",
55
+ role: "group",
56
+ fallback: "date range picker",
57
+ render: (label: string | null, disabled = false) =>
58
+ new DateRangePickerPlugin().render({
59
+ ...sharedProps(),
60
+ value: ["2026-10-02", "2026-10-03"],
61
+ data: {
62
+ label,
63
+ disabled,
64
+ start: "2026-01-01",
65
+ stop: "2026-12-31",
66
+ fullWidth: false,
67
+ },
68
+ }),
69
+ },
70
+ ];
71
+
72
+ beforeEach(() => store.set(initialModeAtom, "edit"));
73
+
74
+ describe.each(widgets)("$name accessible labels", (widget) => {
75
+ it("uses rendered formatting and decoded entities, and follows label updates", () => {
76
+ const { getByRole, rerender } = render(
77
+ widget.render("<span>Visit <strong>date</strong> &amp; time</span>"),
78
+ );
79
+ expect(getByRole(widget.role, { name: "Visit date & time" })).toBeTruthy();
80
+ rerender(widget.render("<span>Updated <em>label</em></span>"));
81
+ expect(getByRole(widget.role, { name: "Updated label" })).toBeTruthy();
82
+ rerender(widget.render(null));
83
+ expect(getByRole(widget.role, { name: widget.fallback })).toBeTruthy();
84
+ });
85
+
86
+ it.each([null, ""])("uses the fallback when label is %s", (label) => {
87
+ const { getByRole } = render(widget.render(label));
88
+ expect(getByRole(widget.role, { name: widget.fallback })).toBeTruthy();
89
+ });
90
+
91
+ it("names the calendar button and every editable segment", () => {
92
+ const { getByRole, getAllByRole } = render(
93
+ widget.render("<strong>Visit</strong> &amp; time"),
94
+ );
95
+ expect(getByRole("button", { name: "Calendar Visit & time" })).toBeTruthy();
96
+ for (const segment of getAllByRole("spinbutton")) {
97
+ expect(segment).toHaveAccessibleName(/Visit & time/);
98
+ }
99
+ });
100
+
101
+ it("preserves disabled controls with a formatted label", () => {
102
+ const { getByRole, getAllByRole } = render(
103
+ widget.render("<strong>Visit</strong>", true),
104
+ );
105
+ expect(getByRole("button", { name: "Calendar Visit" })).toBeDisabled();
106
+ for (const segment of getAllByRole("spinbutton")) {
107
+ expect(segment).toHaveAttribute("aria-disabled", "true");
108
+ }
109
+ });
110
+
111
+ it("keeps labels distinct for multiple widgets", () => {
112
+ const { getByRole } = render(
113
+ <>
114
+ {widget.render("First")}
115
+ {widget.render("Second")}
116
+ </>,
117
+ );
118
+ expect(getByRole(widget.role, { name: "First" })).not.toBe(
119
+ getByRole(widget.role, { name: "Second" }),
120
+ );
121
+ });
122
+ });
@@ -27,7 +27,7 @@ const messageSchema = z.array(
27
27
  role: z.enum(["system", "user", "assistant"]),
28
28
  content: z.string().nullable(),
29
29
  parts: z.array(z.any()),
30
- metadata: z.any().nullable(),
30
+ metadata: z.any().optional(),
31
31
  }),
32
32
  );
33
33
 
@@ -9,7 +9,8 @@ interface Props {
9
9
  label: string | null | undefined;
10
10
  className?: string;
11
11
  labelClassName?: string;
12
- id?: string;
12
+ labelId?: string;
13
+ controlId?: string;
13
14
  fullWidth?: boolean;
14
15
  /**
15
16
  * Align the label to the top, left, or right of the component.
@@ -27,8 +28,9 @@ export const Labeled: React.FC<PropsWithChildren<Props>> = ({
27
28
  align = "left",
28
29
  className,
29
30
  labelClassName,
31
+ labelId,
30
32
  fullWidth,
31
- id,
33
+ controlId,
32
34
  }) => {
33
35
  // If fullWidth is true, force align to be "top"
34
36
  if (fullWidth) {
@@ -45,7 +47,11 @@ export const Labeled: React.FC<PropsWithChildren<Props>> = ({
45
47
 
46
48
  const labelElement = (
47
49
  <div part="label" className="inline-flex items-center m-0 p-0">
48
- <Label htmlFor={id} className={cn("font-prose", labelClassName)}>
50
+ <Label
51
+ id={labelId}
52
+ htmlFor={controlId}
53
+ className={cn("font-prose", labelClassName)}
54
+ >
49
55
  {renderHTML({ html: label })}
50
56
  </Label>
51
57
  </div>
@@ -1,30 +0,0 @@
1
- import "./chunk-75Z2AOVW-C4AOleKf.js";
2
- import "./src-CA_m4ONl.js";
3
- import { n as e } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
- import "./chunk-DU6HZSFF-1TwWR6gh.js";
5
- import "./chunk-P2QGCYS3-0TAWai9C.js";
6
- import "./chunk-PWAF6VOD-lNxB9k8z.js";
7
- import "./chunk-GMAD6QVW-vStrMz2P.js";
8
- import "./chunk-4HAMMTFA-BPTTOOC5.js";
9
- import "./chunk-GVQU2GXP-2HwWgs4u.js";
10
- import "./chunk-L3NEJ4N5-RhC7i0I2.js";
11
- import "./chunk-OSK3NFVY-CZV09N-U.js";
12
- import "./mermaid-Dfvntf3s.js";
13
- import "./chunk-F27PBJKO-DMI1PBe4.js";
14
- import "./chunk-XXDRQBXY-Dnl5VBqG.js";
15
- import "./chunk-POPQ4Y6H-Cc3_56GX.js";
16
- import { i as t, n, r, t as i } from "./chunk-TICWLB2K-DB6hjNOL.js";
17
- //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-ZZMXUADV.mjs
18
- var a = {
19
- parser: n,
20
- get db() {
21
- return new i();
22
- },
23
- renderer: r,
24
- styles: t,
25
- init: /* @__PURE__ */ e((e) => {
26
- e.class ||= {}, e.class.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
27
- }, "init")
28
- };
29
- //#endregion
30
- export { a as diagram };
@@ -1,30 +0,0 @@
1
- import "./chunk-75Z2AOVW-C4AOleKf.js";
2
- import "./src-CA_m4ONl.js";
3
- import { n as e } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
- import "./chunk-DU6HZSFF-1TwWR6gh.js";
5
- import "./chunk-P2QGCYS3-0TAWai9C.js";
6
- import "./chunk-PWAF6VOD-lNxB9k8z.js";
7
- import "./chunk-GMAD6QVW-vStrMz2P.js";
8
- import "./chunk-4HAMMTFA-BPTTOOC5.js";
9
- import "./chunk-GVQU2GXP-2HwWgs4u.js";
10
- import "./chunk-L3NEJ4N5-RhC7i0I2.js";
11
- import "./chunk-OSK3NFVY-CZV09N-U.js";
12
- import "./mermaid-Dfvntf3s.js";
13
- import "./chunk-F27PBJKO-DMI1PBe4.js";
14
- import "./chunk-XXDRQBXY-Dnl5VBqG.js";
15
- import "./chunk-POPQ4Y6H-Cc3_56GX.js";
16
- import { i as t, n, r, t as i } from "./chunk-TICWLB2K-DB6hjNOL.js";
17
- //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-VYDZK3BY.mjs
18
- var a = {
19
- parser: n,
20
- get db() {
21
- return new i();
22
- },
23
- renderer: r,
24
- styles: t,
25
- init: /* @__PURE__ */ e((e) => {
26
- e.class ||= {}, e.class.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
27
- }, "init")
28
- };
29
- //#endregion
30
- export { a as diagram };
@@ -1,16 +0,0 @@
1
- import "./chunk-75Z2AOVW-C4AOleKf.js";
2
- import "./src-CA_m4ONl.js";
3
- import "./chunk-DU6HZSFF-1TwWR6gh.js";
4
- import "./chunk-P2QGCYS3-0TAWai9C.js";
5
- import "./chunk-PWAF6VOD-lNxB9k8z.js";
6
- import "./chunk-GMAD6QVW-vStrMz2P.js";
7
- import "./chunk-4HAMMTFA-BPTTOOC5.js";
8
- import "./chunk-GVQU2GXP-2HwWgs4u.js";
9
- import "./chunk-L3NEJ4N5-RhC7i0I2.js";
10
- import "./chunk-OSK3NFVY-CZV09N-U.js";
11
- import "./mermaid-Dfvntf3s.js";
12
- import "./chunk-F27PBJKO-DMI1PBe4.js";
13
- import "./chunk-XXDRQBXY-Dnl5VBqG.js";
14
- import "./chunk-POPQ4Y6H-Cc3_56GX.js";
15
- import { n as e } from "./chunk-SHT3W25Y-DedDYSP5.js";
16
- export { e as diagram };