@marimo-team/islands 0.25.2-dev105 → 0.25.2-dev106

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 (80) hide show
  1. package/dist/{ConnectedDataExplorerComponent-CLsD_u_F.js → ConnectedDataExplorerComponent-CNSxdKyJ.js} +11 -11
  2. package/dist/{ErrorBoundary-efyVj7rF.js → ErrorBoundary-DrWVvMqC.js} +8 -8
  3. package/dist/{abnfDiagram-VCTEODGH-DP-j9K77.js → abnfDiagram-VCTEODGH-DQDjNXt3.js} +2 -2
  4. package/dist/{any-language-editor-D5auDtxd.js → any-language-editor-B9REGlD9.js} +3 -3
  5. package/dist/{architectureDiagram-5GKGNRK7-BeQUyxB8.js → architectureDiagram-5GKGNRK7-Nmls7Wxn.js} +1 -1
  6. package/dist/{button-e0G6suEi.js → button-CvjkwdSk.js} +1 -1
  7. package/dist/{capabilities-to826YB8.js → capabilities-CQ5IjhzL.js} +1 -1
  8. package/dist/{cells-Cuf0K7MO.js → cells-CvBCD5iu.js} +12 -12
  9. package/dist/{chat-ui-C0-ojNzY.js → chat-ui-h9kErePX.js} +15 -15
  10. package/dist/{check-DLTnw68H.js → check-EDwSwP89.js} +1 -1
  11. package/dist/{chunk-IMKFNOWR-Dk2PgCm2.js → chunk-IMKFNOWR-CoIFEo-1.js} +1 -1
  12. package/dist/{chunk-SHT3W25Y-BGY-9vHH.js → chunk-SHT3W25Y-lHiGx3ZC.js} +1 -1
  13. package/dist/{chunk-SVP7TREG-teKkW9Fg.js → chunk-SVP7TREG-BvsHIrY_.js} +1 -1
  14. package/dist/{chunk-TICWLB2K-DtXuhbug.js → chunk-TICWLB2K-BC8YIm_n.js} +1 -1
  15. package/dist/{classDiagram-ZZMXUADV-DbUMcd7_.js → classDiagram-ZZMXUADV-Bt98lkkv.js} +2 -2
  16. package/dist/{classDiagram-v2-VYDZK3BY-C-3L4d5M.js → classDiagram-v2-VYDZK3BY-D9bfbcC3.js} +2 -2
  17. package/dist/{code-visibility-DE54Pz9F.js → code-visibility-DdgAmJmC.js} +6 -6
  18. package/dist/{common-CTtBH0wF.js → common-DGkl4Eds.js} +22 -22
  19. package/dist/{copy-icon-BCF4LtXi.js → copy-icon-Ft7t9bqz.js} +3 -3
  20. package/dist/{cynefinDiagram-5FMLGOSQ--q32vtYo.js → cynefinDiagram-5FMLGOSQ-CgWra7wt.js} +1 -1
  21. package/dist/{dagre-GXQ25YYZ-ClJucAkw.js → dagre-GXQ25YYZ-CFZ8-35c.js} +1 -1
  22. package/dist/{data-grid-overlay-editor-DFqPk6q5.js → data-grid-overlay-editor-i49eMiEh.js} +1 -1
  23. package/dist/{diagram-S7CK7UJ4-Cyssb9Ln.js → diagram-S7CK7UJ4-lCNQrW7d.js} +1 -1
  24. package/dist/{diagram-UQ7AKVKN-DZYSgUI7.js → diagram-UQ7AKVKN-CQPQ6pP_.js} +1 -1
  25. package/dist/{diagram-VX7I27RA-CGG722Ev.js → diagram-VX7I27RA-Cf3b0llz.js} +1 -1
  26. package/dist/{diagram-Z3DM3KII-BvQr3_De.js → diagram-Z3DM3KII-Bt4QLrpn.js} +1 -1
  27. package/dist/{dialog-CmJuVSh2.js → dialog-CEBFZNyc.js} +3 -3
  28. package/dist/{dropdown-menu-DLNl0uXY.js → dropdown-menu-CP_qCYHC.js} +7 -7
  29. package/dist/{ebnfDiagram-PWID7BFC-DR2FshJT.js → ebnfDiagram-PWID7BFC-D3NAyPFY.js} +2 -2
  30. package/dist/{erDiagram-RLTQ6QDP-xnBvU5f7.js → erDiagram-RLTQ6QDP-Tlu09_Nm.js} +1 -1
  31. package/dist/{error-banner-CSBLWQOS.js → error-banner-Da600cwz.js} +2 -2
  32. package/dist/{error-entries-C7yBRMAV.js → error-entries-CfSQn4ZJ.js} +2 -2
  33. package/dist/{feedback-button-Bp9eebz4.js → feedback-button-A2AHC02G.js} +10 -10
  34. package/dist/{flowDiagram-HODETNUW-Bfnw9tSj.js → flowDiagram-HODETNUW-CAYbpJmV.js} +2 -2
  35. package/dist/{formats-CJxJy0A5.js → formats-DLtvJPnj.js} +3 -3
  36. package/dist/{glide-data-editor-B3gyOR9J.js → glide-data-editor-C_Y83eDT.js} +11 -11
  37. package/dist/{glide-utils-BNg2jWFu.js → glide-utils-DJyqh0EM.js} +3 -3
  38. package/dist/{globals-D-vVdFQv.js → globals-C8J09ZJ3.js} +3 -3
  39. package/dist/{html-to-image-DJECYxR4.js → html-to-image-ASL72siI.js} +11 -11
  40. package/dist/{infoDiagram-27XIBGKW-BAYcNcaV.js → infoDiagram-27XIBGKW-XrDxhr0x.js} +1 -1
  41. package/dist/{ishikawaDiagram-5VMMS53U-DXStWIha.js → ishikawaDiagram-5VMMS53U-CD1muzov.js} +1 -1
  42. package/dist/{kanban-definition-UXKFOSKX-DbdJswTE.js → kanban-definition-UXKFOSKX-Dg9W142_.js} +1 -1
  43. package/dist/{label-csksCK90.js → label-BDKF3Afc.js} +2 -2
  44. package/dist/{loader-BBZo0c48.js → loader-BQOfjTIJ.js} +1 -1
  45. package/dist/main.js +32 -32
  46. package/dist/{mermaid-C2NJdX2u.js → mermaid-CiAXjLpA.js} +36 -36
  47. package/dist/{mindmap-definition-YA3MSWOX-BQ8i-blD.js → mindmap-definition-YA3MSWOX-DgCidgYJ.js} +1 -1
  48. package/dist/{number-overlay-editor-D20HUk2N.js → number-overlay-editor-Cp9NfidD.js} +1 -1
  49. package/dist/{pegDiagram-XKGWAZYB-DUcNNAN-.js → pegDiagram-XKGWAZYB-coOYYKB6.js} +2 -2
  50. package/dist/{pieDiagram-E7YTZNPT-CSFNZSft.js → pieDiagram-E7YTZNPT-BnXTc3bj.js} +1 -1
  51. package/dist/{process-output-Donyae-q.js → process-output-sgQSi4QO.js} +4 -4
  52. package/dist/{railroadDiagram-O6MQD6OU-DIKoeErt.js → railroadDiagram-O6MQD6OU-B28-u83n.js} +2 -2
  53. package/dist/{requirementDiagram-BXWQKSXE-DbJ4dnDA.js → requirementDiagram-BXWQKSXE-CdYCTMu0.js} +1 -1
  54. package/dist/{reveal-component-4KH8dyFk.js → reveal-component-CBoV9nSd.js} +10 -10
  55. package/dist/{select-eLd7a6qs.js → select-BButFi-d.js} +4 -4
  56. package/dist/{sequenceDiagram-WJ2MYXX4-DrFl3KeD.js → sequenceDiagram-WJ2MYXX4-CM3aRAe_.js} +1 -1
  57. package/dist/{spec-DkOU7lfi.js → spec-BwarBpUJ.js} +4 -4
  58. package/dist/{stateDiagram-D77RDMKH-CW5dERQ1.js → stateDiagram-D77RDMKH-DOZUMVj8.js} +2 -2
  59. package/dist/{stateDiagram-v2-MP3YSRHH-B1BR_34Z.js → stateDiagram-v2-MP3YSRHH-CISYxma6.js} +2 -2
  60. package/dist/{swimlanes-42K2YHIH-CXasdezK.js → swimlanes-42K2YHIH-BkSppxp8.js} +1 -1
  61. package/dist/{swimlanesDiagram-VR7AAH4N-WuS8E4Md.js → swimlanesDiagram-VR7AAH4N-c8G5pGxC.js} +2 -2
  62. package/dist/{swiper-component-Bzo0y0WO.js → swiper-component-DKntyn8p.js} +2 -2
  63. package/dist/{timeline-definition-24CTP7MA-MS0jeNYt.js → timeline-definition-24CTP7MA-CaMQayqK.js} +1 -1
  64. package/dist/{toDate-CaG7azFp.js → toDate-Dwcg_x_5.js} +3 -3
  65. package/dist/{toast-DEQUzOQE.js → toast-B9UMEi8u.js} +4 -4
  66. package/dist/{tooltip-Dbmm909v.js → tooltip-BO1REbqs.js} +2 -2
  67. package/dist/{use-restore-focus-B7_UeKnI.js → use-restore-focus-BEM7sFWl.js} +1 -1
  68. package/dist/{useAsyncData-B2hCigr0.js → useAsyncData-Deh5kszT.js} +1 -1
  69. package/dist/{useDateFormatter-DtgICMM1.js → useDateFormatter-D8XruNGG.js} +2 -2
  70. package/dist/{useDeepCompareMemoize-NxOUy83E.js → useDeepCompareMemoize-DXwzRINI.js} +1 -1
  71. package/dist/{useIframeCapabilities-DIRs8689.js → useIframeCapabilities-DBETvvPl.js} +1 -1
  72. package/dist/{useLifecycle-NfWtOhUr.js → useLifecycle-j7D9uD1o.js} +3 -3
  73. package/dist/{useTheme-DdoJP40B.js → useTheme-CRnjkku0.js} +2 -2
  74. package/dist/{vega-component-lajX4E5T.js → vega-component-DLBAQLSf.js} +9 -9
  75. package/dist/{vennDiagram-4TSXK5OY-BjY3_fWF.js → vennDiagram-4TSXK5OY-CF8pfaK3.js} +1 -1
  76. package/dist/{wardleyDiagram-VM6X3IG4-CmNH2_Vg.js → wardleyDiagram-VM6X3IG4-dGPu39d-.js} +1 -1
  77. package/dist/{xychartDiagram-S5SC5T6Z-frIXgxSb.js → xychartDiagram-S5SC5T6Z-CP6-9q56.js} +1 -1
  78. package/package.json +1 -1
  79. package/src/hooks/__tests__/useEventListener.test.tsx +45 -1
  80. package/src/hooks/useEventListener.ts +6 -1
@@ -1,10 +1,10 @@
1
1
  import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
- import { g as t, h as n, r } from "./button-e0G6suEi.js";
2
+ import { g as t, h as n, r } from "./button-CvjkwdSk.js";
3
3
  import { t as i } from "./react-sHtZdjeP.js";
4
4
  import { t as a } from "./compiler-runtime-CldRdSsv.js";
5
- import { h as o } from "./tooltip-Dbmm909v.js";
5
+ import { h as o } from "./tooltip-BO1REbqs.js";
6
6
  import { t as s } from "./jsx-runtime-3BD1kT0s.js";
7
- import { E as c, w as l } from "./useTheme-DdoJP40B.js";
7
+ import { E as c, w as l } from "./useTheme-CRnjkku0.js";
8
8
  var u = o("calendar", [
9
9
  ["path", {
10
10
  d: "M8 2v4",
@@ -1,8 +1,8 @@
1
1
  import { a as e, r as t } from "./rolldown-runtime-Cb76FRpK.js";
2
- import { a as n, g as r, s as i } from "./button-e0G6suEi.js";
2
+ import { a as n, g as r, s as i } from "./button-CvjkwdSk.js";
3
3
  import { t as a } from "./react-sHtZdjeP.js";
4
4
  import { t as o } from "./compiler-runtime-CldRdSsv.js";
5
- import { C as s, F as c, L as l, M as u, O as d, P as f, S as p, j as m, v as h } from "./use-restore-focus-B7_UeKnI.js";
5
+ import { C as s, F as c, L as l, M as u, O as d, P as f, S as p, j as m, v as h } from "./use-restore-focus-BEM7sFWl.js";
6
6
  import { l as g, t as _ } from "./_baseMerge-BiGRwuqv.js";
7
7
  //#region ../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/mergeWith.js
8
8
  var v = g(function(e, t, n, r) {
@@ -1,21 +1,21 @@
1
1
  import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
- import { g as t, h as n, m as r, o as i } from "./button-e0G6suEi.js";
2
+ import { g as t, h as n, m as r, o as i } from "./button-CvjkwdSk.js";
3
3
  import { t as a } from "./react-sHtZdjeP.js";
4
4
  import { t as o } from "./compiler-runtime-CldRdSsv.js";
5
- import { t as s } from "./tooltip-Dbmm909v.js";
6
- import { T as c, c as l } from "./toDate-CaG7azFp.js";
5
+ import { t as s } from "./tooltip-BO1REbqs.js";
6
+ import { T as c, c as l } from "./toDate-Dwcg_x_5.js";
7
7
  import { t as u } from "./jsx-runtime-3BD1kT0s.js";
8
- import { n as d } from "./error-banner-CSBLWQOS.js";
8
+ import { n as d } from "./error-banner-Da600cwz.js";
9
9
  import { t as f } from "./debounce-C3jyATpc.js";
10
- import { A as p, n as ee } from "./useTheme-DdoJP40B.js";
10
+ import { A as p, n as ee } from "./useTheme-CRnjkku0.js";
11
11
  import { c as m } from "./arrays-CN1djC4k.js";
12
12
  import { t as te } from "./objects-CzUgoMIF.js";
13
- import { t as h } from "./useAsyncData-B2hCigr0.js";
14
- import { a as ne, i as re, n as ie, t as g } from "./formats-CJxJy0A5.js";
13
+ import { t as h } from "./useAsyncData-Deh5kszT.js";
14
+ import { a as ne, i as re, n as ie, t as g } from "./formats-DLtvJPnj.js";
15
15
  import { M as ae, n as oe } from "./vega-loader.browser-DNST6uVf.js";
16
16
  import { t as se } from "./react-vega-BED0DjiB.js";
17
- import { a as ce, n as _ } from "./loader-BBZo0c48.js";
18
- import { t as le } from "./useDeepCompareMemoize-NxOUy83E.js";
17
+ import { a as ce, n as _ } from "./loader-BQOfjTIJ.js";
18
+ import { t as le } from "./useDeepCompareMemoize-DXwzRINI.js";
19
19
  import { t as ue } from "./semaphore-89jsoHtS.js";
20
20
  import { t as de } from "./use-vega-container-remeasure-Bz4PZMtt.js";
21
21
  //#region src/plugins/impl/vega/fix-relative-url.ts
@@ -3,7 +3,7 @@ import { t } from "./src-CA_m4ONl.js";
3
3
  import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
4
  import { $ as r, H as i, K as a, U as o, a as s, b as c, c as l, et as u, f as d, nt as f, tt as p, v as m, w as h, y as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
5
5
  import { t as _ } from "./rough.esm-CtV9AnV1.js";
6
- import { p as v } from "./mermaid-C2NJdX2u.js";
6
+ import { p as v } from "./mermaid-CiAXjLpA.js";
7
7
  //#region ../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js
8
8
  var y = (e, t) => p(e, "a", -t), b = 1e-10;
9
9
  function x(e, t) {
@@ -2,7 +2,7 @@ import { i as e } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
2
2
  import { n as t } from "./src-CA_m4ONl.js";
3
3
  import { n } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
4
  import { D as r, H as i, K as a, U as o, a as s, b as c, c as l, v as u, w as d, x as f, y as p } from "./chunk-DU6HZSFF-BwiyaNpg.js";
5
- import { p as m } from "./mermaid-C2NJdX2u.js";
5
+ import { p as m } from "./mermaid-CiAXjLpA.js";
6
6
  import { n as h } from "./mermaid-parser.core-DxuSfYwJ.js";
7
7
  import { t as g } from "./chunk-JWPE2WC7-DJvv1t8U.js";
8
8
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-VM6X3IG4.mjs
@@ -9,7 +9,7 @@ import { n as s } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
9
9
  import { D as c, H as l, K as u, U as d, a as f, b as p, c as m, f as h, v as g, w as _, y as v, z as y } from "./chunk-DU6HZSFF-BwiyaNpg.js";
10
10
  import "./chunk-PWAF6VOD-CQw5qATZ.js";
11
11
  import { t as b } from "./chunk-GMAD6QVW-BhaJx0X3.js";
12
- import { p as x } from "./mermaid-C2NJdX2u.js";
12
+ import { p as x } from "./mermaid-CiAXjLpA.js";
13
13
  //#region ../node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/band.js
14
14
  function S() {
15
15
  var e = t().unknown(void 0), r = e.domain, i = e.range, o = 0, s = 1, c, l, u = !1, d = 0, f = 0, p = .5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.25.2-dev105",
3
+ "version": "0.25.2-dev106",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { renderHook } from "@testing-library/react";
4
4
  import { useRef } from "react";
5
- import { beforeEach, describe, expect, it, vi } from "vitest";
5
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
6
6
  import {
7
7
  type HTMLElementNotDerivedFromRef,
8
8
  isRefObject,
@@ -28,6 +28,50 @@ describe("isRefObject", () => {
28
28
  });
29
29
  });
30
30
 
31
+ describe.each([1, 2])("with %i anchors named current", (count) => {
32
+ let iframe: HTMLIFrameElement;
33
+ let browserWindow: Window;
34
+
35
+ beforeEach(() => {
36
+ // An iframe preserves named properties hidden by Vitest's global window.
37
+ iframe = document.createElement("iframe");
38
+ document.body.append(iframe);
39
+ if (!iframe.contentWindow) {
40
+ throw new Error("Expected an iframe window");
41
+ }
42
+ browserWindow = iframe.contentWindow;
43
+ const anchors = Array.from({ length: count }, () => {
44
+ const anchor = browserWindow.document.createElement("a");
45
+ anchor.id = "current";
46
+ return anchor;
47
+ });
48
+ browserWindow.document.body.append(...anchors);
49
+ });
50
+
51
+ afterEach(() => {
52
+ iframe.remove();
53
+ });
54
+
55
+ it("does not mistake window for a React ref", () => {
56
+ expect("current" in browserWindow).toBe(true);
57
+ expect(isRefObject(browserWindow)).toBe(false);
58
+ });
59
+
60
+ it("attaches and removes the listener on window", () => {
61
+ const listener = vi.fn();
62
+ const { unmount } = renderHook(() =>
63
+ useEventListener(browserWindow, "resize", listener),
64
+ );
65
+
66
+ browserWindow.dispatchEvent(new Event("resize"));
67
+ expect(listener).toHaveBeenCalledTimes(1);
68
+
69
+ unmount();
70
+ browserWindow.dispatchEvent(new Event("resize"));
71
+ expect(listener).toHaveBeenCalledTimes(1);
72
+ });
73
+ });
74
+
31
75
  describe("useEventListener", () => {
32
76
  beforeEach(() => {
33
77
  vi.clearAllMocks();
@@ -13,7 +13,12 @@ export type HTMLElementNotDerivedFromRef<T = HTMLElement> = T & {
13
13
  };
14
14
 
15
15
  export function isRefObject<T>(target: unknown): target is RefObject<T | null> {
16
- return target !== null && typeof target === "object" && "current" in target;
16
+ return (
17
+ target !== null &&
18
+ typeof target === "object" &&
19
+ !("addEventListener" in target) &&
20
+ "current" in target
21
+ );
17
22
  }
18
23
 
19
24
  export function useEventListener<K extends keyof DocumentEventMap>(