@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.
- package/dist/{ConnectedDataExplorerComponent-BRuwLOIx.js → ConnectedDataExplorerComponent-BsWiIPFk.js} +4 -4
- package/dist/{ErrorBoundary-jQVF8yMb.js → ErrorBoundary-D1Z3KAf_.js} +2 -2
- package/dist/{abnfDiagram-VCTEODGH-LlJTOOU_.js → abnfDiagram-VCTEODGH-I2x4Yu25.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-9PQtGLLZ.js → architectureDiagram-5GKGNRK7-1bSQMKzK.js} +1 -1
- package/dist/{arrays-DA6KkLfq.js → arrays-DoQ-AILx.js} +7 -21
- package/dist/{capabilities-CvWU-ey_.js → capabilities-C2QUNRXi.js} +1 -1
- package/dist/{chat-ui-Bl2euMBD.js → chat-ui-BAyHM_GD.js} +524 -524
- package/dist/{chunk-IMKFNOWR-DcXv-BD5.js → chunk-IMKFNOWR-fsCGAJ9G.js} +1 -1
- package/dist/{chunk-SHT3W25Y-VwnELN23.js → chunk-SHT3W25Y-D2STW4hj.js} +1 -1
- package/dist/{chunk-SVP7TREG-DgQpI5Zi.js → chunk-SVP7TREG-CiY7cQG-.js} +1 -1
- package/dist/{chunk-TICWLB2K-CTg6VTJT.js → chunk-TICWLB2K-C_t5RBp9.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-UzmcFrnW.js → classDiagram-ZZMXUADV-B2JvZAP4.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-DhjiI6IQ.js → classDiagram-v2-VYDZK3BY-L8VsZG5A.js} +2 -2
- package/dist/{code-visibility-CjZo_SV8.js → code-visibility-CInEQd1e.js} +19 -19
- package/dist/{common-CFLvScF3.js → common-W5HfVJPN.js} +4362 -4362
- package/dist/{cynefinDiagram-5FMLGOSQ-O4ShIbJX.js → cynefinDiagram-5FMLGOSQ-DdllC264.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-dtHhhcPu.js → dagre-GXQ25YYZ-BaWHw4_f.js} +1 -1
- package/dist/{data-grid-overlay-editor-CzW3mY6m.js → data-grid-overlay-editor-BQCaV0fI.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-ppPYVZ6W.js → diagram-S7CK7UJ4-pFt-tUDe.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-CMZDf--k.js → diagram-UQ7AKVKN-DqGJiBp4.js} +1 -1
- package/dist/{diagram-VX7I27RA-CFvJdx-C.js → diagram-VX7I27RA-Dr-yzMjf.js} +1 -1
- package/dist/{diagram-Z3DM3KII-Dt6_uFbv.js → diagram-Z3DM3KII-8xzJzv-w.js} +1 -1
- package/dist/{dropdown-menu-CeaOsjWZ.js → dropdown-menu-NlnsmNA6.js} +2 -2
- package/dist/{ebnfDiagram-PWID7BFC-DpRFrKK-.js → ebnfDiagram-PWID7BFC-Br04Wy-E.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-CqAU4b0u.js → erDiagram-RLTQ6QDP-D5-XVgvv.js} +1 -1
- package/dist/{error-entries-CYGwr5-O.js → error-entries-BacCWMWj.js} +4678 -5028
- package/dist/{feedback-button-GR_8U4Vo.js → feedback-button-DLXUcQ7l.js} +113 -113
- package/dist/{flowDiagram-HODETNUW-i8-Gw8HO.js → flowDiagram-HODETNUW-CVl2kREF.js} +2 -2
- package/dist/{formats-BtoHHy42.js → formats-BCYthwyc.js} +1 -1
- package/dist/{glide-data-editor-Dfdxc22H.js → glide-data-editor-D5YaHPKx.js} +5 -5
- package/dist/{globals-CxjzBEbP.js → globals-DjX1uxzy.js} +2 -2
- package/dist/{html-to-image-Cy5UDpQJ.js → html-to-image-DAmgSo5P.js} +624 -573
- package/dist/{infoDiagram-27XIBGKW-DpfOKdLL.js → infoDiagram-27XIBGKW-BJ4vNcZE.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-Dg7mrMG7.js → ishikawaDiagram-5VMMS53U-B_Jy1Dsm.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-QB6e3Jrj.js → kanban-definition-UXKFOSKX-C6MkS9vw.js} +1 -1
- package/dist/main.js +1117 -1117
- package/dist/{mermaid-CeWG4Egr.js → mermaid-Bh918qrq.js} +34 -34
- package/dist/{mindmap-definition-YA3MSWOX-BTz3uTGe.js → mindmap-definition-YA3MSWOX-BP3ZTuir.js} +1 -1
- package/dist/{number-overlay-editor-CwHYeI4e.js → number-overlay-editor-3C_K6w_0.js} +1 -1
- package/dist/{once-DWGO2mQ2.js → once-NnpX_HnX.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-3ZIEa3mB.js → pegDiagram-XKGWAZYB-nNGOQtnt.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BJAlk046.js → pieDiagram-E7YTZNPT-CpRz5BZz.js} +1 -1
- package/dist/{process-output-q9MTAIMX.js → process-output-DweUmAmV.js} +3 -3
- package/dist/{railroadDiagram-O6MQD6OU-Dn3bsSRa.js → railroadDiagram-O6MQD6OU-BqOEN4I0.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-wcOmQQCL.js → requirementDiagram-BXWQKSXE-CEfg6vu9.js} +1 -1
- package/dist/{reveal-component-C5bOqXlB.js → reveal-component-JjJRTT9d.js} +17 -17
- package/dist/{sequenceDiagram-WJ2MYXX4-DSh_qxoF.js → sequenceDiagram-WJ2MYXX4-IOmpQcOi.js} +1 -1
- package/dist/{spec-C7Fos-If.js → spec-Dkp64vVQ.js} +1 -1
- package/dist/{stateDiagram-D77RDMKH-DH_H8NMH.js → stateDiagram-D77RDMKH-tgU-EY9_.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-D_JM7MEK.js → stateDiagram-v2-MP3YSRHH-BofhG6q1.js} +2 -2
- package/dist/{swimlanes-42K2YHIH-CfoTJO-9.js → swimlanes-42K2YHIH-DW4vWDBd.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-Z_QhvK0G.js → swimlanesDiagram-VR7AAH4N-BJcrqUJr.js} +2 -2
- package/dist/{swiper-component-D2geL1Ku.js → swiper-component-BVfnhbnt.js} +1 -1
- package/dist/{timeline-definition-24CTP7MA-BFtdScaL.js → timeline-definition-24CTP7MA-D_QU3NGs.js} +1 -1
- package/dist/{toDate-CQAFSwos.js → toDate-BNDEXbfV.js} +30 -30
- package/dist/{useAsyncData-BeyZyjso.js → useAsyncData-ASDni9vH.js} +1 -1
- package/dist/{useDeepCompareMemoize-DOQgae0W.js → useDeepCompareMemoize-B1Ogyf53.js} +1 -1
- package/dist/{useIframeCapabilities-DNvaj9wM.js → useIframeCapabilities-6a_yDNXp.js} +1 -1
- package/dist/{useLifecycle-n2lnCFS8.js → useLifecycle-Bfpa2m7k.js} +1 -1
- package/dist/{useTheme-CY777LXN.js → useTheme-5TwyOh3B.js} +66 -66
- package/dist/{vega-component-0nQzA-I8.js → vega-component-BHS9UOtC.js} +19 -19
- package/dist/{vennDiagram-4TSXK5OY-BXY8IGCA.js → vennDiagram-4TSXK5OY-YFYsNIAh.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-D0tFe6eC.js → wardleyDiagram-VM6X3IG4-i_n8mAWC.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-Dx8wFM-y.js → xychartDiagram-S5SC5T6Z-BYGN95wW.js} +1 -1
- package/package.json +1 -1
- package/src/__mocks__/document.tsx +13 -4
- package/src/__mocks__/notebook.ts +1 -2
- package/src/components/datasources/datasources.tsx +1 -1
- package/src/components/dependency-graph/custom-node.tsx +1 -1
- package/src/components/dependency-graph/minimap-content.tsx +12 -14
- package/src/components/editor/actions/useSetCodeVisibility.ts +1 -1
- package/src/components/editor/actions/useSetOutputsExpanded.ts +1 -1
- package/src/components/editor/alerts/stdin-blocking-alert.tsx +1 -1
- package/src/components/editor/cell/code/cell-editor.tsx +1 -1
- package/src/components/editor/cell/useSplitCell.tsx +8 -5
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/session-panel.tsx +1 -1
- package/src/components/editor/chrome/panels/variable-panel.tsx +1 -5
- package/src/components/editor/chrome/wrapper/minimap-state.ts +1 -1
- package/src/components/editor/columns/__tests__/cell-column.test.tsx +1 -1
- package/src/components/editor/columns/cell-column.tsx +1 -1
- package/src/components/editor/columns/sortable-column.tsx +1 -1
- package/src/components/editor/links/__tests__/cell-link.test.tsx +1 -1
- package/src/components/editor/links/cell-link-list.tsx +1 -1
- package/src/components/editor/links/cell-link.tsx +1 -1
- package/src/components/editor/navigation/__tests__/navigation.test.ts +20 -6
- package/src/components/editor/navigation/__tests__/selection.test.ts +1 -2
- package/src/components/editor/navigation/clipboard.ts +5 -3
- package/src/components/editor/renderers/cell-array.tsx +7 -12
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +1 -1
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +4 -4
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +1 -1
- package/src/components/editor/stdin-blocking-alert.tsx +1 -1
- package/src/components/slides/__tests__/minimap-actions.test.tsx +13 -4
- package/src/components/slides/__tests__/minimap.test.ts +38 -19
- package/src/components/slides/minimap.tsx +11 -10
- package/src/components/sort/SortableCellsProvider.tsx +2 -21
- package/src/components/tracing/tracing.tsx +1 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +1 -1
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +8 -12
- package/src/core/ai/context/providers/cell-output.ts +2 -2
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +34 -66
- package/src/core/ai/tools/edit-notebook-tool.ts +12 -10
- package/src/core/cells/__tests__/actions.test.ts +64 -25
- package/src/core/cells/__tests__/arrange.test.ts +156 -4
- package/src/core/cells/__tests__/cells.test.ts +12 -290
- package/src/core/cells/__tests__/document.test.ts +2 -46
- package/src/core/cells/__tests__/harness.ts +28 -4
- package/src/core/cells/__tests__/layout.test.ts +42 -54
- package/src/core/cells/__tests__/session.test.ts +0 -2
- package/src/core/cells/__tests__/utils.test.ts +9 -107
- package/src/core/cells/actions.ts +112 -26
- package/src/core/cells/add-missing-import.ts +1 -1
- package/src/core/cells/arrange.ts +206 -13
- package/src/core/cells/cells.ts +28 -256
- package/src/core/cells/document.ts +18 -122
- package/src/core/cells/layout.ts +79 -10
- package/src/core/cells/pending-delete-service.ts +1 -1
- package/src/core/cells/utils.ts +4 -4
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +6 -7
- package/src/core/codemirror/copilot/getCodes.ts +2 -2
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -2
- package/src/core/codemirror/lsp/utils.ts +1 -1
- package/src/core/documentation/doc-lookup.ts +1 -1
- package/src/core/edit-app.tsx +2 -5
- package/src/core/errors/error-entries.ts +1 -1
- package/src/core/islands/__tests__/bootstrap.test.ts +2 -6
- package/src/core/islands/components/web-components.tsx +1 -1
- package/src/core/notebook/document/__tests__/codemirror.test.ts +8 -0
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +1 -1
- package/src/stories/cell.stories.tsx +1 -2
- package/src/stories/layout/vertical/one-column.stories.tsx +1 -2
- package/src/stories/runtime-story.tsx +2 -3
- package/src/utils/__tests__/id-tree.test.ts +0 -617
- 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 {
|
|
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(
|
|
24
|
-
|
|
23
|
+
function f() {
|
|
24
|
+
return typeof document < "u" && document.querySelector("marimo-wasm") !== null;
|
|
25
25
|
}
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region src/
|
|
28
|
-
function p() {
|
|
29
|
-
|
|
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 =
|
|
56
|
-
return
|
|
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 _ =
|
|
59
|
-
mode:
|
|
58
|
+
var _ = i({
|
|
59
|
+
mode: c() ? "read" : "not-set",
|
|
60
60
|
cellAnchor: null
|
|
61
|
-
}), v =
|
|
61
|
+
}), v = i(void 0);
|
|
62
62
|
function y() {
|
|
63
|
-
let e =
|
|
63
|
+
let e = s.get(v);
|
|
64
64
|
return e !== "home" && e !== "gallery";
|
|
65
65
|
}
|
|
66
|
-
var b =
|
|
66
|
+
var b = i(!1);
|
|
67
67
|
function x() {
|
|
68
|
-
let e = (0, d.c)(1), { mode: t } =
|
|
69
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = new URLSearchParams(window.location.search).get(
|
|
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 =
|
|
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 =
|
|
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(
|
|
482
|
+
t.delete(o.sessionId), t.delete(o.kiosk);
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
t.has(
|
|
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(
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
594
|
-
return t.search = "", n && t.searchParams.set(
|
|
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 =
|
|
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
|
|
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-
|
|
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 {
|
|
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) {
|
|
@@ -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-
|
|
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
|
|
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
|
|
562
|
-
function
|
|
563
|
-
return
|
|
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] =
|
|
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 =
|
|
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 =
|
|
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 ||
|
|
648
|
+
}, e, t || He);
|
|
649
649
|
}
|
|
650
|
-
var
|
|
651
|
-
function
|
|
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
|
|
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
|
|
698
|
-
function
|
|
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)) :
|
|
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 (
|
|
709
|
+
for (n of e.keys()) if (K(n, t)) return n;
|
|
715
710
|
}
|
|
716
|
-
function
|
|
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-- &&
|
|
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) || !
|
|
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) || !
|
|
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
|
|
749
|
+
var q = I();
|
|
755
750
|
async function Qe(e, t) {
|
|
756
|
-
return t(
|
|
757
|
-
let r =
|
|
758
|
-
let i =
|
|
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 =
|
|
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
|
-
],
|
|
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:
|
|
892
|
-
github:
|
|
893
|
-
anthropic:
|
|
894
|
-
google:
|
|
895
|
-
ollama:
|
|
896
|
-
openrouter:
|
|
897
|
-
wandb:
|
|
898
|
-
opencode_go:
|
|
899
|
-
open_ai_compatible:
|
|
900
|
-
azure:
|
|
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(),
|
|
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
|
|
987
|
+
var Y = F(_t()), yt = F({}), X = F((e) => {
|
|
993
988
|
let t = e(yt);
|
|
994
|
-
return vt(e(
|
|
995
|
-
}), bt = F((e) => e(
|
|
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(
|
|
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(
|
|
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
|
|
1000
|
+
return q.get(X);
|
|
1006
1001
|
}
|
|
1007
|
-
F((e) =>
|
|
1008
|
-
var Tt = F((e) =>
|
|
1009
|
-
F((e) => e(
|
|
1010
|
-
var Dt = F((e) => e(
|
|
1011
|
-
function
|
|
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
|
|
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
|
|
1018
|
-
return
|
|
1012
|
+
function kt(e) {
|
|
1013
|
+
return Z(e) && Ot(e);
|
|
1019
1014
|
}
|
|
1020
|
-
var
|
|
1021
|
-
F((e) => e(
|
|
1022
|
-
let t = e(
|
|
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(
|
|
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 (
|
|
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(
|
|
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
|
-
|
|
1076
|
-
|
|
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
|
-
|
|
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:
|
|
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,
|
|
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-
|
|
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-
|
|
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
|
|
14
|
-
import {
|
|
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-
|
|
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
|
|
647
|
-
a[38] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
648
|
-
let
|
|
649
|
-
a[40] === K ?
|
|
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] =
|
|
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[
|
|
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[
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
/* 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
|
-
/**
|
|
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
|
-
): {
|
|
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
|
|
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) {
|