@marimo-team/islands 0.26.1-dev36 → 0.26.1-dev38

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 (81) hide show
  1. package/dist/{ConnectedDataExplorerComponent-jtTaDisw.js → ConnectedDataExplorerComponent-BVMWCBON.js} +9 -9
  2. package/dist/{ErrorBoundary-BmE2rNzY.js → ErrorBoundary-B54cPfe2.js} +6 -6
  3. package/dist/{abnfDiagram-VCTEODGH-cUj3Gnnh.js → abnfDiagram-VCTEODGH-BRj77JhY.js} +2 -2
  4. package/dist/{any-language-editor-BHgkY7jY.js → any-language-editor-BQ9dhxg5.js} +2 -2
  5. package/dist/{architectureDiagram-5GKGNRK7-CIAZgn9d.js → architectureDiagram-5GKGNRK7-CDnAsvE1.js} +1 -1
  6. package/dist/{assertNever-BHnIohkX.js → assertNever-DeSqnr83.js} +2 -2
  7. package/dist/{chat-ui-CWmSnBs8.js → chat-ui-CXyZb62N.js} +12 -12
  8. package/dist/{check-LtjuWmNn.js → check-COXd6cXw.js} +1 -1
  9. package/dist/{chunk-IMKFNOWR-CB9N3qYR.js → chunk-IMKFNOWR-BFtu1O6j.js} +1 -1
  10. package/dist/{chunk-SHT3W25Y-D9njV7TI.js → chunk-SHT3W25Y-B9zWo9Da.js} +1 -1
  11. package/dist/{chunk-SVP7TREG-CUCE0BFm.js → chunk-SVP7TREG-kKS-I24p.js} +1 -1
  12. package/dist/{chunk-TICWLB2K-iQB6ttkI.js → chunk-TICWLB2K-EY3w5-eg.js} +1 -1
  13. package/dist/{classDiagram-ZZMXUADV-BI1VBNIo.js → classDiagram-ZZMXUADV-BR66X7fj.js} +2 -2
  14. package/dist/{classDiagram-v2-VYDZK3BY-BYL3asWh.js → classDiagram-v2-VYDZK3BY-DPcxw_9g.js} +2 -2
  15. package/dist/{code-visibility-BzRlyFnf.js → code-visibility-DxF4Svad.js} +5 -5
  16. package/dist/{common-CNYx3wi3.js → common-CEFc24f5.js} +19 -19
  17. package/dist/{config-1ku0tAiU.js → config-DE3A8m65.js} +3 -3
  18. package/dist/{copy-icon-rYV2znAe.js → copy-icon-gSCLWI50.js} +2 -2
  19. package/dist/{createReducer-BdiSrxHu.js → createReducer-BFfuVhJG.js} +1 -1
  20. package/dist/{cynefinDiagram-5FMLGOSQ-DpGtYvnZ.js → cynefinDiagram-5FMLGOSQ-B9kG0Adl.js} +1 -1
  21. package/dist/{dagre-GXQ25YYZ-B5GDC2kN.js → dagre-GXQ25YYZ-ClnyHQzL.js} +1 -1
  22. package/dist/{data-grid-overlay-editor-DcqdB__T.js → data-grid-overlay-editor-DpaN7MT1.js} +1 -1
  23. package/dist/{diagram-S7CK7UJ4-B2T25t1t.js → diagram-S7CK7UJ4-afCjSSlp.js} +1 -1
  24. package/dist/{diagram-UQ7AKVKN-Dy3B5L_z.js → diagram-UQ7AKVKN-BCHefG5P.js} +1 -1
  25. package/dist/{diagram-VX7I27RA-tOptWvNh.js → diagram-VX7I27RA-9jXA0khj.js} +1 -1
  26. package/dist/{diagram-Z3DM3KII-DsgZAokO.js → diagram-Z3DM3KII-C8tsbK7Q.js} +1 -1
  27. package/dist/{dialog-vs6x3On9.js → dialog-Dn_UHaEl.js} +2 -2
  28. package/dist/{dropdown-menu-D65ZUqka.js → dropdown-menu-D0nePAlm.js} +5 -5
  29. package/dist/{ebnfDiagram-PWID7BFC-CGWECzS1.js → ebnfDiagram-PWID7BFC-It0ZS33j.js} +2 -2
  30. package/dist/{erDiagram-RLTQ6QDP-CZLi87y3.js → erDiagram-RLTQ6QDP-Z0Qfo02H.js} +1 -1
  31. package/dist/{error-banner-D-AC7pQx.js → error-banner-DChjSagB.js} +1 -1
  32. package/dist/{error-entries-DFHEq_SO.js → error-entries-DYoi03MZ.js} +8 -8
  33. package/dist/{feedback-button-2c5dWZX5.js → feedback-button-0vPTkcg1.js} +7 -7
  34. package/dist/{flowDiagram-HODETNUW-CS86WYbX.js → flowDiagram-HODETNUW-8DeXLUFK.js} +2 -2
  35. package/dist/{formats-BUFLQJXY.js → formats-6QF5hRsy.js} +1 -1
  36. package/dist/{glide-data-editor-DkOZUghO.js → glide-data-editor-CGTNgso9.js} +11 -11
  37. package/dist/{glide-utils-CZ-O-CB_.js → glide-utils-B7gy9Her.js} +2 -2
  38. package/dist/{globals-D0kZC9LO.js → globals-CgiVptxE.js} +3 -3
  39. package/dist/{html-to-image-D6Gtk5ik.js → html-to-image-CUFNjxtw.js} +13 -13
  40. package/dist/{infoDiagram-27XIBGKW-C9JBFfpC.js → infoDiagram-27XIBGKW-B5wmzeRz.js} +1 -1
  41. package/dist/{ishikawaDiagram-5VMMS53U-Eh3iuw2D.js → ishikawaDiagram-5VMMS53U-BcbPwik7.js} +1 -1
  42. package/dist/{kanban-definition-UXKFOSKX-DYtuVwYD.js → kanban-definition-UXKFOSKX-AfQmkIoH.js} +1 -1
  43. package/dist/main.js +30 -30
  44. package/dist/{mermaid--k1o49nH.js → mermaid-az53hfgW.js} +34 -34
  45. package/dist/{mindmap-definition-YA3MSWOX-Dn1Cnqys.js → mindmap-definition-YA3MSWOX-B7eBrMap.js} +1 -1
  46. package/dist/{number-overlay-editor-BABdat1B.js → number-overlay-editor-Do3bbYxg.js} +1 -1
  47. package/dist/{pegDiagram-XKGWAZYB-DiY7rITR.js → pegDiagram-XKGWAZYB-BwjpXSLR.js} +2 -2
  48. package/dist/{pencil-AWgwbH4D.js → pencil-pQhLU2Up.js} +1 -1
  49. package/dist/{pieDiagram-E7YTZNPT-BL6InbDs.js → pieDiagram-E7YTZNPT-D5AyRqAQ.js} +1 -1
  50. package/dist/{process-output-ZBdibqlG.js → process-output-DMMs8Ywh.js} +4 -4
  51. package/dist/{railroadDiagram-O6MQD6OU-DterenMu.js → railroadDiagram-O6MQD6OU-Hhrla0Qq.js} +2 -2
  52. package/dist/{requirementDiagram-BXWQKSXE-Vb5_9LHC.js → requirementDiagram-BXWQKSXE-MgDRuFUM.js} +1 -1
  53. package/dist/{reveal-component-C5O0UMiR.js → reveal-component-0gSwFNjH.js} +7 -7
  54. package/dist/{select-CKLRKIzB.js → select-C4rPKgSx.js} +4 -4
  55. package/dist/{sequenceDiagram-WJ2MYXX4-BWsq8hMt.js → sequenceDiagram-WJ2MYXX4-xZYdOGbe.js} +1 -1
  56. package/dist/{spec-C4uOz0Em.js → spec-BsiCag5K.js} +4 -4
  57. package/dist/{stateDiagram-D77RDMKH-nfKKy6aQ.js → stateDiagram-D77RDMKH-DdhE3Yx9.js} +2 -2
  58. package/dist/{stateDiagram-v2-MP3YSRHH-DMUHA_9A.js → stateDiagram-v2-MP3YSRHH-DENKYVKr.js} +2 -2
  59. package/dist/{static-state-DZ1nSa6e.js → static-state-CNnjDcOR.js} +1 -1
  60. package/dist/{swimlanes-42K2YHIH-N4qHIMoc.js → swimlanes-42K2YHIH-Bw7xuGAn.js} +1 -1
  61. package/dist/{swimlanesDiagram-VR7AAH4N-DQpDDjQb.js → swimlanesDiagram-VR7AAH4N-L91TUeh5.js} +2 -2
  62. package/dist/{timeline-definition-24CTP7MA-Od8dY9F5.js → timeline-definition-24CTP7MA-BeGrmws1.js} +1 -1
  63. package/dist/{toast-bhZHUEal.js → toast-qyBwbZJ0.js} +3 -3
  64. package/dist/{tooltip-DSWC_Td_.js → tooltip-COQxCMLx.js} +1 -1
  65. package/dist/{use-restore-focus-ocw7t85i.js → use-restore-focus-D5-Hgr1l.js} +44 -57
  66. package/dist/{useDateFormatter-BiDS8uXQ.js → useDateFormatter-L8edl513.js} +2 -2
  67. package/dist/{useDeepCompareMemoize-BsaXfZ8C.js → useDeepCompareMemoize-B6yhm6sM.js} +1 -1
  68. package/dist/{useLifecycle-CCV7yZ-v.js → useLifecycle-Dnxradbp.js} +1 -1
  69. package/dist/{vega-component-D61CTW1X.js → vega-component-CWKS3tOU.js} +6 -6
  70. package/dist/{vennDiagram-4TSXK5OY-Di3T2YMb.js → vennDiagram-4TSXK5OY-fknCUyJ2.js} +1 -1
  71. package/dist/{wardleyDiagram-VM6X3IG4-CKOF5DTi.js → wardleyDiagram-VM6X3IG4-DvoVMCdj.js} +1 -1
  72. package/dist/{xychartDiagram-S5SC5T6Z-GYLPWSeb.js → xychartDiagram-S5SC5T6Z-0TYtO6UV.js} +1 -1
  73. package/package.json +1 -1
  74. package/src/__tests__/render-tracker.ts +15 -0
  75. package/src/__tests__/setup.ts +3 -0
  76. package/src/components/editor/__tests__/cell-renders.test.tsx +116 -0
  77. package/src/components/icons/__tests__/large-spinner.test.tsx +5 -4
  78. package/src/components/ui/__tests__/fullscreen.test.tsx +60 -0
  79. package/src/components/ui/fullscreen.tsx +35 -50
  80. package/src/core/vscode/__tests__/is-in-vscode.test.ts +36 -0
  81. package/src/core/vscode/is-in-vscode.ts +2 -2
@@ -5,7 +5,7 @@ import { i as a, p as o } from "./chunk-75Z2AOVW-76L6My3P.js";
5
5
  import { n as s } from "./src-D5uZaZib.js";
6
6
  import { n as c } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
7
7
  import { H as l, K as u, U as d, a as f, c as p, f as m, v as h, w as g, x as _, y as v } from "./chunk-DU6HZSFF-4SDIhUTY.js";
8
- import { p as y } from "./mermaid--k1o49nH.js";
8
+ import { p as y } from "./mermaid-az53hfgW.js";
9
9
  import { n as b } from "./mermaid-parser.core-DtOnl7m4.js";
10
10
  import { t as x } from "./chunk-JWPE2WC7-DJvv1t8U.js";
11
11
  //#region ../node_modules/.pnpm/d3-shape@3.2.0/node_modules/d3-shape/src/descending.js
@@ -1,7 +1,7 @@
1
- import { T as e } from "./html-to-image-D6Gtk5ik.js";
2
- import { h as t } from "./tooltip-DSWC_Td_.js";
3
- import { Tt as n, wt as r } from "./error-entries-DFHEq_SO.js";
4
- import { r as i } from "./assertNever-BHnIohkX.js";
1
+ import { T as e } from "./html-to-image-CUFNjxtw.js";
2
+ import { h as t } from "./tooltip-COQxCMLx.js";
3
+ import { Tt as n, wt as r } from "./error-entries-DYoi03MZ.js";
4
+ import { r as i } from "./assertNever-DeSqnr83.js";
5
5
  var a = t("file", [["path", {
6
6
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
7
7
  key: "1oefj6"
@@ -1,9 +1,9 @@
1
1
  import { n as e } from "./src-D5uZaZib.js";
2
2
  import { n as t } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
3
3
  import "./chunk-DU6HZSFF-4SDIhUTY.js";
4
- import "./mermaid--k1o49nH.js";
4
+ import "./mermaid-az53hfgW.js";
5
5
  import { g as n, t as r } from "./mermaid-parser.core-DtOnl7m4.js";
6
- import { n as i, r as a, t as o } from "./chunk-SVP7TREG-CUCE0BFm.js";
6
+ import { n as i, r as a, t as o } from "./chunk-SVP7TREG-kKS-I24p.js";
7
7
  import { t as s } from "./chunk-JWPE2WC7-DJvv1t8U.js";
8
8
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/railroadDiagram-O6MQD6OU.mjs
9
9
  var c = n().Railroad.parser.LangiumParser, l = /* @__PURE__ */ t((e) => {
@@ -9,7 +9,7 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
9
9
  import "./chunk-GVQU2GXP-BkolpSXU.js";
10
10
  import "./chunk-L3NEJ4N5-B-BFQp9t.js";
11
11
  import "./chunk-OSK3NFVY-BzfZ4VBG.js";
12
- import { n as p, r as m } from "./mermaid--k1o49nH.js";
12
+ import { n as p, r as m } from "./mermaid-az53hfgW.js";
13
13
  import { t as h } from "./chunk-XXDRQBXY-BM-YIt-_.js";
14
14
  import { t as g } from "./chunk-POPQ4Y6H-BFSZel4w.js";
15
15
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-BXWQKSXE.mjs
@@ -2,15 +2,15 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { g as t, h as n, m as r, r as i, t as a } from "./button-Z2R2272J.js";
3
3
  import { t as o } from "./react-Bgs_wQh3.js";
4
4
  import { t as s } from "./compiler-runtime-C5KHtL5D.js";
5
- import { h as c, t as l } from "./tooltip-DSWC_Td_.js";
6
- import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-CNYx3wi3.js";
7
- import { M as w } from "./select-CKLRKIzB.js";
8
- import { X as T } from "./dropdown-menu-D65ZUqka.js";
5
+ import { h as c, t as l } from "./tooltip-COQxCMLx.js";
6
+ import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-CEFc24f5.js";
7
+ import { M as w } from "./select-C4rPKgSx.js";
8
+ import { X as T } from "./dropdown-menu-D0nePAlm.js";
9
9
  import { t as E } from "./jsx-runtime-D8btoEHk.js";
10
- import { Bt as D, Ut as O, f as k, i as ee } from "./use-restore-focus-ocw7t85i.js";
10
+ import { Bt as D, Ut as O, f as k, i as ee } from "./use-restore-focus-D5-Hgr1l.js";
11
11
  import { t as A } from "./useEvent-BoN7U38T.js";
12
- import { o as te } from "./static-state-DZ1nSa6e.js";
13
- import { n as ne, t as re } from "./code-visibility-BzRlyFnf.js";
12
+ import { o as te } from "./static-state-CNnjDcOR.js";
13
+ import { n as ne, t as re } from "./code-visibility-DxF4Svad.js";
14
14
  /* empty css */
15
15
  var j = c("sticky-note", [["path", {
16
16
  d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
@@ -2,12 +2,12 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { h as t, i as n, m as r, p as i, u as a } from "./button-Z2R2272J.js";
3
3
  import { t as o } from "./react-Bgs_wQh3.js";
4
4
  import { t as s } from "./compiler-runtime-C5KHtL5D.js";
5
- import { c, h as l, l as u, p as d, s as f, u as p } from "./tooltip-DSWC_Td_.js";
6
- import { t as m } from "./check-LtjuWmNn.js";
7
- import { a as h, s as g } from "./assertNever-BHnIohkX.js";
5
+ import { c, h as l, l as u, p as d, s as f, u as p } from "./tooltip-COQxCMLx.js";
6
+ import { t as m } from "./check-COXd6cXw.js";
7
+ import { a as h, s as g } from "./assertNever-DeSqnr83.js";
8
8
  import { t as _ } from "./react-dom-DdqGVp5N.js";
9
9
  import { t as v } from "./jsx-runtime-D8btoEHk.js";
10
- import { _n as y, an as b, fn as x, gn as S, hn as C, in as ee, l as w, mn as T, nn as te, o as E, on as D, pn as O, s as ne, tn as re, un as ie, vn as ae, yn as k } from "./use-restore-focus-ocw7t85i.js";
10
+ import { _n as y, an as b, fn as x, gn as S, hn as C, in as ee, l as w, mn as T, nn as te, o as E, on as D, pn as O, s as ne, tn as re, un as ie, vn as ae, yn as k } from "./use-restore-focus-D5-Hgr1l.js";
11
11
  var A = l("chevron-down", [["path", {
12
12
  d: "m6 9 6 6 6-6",
13
13
  key: "qrunsl"
@@ -3,7 +3,7 @@ import { n, t as r } from "./src-D5uZaZib.js";
3
3
  import { n as i } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
4
  import { A as a, F as o, G as s, H as c, K as l, O as u, U as d, a as f, b as p, c as m, i as h, r as g, s as _, v, w as y, x as b, y as x, z as S } from "./chunk-DU6HZSFF-4SDIhUTY.js";
5
5
  import { t as C } from "./dist-CB9MzCXv.js";
6
- import { a as w, i as T } from "./mermaid--k1o49nH.js";
6
+ import { a as w, i as T } from "./mermaid-az53hfgW.js";
7
7
  import { a as E, c as D, i as O, n as k, r as A, s as j } from "./chunk-F27PBJKO-COH2t-FO.js";
8
8
  import { t as M } from "./chunk-2Q5K7J3B-BMkUkeuy.js";
9
9
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WJ2MYXX4.mjs
@@ -1,7 +1,7 @@
1
- import { h as e } from "./tooltip-DSWC_Td_.js";
2
- import { o as t } from "./useLifecycle-CCV7yZ-v.js";
3
- import { i as n, o as r } from "./useDateFormatter-BiDS8uXQ.js";
4
- import { n as i } from "./assertNever-BHnIohkX.js";
1
+ import { h as e } from "./tooltip-COQxCMLx.js";
2
+ import { o as t } from "./useLifecycle-Dnxradbp.js";
3
+ import { i as n, o as r } from "./useDateFormatter-L8edl513.js";
4
+ import { n as i } from "./assertNever-DeSqnr83.js";
5
5
  var a = e("align-center-vertical", [
6
6
  ["path", {
7
7
  d: "M12 2v20",
@@ -12,11 +12,11 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
12
12
  import "./chunk-GVQU2GXP-BkolpSXU.js";
13
13
  import "./chunk-L3NEJ4N5-B-BFQp9t.js";
14
14
  import "./chunk-OSK3NFVY-BzfZ4VBG.js";
15
- import "./mermaid--k1o49nH.js";
15
+ import "./mermaid-az53hfgW.js";
16
16
  import "./chunk-F27PBJKO-COH2t-FO.js";
17
17
  import "./chunk-XXDRQBXY-BM-YIt-_.js";
18
18
  import "./chunk-POPQ4Y6H-BFSZel4w.js";
19
- import { i as f, n as p, t as m } from "./chunk-IMKFNOWR-CB9N3qYR.js";
19
+ import { i as f, n as p, t as m } from "./chunk-IMKFNOWR-BFtu1O6j.js";
20
20
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-D77RDMKH.mjs
21
21
  var h = /* @__PURE__ */ s((e) => e.append("circle").attr("class", "start-state").attr("r", d().state.sizeUnit).attr("cx", d().state.padding + d().state.sizeUnit).attr("cy", d().state.padding + d().state.sizeUnit), "drawStartState"), g = /* @__PURE__ */ s((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", d().state.textHeight).attr("class", "divider").attr("x2", d().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), _ = /* @__PURE__ */ s((e, t) => {
22
22
  let n = e.append("text").attr("x", 2 * d().state.padding).attr("y", d().state.textHeight + 2 * d().state.padding).attr("font-size", d().state.fontSize).attr("class", "state-title").text(t.id), r = n.node().getBBox();
@@ -9,11 +9,11 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
9
9
  import "./chunk-GVQU2GXP-BkolpSXU.js";
10
10
  import "./chunk-L3NEJ4N5-B-BFQp9t.js";
11
11
  import "./chunk-OSK3NFVY-BzfZ4VBG.js";
12
- import "./mermaid--k1o49nH.js";
12
+ import "./mermaid-az53hfgW.js";
13
13
  import "./chunk-F27PBJKO-COH2t-FO.js";
14
14
  import "./chunk-XXDRQBXY-BM-YIt-_.js";
15
15
  import "./chunk-POPQ4Y6H-BFSZel4w.js";
16
- import { i as t, n, r, t as i } from "./chunk-IMKFNOWR-CB9N3qYR.js";
16
+ import { i as t, n, r, t as i } from "./chunk-IMKFNOWR-BFtu1O6j.js";
17
17
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-MP3YSRHH.mjs
18
18
  var a = {
19
19
  parser: n,
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./compiler-runtime-C5KHtL5D.js";
2
- import { Bt as t, Ct as n, Ut as r, f as i, h as a } from "./use-restore-focus-ocw7t85i.js";
2
+ import { Bt as t, Ct as n, Ut as r, f as i, h as a } from "./use-restore-focus-D5-Hgr1l.js";
3
3
  import { t as o } from "./invariant-DLmrl-hA.js";
4
4
  //#region src/core/wasm/utils.ts
5
5
  function s() {
@@ -9,7 +9,7 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
9
9
  import "./chunk-GVQU2GXP-BkolpSXU.js";
10
10
  import "./chunk-L3NEJ4N5-B-BFQp9t.js";
11
11
  import { o as n } from "./chunk-OSK3NFVY-BzfZ4VBG.js";
12
- import { c as r } from "./mermaid--k1o49nH.js";
12
+ import { c as r } from "./mermaid-az53hfgW.js";
13
13
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanes-42K2YHIH.mjs
14
14
  var i = 5, a = 1e-5, o = 1e-6;
15
15
  function s(e) {
@@ -9,11 +9,11 @@ import "./chunk-4HAMMTFA-qKgadZwy.js";
9
9
  import "./chunk-GVQU2GXP-BkolpSXU.js";
10
10
  import "./chunk-L3NEJ4N5-B-BFQp9t.js";
11
11
  import "./chunk-OSK3NFVY-BzfZ4VBG.js";
12
- import "./mermaid--k1o49nH.js";
12
+ import "./mermaid-az53hfgW.js";
13
13
  import "./chunk-F27PBJKO-COH2t-FO.js";
14
14
  import "./chunk-XXDRQBXY-BM-YIt-_.js";
15
15
  import "./chunk-POPQ4Y6H-BFSZel4w.js";
16
- import { r as t, t as n } from "./chunk-SHT3W25Y-D9njV7TI.js";
16
+ import { r as t, t as n } from "./chunk-SHT3W25Y-B9zWo9Da.js";
17
17
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-VR7AAH4N.mjs
18
18
  var r = n({
19
19
  defaultLayout: "swimlane",
@@ -3,7 +3,7 @@ import { p as t } from "./chunk-75Z2AOVW-76L6My3P.js";
3
3
  import { n, t as r } from "./src-D5uZaZib.js";
4
4
  import { n as i, t as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
5
5
  import { $ as o, J as s, a as c, b as l, et as u, nt as d, o as f, x as p } from "./chunk-DU6HZSFF-4SDIhUTY.js";
6
- import { p as m } from "./mermaid--k1o49nH.js";
6
+ import { p as m } from "./mermaid-az53hfgW.js";
7
7
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-24CTP7MA.mjs
8
8
  var h = (function() {
9
9
  var e = /* @__PURE__ */ i(function(e, t, n, r) {
@@ -2,11 +2,11 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { h as t, i as n, p as r } from "./button-Z2R2272J.js";
3
3
  import { t as i } from "./react-Bgs_wQh3.js";
4
4
  import { t as a } from "./compiler-runtime-C5KHtL5D.js";
5
- import { m as o } from "./tooltip-DSWC_Td_.js";
6
- import { a as s, s as c } from "./assertNever-BHnIohkX.js";
5
+ import { m as o } from "./tooltip-COQxCMLx.js";
6
+ import { a as s, s as c } from "./assertNever-DeSqnr83.js";
7
7
  import { t as l } from "./react-dom-DdqGVp5N.js";
8
8
  import { t as u } from "./jsx-runtime-D8btoEHk.js";
9
- import { _n as d, an as f, bn as p, dn as m, fn as h, gn as g, hn as _, mn as v, un as ee, vn as te, yn as y } from "./use-restore-focus-ocw7t85i.js";
9
+ import { _n as d, an as f, bn as p, dn as m, fn as h, gn as g, hn as _, mn as v, un as ee, vn as te, yn as y } from "./use-restore-focus-D5-Hgr1l.js";
10
10
  //#region ../node_modules/.pnpm/@radix-ui+react-toast@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react@1_72d2e12f1af98becc17c9660ff8081b2/node_modules/@radix-ui/react-toast/dist/index.mjs
11
11
  var b = /* @__PURE__ */ e(i(), 1), ne = /* @__PURE__ */ e(l(), 1), x = u(), S = Object.defineProperty, C = (e, t) => S(e, "name", {
12
12
  value: t,
@@ -4,7 +4,7 @@ import { t as i } from "./react-Bgs_wQh3.js";
4
4
  import { t as a } from "./compiler-runtime-C5KHtL5D.js";
5
5
  import { t as o } from "./react-dom-DdqGVp5N.js";
6
6
  import { t as s } from "./jsx-runtime-D8btoEHk.js";
7
- import { _n as c, an as l, cn as u, fn as d, gn as f, hn as p, l as m, mn as h, o as g, pn as _, s as v, un as y, vn as b, yn as x } from "./use-restore-focus-ocw7t85i.js";
7
+ import { _n as c, an as l, cn as u, fn as d, gn as f, hn as p, l as m, mn as h, o as g, pn as _, s as v, un as y, vn as b, yn as x } from "./use-restore-focus-D5-Hgr1l.js";
8
8
  //#region ../node_modules/.pnpm/lucide-react@0.577.0_react@19.3.1/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
9
9
  var S = /* @__PURE__ */ e(i()), C = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), w = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), T = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), E = (e) => {
10
10
  let t = T(e);
@@ -7578,7 +7578,7 @@ function Ph(e) {
7578
7578
  //#endregion
7579
7579
  //#region src/core/vscode/is-in-vscode.ts
7580
7580
  function Fh() {
7581
- return document.querySelector("[data-vscode-theme-kind]") !== null;
7581
+ return document.body?.hasAttribute("data-vscode-theme-kind") ?? !1;
7582
7582
  }
7583
7583
  //#endregion
7584
7584
  //#region src/components/ui/fullscreen.tsx
@@ -7600,71 +7600,58 @@ function Vh(e) {
7600
7600
  }, t[0] = e, t[1] = n), (0, v.useSyncExternalStore)(Bh, n);
7601
7601
  }
7602
7602
  function Hh(e) {
7603
+ let t = (0, Ei.c)(8), { children: n } = e, [r, i] = v.useState(null), a = v.useRef(null), o, s;
7604
+ t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
7605
+ a.current && i(Gh(a.current, Ih));
7606
+ }, s = [], t[0] = o, t[1] = s) : (o = t[0], s = t[1]), (0, v.useLayoutEffect)(o, s);
7607
+ let c;
7608
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, b.jsx)("div", {
7609
+ ref: a,
7610
+ className: "contents invisible"
7611
+ }), t[2] = c) : c = t[2];
7612
+ let l;
7613
+ t[3] !== n || t[4] !== r ? (l = n(r), t[3] = n, t[4] = r, t[5] = l) : l = t[5];
7614
+ let u;
7615
+ return t[6] === l ? u = t[7] : (u = /* @__PURE__ */ (0, b.jsxs)(b.Fragment, { children: [c, l] }), t[6] = l, t[7] = u), u;
7616
+ }
7617
+ function Uh(e) {
7603
7618
  let t = (t) => {
7604
- let n = (0, Ei.c)(6), [r, i] = v.useState(null), a = v.useRef(null), o, s;
7605
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
7606
- if (!a.current) return;
7607
- let e = Wh(a.current, Ih);
7608
- i(e);
7609
- }, s = [], n[0] = o, n[1] = s) : (o = n[0], s = n[1]), v.useLayoutEffect(o, s);
7610
- let c;
7611
- n[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, b.jsx)("div", {
7612
- ref: a,
7613
- className: "contents invisible"
7614
- }), n[2] = c) : c = n[2];
7615
- let l;
7616
- return n[3] !== r || n[4] !== t ? (l = /* @__PURE__ */ (0, b.jsxs)(b.Fragment, { children: [c, /* @__PURE__ */ (0, b.jsx)(e, {
7617
- ...t,
7618
- container: r
7619
- })] }), n[3] = r, n[4] = t, n[5] = l) : l = n[5], l;
7620
- }, n = (n) => {
7621
- let r = (0, Ei.c)(7), i = zh();
7619
+ let n = (0, Ei.c)(7), r = zh();
7622
7620
  if (Fh()) {
7623
- let e;
7624
- return r[0] === n ? e = r[1] : (e = /* @__PURE__ */ (0, b.jsx)(t, { ...n }), r[0] = n, r[1] = e), e;
7621
+ let r;
7622
+ return n[0] === t ? r = n[1] : (r = /* @__PURE__ */ (0, b.jsx)(Hh, { children: (n) => /* @__PURE__ */ (0, b.jsx)(e, {
7623
+ ...t,
7624
+ container: n
7625
+ }) }), n[0] = t, n[1] = r), r;
7625
7626
  }
7626
- if (!i) {
7627
- let t;
7628
- return r[2] === n ? t = r[3] : (t = /* @__PURE__ */ (0, b.jsx)(e, { ...n }), r[2] = n, r[3] = t), t;
7627
+ if (!r) {
7628
+ let r;
7629
+ return n[2] === t ? r = n[3] : (r = /* @__PURE__ */ (0, b.jsx)(e, { ...t }), n[2] = t, n[3] = r), r;
7629
7630
  }
7630
- let a;
7631
- return r[4] !== i || r[5] !== n ? (a = /* @__PURE__ */ (0, b.jsx)(e, {
7632
- ...n,
7633
- container: i
7634
- }), r[4] = i, r[5] = n, r[6] = a) : a = r[6], a;
7631
+ let i;
7632
+ return n[4] !== r || n[5] !== t ? (i = /* @__PURE__ */ (0, b.jsx)(e, {
7633
+ ...t,
7634
+ container: r
7635
+ }), n[4] = r, n[5] = t, n[6] = i) : i = n[6], i;
7635
7636
  };
7636
- return n.displayName = e.displayName, n;
7637
+ return t.displayName = e.displayName, t;
7637
7638
  }
7638
- function Uh(e) {
7639
+ function Wh(e) {
7639
7640
  let t = (t) => {
7640
- let n = (0, Ei.c)(6), [r, i] = v.useState(null), a = v.useRef(null), o, s;
7641
- n[0] === Symbol.for("react.memo_cache_sentinel") ? (o = () => {
7642
- if (!a.current) return;
7643
- let e = Wh(a.current, Ih);
7644
- i(e);
7645
- }, s = [], n[0] = o, n[1] = s) : (o = n[0], s = n[1]), v.useLayoutEffect(o, s);
7646
- let c;
7647
- n[2] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, b.jsx)("div", {
7648
- ref: a,
7649
- className: "contents invisible"
7650
- }), n[2] = c) : c = n[2];
7651
- let l;
7652
- return n[3] !== r || n[4] !== t ? (l = /* @__PURE__ */ (0, b.jsxs)(b.Fragment, { children: [c, /* @__PURE__ */ (0, b.jsx)(e, {
7653
- ...t,
7654
- collisionBoundary: r
7655
- })] }), n[3] = r, n[4] = t, n[5] = l) : l = n[5], l;
7656
- }, n = (n) => {
7657
- let r = (0, Ei.c)(4);
7641
+ let n = (0, Ei.c)(4);
7658
7642
  if (Fh()) {
7659
- let e;
7660
- return r[0] === n ? e = r[1] : (e = /* @__PURE__ */ (0, b.jsx)(t, { ...n }), r[0] = n, r[1] = e), e;
7643
+ let r;
7644
+ return n[0] === t ? r = n[1] : (r = /* @__PURE__ */ (0, b.jsx)(Hh, { children: (n) => /* @__PURE__ */ (0, b.jsx)(e, {
7645
+ ...t,
7646
+ collisionBoundary: n
7647
+ }) }), n[0] = t, n[1] = r), r;
7661
7648
  }
7662
- let i;
7663
- return r[2] === n ? i = r[3] : (i = /* @__PURE__ */ (0, b.jsx)(e, { ...n }), r[2] = n, r[3] = i), i;
7649
+ let r;
7650
+ return n[2] === t ? r = n[3] : (r = /* @__PURE__ */ (0, b.jsx)(e, { ...t }), n[2] = t, n[3] = r), r;
7664
7651
  };
7665
- return n.displayName = e.displayName, n;
7652
+ return t.displayName = e.displayName, t;
7666
7653
  }
7667
- function Wh(e, t) {
7654
+ function Gh(e, t) {
7668
7655
  let n = e;
7669
7656
  for (; n;) {
7670
7657
  let e = n.closest(t);
@@ -7676,7 +7663,7 @@ function Wh(e, t) {
7676
7663
  }
7677
7664
  //#endregion
7678
7665
  //#region src/components/ui/use-restore-focus.ts
7679
- function Gh() {
7666
+ function Kh() {
7680
7667
  let e = (0, Ei.c)(3), [t, n] = (0, v.useState)(null), r;
7681
7668
  e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
7682
7669
  n(document.activeElement);
@@ -7690,4 +7677,4 @@ function Gh() {
7690
7677
  }, e[1] = t, e[2] = a), a;
7691
7678
  }
7692
7679
  //#endregion
7693
- export { Pm as $, sr as $t, Bp as A, Yi as At, ip as B, Ci as Bt, Jm as C, ea as Ct, Pp as D, Xi as Dt, Ym as E, Qi as Et, nm as F, Ii as Ft, Nm as G, Dr as Gt, W as H, gi as Ht, Op as I, Ui as It, Y as J, _r as Jt, Np as K, ar as Kt, Hp as L, ki as Lt, qp as M, ji as Mt, tm as N, qi as Nt, Vp as O, $i as Ot, ap as P, Gi as Pt, Ap as Q, xr as Qt, om as R, _i as Rt, oh as S, ia as St, nh as T, ta as Tt, Gp as U, O as Ut, Zp as V, wi as Vt, Z as W, fi as Wt, km as X, pr as Xt, J as Y, Sr as Yt, Jp as Z, dr as Zt, ah as _, C as _n, Wu as _t, Vh as a, Dt as an, q as at, Zm as b, ne as bn, Mu as bt, Fh as c, mt as cn, em as ct, Ah as d, $e as dn, Qp as dt, rr as en, Dm as et, gh as f, Ge as fn, Kp as ft, th as g, ue as gn, Rf as gt, mh as h, Ce as hn, Hf as ht, zh as i, Nt as in, zp as it, fm as j, Mi as jt, jp as k, Zi as kt, Mh as l, pt as ln, Wp as lt, ph as m, je as mn, Kf as mt, Lh as n, Wn as nn, X as nt, Hh as o, ut as on, Up as ot, hh as p, Ve as pn, Lp as pt, Fp as q, wr as qt, Rh as r, Lt as rn, xm as rt, Uh as s, ft as sn, sm as st, Gh as t, $n as tn, rm as tt, kh as u, Qe as un, G as ut, ih as v, ae as vn, Lu as vt, $ as w, na as wt, rh as x, jo as xt, Qm as y, x as yn, lu as yt, Sm as z, Ti as zt };
7680
+ export { Pm as $, sr as $t, Bp as A, Yi as At, ip as B, Ci as Bt, Jm as C, ea as Ct, Pp as D, Xi as Dt, Ym as E, Qi as Et, nm as F, Ii as Ft, Nm as G, Dr as Gt, W as H, gi as Ht, Op as I, Ui as It, Y as J, _r as Jt, Np as K, ar as Kt, Hp as L, ki as Lt, qp as M, ji as Mt, tm as N, qi as Nt, Vp as O, $i as Ot, ap as P, Gi as Pt, Ap as Q, xr as Qt, om as R, _i as Rt, oh as S, ia as St, nh as T, ta as Tt, Gp as U, O as Ut, Zp as V, wi as Vt, Z as W, fi as Wt, km as X, pr as Xt, J as Y, Sr as Yt, Jp as Z, dr as Zt, ah as _, C as _n, Wu as _t, Vh as a, Dt as an, q as at, Zm as b, ne as bn, Mu as bt, Fh as c, mt as cn, em as ct, Ah as d, $e as dn, Qp as dt, rr as en, Dm as et, gh as f, Ge as fn, Kp as ft, th as g, ue as gn, Rf as gt, mh as h, Ce as hn, Hf as ht, zh as i, Nt as in, zp as it, fm as j, Mi as jt, jp as k, Zi as kt, Mh as l, pt as ln, Wp as lt, ph as m, je as mn, Kf as mt, Lh as n, Wn as nn, X as nt, Uh as o, ut as on, Up as ot, hh as p, Ve as pn, Lp as pt, Fp as q, wr as qt, Rh as r, Lt as rn, xm as rt, Wh as s, ft as sn, sm as st, Kh as t, $n as tn, rm as tt, kh as u, Qe as un, G as ut, ih as v, ae as vn, Lu as vt, $ as w, na as wt, rh as x, jo as xt, Qm as y, x as yn, lu as yt, Sm as z, Ti as zt };
@@ -1,7 +1,7 @@
1
1
  import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { t } from "./react-Bgs_wQh3.js";
3
- import { h as n } from "./tooltip-DSWC_Td_.js";
4
- import { C as r } from "./select-CKLRKIzB.js";
3
+ import { h as n } from "./tooltip-COQxCMLx.js";
4
+ import { C as r } from "./select-C4rPKgSx.js";
5
5
  var i = n("chart-pie", [["path", {
6
6
  d: "M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",
7
7
  key: "pzmjnu"
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { t } from "./react-Bgs_wQh3.js";
3
- import { Lt as n } from "./use-restore-focus-ocw7t85i.js";
3
+ import { Lt as n } from "./use-restore-focus-D5-Hgr1l.js";
4
4
  //#region src/utils/semaphore.ts
5
5
  var r = class {
6
6
  maxPermits;
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { h as t, i as n } from "./button-Z2R2272J.js";
3
3
  import { t as r } from "./react-Bgs_wQh3.js";
4
4
  import { t as i } from "./compiler-runtime-C5KHtL5D.js";
5
- import { h as a } from "./tooltip-DSWC_Td_.js";
5
+ import { h as a } from "./tooltip-COQxCMLx.js";
6
6
  import { t as o } from "./jsx-runtime-D8btoEHk.js";
7
7
  var s = a("calendar", [
8
8
  ["path", {
@@ -2,18 +2,18 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
2
2
  import { g as t, h as n, m as r, s as i } from "./button-Z2R2272J.js";
3
3
  import { t as a } from "./react-Bgs_wQh3.js";
4
4
  import { t as o } from "./compiler-runtime-C5KHtL5D.js";
5
- import { t as s } from "./tooltip-DSWC_Td_.js";
6
- import { l as c, t as l } from "./config-1ku0tAiU.js";
5
+ import { t as s } from "./tooltip-COQxCMLx.js";
6
+ import { l as c, t as l } from "./config-DE3A8m65.js";
7
7
  import { t as u } from "./jsx-runtime-D8btoEHk.js";
8
- import { d } from "./use-restore-focus-ocw7t85i.js";
9
- import { n as f } from "./error-banner-D-AC7pQx.js";
8
+ import { d } from "./use-restore-focus-D5-Hgr1l.js";
9
+ import { n as f } from "./error-banner-DChjSagB.js";
10
10
  import { t as p } from "./debounce-DrhhziJv.js";
11
11
  import { t as ee } from "./objects-DCmMvZtn.js";
12
12
  import { t as te } from "./useEvent-BoN7U38T.js";
13
- import { a as ne, i as re, n as ie, t as m } from "./formats-BUFLQJXY.js";
13
+ import { a as ne, i as re, n as ie, t as m } from "./formats-6QF5hRsy.js";
14
14
  import { a as h, t as g } from "./arrays-DoQ-AILx.js";
15
15
  import { t as ae } from "./useAsyncData-P5-Oovhq.js";
16
- import { n as _, t as oe } from "./useDeepCompareMemoize-BsaXfZ8C.js";
16
+ import { n as _, t as oe } from "./useDeepCompareMemoize-B6yhm6sM.js";
17
17
  import { W as se, n as ce } from "./vega-loader.browser-Co9gYE8Z.js";
18
18
  import { t as le } from "./react-vega-CGgQEf0O.js";
19
19
  import { a as ue, n as de } from "./loader-qPmiRXZd.js";
@@ -3,7 +3,7 @@ import { t } from "./src-D5uZaZib.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-4SDIhUTY.js";
5
5
  import { t as _ } from "./rough.esm-CtV9AnV1.js";
6
- import { p as v } from "./mermaid--k1o49nH.js";
6
+ import { p as v } from "./mermaid-az53hfgW.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-76L6My3P.js";
2
2
  import { n as t } from "./src-D5uZaZib.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-4SDIhUTY.js";
5
- import { p as m } from "./mermaid--k1o49nH.js";
5
+ import { p as m } from "./mermaid-az53hfgW.js";
6
6
  import { n as h } from "./mermaid-parser.core-DtOnl7m4.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-4SDIhUTY.js";
10
10
  import "./chunk-PWAF6VOD-CRu_RGP2.js";
11
11
  import { t as b } from "./chunk-GMAD6QVW-BJGF8QZL.js";
12
- import { p as x } from "./mermaid--k1o49nH.js";
12
+ import { p as x } from "./mermaid-az53hfgW.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.26.1-dev36",
3
+ "version": "0.26.1-dev38",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -0,0 +1,15 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import type { ProfilerOnRenderCallback } from "react";
3
+
4
+ /** Counts committed subtree renders, not render attempts or elapsed time. */
5
+ export function createRenderTracker() {
6
+ const counts = new Map<string, number>();
7
+ const onRender: ProfilerOnRenderCallback = (id) => {
8
+ counts.set(id, (counts.get(id) ?? 0) + 1);
9
+ };
10
+ return {
11
+ onRender,
12
+ reset: () => counts.clear(),
13
+ counts: (): Record<string, number> => Object.fromEntries(counts),
14
+ };
15
+ }
@@ -36,6 +36,9 @@ globalThis.IntersectionObserver ??= class {
36
36
  }
37
37
  } as never;
38
38
 
39
+ // jsdom has no layout, so Range has no getClientRects (CodeMirror calls it)
40
+ Range.prototype.getClientRects ??= () => [] as unknown as DOMRectList;
41
+
39
42
  // Global setup for all tests
40
43
  beforeEach(() => {
41
44
  // Reset all mocks before each test
@@ -0,0 +1,116 @@
1
+ /* Copyright 2026 Marimo. All rights reserved. */
2
+ import { act, render } from "@testing-library/react";
3
+ import { Profiler } from "react";
4
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
5
+ import { DocumentWrapper } from "@/__mocks__/document";
6
+ import { MockExecutions } from "@/__mocks__/executions";
7
+ import { MockRequestClient } from "@/__mocks__/requests";
8
+ import { createRenderTracker } from "@/__tests__/render-tracker";
9
+ import { cell } from "@/core/notebook/document/__tests__/fixtures";
10
+ import { cellId } from "@/__tests__/branded";
11
+ import { TooltipProvider } from "@/components/ui/tooltip";
12
+ import { notebookAtom } from "@/core/cells/cells";
13
+ import { editorMountScheduler } from "@/core/codemirror/editor-mount-scheduler";
14
+ import { setupNotebook } from "@/core/cells/__tests__/harness";
15
+ import { defaultUserConfig } from "@/core/config/config-schema";
16
+ import { requestClientAtom } from "@/core/network/requests";
17
+ import { invariant } from "@/utils/invariant";
18
+ import { Cell } from "../notebook-cell";
19
+
20
+ const stops: Array<() => void> = [];
21
+ beforeEach(() => vi.useFakeTimers());
22
+ afterEach(() => {
23
+ act(() => stops.splice(0).forEach((stop) => stop()));
24
+ vi.useRealTimers();
25
+ });
26
+
27
+ async function setup(count: number) {
28
+ const ids = Array.from({ length: count }, (_, i) => cellId(`c${i + 1}`));
29
+ const notebook = setupNotebook(
30
+ stops,
31
+ Object.fromEntries(ids.map((id, i) => [id, cell(id, `x = ${i + 1}`)])),
32
+ );
33
+ const { store, model } = notebook;
34
+ store.set(requestClientAtom, MockRequestClient.create());
35
+ const replica = MockExecutions.seed(store, []);
36
+ const renders = createRenderTracker();
37
+ const userConfig = defaultUserConfig();
38
+ const mounted = render(
39
+ <DocumentWrapper store={store} model={model}>
40
+ <TooltipProvider>
41
+ {ids.map((id) => (
42
+ <Profiler key={id} id={id} onRender={renders.onRender}>
43
+ <Cell
44
+ cellId={id}
45
+ theme="light"
46
+ mode="edit"
47
+ userConfig={userConfig}
48
+ showPlaceholder={false}
49
+ canDelete={true}
50
+ canMoveX={false}
51
+ isCollapsed={false}
52
+ collapseCount={0}
53
+ />
54
+ </Profiler>
55
+ ))}
56
+ </TooltipProvider>
57
+ </DocumentWrapper>,
58
+ );
59
+ stops.unshift(mounted.unmount);
60
+ await act(async () => {
61
+ // Settle delayed console clears before measuring update commits.
62
+ await vi.runOnlyPendingTimersAsync();
63
+ });
64
+ expect(Object.keys(renders.counts())).toEqual(ids);
65
+ renders.reset();
66
+ return { ...notebook, replica, renders };
67
+ }
68
+
69
+ describe.each([2, 25])("cell render isolation with %i cells", (count) => {
70
+ it("does not re-render other cells on a keystroke", async () => {
71
+ const { store, model, renders } = await setup(count);
72
+ await act(async () => {
73
+ editorMountScheduler.promote("c1");
74
+ await vi.runOnlyPendingTimersAsync();
75
+ });
76
+ const view =
77
+ store.get(notebookAtom).cellHandles[cellId("c1")].current?.editorView;
78
+ invariant(view, "The cell editor must be mounted");
79
+ renders.reset();
80
+ await act(async () => {
81
+ view.dispatch({
82
+ changes: { from: view.state.doc.length, insert: "2" },
83
+ });
84
+ });
85
+ expect(store.get(model.documentAtom)?.cells.get(cellId("c1"))?.code).toBe(
86
+ "x = 12",
87
+ );
88
+ expect(Object.keys(renders.counts())).toEqual(["c1"]);
89
+ expect(store.get(model.syncStatusAtom).status).toBe("pending");
90
+ renders.reset();
91
+ await act(async () => {
92
+ // Include the debounce window and delayed console work in the measurement.
93
+ await vi.advanceTimersByTimeAsync(200);
94
+ });
95
+ expect(store.get(model.syncStatusAtom).status).toBe("sending");
96
+ expect(Object.keys(renders.counts())).toEqual([]);
97
+ });
98
+
99
+ it("re-renders only the cell targeted by a kernel update", async () => {
100
+ const { store, replica, renders } = await setup(count);
101
+ for (const execution of [
102
+ MockExecutions.queued("c2"),
103
+ MockExecutions.running("c2"),
104
+ MockExecutions.completed("c2"),
105
+ ]) {
106
+ renders.reset();
107
+ await act(async () => {
108
+ store.set(
109
+ replica.executionsAtom,
110
+ MockExecutions.inputs([execution]).executions,
111
+ );
112
+ });
113
+ expect(Object.keys(renders.counts())).toEqual(["c2"]);
114
+ }
115
+ });
116
+ });