@marimo-team/islands 0.25.3-dev197 → 0.25.3-dev198

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 (135) hide show
  1. package/dist/{ConnectedDataExplorerComponent-BRuwLOIx.js → ConnectedDataExplorerComponent-BsWiIPFk.js} +4 -4
  2. package/dist/{ErrorBoundary-jQVF8yMb.js → ErrorBoundary-D1Z3KAf_.js} +2 -2
  3. package/dist/{abnfDiagram-VCTEODGH-LlJTOOU_.js → abnfDiagram-VCTEODGH-I2x4Yu25.js} +2 -2
  4. package/dist/{architectureDiagram-5GKGNRK7-9PQtGLLZ.js → architectureDiagram-5GKGNRK7-1bSQMKzK.js} +1 -1
  5. package/dist/{arrays-DA6KkLfq.js → arrays-DoQ-AILx.js} +7 -21
  6. package/dist/{capabilities-CvWU-ey_.js → capabilities-C2QUNRXi.js} +1 -1
  7. package/dist/{chat-ui-Bl2euMBD.js → chat-ui-BAyHM_GD.js} +524 -524
  8. package/dist/{chunk-IMKFNOWR-DcXv-BD5.js → chunk-IMKFNOWR-fsCGAJ9G.js} +1 -1
  9. package/dist/{chunk-SHT3W25Y-VwnELN23.js → chunk-SHT3W25Y-D2STW4hj.js} +1 -1
  10. package/dist/{chunk-SVP7TREG-DgQpI5Zi.js → chunk-SVP7TREG-CiY7cQG-.js} +1 -1
  11. package/dist/{chunk-TICWLB2K-CTg6VTJT.js → chunk-TICWLB2K-C_t5RBp9.js} +1 -1
  12. package/dist/{classDiagram-ZZMXUADV-UzmcFrnW.js → classDiagram-ZZMXUADV-B2JvZAP4.js} +2 -2
  13. package/dist/{classDiagram-v2-VYDZK3BY-DhjiI6IQ.js → classDiagram-v2-VYDZK3BY-L8VsZG5A.js} +2 -2
  14. package/dist/{code-visibility-CjZo_SV8.js → code-visibility-CInEQd1e.js} +19 -19
  15. package/dist/{common-CFLvScF3.js → common-W5HfVJPN.js} +4362 -4362
  16. package/dist/{cynefinDiagram-5FMLGOSQ-O4ShIbJX.js → cynefinDiagram-5FMLGOSQ-DdllC264.js} +1 -1
  17. package/dist/{dagre-GXQ25YYZ-dtHhhcPu.js → dagre-GXQ25YYZ-BaWHw4_f.js} +1 -1
  18. package/dist/{data-grid-overlay-editor-CzW3mY6m.js → data-grid-overlay-editor-BQCaV0fI.js} +1 -1
  19. package/dist/{diagram-S7CK7UJ4-ppPYVZ6W.js → diagram-S7CK7UJ4-pFt-tUDe.js} +1 -1
  20. package/dist/{diagram-UQ7AKVKN-CMZDf--k.js → diagram-UQ7AKVKN-DqGJiBp4.js} +1 -1
  21. package/dist/{diagram-VX7I27RA-CFvJdx-C.js → diagram-VX7I27RA-Dr-yzMjf.js} +1 -1
  22. package/dist/{diagram-Z3DM3KII-Dt6_uFbv.js → diagram-Z3DM3KII-8xzJzv-w.js} +1 -1
  23. package/dist/{dropdown-menu-CeaOsjWZ.js → dropdown-menu-NlnsmNA6.js} +2 -2
  24. package/dist/{ebnfDiagram-PWID7BFC-DpRFrKK-.js → ebnfDiagram-PWID7BFC-Br04Wy-E.js} +2 -2
  25. package/dist/{erDiagram-RLTQ6QDP-CqAU4b0u.js → erDiagram-RLTQ6QDP-D5-XVgvv.js} +1 -1
  26. package/dist/{error-entries-CYGwr5-O.js → error-entries-BacCWMWj.js} +4678 -5028
  27. package/dist/{feedback-button-GR_8U4Vo.js → feedback-button-DLXUcQ7l.js} +113 -113
  28. package/dist/{flowDiagram-HODETNUW-i8-Gw8HO.js → flowDiagram-HODETNUW-CVl2kREF.js} +2 -2
  29. package/dist/{formats-BtoHHy42.js → formats-BCYthwyc.js} +1 -1
  30. package/dist/{glide-data-editor-Dfdxc22H.js → glide-data-editor-D5YaHPKx.js} +5 -5
  31. package/dist/{globals-CxjzBEbP.js → globals-DjX1uxzy.js} +2 -2
  32. package/dist/{html-to-image-Cy5UDpQJ.js → html-to-image-DAmgSo5P.js} +624 -573
  33. package/dist/{infoDiagram-27XIBGKW-DpfOKdLL.js → infoDiagram-27XIBGKW-BJ4vNcZE.js} +1 -1
  34. package/dist/{ishikawaDiagram-5VMMS53U-Dg7mrMG7.js → ishikawaDiagram-5VMMS53U-B_Jy1Dsm.js} +1 -1
  35. package/dist/{kanban-definition-UXKFOSKX-QB6e3Jrj.js → kanban-definition-UXKFOSKX-C6MkS9vw.js} +1 -1
  36. package/dist/main.js +1117 -1117
  37. package/dist/{mermaid-CeWG4Egr.js → mermaid-Bh918qrq.js} +34 -34
  38. package/dist/{mindmap-definition-YA3MSWOX-BTz3uTGe.js → mindmap-definition-YA3MSWOX-BP3ZTuir.js} +1 -1
  39. package/dist/{number-overlay-editor-CwHYeI4e.js → number-overlay-editor-3C_K6w_0.js} +1 -1
  40. package/dist/{once-DWGO2mQ2.js → once-NnpX_HnX.js} +1 -1
  41. package/dist/{pegDiagram-XKGWAZYB-3ZIEa3mB.js → pegDiagram-XKGWAZYB-nNGOQtnt.js} +2 -2
  42. package/dist/{pieDiagram-E7YTZNPT-BJAlk046.js → pieDiagram-E7YTZNPT-CpRz5BZz.js} +1 -1
  43. package/dist/{process-output-q9MTAIMX.js → process-output-DweUmAmV.js} +3 -3
  44. package/dist/{railroadDiagram-O6MQD6OU-Dn3bsSRa.js → railroadDiagram-O6MQD6OU-BqOEN4I0.js} +2 -2
  45. package/dist/{requirementDiagram-BXWQKSXE-wcOmQQCL.js → requirementDiagram-BXWQKSXE-CEfg6vu9.js} +1 -1
  46. package/dist/{reveal-component-C5bOqXlB.js → reveal-component-JjJRTT9d.js} +17 -17
  47. package/dist/{sequenceDiagram-WJ2MYXX4-DSh_qxoF.js → sequenceDiagram-WJ2MYXX4-IOmpQcOi.js} +1 -1
  48. package/dist/{spec-C7Fos-If.js → spec-Dkp64vVQ.js} +1 -1
  49. package/dist/{stateDiagram-D77RDMKH-DH_H8NMH.js → stateDiagram-D77RDMKH-tgU-EY9_.js} +2 -2
  50. package/dist/{stateDiagram-v2-MP3YSRHH-D_JM7MEK.js → stateDiagram-v2-MP3YSRHH-BofhG6q1.js} +2 -2
  51. package/dist/{swimlanes-42K2YHIH-CfoTJO-9.js → swimlanes-42K2YHIH-DW4vWDBd.js} +1 -1
  52. package/dist/{swimlanesDiagram-VR7AAH4N-Z_QhvK0G.js → swimlanesDiagram-VR7AAH4N-BJcrqUJr.js} +2 -2
  53. package/dist/{swiper-component-D2geL1Ku.js → swiper-component-BVfnhbnt.js} +1 -1
  54. package/dist/{timeline-definition-24CTP7MA-BFtdScaL.js → timeline-definition-24CTP7MA-D_QU3NGs.js} +1 -1
  55. package/dist/{toDate-CQAFSwos.js → toDate-BNDEXbfV.js} +30 -30
  56. package/dist/{useAsyncData-BeyZyjso.js → useAsyncData-ASDni9vH.js} +1 -1
  57. package/dist/{useDeepCompareMemoize-DOQgae0W.js → useDeepCompareMemoize-B1Ogyf53.js} +1 -1
  58. package/dist/{useIframeCapabilities-DNvaj9wM.js → useIframeCapabilities-6a_yDNXp.js} +1 -1
  59. package/dist/{useLifecycle-n2lnCFS8.js → useLifecycle-Bfpa2m7k.js} +1 -1
  60. package/dist/{useTheme-CY777LXN.js → useTheme-5TwyOh3B.js} +66 -66
  61. package/dist/{vega-component-0nQzA-I8.js → vega-component-BHS9UOtC.js} +19 -19
  62. package/dist/{vennDiagram-4TSXK5OY-BXY8IGCA.js → vennDiagram-4TSXK5OY-YFYsNIAh.js} +1 -1
  63. package/dist/{wardleyDiagram-VM6X3IG4-D0tFe6eC.js → wardleyDiagram-VM6X3IG4-i_n8mAWC.js} +1 -1
  64. package/dist/{xychartDiagram-S5SC5T6Z-Dx8wFM-y.js → xychartDiagram-S5SC5T6Z-BYGN95wW.js} +1 -1
  65. package/package.json +1 -1
  66. package/src/__mocks__/document.tsx +13 -4
  67. package/src/__mocks__/notebook.ts +1 -2
  68. package/src/components/datasources/datasources.tsx +1 -1
  69. package/src/components/dependency-graph/custom-node.tsx +1 -1
  70. package/src/components/dependency-graph/minimap-content.tsx +12 -14
  71. package/src/components/editor/actions/useSetCodeVisibility.ts +1 -1
  72. package/src/components/editor/actions/useSetOutputsExpanded.ts +1 -1
  73. package/src/components/editor/alerts/stdin-blocking-alert.tsx +1 -1
  74. package/src/components/editor/cell/code/cell-editor.tsx +1 -1
  75. package/src/components/editor/cell/useSplitCell.tsx +8 -5
  76. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +1 -1
  77. package/src/components/editor/chrome/panels/session-panel.tsx +1 -1
  78. package/src/components/editor/chrome/panels/variable-panel.tsx +1 -5
  79. package/src/components/editor/chrome/wrapper/minimap-state.ts +1 -1
  80. package/src/components/editor/columns/__tests__/cell-column.test.tsx +1 -1
  81. package/src/components/editor/columns/cell-column.tsx +1 -1
  82. package/src/components/editor/columns/sortable-column.tsx +1 -1
  83. package/src/components/editor/links/__tests__/cell-link.test.tsx +1 -1
  84. package/src/components/editor/links/cell-link-list.tsx +1 -1
  85. package/src/components/editor/links/cell-link.tsx +1 -1
  86. package/src/components/editor/navigation/__tests__/navigation.test.ts +20 -6
  87. package/src/components/editor/navigation/__tests__/selection.test.ts +1 -2
  88. package/src/components/editor/navigation/clipboard.ts +5 -3
  89. package/src/components/editor/renderers/cell-array.tsx +7 -12
  90. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +1 -1
  91. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +4 -4
  92. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +1 -1
  93. package/src/components/editor/stdin-blocking-alert.tsx +1 -1
  94. package/src/components/slides/__tests__/minimap-actions.test.tsx +13 -4
  95. package/src/components/slides/__tests__/minimap.test.ts +38 -19
  96. package/src/components/slides/minimap.tsx +11 -10
  97. package/src/components/sort/SortableCellsProvider.tsx +2 -21
  98. package/src/components/tracing/tracing.tsx +1 -1
  99. package/src/core/ai/__tests__/staged-cells.test.ts +1 -1
  100. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +8 -12
  101. package/src/core/ai/context/providers/cell-output.ts +2 -2
  102. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +34 -66
  103. package/src/core/ai/tools/edit-notebook-tool.ts +12 -10
  104. package/src/core/cells/__tests__/actions.test.ts +64 -25
  105. package/src/core/cells/__tests__/arrange.test.ts +156 -4
  106. package/src/core/cells/__tests__/cells.test.ts +12 -290
  107. package/src/core/cells/__tests__/document.test.ts +2 -46
  108. package/src/core/cells/__tests__/harness.ts +28 -4
  109. package/src/core/cells/__tests__/layout.test.ts +42 -54
  110. package/src/core/cells/__tests__/session.test.ts +0 -2
  111. package/src/core/cells/__tests__/utils.test.ts +9 -107
  112. package/src/core/cells/actions.ts +112 -26
  113. package/src/core/cells/add-missing-import.ts +1 -1
  114. package/src/core/cells/arrange.ts +206 -13
  115. package/src/core/cells/cells.ts +28 -256
  116. package/src/core/cells/document.ts +18 -122
  117. package/src/core/cells/layout.ts +79 -10
  118. package/src/core/cells/pending-delete-service.ts +1 -1
  119. package/src/core/cells/utils.ts +4 -4
  120. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +6 -7
  121. package/src/core/codemirror/copilot/getCodes.ts +2 -2
  122. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -2
  123. package/src/core/codemirror/lsp/utils.ts +1 -1
  124. package/src/core/documentation/doc-lookup.ts +1 -1
  125. package/src/core/edit-app.tsx +2 -5
  126. package/src/core/errors/error-entries.ts +1 -1
  127. package/src/core/islands/__tests__/bootstrap.test.ts +2 -6
  128. package/src/core/islands/components/web-components.tsx +1 -1
  129. package/src/core/notebook/document/__tests__/codemirror.test.ts +8 -0
  130. package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +1 -1
  131. package/src/stories/cell.stories.tsx +1 -2
  132. package/src/stories/layout/vertical/one-column.stories.tsx +1 -2
  133. package/src/stories/runtime-story.tsx +2 -3
  134. package/src/utils/__tests__/id-tree.test.ts +0 -617
  135. package/src/utils/id-tree.tsx +0 -609
@@ -2,7 +2,7 @@ import { t as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { g as t } from "./button-BQRdqQi1.js";
3
3
  import { t as n } from "./compiler-runtime-CldRdSsv.js";
4
4
  import { m as r } from "./tooltip-s4zZxwKe.js";
5
- import { C as i, F as a, M as o, a as s, y as c } from "./useTheme-CY777LXN.js";
5
+ import { F as i, M as a, a as o, b as s, o as c } from "./useTheme-5TwyOh3B.js";
6
6
  import { t as l } from "./invariant-DLmrl-hA.js";
7
7
  var u = r("circle-question-mark", [
8
8
  ["circle", {
@@ -20,13 +20,13 @@ var u = r("circle-question-mark", [
20
20
  key: "p32p05"
21
21
  }]
22
22
  ]), d = n();
23
- function f(e, t) {
24
- if (e == null) throw Error(t || `Expected value but got ${e}`);
23
+ function f() {
24
+ return typeof document < "u" && document.querySelector("marimo-wasm") !== null;
25
25
  }
26
26
  //#endregion
27
- //#region src/core/wasm/utils.ts
28
- function p() {
29
- return typeof document < "u" && document.querySelector("marimo-wasm") !== null;
27
+ //#region src/utils/assertExists.ts
28
+ function p(e, t) {
29
+ if (e == null) throw Error(t || `Expected value but got ${e}`);
30
30
  }
31
31
  //#endregion
32
32
  //#region src/utils/Deferred.ts
@@ -52,21 +52,21 @@ function h(e) {
52
52
  //#endregion
53
53
  //#region src/core/mode.ts
54
54
  function g() {
55
- let e = c.get(v);
56
- return f(e, "internal-error: initial mode not found"), l(e !== "present", "internal-error: initial mode cannot be 'present'"), e;
55
+ let e = s.get(v);
56
+ return p(e, "internal-error: initial mode not found"), l(e !== "present", "internal-error: initial mode cannot be 'present'"), e;
57
57
  }
58
- var _ = a({
59
- mode: i() ? "read" : "not-set",
58
+ var _ = i({
59
+ mode: c() ? "read" : "not-set",
60
60
  cellAnchor: null
61
- }), v = a(void 0);
61
+ }), v = i(void 0);
62
62
  function y() {
63
- let e = c.get(v);
63
+ let e = s.get(v);
64
64
  return e !== "home" && e !== "gallery";
65
65
  }
66
- var b = a(!1);
66
+ var b = i(!1);
67
67
  function x() {
68
- let e = (0, d.c)(1), { mode: t } = o(_), n = o(b), r;
69
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = new URLSearchParams(window.location.search).get(s.kiosk), e[0] = r) : r = e[0], t !== "read" && !n && r !== "true";
68
+ let e = (0, d.c)(1), { mode: t } = a(_), n = a(b), r;
69
+ return e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = new URLSearchParams(window.location.search).get(o.kiosk), e[0] = r) : r = e[0], t !== "read" && !n && r !== "true";
70
70
  }
71
71
  //#endregion
72
72
  //#region ../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js
@@ -467,7 +467,7 @@ function M({ href: e, queryParams: t, keys: n }) {
467
467
  }
468
468
  //#endregion
469
469
  //#region src/core/kernel/session.ts
470
- var N = a(null), P = (0, O.init)({ length: 6 });
470
+ var N = i(null), P = (0, O.init)({ length: 6 });
471
471
  function F() {
472
472
  return `s_${P()}`;
473
473
  }
@@ -476,13 +476,13 @@ function I(e) {
476
476
  }
477
477
  var L = null;
478
478
  function R() {
479
- let e = c.get(v) === "edit", n = new URL(window.location.href).searchParams.get(s.sessionId), r = I(n) ? n : null;
479
+ let e = s.get(v) === "edit", n = new URL(window.location.href).searchParams.get(o.sessionId), r = I(n) ? n : null;
480
480
  return k((t) => {
481
481
  if (!e) {
482
- t.delete(s.sessionId), t.delete(s.kiosk);
482
+ t.delete(o.sessionId), t.delete(o.kiosk);
483
483
  return;
484
484
  }
485
- t.has(s.kiosk) || t.delete(s.sessionId);
485
+ t.has(o.kiosk) || t.delete(o.sessionId);
486
486
  }), r === null ? (t.debug("Starting a new session", { sessionId: n }), F()) : e ? (t.debug("Connecting to existing session", { sessionId: r }), r) : (t.debug("Ignoring session_id from URL outside the editor", { sessionId: r }), F());
487
487
  }
488
488
  function z() {
@@ -513,7 +513,7 @@ function W() {
513
513
  }
514
514
  //#endregion
515
515
  //#region src/core/runtime/runtime.ts
516
- var G = new Set(Object.values(s)), K = class {
516
+ var G = new Set(Object.values(o)), K = class {
517
517
  initialHealthyCheck = new m();
518
518
  config;
519
519
  lazy;
@@ -536,7 +536,7 @@ var G = new Set(Object.values(s)), K = class {
536
536
  return this.httpURL.origin === window.location.origin;
537
537
  }
538
538
  get isServerless() {
539
- return p() || i() || U();
539
+ return f() || c() || U();
540
540
  }
541
541
  formatHttpURL({ path: e = "", searchParams: t, restrictToKnownQueryParams: n = !0 }) {
542
542
  let r = this.httpURL, i = new URLSearchParams(window.location.search);
@@ -545,14 +545,14 @@ var G = new Set(Object.values(s)), K = class {
545
545
  return r.pathname = `${r.pathname.replace(/\/$/, "")}/${e.replace(/^\//, "")}`, r.hash = "", r;
546
546
  }
547
547
  appendCrossOriginAuth(e) {
548
- return !this.isSameOrigin && this.config.authToken && e.searchParams.set(s.accessToken, this.config.authToken), e;
548
+ return !this.isSameOrigin && this.config.authToken && e.searchParams.set(o.accessToken, this.config.authToken), e;
549
549
  }
550
550
  formatNavigableHttpURL(e, t) {
551
551
  let n = this.formatHttpURL({
552
552
  path: e,
553
553
  searchParams: t
554
554
  });
555
- return n.searchParams.delete(s.accessToken), this.appendCrossOriginAuth(n);
555
+ return n.searchParams.delete(o.accessToken), this.appendCrossOriginAuth(n);
556
556
  }
557
557
  formatWsURL(e, t) {
558
558
  let n = this.formatHttpURL({
@@ -566,7 +566,7 @@ var G = new Set(Object.values(s)), K = class {
566
566
  let n = this.formatHttpURL({ path: e }), r = new URLSearchParams(this.httpURL.search), i = new URLSearchParams(window.location.search);
567
567
  for (let e of i.keys()) r.delete(e);
568
568
  for (let [e, t] of i) r.append(e, t);
569
- return r.delete(s.accessToken), r.delete("refresh_token"), r.delete(s.sessionId), n.searchParams.set("query_params", r.toString()), n.searchParams.set(s.sessionId, t), n;
569
+ return r.delete(o.accessToken), r.delete("refresh_token"), r.delete(o.sessionId), n.searchParams.set("query_params", r.toString()), n.searchParams.set(o.sessionId, t), n;
570
570
  }
571
571
  getWsURL(e) {
572
572
  let t = this.getSessionURL("/ws", e);
@@ -574,11 +574,11 @@ var G = new Set(Object.values(s)), K = class {
574
574
  }
575
575
  getSseURL(e) {
576
576
  let t = this.getSessionURL("/sse", e);
577
- return t.searchParams.delete(s.accessToken), t;
577
+ return t.searchParams.delete(o.accessToken), t;
578
578
  }
579
579
  getNotebookURL(e) {
580
580
  let t = this.formatHttpURL({ path: `/api/marimo/v1/notebooks/${encodeURIComponent(e)}` });
581
- return t.searchParams.delete(s.accessToken), t;
581
+ return t.searchParams.delete(o.accessToken), t;
582
582
  }
583
583
  getWsSyncURL(e) {
584
584
  let t = this.getSessionURL("/ws_sync", e);
@@ -590,8 +590,8 @@ var G = new Set(Object.values(s)), K = class {
590
590
  }
591
591
  getLSPURL(e) {
592
592
  if (e === "copilot") {
593
- let t = this.formatWsURL(`/lsp/${e}`), n = t.searchParams.get(s.accessToken);
594
- return t.search = "", n && t.searchParams.set(s.accessToken, n), t;
593
+ let t = this.formatWsURL(`/lsp/${e}`), n = t.searchParams.get(o.accessToken);
594
+ return t.search = "", n && t.searchParams.set(o.accessToken, n), t;
595
595
  }
596
596
  return this.formatWsURL(`/lsp/${e}`);
597
597
  }
@@ -675,12 +675,12 @@ function J() {
675
675
  var Y = {
676
676
  lazy: !0,
677
677
  url: J()
678
- }, ee = a(Y), te = a((e) => {
678
+ }, ee = i(Y), te = i((e) => {
679
679
  let t = e(ee);
680
680
  return new K(t, t.lazy);
681
681
  });
682
682
  function X() {
683
- return c.get(te);
683
+ return s.get(te);
684
684
  }
685
685
  function ne(e) {
686
686
  if (e.startsWith("http")) return new URL(e);
@@ -1,7 +1,7 @@
1
1
  import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { t } from "./react-sHtZdjeP.js";
3
3
  import { t as n } from "./compiler-runtime-CldRdSsv.js";
4
- import { R as r } from "./useTheme-CY777LXN.js";
4
+ import { R as r } from "./useTheme-5TwyOh3B.js";
5
5
  import { t as i } from "./invariant-DLmrl-hA.js";
6
6
  //#region src/hooks/useAsyncData.ts
7
7
  var a = n(), o = /* @__PURE__ */ e(t(), 1), s = {
@@ -1,6 +1,6 @@
1
1
  import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { t } from "./react-sHtZdjeP.js";
3
- import { S as n } from "./useTheme-CY777LXN.js";
3
+ import { C as n } from "./useTheme-5TwyOh3B.js";
4
4
  //#region src/hooks/useDeepCompareMemoize.ts
5
5
  var r = /* @__PURE__ */ e(t(), 1);
6
6
  function i(e) {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./compiler-runtime-CldRdSsv.js";
2
- import { t } from "./capabilities-CvWU-ey_.js";
2
+ import { t } from "./capabilities-C2QUNRXi.js";
3
3
  //#region src/hooks/useIframeCapabilities.ts
4
4
  var n = e();
5
5
  function r() {
@@ -4,7 +4,7 @@ import { t as i } from "./react-sHtZdjeP.js";
4
4
  import { t as a } from "./compiler-runtime-CldRdSsv.js";
5
5
  import { m as o } from "./tooltip-s4zZxwKe.js";
6
6
  import { t as s } from "./jsx-runtime-3BD1kT0s.js";
7
- import { F as c, N as l } from "./useTheme-CY777LXN.js";
7
+ import { F as c, N as l } from "./useTheme-5TwyOh3B.js";
8
8
  var u = o("calendar", [
9
9
  ["path", {
10
10
  d: "M8 2v4",
@@ -545,7 +545,7 @@ function Fe(e, t) {
545
545
  }, a;
546
546
  }
547
547
  var G = (e, t, n) => (t.has(n) ? t : t.set(n, e())).get(n), Ie = /* @__PURE__ */ new WeakMap(), Le = (e, t, n, r) => G(e, G(() => /* @__PURE__ */ new WeakMap(), G(() => /* @__PURE__ */ new WeakMap(), Ie, t), n), r);
548
- function K(e, t, n = Object.is) {
548
+ function Re(e, t, n = Object.is) {
549
549
  return Le(() => {
550
550
  let r = /* @__PURE__ */ Symbol(), i = ([e, i]) => {
551
551
  if (i === r) return t(e);
@@ -558,9 +558,9 @@ function K(e, t, n = Object.is) {
558
558
  return a.init = r, a;
559
559
  }, e, t, n);
560
560
  }
561
- var Re = (e, t, n) => (t.has(n) ? t : t.set(n, e())).get(n), ze = /* @__PURE__ */ new WeakMap(), Be = (e, t, n) => Re(e, Re(() => /* @__PURE__ */ new WeakMap(), ze, t), n), Ve = {}, He = (e) => !!e.write, Ue = (e) => typeof e == "function";
562
- function We(e, t) {
563
- return Be(() => {
561
+ var ze = (e, t, n) => (t.has(n) ? t : t.set(n, e())).get(n), Be = /* @__PURE__ */ new WeakMap(), Ve = (e, t, n) => ze(e, ze(() => /* @__PURE__ */ new WeakMap(), Be, t), n), He = {}, Ue = (e) => !!e.write, We = (e) => typeof e == "function";
562
+ function Ge(e, t) {
563
+ return Ve(() => {
564
564
  let n = /* @__PURE__ */ new WeakMap(), r = (a, o) => {
565
565
  let s = n.get(a);
566
566
  if (s) return s;
@@ -582,10 +582,10 @@ function We(e, t) {
582
582
  }
583
583
  return o[c];
584
584
  };
585
- l[o] = He(e) ? F(f, (t, n, a) => {
585
+ l[o] = Ue(e) ? F(f, (t, n, a) => {
586
586
  let o = t(i), c = t(e), l = r(c, o?.arr).keyList.indexOf(s);
587
587
  if (l < 0 || l >= c.length) throw Error("splitAtom: index out of bounds for write");
588
- let u = Ue(a) ? a(c[l]) : a;
588
+ let u = We(a) ? a(c[l]) : a;
589
589
  Object.is(c[l], u) || n(e, [
590
590
  ...c.slice(0, l),
591
591
  u,
@@ -602,7 +602,7 @@ function We(e, t) {
602
602
  return r(a, n?.arr);
603
603
  });
604
604
  i.init = void 0;
605
- let a = He(e) ? F((e) => e(i).atomList, (t, n, r) => {
605
+ let a = Ue(e) ? F((e) => e(i).atomList, (t, n, r) => {
606
606
  switch (r.type) {
607
607
  case "remove": {
608
608
  let i = t(a).indexOf(r.atom);
@@ -645,10 +645,10 @@ function We(e, t) {
645
645
  }
646
646
  }) : F((e) => e(i).atomList);
647
647
  return a;
648
- }, e, t || Ve);
648
+ }, e, t || He);
649
649
  }
650
- var Ge = (e) => typeof e?.then == "function";
651
- function Ke(e = () => {
650
+ var Ke = (e) => typeof e?.then == "function";
651
+ function qe(e = () => {
652
652
  try {
653
653
  return window.localStorage;
654
654
  } catch {
@@ -668,7 +668,7 @@ function Ke(e = () => {
668
668
  }
669
669
  return r;
670
670
  }, s = e()?.getItem(i) ?? null;
671
- return Ge(s) ? s.then(o) : o(s);
671
+ return Ke(s) ? s.then(o) : o(s);
672
672
  },
673
673
  setItem: (n, r) => e()?.setItem(n, JSON.stringify(r, t?.replacer)),
674
674
  removeItem: (t) => e()?.removeItem(t)
@@ -694,33 +694,28 @@ function Ke(e = () => {
694
694
  };
695
695
  }), o && (i.subscribe = a(o)), i;
696
696
  }
697
- var qe = Ke();
698
- function Je(e, t, n = qe, r) {
697
+ var Je = qe();
698
+ function Ye(e, t, n = Je, r) {
699
699
  let i = r?.getOnInit, a = F(i ? n.getItem(e, t) : t);
700
700
  return a.onMount = (r) => (r(n.getItem(e, t)), n.subscribe?.call(n, e, r, t)), F((e) => e(a), (r, i, o) => {
701
701
  let s = typeof o == "function" ? o(r(a)) : o;
702
- return s === Ne ? (i(a, t), n.removeItem(e)) : Ge(s) ? s.then((t) => (i(a, t), n.setItem(e, t))) : (i(a, s), n.setItem(e, s));
702
+ return s === Ne ? (i(a, t), n.removeItem(e)) : Ke(s) ? s.then((t) => (i(a, t), n.setItem(e, t))) : (i(a, s), n.setItem(e, s));
703
703
  });
704
704
  }
705
705
  //#endregion
706
- //#region src/core/islands/utils.ts
707
- function Ye() {
708
- return !0;
709
- }
710
- //#endregion
711
706
  //#region ../node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.mjs
712
707
  var Xe = Object.prototype.hasOwnProperty;
713
708
  function Ze(e, t, n) {
714
- for (n of e.keys()) if (q(n, t)) return n;
709
+ for (n of e.keys()) if (K(n, t)) return n;
715
710
  }
716
- function q(e, t) {
711
+ function K(e, t) {
717
712
  var n, r, i;
718
713
  if (e === t) return !0;
719
714
  if (e && t && (n = e.constructor) === t.constructor) {
720
715
  if (n === Date) return e.getTime() === t.getTime();
721
716
  if (n === RegExp) return e.toString() === t.toString();
722
717
  if (n === Array) {
723
- if ((r = e.length) === t.length) for (; r-- && q(e[r], t[r]););
718
+ if ((r = e.length) === t.length) for (; r-- && K(e[r], t[r]););
724
719
  return r === -1;
725
720
  }
726
721
  if (n === Set) {
@@ -730,7 +725,7 @@ function q(e, t) {
730
725
  }
731
726
  if (n === Map) {
732
727
  if (e.size !== t.size) return !1;
733
- for (r of e) if (i = r[0], i && typeof i == "object" && (i = Ze(t, i), !i) || !q(r[1], t.get(i))) return !1;
728
+ for (r of e) if (i = r[0], i && typeof i == "object" && (i = Ze(t, i), !i) || !K(r[1], t.get(i))) return !1;
734
729
  return !0;
735
730
  }
736
731
  if (n === ArrayBuffer) e = new Uint8Array(e), t = new Uint8Array(t);
@@ -743,7 +738,7 @@ function q(e, t) {
743
738
  return r === -1;
744
739
  }
745
740
  if (!n || typeof e == "object") {
746
- for (n in r = 0, e) if (Xe.call(e, n) && ++r && !Xe.call(t, n) || !(n in t) || !q(e[n], t[n])) return !1;
741
+ for (n in r = 0, e) if (Xe.call(e, n) && ++r && !Xe.call(t, n) || !(n in t) || !K(e[n], t[n])) return !1;
747
742
  return Object.keys(t).length === r;
748
743
  }
749
744
  }
@@ -751,11 +746,11 @@ function q(e, t) {
751
746
  }
752
747
  //#endregion
753
748
  //#region src/core/state/jotai.ts
754
- var J = I();
749
+ var q = I();
755
750
  async function Qe(e, t) {
756
- return t(J.get(e)) ? J.get(e) : new Promise((n) => {
757
- let r = J.sub(e, () => {
758
- let i = J.get(e);
751
+ return t(q.get(e)) ? q.get(e) : new Promise((n) => {
752
+ let r = q.sub(e, () => {
753
+ let i = q.get(e);
759
754
  t(i) && (r(), n(i));
760
755
  });
761
756
  });
@@ -775,7 +770,7 @@ function $e(e, t) {
775
770
  ], n[0] = e, n[1] = t, n[2] = r, n[3] = i, n[4] = a) : (i = n[3], a = n[4]), (0, y.useEffect)(i, a);
776
771
  }
777
772
  var et = Symbol("sentinel");
778
- function tt(e, t = q) {
773
+ function tt(e, t = K) {
779
774
  let n = et;
780
775
  return F((r) => {
781
776
  let i = r(e);
@@ -814,7 +809,7 @@ var nt = F(null), rt = F(null), it = F((e) => {
814
809
  "ask",
815
810
  "agent",
816
811
  "code_mode"
817
- ], Y = f({
812
+ ], J = f({
818
813
  api_key: u().optional(),
819
814
  base_url: u().optional(),
820
815
  project: u().optional()
@@ -888,23 +883,23 @@ var nt = F(null), rt = F(null), it = F((e) => {
888
883
  mode: m(ut).transform((e) => e === "manual" ? "ask" : e).prefault("ask"),
889
884
  inline_tooltip: p().prefault(!1),
890
885
  allow_provider_config: p().prefault(!0),
891
- open_ai: Y.optional(),
892
- github: Y.optional(),
893
- anthropic: Y.optional(),
894
- google: Y.optional(),
895
- ollama: Y.optional(),
896
- openrouter: Y.optional(),
897
- wandb: Y.optional(),
898
- opencode_go: Y.optional(),
899
- open_ai_compatible: Y.optional(),
900
- azure: Y.optional(),
886
+ open_ai: J.optional(),
887
+ github: J.optional(),
888
+ anthropic: J.optional(),
889
+ google: J.optional(),
890
+ ollama: J.optional(),
891
+ openrouter: J.optional(),
892
+ wandb: J.optional(),
893
+ opencode_go: J.optional(),
894
+ open_ai_compatible: J.optional(),
895
+ azure: J.optional(),
901
896
  bedrock: s({
902
897
  region_name: u().optional(),
903
898
  profile_name: u().optional(),
904
899
  aws_access_key_id: u().optional(),
905
900
  aws_secret_access_key: u().optional()
906
901
  }).optional(),
907
- custom_providers: l(u(), Y).prefault({}),
902
+ custom_providers: l(u(), J).prefault({}),
908
903
  models: dt.prefault({
909
904
  displayed_models: [],
910
905
  custom_models: []
@@ -989,39 +984,44 @@ function vt(...e) {
989
984
  if (Array.isArray(t)) return [...t];
990
985
  });
991
986
  }
992
- var X = F(_t()), yt = F({}), Z = F((e) => {
987
+ var Y = F(_t()), yt = F({}), X = F((e) => {
993
988
  let t = e(yt);
994
- return vt(e(X), t);
995
- }), bt = F((e) => e(Z).runtime.auto_instantiate), xt = F((e) => e(Z).keymap.overrides ?? {}), St = F(i());
989
+ return vt(e(Y), t);
990
+ }), bt = F((e) => e(X).runtime.auto_instantiate), xt = F((e) => e(X).keymap.overrides ?? {}), St = F(i());
996
991
  F((e) => {
997
992
  let t = e(xt), r = e(St);
998
993
  return new n(t, { platform: r });
999
- }), F((e) => e(Z).save), F((e) => e(Z).server.transport === "sse" ? "sse" : "websocket"), F((e) => e(Z).ai), F((e) => e(Z).completion), F((e) => e(Z).keymap.preset);
994
+ }), F((e) => e(X).save), F((e) => e(X).server.transport === "sse" ? "sse" : "websocket"), F((e) => e(X).ai), F((e) => e(X).completion), F((e) => e(X).keymap.preset);
1000
995
  function Ct() {
1001
- let e = (0, W.c)(3), t = H(Z), n = U(X), r;
996
+ let e = (0, W.c)(3), t = H(X), n = U(Y), r;
1002
997
  return e[0] !== t || e[1] !== n ? (r = [t, n], e[0] = t, e[1] = n, e[2] = r) : r = e[2], r;
1003
998
  }
1004
999
  function wt() {
1005
- return J.get(Z);
1000
+ return q.get(X);
1006
1001
  }
1007
- F((e) => Ot(e(Z)));
1008
- var Tt = F((e) => kt(e(Z))), Et = F((e) => At(e(Z)));
1009
- F((e) => e(Z).display.code_editor_font_size);
1010
- var Dt = F((e) => e(Z).display.locale);
1011
- function Ot(e) {
1002
+ F((e) => Z(e(X)));
1003
+ var Tt = F((e) => Ot(e(X))), Et = F((e) => kt(e(X)));
1004
+ F((e) => e(X).display.code_editor_font_size);
1005
+ var Dt = F((e) => e(X).display.locale);
1006
+ function Z(e) {
1012
1007
  return e.ai?.enabled !== !1;
1013
1008
  }
1014
- function kt(e) {
1009
+ function Ot(e) {
1015
1010
  return !!e.ai?.models?.chat_model || !!e.ai?.models?.edit_model || !!e.ai?.models?.autocomplete_model;
1016
1011
  }
1017
- function At(e) {
1018
- return Ot(e) && kt(e);
1012
+ function kt(e) {
1013
+ return Z(e) && Ot(e);
1019
1014
  }
1020
- var jt = F({}), Mt = K(F((e) => e(it)?.revision.app_config ?? e(jt)), (e) => e, q), Nt = F((e) => gt(e(Mt)));
1021
- F((e) => e(Nt).width), F((e) => {
1022
- let t = e(Z), n = t.snippets?.custom_paths ?? [], r = t.snippets?.include_default_snippets;
1015
+ var At = F({}), jt = Re(F((e) => e(it)?.revision.app_config ?? e(At)), (e) => e, K), Mt = F((e) => gt(e(jt)));
1016
+ F((e) => e(Mt).width), F((e) => {
1017
+ let t = e(X), n = t.snippets?.custom_paths ?? [], r = t.snippets?.include_default_snippets;
1023
1018
  return n.length > 0 || r === !0;
1024
- }), F((e) => e(Z).server?.disable_file_downloads ?? !1);
1019
+ }), F((e) => e(X).server?.disable_file_downloads ?? !1);
1020
+ //#endregion
1021
+ //#region src/core/islands/utils.ts
1022
+ function Nt() {
1023
+ return !0;
1024
+ }
1025
1025
  //#endregion
1026
1026
  //#region src/core/constants.ts
1027
1027
  var Pt = {
@@ -1056,7 +1056,7 @@ function Rt() {
1056
1056
  return Lt.includes(e) ? e : void 0;
1057
1057
  }
1058
1058
  var zt = F((e) => {
1059
- if (Ye()) {
1059
+ if (Nt()) {
1060
1060
  if (document.body.classList.contains("dark-mode") || document.body.classList.contains("dark") || document.body.dataset.theme === "dark" || document.body.dataset.mode === "dark" || $() === "dark") return "dark";
1061
1061
  let e = window.getComputedStyle(document.body), t = e.getPropertyValue("color-scheme").trim();
1062
1062
  if (t) return t.includes("dark") ? "dark" : "light";
@@ -1067,13 +1067,13 @@ var zt = F((e) => {
1067
1067
  }
1068
1068
  return "light";
1069
1069
  }
1070
- return Rt() ?? e(Z).display.theme;
1070
+ return Rt() ?? e(X).display.theme;
1071
1071
  }), Q = F(!1);
1072
1072
  function Bt() {
1073
1073
  if (typeof window > "u" || !window.matchMedia) return;
1074
1074
  let e = window.matchMedia("(prefers-color-scheme: dark)");
1075
- J.set(Q, e.matches), e.addEventListener("change", (e) => {
1076
- J.set(Q, e.matches);
1075
+ q.set(Q, e.matches), e.addEventListener("change", (e) => {
1076
+ q.set(Q, e.matches);
1077
1077
  });
1078
1078
  }
1079
1079
  Bt();
@@ -1088,7 +1088,7 @@ var Vt = F($());
1088
1088
  function Ht() {
1089
1089
  let e = new MutationObserver(() => {
1090
1090
  let e = $();
1091
- J.set(Vt, e);
1091
+ q.set(Vt, e);
1092
1092
  });
1093
1093
  return e.observe(document.body, {
1094
1094
  attributes: !0,
@@ -1104,9 +1104,9 @@ var Ut = F((e) => {
1104
1104
  });
1105
1105
  function Wt() {
1106
1106
  let e = (0, W.c)(3), t;
1107
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = { store: J }, e[0] = t) : t = e[0];
1107
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = { store: q }, e[0] = t) : t = e[0];
1108
1108
  let n = H(Ut, t), r;
1109
1109
  return e[1] === n ? r = e[2] : (r = { theme: n }, e[1] = n, e[2] = r), r;
1110
1110
  }
1111
1111
  //#endregion
1112
- export { ke as A, Ye as C, Ke as D, Je as E, F, I, C as L, H as M, U as N, K as O, R as P, x as R, q as S, Pe as T, it as _, Ft as a, $e as b, bt as c, vt as d, Z as f, nt as g, rt as h, Pt as i, Me as j, We as k, wt as l, X as m, Wt as n, Et as o, Ct as p, It as r, Tt as s, Ut as t, Dt as u, tt as v, Fe as w, Qe as x, J as y };
1112
+ export { ke as A, K as C, qe as D, Ye as E, F, I, C as L, H as M, U as N, Re as O, R as P, x as R, Qe as S, Pe as T, nt as _, Ft as a, q as b, Tt as c, Dt as d, vt as f, rt as g, Y as h, Pt as i, Me as j, Ge as k, bt as l, Ct as m, Wt as n, Nt as o, X as p, It as r, Et as s, Ut as t, wt as u, it as v, Fe as w, $e as x, tt as y };
@@ -3,20 +3,20 @@ import { g as t, h as n, m as r, o as i } from "./button-BQRdqQi1.js";
3
3
  import { t as a } from "./react-sHtZdjeP.js";
4
4
  import { t as o } from "./compiler-runtime-CldRdSsv.js";
5
5
  import { t as s } from "./tooltip-s4zZxwKe.js";
6
- import { C as c, a as l } from "./toDate-CQAFSwos.js";
6
+ import { C as c, a as l } from "./toDate-BNDEXbfV.js";
7
7
  import { t as u } from "./jsx-runtime-3BD1kT0s.js";
8
8
  import { n as d } from "./error-banner-DxJ3s8YO.js";
9
9
  import { t as f } from "./debounce-C3jyATpc.js";
10
- import { R as p, n as ee } from "./useTheme-CY777LXN.js";
11
- import { s as m, t as h } from "./arrays-DA6KkLfq.js";
10
+ import { R as p, n as ee } from "./useTheme-5TwyOh3B.js";
12
11
  import { t as te } from "./objects-DCmMvZtn.js";
13
- import { t as ne } from "./useAsyncData-BeyZyjso.js";
14
- import { a as g, i as re, n as ie, t as ae } from "./formats-BtoHHy42.js";
12
+ import { a as m, t as h } from "./arrays-DoQ-AILx.js";
13
+ import { t as ne } from "./useAsyncData-ASDni9vH.js";
14
+ import { a as g, i as re, n as ie, t as ae } from "./formats-BCYthwyc.js";
15
15
  import { t as _ } from "./semaphore-89jsoHtS.js";
16
16
  import { D as oe, n as se } from "./vega-loader.browser-B9Pz0EGP.js";
17
17
  import { t as ce } from "./react-vega-C4T9Rb_w.js";
18
18
  import { a as le, n as v } from "./loader-DOVB0Syl.js";
19
- import { t as ue } from "./useDeepCompareMemoize-DOQgae0W.js";
19
+ import { t as ue } from "./useDeepCompareMemoize-B1Ogyf53.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
22
22
  var fe = /* @__PURE__ */ e(a(), 1), pe = o();
@@ -643,23 +643,23 @@ var K = (e) => {
643
643
  children: _.stack
644
644
  })]
645
645
  }), a[36] = _, a[37] = Y);
646
- let X, ye;
647
- a[38] === Symbol.for("react.memo_cache_sentinel") ? (X = n("relative"), ye = r.stopPropagation(), a[38] = X, a[39] = ye) : (X = a[38], ye = a[39]);
648
- let Z;
649
- a[40] === K ? Z = a[41] : (Z = /* @__PURE__ */ (0, G.jsx)("div", {
646
+ let ye, be;
647
+ a[38] === Symbol.for("react.memo_cache_sentinel") ? (ye = n("relative"), be = r.stopPropagation(), a[38] = ye, a[39] = be) : (ye = a[38], be = a[39]);
648
+ let X;
649
+ a[40] === K ? X = a[41] : (X = /* @__PURE__ */ (0, G.jsx)("div", {
650
650
  ref: g,
651
651
  "data-container-width": K
652
- }), a[40] = K, a[41] = Z);
652
+ }), a[40] = K, a[41] = X);
653
+ let Z;
654
+ a[42] === z ? Z = a[43] : (Z = z(), a[42] = z, a[43] = Z);
653
655
  let Q;
654
- a[42] === z ? Q = a[43] : (Q = z(), a[42] = z, a[43] = Q);
656
+ a[44] !== X || a[45] !== Z ? (Q = /* @__PURE__ */ (0, G.jsxs)("div", {
657
+ className: ye,
658
+ onPointerDown: be,
659
+ children: [X, Z]
660
+ }), a[44] = X, a[45] = Z, a[46] = Q) : Q = a[46];
655
661
  let $;
656
- a[44] !== Z || a[45] !== Q ? ($ = /* @__PURE__ */ (0, G.jsxs)("div", {
657
- className: X,
658
- onPointerDown: ye,
659
- children: [Z, Q]
660
- }), a[44] = Z, a[45] = Q, a[46] = $) : $ = a[46];
661
- let be;
662
- return a[47] !== Y || a[48] !== $ ? (be = /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [Y, $] }), a[47] = Y, a[48] = $, a[49] = be) : be = a[49], be;
662
+ return a[47] !== Y || a[48] !== Q ? ($ = /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [Y, Q] }), a[47] = Y, a[48] = Q, a[49] = $) : $ = a[49], $;
663
663
  };
664
664
  function ge(e) {
665
665
  return e instanceof Set ? [...e] : e;
@@ -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-CeWG4Egr.js";
6
+ import { p as v } from "./mermaid-Bh918qrq.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-CeWG4Egr.js";
5
+ import { p as m } from "./mermaid-Bh918qrq.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-CeWG4Egr.js";
12
+ import { p as x } from "./mermaid-Bh918qrq.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.3-dev197",
3
+ "version": "0.25.3-dev198",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  /* Copyright 2026 Marimo. All rights reserved. */
2
2
 
3
- import { atom, type createStore, Provider } from "jotai";
3
+ import { atom, type createStore, type PrimitiveAtom, Provider } from "jotai";
4
4
  import type { ReactNode } from "react";
5
5
  import {
6
6
  createDocumentModel,
@@ -12,21 +12,30 @@ import type { Document } from "@/core/notebook/replica";
12
12
  import { fakeBackend } from "@/core/notebook/replica/__tests__/fixtures";
13
13
  import { activeDocumentModelAtom } from "@/core/session/active-notebook";
14
14
 
15
- /** A started document model over `document`, for components that edit cells. */
15
+ /**
16
+ * A started document model over `document`, for components that edit cells.
17
+ * Setting `documentAtom` delivers a document as the host would.
18
+ */
16
19
  export function mockDocumentModel(
17
20
  store: ReturnType<typeof createStore>,
18
21
  document: Document | null = documentFixture(),
19
- ): { model: DocumentModel; stop: () => void } {
22
+ ): {
23
+ model: DocumentModel;
24
+ documentAtom: PrimitiveAtom<Document | null>;
25
+ stop: () => void;
26
+ } {
20
27
  const controller = new AbortController();
28
+ const documentAtom = atom(document);
21
29
  const model = createDocumentModel({
22
30
  store,
23
- documentAtom: atom(document),
31
+ documentAtom,
24
32
  backendAtom: atom(fakeBackend()),
25
33
  });
26
34
  model.start({ signal: controller.signal });
27
35
  store.set(activeDocumentModelAtom, model);
28
36
  return {
29
37
  model,
38
+ documentAtom,
30
39
  stop: () => {
31
40
  controller.abort();
32
41
  if (store.get(activeDocumentModelAtom) === model) {