@marimo-team/islands 0.25.3-dev4 → 0.25.3-dev5
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-CNSxdKyJ.js → ConnectedDataExplorerComponent-CNMliVzw.js} +1 -1
- package/dist/{ErrorBoundary-CuU5CuVr.js → ErrorBoundary-BiZWOrv4.js} +1 -1
- package/dist/{abnfDiagram-VCTEODGH-DQDjNXt3.js → abnfDiagram-VCTEODGH-D-Ez91gV.js} +2 -2
- package/dist/{any-language-editor-B9REGlD9.js → any-language-editor-DZ_YTVus.js} +1 -1
- package/dist/{architectureDiagram-5GKGNRK7-Nmls7Wxn.js → architectureDiagram-5GKGNRK7-CTpcNtO8.js} +1 -1
- package/dist/{chat-ui-BDpymeoe.js → chat-ui-0lKdOoQ3.js} +436 -437
- package/dist/{chunk-IMKFNOWR-CoIFEo-1.js → chunk-IMKFNOWR-DGxi-zeo.js} +1 -1
- package/dist/{chunk-SHT3W25Y-lHiGx3ZC.js → chunk-SHT3W25Y-CV9J3rAB.js} +1 -1
- package/dist/{chunk-SVP7TREG-BvsHIrY_.js → chunk-SVP7TREG-BL-9Fqgg.js} +1 -1
- package/dist/{chunk-TICWLB2K-BC8YIm_n.js → chunk-TICWLB2K-Cu_XMjDM.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-Bt98lkkv.js → classDiagram-ZZMXUADV-BXXV13Hq.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-D9bfbcC3.js → classDiagram-v2-VYDZK3BY-B7FXJ1Cp.js} +2 -2
- package/dist/{code-visibility-Lu0dkrFO.js → code-visibility-CW5_8ZOI.js} +14 -14
- package/dist/{common-DiWGWDIM.js → common-mzWw4FdI.js} +6413 -6254
- package/dist/{cynefinDiagram-5FMLGOSQ-CgWra7wt.js → cynefinDiagram-5FMLGOSQ-CH96rwba.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-CFZ8-35c.js → dagre-GXQ25YYZ-BD3PmpFY.js} +1 -1
- package/dist/{data-grid-overlay-editor-ga7ytgbj.js → data-grid-overlay-editor-CJmehSdc.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-lCNQrW7d.js → diagram-S7CK7UJ4-BsSJJldB.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-CQPQ6pP_.js → diagram-UQ7AKVKN-muQtNZc4.js} +1 -1
- package/dist/{diagram-VX7I27RA-Cf3b0llz.js → diagram-VX7I27RA-CdhuZAqR.js} +1 -1
- package/dist/{diagram-Z3DM3KII-Bt4QLrpn.js → diagram-Z3DM3KII-BD8mXjOj.js} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-D3NAyPFY.js → ebnfDiagram-PWID7BFC-BIN1sweE.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-Tlu09_Nm.js → erDiagram-RLTQ6QDP-Ctp5cfoN.js} +1 -1
- package/dist/{error-banner-Da600cwz.js → error-banner-D-WCIiMt.js} +10 -5
- package/dist/{cells-C8iCYvLU.js → error-entries-DSvFWT_M.js} +2262 -2206
- package/dist/{feedback-button-DQA-pzxi.js → feedback-button-BcT1FBud.js} +115 -116
- package/dist/{flowDiagram-HODETNUW-CAYbpJmV.js → flowDiagram-HODETNUW-3EfLrlFb.js} +2 -2
- package/dist/{formats-BGh2thRc.js → formats-CeOmU1MU.js} +1 -1
- package/dist/{glide-data-editor-Bv75MH6g.js → glide-data-editor-XckatD0j.js} +3 -3
- package/dist/{globals-EDQGFIvi.js → globals-jRrLCkrP.js} +1 -1
- package/dist/{html-to-image-CZY1pIZH.js → html-to-image-B8s5SgGm.js} +23 -23
- package/dist/{infoDiagram-27XIBGKW-XrDxhr0x.js → infoDiagram-27XIBGKW-DipQoHxl.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-CD1muzov.js → ishikawaDiagram-5VMMS53U-DgFMjSGz.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-Dg9W142_.js → kanban-definition-UXKFOSKX-w1ACVjgl.js} +1 -1
- package/dist/main.js +164 -163
- package/dist/{mermaid-CiAXjLpA.js → mermaid-CHo49Yv-.js} +33 -33
- package/dist/{mindmap-definition-YA3MSWOX-DgCidgYJ.js → mindmap-definition-YA3MSWOX-CrT0KSfX.js} +1 -1
- package/dist/{number-overlay-editor-BCP3MxhC.js → number-overlay-editor-pZx8dUDV.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-coOYYKB6.js → pegDiagram-XKGWAZYB-BqvywNJA.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BnXTc3bj.js → pieDiagram-E7YTZNPT-BfxJ_XCc.js} +1 -1
- package/dist/{process-output-e4jj9Ijt.js → process-output-CKRXyszb.js} +3 -3
- package/dist/{railroadDiagram-O6MQD6OU-B28-u83n.js → railroadDiagram-O6MQD6OU-8vFLVTPu.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-CdYCTMu0.js → requirementDiagram-BXWQKSXE-a_MxGvxe.js} +1 -1
- package/dist/{reveal-component-DO5BJB9l.js → reveal-component-79ez8-D5.js} +4 -4
- package/dist/{sequenceDiagram-WJ2MYXX4-CM3aRAe_.js → sequenceDiagram-WJ2MYXX4-CXFMnxGh.js} +1 -1
- package/dist/{stateDiagram-D77RDMKH-DOZUMVj8.js → stateDiagram-D77RDMKH-DQeA_CwI.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-CISYxma6.js → stateDiagram-v2-MP3YSRHH-BxxQucm1.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-BkSppxp8.js → swimlanes-42K2YHIH-Do6L-cYg.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-c8G5pGxC.js → swimlanesDiagram-VR7AAH4N-DUzPvSVU.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-CaMQayqK.js → timeline-definition-24CTP7MA-D3c46WM5.js} +1 -1
- package/dist/{toDate-BNJf01u1.js → toDate-vIXljnsr.js} +39 -38
- package/dist/{vega-component-DG29TAB7.js → vega-component-DTG6zxaY.js} +3 -3
- package/dist/{vennDiagram-4TSXK5OY-CF8pfaK3.js → vennDiagram-4TSXK5OY-BSZD8JcZ.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-dGPu39d-.js → wardleyDiagram-VM6X3IG4-48cUWkfA.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CP6-9q56.js → xychartDiagram-S5SC5T6Z-CswYgYeu.js} +1 -1
- package/package.json +1 -1
- package/src/components/editor/Output.tsx +5 -2
- package/src/components/editor/chrome/panels/error-panel.tsx +1 -0
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +167 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +32 -24
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +82 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +434 -0
- package/src/components/editor/errors/send-error-report-button.tsx +66 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +21 -5
- package/src/components/editor/output/MarimoTracebackOutput.tsx +9 -0
- package/src/components/editor/output/__tests__/ansi-reduce.test.ts +18 -0
- package/src/components/editor/output/ansi-reduce.ts +6 -0
- package/src/core/attachments/state.ts +21 -0
- package/src/core/cells/__tests__/cells.test.ts +52 -0
- package/src/core/cells/__tests__/error-report.test.ts +89 -0
- package/src/core/cells/__tests__/session.test.ts +34 -0
- package/src/core/cells/error-report.ts +55 -0
- package/src/core/cells/session.ts +9 -0
- package/src/core/islands/__tests__/bootstrap.test.ts +26 -0
- package/src/core/islands/bootstrap.ts +1 -0
- package/src/core/websocket/__tests__/useMarimoKernelConnection.hook.test.tsx +193 -0
- package/src/core/websocket/useMarimoKernelConnection.tsx +9 -0
- package/dist/error-entries-CzoYkIQZ.js +0 -56
|
@@ -9,7 +9,7 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-Cwbt-lF0.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-n-zgIVSy.js";
|
|
11
11
|
import { o as n } from "./chunk-OSK3NFVY-DXa-Cxbn.js";
|
|
12
|
-
import { c as r } from "./mermaid-
|
|
12
|
+
import { c as r } from "./mermaid-CHo49Yv-.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) {
|
package/dist/{swimlanesDiagram-VR7AAH4N-c8G5pGxC.js → swimlanesDiagram-VR7AAH4N-DUzPvSVU.js}
RENAMED
|
@@ -9,11 +9,11 @@ import "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
|
9
9
|
import "./chunk-GVQU2GXP-Cwbt-lF0.js";
|
|
10
10
|
import "./chunk-L3NEJ4N5-n-zgIVSy.js";
|
|
11
11
|
import "./chunk-OSK3NFVY-DXa-Cxbn.js";
|
|
12
|
-
import "./mermaid-
|
|
12
|
+
import "./mermaid-CHo49Yv-.js";
|
|
13
13
|
import "./chunk-F27PBJKO-ufseIn5y.js";
|
|
14
14
|
import "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
15
15
|
import "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
16
|
-
import { r as t, t as n } from "./chunk-SHT3W25Y-
|
|
16
|
+
import { r as t, t as n } from "./chunk-SHT3W25Y-CV9J3rAB.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",
|
package/dist/{timeline-definition-24CTP7MA-CaMQayqK.js → timeline-definition-24CTP7MA-D3c46WM5.js}
RENAMED
|
@@ -3,7 +3,7 @@ import { p as t } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
3
3
|
import { n, t as r } from "./src-CA_m4ONl.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-BwiyaNpg.js";
|
|
6
|
-
import { p as m } from "./mermaid-
|
|
6
|
+
import { p as m } from "./mermaid-CHo49Yv-.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) {
|
|
@@ -465,54 +465,55 @@ function M({ href: e, queryParams: t, keys: n }) {
|
|
|
465
465
|
let m = f.toString();
|
|
466
466
|
return m ? `${o}?${m}${s}` : e;
|
|
467
467
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
468
|
+
//#endregion
|
|
469
|
+
//#region src/core/kernel/session.ts
|
|
470
|
+
var N = a(null), P = (0, O.init)({ length: 6 });
|
|
471
|
+
function F() {
|
|
472
|
+
return `s_${P()}`;
|
|
472
473
|
}
|
|
473
|
-
function
|
|
474
|
+
function I(e) {
|
|
474
475
|
return e ? /^s_[\da-z]{6}$/.test(e) : !1;
|
|
475
476
|
}
|
|
476
|
-
var
|
|
477
|
-
function
|
|
478
|
-
let e = o.get(v) === "edit", n = new URL(window.location.href).searchParams.get(s.sessionId), r =
|
|
477
|
+
var L = null;
|
|
478
|
+
function R() {
|
|
479
|
+
let e = o.get(v) === "edit", n = new URL(window.location.href).searchParams.get(s.sessionId), r = I(n) ? n : null;
|
|
479
480
|
return k((t) => {
|
|
480
481
|
if (!e) {
|
|
481
482
|
t.delete(s.sessionId), t.delete(s.kiosk);
|
|
482
483
|
return;
|
|
483
484
|
}
|
|
484
485
|
t.has(s.kiosk) || t.delete(s.sessionId);
|
|
485
|
-
}), r === null ? (t.debug("Starting a new session", { sessionId: n }),
|
|
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());
|
|
486
487
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
488
|
+
function z() {
|
|
489
|
+
return L === null && (L = R()), L;
|
|
489
490
|
}
|
|
490
491
|
//#endregion
|
|
491
492
|
//#region src/core/static/static-state.ts
|
|
492
|
-
function
|
|
493
|
+
function B(e) {
|
|
493
494
|
if (typeof e != "object" || !e || Array.isArray(e)) return !1;
|
|
494
495
|
for (let t of Object.values(e)) if (typeof t != "string") return !1;
|
|
495
496
|
return !0;
|
|
496
497
|
}
|
|
497
|
-
function
|
|
498
|
+
function V(e) {
|
|
498
499
|
if (typeof e != "object" || !e || Array.isArray(e)) return !1;
|
|
499
500
|
let t = e;
|
|
500
|
-
return !(!
|
|
501
|
-
}
|
|
502
|
-
function V() {
|
|
503
|
-
let e = typeof window > "u" ? void 0 : window.__MARIMO_STATIC__;
|
|
504
|
-
return B(e) ? e : void 0;
|
|
501
|
+
return !(!B(t.files) || t.modelNotifications !== void 0 && !Array.isArray(t.modelNotifications));
|
|
505
502
|
}
|
|
506
503
|
function H() {
|
|
507
|
-
|
|
504
|
+
let e = typeof window > "u" ? void 0 : window.__MARIMO_STATIC__;
|
|
505
|
+
return V(e) ? e : void 0;
|
|
508
506
|
}
|
|
509
507
|
function U() {
|
|
510
|
-
|
|
508
|
+
return H() !== void 0;
|
|
509
|
+
}
|
|
510
|
+
function W() {
|
|
511
|
+
let e = H();
|
|
511
512
|
return l(e !== void 0, "Not a static notebook"), e.files;
|
|
512
513
|
}
|
|
513
514
|
//#endregion
|
|
514
515
|
//#region src/core/runtime/runtime.ts
|
|
515
|
-
var
|
|
516
|
+
var G = class {
|
|
516
517
|
initialHealthyCheck = new m();
|
|
517
518
|
config;
|
|
518
519
|
lazy;
|
|
@@ -535,7 +536,7 @@ var W = class {
|
|
|
535
536
|
return this.httpURL.origin === window.location.origin;
|
|
536
537
|
}
|
|
537
538
|
get isServerless() {
|
|
538
|
-
return p() || c() ||
|
|
539
|
+
return p() || c() || U();
|
|
539
540
|
}
|
|
540
541
|
formatHttpURL({ path: e = "", searchParams: t, restrictToKnownQueryParams: n = !0 }) {
|
|
541
542
|
let r = this.httpURL, i = new URLSearchParams(window.location.search);
|
|
@@ -559,7 +560,7 @@ var W = class {
|
|
|
559
560
|
searchParams: t,
|
|
560
561
|
restrictToKnownQueryParams: !1
|
|
561
562
|
});
|
|
562
|
-
return
|
|
563
|
+
return K(this.appendCrossOriginAuth(n).toString());
|
|
563
564
|
}
|
|
564
565
|
getSessionSearchParams(e) {
|
|
565
566
|
let t = new URL(this.config.url), n = new URLSearchParams(t.search);
|
|
@@ -645,17 +646,17 @@ var W = class {
|
|
|
645
646
|
}
|
|
646
647
|
headers() {
|
|
647
648
|
let e = {
|
|
648
|
-
"Marimo-Session-Id":
|
|
649
|
+
"Marimo-Session-Id": z(),
|
|
649
650
|
"Marimo-Server-Token": this.config.serverToken ?? "",
|
|
650
651
|
"x-runtime-url": this.httpURL.toString()
|
|
651
652
|
};
|
|
652
653
|
return this.config.authToken && (e.Authorization = `Bearer ${this.config.authToken}`), e;
|
|
653
654
|
}
|
|
654
655
|
sessionHeaders() {
|
|
655
|
-
return { "Marimo-Session-Id":
|
|
656
|
+
return { "Marimo-Session-Id": z() };
|
|
656
657
|
}
|
|
657
658
|
};
|
|
658
|
-
function
|
|
659
|
+
function K(e) {
|
|
659
660
|
if (!e.startsWith("http")) {
|
|
660
661
|
t.warn(`URL must start with http: ${e}`);
|
|
661
662
|
let n = new URL(e);
|
|
@@ -665,29 +666,29 @@ function G(e) {
|
|
|
665
666
|
}
|
|
666
667
|
//#endregion
|
|
667
668
|
//#region src/core/runtime/config.ts
|
|
668
|
-
function
|
|
669
|
+
function q() {
|
|
669
670
|
let e = new URL(document.baseURI);
|
|
670
671
|
return e.search = "", e.hash = "", e.toString();
|
|
671
672
|
}
|
|
672
|
-
var
|
|
673
|
+
var J = {
|
|
673
674
|
lazy: !0,
|
|
674
|
-
url:
|
|
675
|
-
},
|
|
676
|
-
let t = e(
|
|
677
|
-
return new
|
|
675
|
+
url: q()
|
|
676
|
+
}, Y = a(J), ee = a((e) => {
|
|
677
|
+
let t = e(Y);
|
|
678
|
+
return new G(t, t.lazy);
|
|
678
679
|
});
|
|
679
680
|
function X() {
|
|
680
|
-
return o.get(
|
|
681
|
+
return o.get(ee);
|
|
681
682
|
}
|
|
682
|
-
function
|
|
683
|
+
function te(e) {
|
|
683
684
|
if (e.startsWith("http")) return new URL(e);
|
|
684
685
|
let t = X().httpURL.toString();
|
|
685
686
|
return t.startsWith("blob:") && (t = t.replace("blob:", "")), new URL(e, t);
|
|
686
687
|
}
|
|
687
688
|
//#endregion
|
|
688
689
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js
|
|
689
|
-
var
|
|
690
|
-
Z * 7, Z *
|
|
690
|
+
var ne = 365.2425, re = 6048e5, ie = 864e5, Z = 86400;
|
|
691
|
+
Z * 7, Z * ne / 12 * 3;
|
|
691
692
|
var Q = Symbol.for("constructDateFrom");
|
|
692
693
|
//#endregion
|
|
693
694
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
|
|
@@ -696,8 +697,8 @@ function $(e, t) {
|
|
|
696
697
|
}
|
|
697
698
|
//#endregion
|
|
698
699
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
|
|
699
|
-
function
|
|
700
|
+
function ae(e, t) {
|
|
700
701
|
return $(t || e, e);
|
|
701
702
|
}
|
|
702
703
|
//#endregion
|
|
703
|
-
export { u as S,
|
|
704
|
+
export { u as C, f as S, b as _, te as a, m as b, U as c, j as d, k as f, y as g, v as h, re as i, N as l, g as m, $ as n, X as o, D as p, ie as r, W as s, ae as t, M as u, x as v, p as x, _ as y };
|
|
@@ -3,15 +3,15 @@ import { g as t, h as n, m as r, o as i } from "./button-CvjkwdSk.js";
|
|
|
3
3
|
import { t as a } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as o } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { t as s } from "./tooltip-BO1REbqs.js";
|
|
6
|
-
import {
|
|
6
|
+
import { C as c, a as l } from "./toDate-vIXljnsr.js";
|
|
7
7
|
import { t as u } from "./jsx-runtime-3BD1kT0s.js";
|
|
8
|
-
import { n as d } from "./error-banner-
|
|
8
|
+
import { n as d } from "./error-banner-D-WCIiMt.js";
|
|
9
9
|
import { t as f } from "./debounce-C3jyATpc.js";
|
|
10
10
|
import { A as p, n as ee } from "./useTheme-CRnjkku0.js";
|
|
11
11
|
import { c as m } from "./arrays-CN1djC4k.js";
|
|
12
12
|
import { t as te } from "./objects-CzUgoMIF.js";
|
|
13
13
|
import { t as h } from "./useAsyncData-Deh5kszT.js";
|
|
14
|
-
import { a as ne, i as re, n as ie, t as g } from "./formats-
|
|
14
|
+
import { a as ne, i as re, n as ie, t as g } from "./formats-CeOmU1MU.js";
|
|
15
15
|
import { M as ae, n as oe } from "./vega-loader.browser-DNST6uVf.js";
|
|
16
16
|
import { t as se } from "./react-vega-BED0DjiB.js";
|
|
17
17
|
import { a as ce, n as _ } from "./loader-BQOfjTIJ.js";
|
|
@@ -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-CHo49Yv-.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-CHo49Yv-.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-CHo49Yv-.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
|
@@ -66,7 +66,7 @@ export type OnRefactorWithAI = (opts: {
|
|
|
66
66
|
* Renders an output based on an OutputMessage.
|
|
67
67
|
*/
|
|
68
68
|
export const OutputRenderer: React.FC<{
|
|
69
|
-
message: Pick<OutputMessage, "channel" | "data" | "mimetype">;
|
|
69
|
+
message: Pick<OutputMessage, "channel" | "data" | "mimetype" | "code">;
|
|
70
70
|
cellId?: CellId;
|
|
71
71
|
onRefactorWithAI?: OnRefactorWithAI;
|
|
72
72
|
wrapText?: boolean;
|
|
@@ -172,7 +172,9 @@ export const OutputRenderer: React.FC<{
|
|
|
172
172
|
|
|
173
173
|
case "application/vnd.marimo+error":
|
|
174
174
|
invariant(Array.isArray(data), "Expected array data");
|
|
175
|
-
return
|
|
175
|
+
return (
|
|
176
|
+
<MarimoErrorOutput cellId={cellId} errors={data} code={message.code} />
|
|
177
|
+
);
|
|
176
178
|
|
|
177
179
|
case "application/vnd.marimo+traceback":
|
|
178
180
|
invariant(
|
|
@@ -183,6 +185,7 @@ export const OutputRenderer: React.FC<{
|
|
|
183
185
|
<MarimoTracebackOutput
|
|
184
186
|
onRefactorWithAI={onRefactorWithAI}
|
|
185
187
|
traceback={data}
|
|
188
|
+
code={message.code}
|
|
186
189
|
cellId={cellId}
|
|
187
190
|
/>
|
|
188
191
|
);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
// @vitest-environment jsdom
|
|
3
|
+
|
|
4
|
+
import { act, fireEvent, render, screen } from "@testing-library/react";
|
|
5
|
+
import { createStore, Provider } from "jotai";
|
|
6
|
+
import { userEvent } from "storybook/test";
|
|
7
|
+
import { describe, expect, it } from "vitest";
|
|
8
|
+
import { PAIR_PREVIEW } from "@/__tests__/fixtures/pair-preview";
|
|
9
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
10
|
+
import { type Attachment, attachmentsAtom } from "@/core/attachments/state";
|
|
11
|
+
import { pairPreviewAtom } from "@/core/config/pair";
|
|
12
|
+
import { connectionAtom } from "@/core/network/connection";
|
|
13
|
+
import { WebSocketClosedReason, ConnectionState } from "@/core/websocket/types";
|
|
14
|
+
import { AttachmentStatus } from "../footer-items/attachment-status";
|
|
15
|
+
|
|
16
|
+
const AGENT: Attachment = {
|
|
17
|
+
id: "a1",
|
|
18
|
+
kind: "agent",
|
|
19
|
+
name: "Pi",
|
|
20
|
+
notebook_id: "nb-test",
|
|
21
|
+
identity: "pi-thread",
|
|
22
|
+
since: new Date().toISOString(),
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function renderStatus(attachments: Attachment[] = [AGENT], preview = true) {
|
|
26
|
+
const store = createStore();
|
|
27
|
+
store.set(connectionAtom, { state: ConnectionState.OPEN });
|
|
28
|
+
store.set(pairPreviewAtom, preview ? PAIR_PREVIEW : undefined);
|
|
29
|
+
store.set(attachmentsAtom, attachments);
|
|
30
|
+
return {
|
|
31
|
+
store,
|
|
32
|
+
...render(
|
|
33
|
+
<Provider store={store}>
|
|
34
|
+
<TooltipProvider>
|
|
35
|
+
<AttachmentStatus />
|
|
36
|
+
</TooltipProvider>
|
|
37
|
+
</Provider>,
|
|
38
|
+
),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
describe("AttachmentStatus", () => {
|
|
43
|
+
it("renders nothing outside the preview", () => {
|
|
44
|
+
expect(renderStatus([AGENT], false).container).toBeEmptyDOMElement();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("renders nothing without agents", () => {
|
|
48
|
+
expect(
|
|
49
|
+
renderStatus([{ ...AGENT, kind: "client" }]).container,
|
|
50
|
+
).toBeEmptyDOMElement();
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("lists each agent by its self-described name", () => {
|
|
54
|
+
renderStatus([
|
|
55
|
+
AGENT,
|
|
56
|
+
{ ...AGENT, id: "a2", identity: "claude-thread", name: "Claude Code" },
|
|
57
|
+
{ ...AGENT, id: "c1", kind: "client", name: "Browser" },
|
|
58
|
+
]);
|
|
59
|
+
expect(screen.getAllByTestId("footer-attachment-status")).toHaveLength(2);
|
|
60
|
+
expect(screen.getByLabelText("Pi: Connected")).toBeInTheDocument();
|
|
61
|
+
expect(screen.getByLabelText("Claude Code: Connected")).toBeInTheDocument();
|
|
62
|
+
expect(screen.queryByText("Browser")).not.toBeInTheDocument();
|
|
63
|
+
fireEvent.click(screen.getByLabelText("Pi: Connected"));
|
|
64
|
+
expect(screen.getByText(/^Connected /)).toBeInTheDocument();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("uses Agent when no name was supplied", () => {
|
|
68
|
+
renderStatus([{ ...AGENT, name: null }]);
|
|
69
|
+
expect(screen.getByLabelText("Agent: Connected")).toBeInTheDocument();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("groups attachments by identity while retaining each connection row", () => {
|
|
73
|
+
renderStatus([
|
|
74
|
+
AGENT,
|
|
75
|
+
{ ...AGENT, id: "a2", since: "2026-10-14T00:00:00Z" },
|
|
76
|
+
]);
|
|
77
|
+
expect(screen.getAllByTestId("footer-attachment-status")).toHaveLength(1);
|
|
78
|
+
fireEvent.click(screen.getByLabelText("Pi: Connected"));
|
|
79
|
+
expect(screen.getAllByText(/^Connected /)).toHaveLength(2);
|
|
80
|
+
expect(screen.getByText("a1")).toBeInTheDocument();
|
|
81
|
+
expect(screen.getByText("a2")).toBeInTheDocument();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("preserves an open popover when the same identity reconnects", () => {
|
|
85
|
+
const { store } = renderStatus();
|
|
86
|
+
fireEvent.click(screen.getByLabelText("Pi: Connected"));
|
|
87
|
+
act(() =>
|
|
88
|
+
store.set(attachmentsAtom, [
|
|
89
|
+
{ ...AGENT, id: "a2", since: "2026-10-14T00:00:00Z" },
|
|
90
|
+
]),
|
|
91
|
+
);
|
|
92
|
+
expect(
|
|
93
|
+
screen.getByRole("button", { name: "Pi: Connected" }),
|
|
94
|
+
).toHaveAttribute("aria-expanded", "true");
|
|
95
|
+
expect(screen.queryByText("a1")).not.toBeInTheDocument();
|
|
96
|
+
expect(screen.getByText("a2")).toBeInTheDocument();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
it("does not open a closed popover when the same identity reconnects", () => {
|
|
100
|
+
const { store } = renderStatus();
|
|
101
|
+
act(() => store.set(attachmentsAtom, [{ ...AGENT, id: "a2" }]));
|
|
102
|
+
expect(
|
|
103
|
+
screen.getByRole("button", { name: "Pi: Connected" }),
|
|
104
|
+
).toHaveAttribute("aria-expanded", "false");
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it("keeps anonymous attachments separate from matching client identities", () => {
|
|
108
|
+
renderStatus([
|
|
109
|
+
{ ...AGENT, identity: undefined },
|
|
110
|
+
{ ...AGENT, id: "a2", identity: undefined },
|
|
111
|
+
{ ...AGENT, id: "a3", identity: "a1" },
|
|
112
|
+
]);
|
|
113
|
+
expect(screen.getAllByTestId("footer-attachment-status")).toHaveLength(3);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
it("accepts client identities that match object property names", () => {
|
|
117
|
+
renderStatus([
|
|
118
|
+
{ ...AGENT, identity: "__proto__" },
|
|
119
|
+
{ ...AGENT, id: "a2", identity: "constructor" },
|
|
120
|
+
]);
|
|
121
|
+
expect(screen.getAllByTestId("footer-attachment-status")).toHaveLength(2);
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it.each(["{Enter}", " "])("opens from the keyboard with %j", async (key) => {
|
|
125
|
+
const user = userEvent.setup();
|
|
126
|
+
renderStatus();
|
|
127
|
+
const button = screen.getByRole("button", { name: "Pi: Connected" });
|
|
128
|
+
expect(button.tagName).toBe("BUTTON");
|
|
129
|
+
expect(button).toHaveAttribute("type", "button");
|
|
130
|
+
await user.tab();
|
|
131
|
+
expect(button).toHaveFocus();
|
|
132
|
+
await user.keyboard(key);
|
|
133
|
+
expect(button).toHaveAttribute("aria-expanded", "true");
|
|
134
|
+
expect(screen.getByText(/^Connected /)).toBeInTheDocument();
|
|
135
|
+
await user.keyboard("{Escape}");
|
|
136
|
+
expect(button).toHaveAttribute("aria-expanded", "false");
|
|
137
|
+
expect(button).toHaveFocus();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it.each([
|
|
141
|
+
{ state: ConnectionState.CONNECTING },
|
|
142
|
+
{ state: ConnectionState.CLOSING },
|
|
143
|
+
{ state: ConnectionState.NOT_STARTED },
|
|
144
|
+
{
|
|
145
|
+
state: ConnectionState.CLOSED,
|
|
146
|
+
code: WebSocketClosedReason.KERNEL_DISCONNECTED,
|
|
147
|
+
reason: "offline",
|
|
148
|
+
},
|
|
149
|
+
])("hides connected claims while the browser is %j", (connection) => {
|
|
150
|
+
const { store, container } = renderStatus();
|
|
151
|
+
act(() => store.set(connectionAtom, connection));
|
|
152
|
+
expect(container).toBeEmptyDOMElement();
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it("removes detached agents when the list is replaced", () => {
|
|
156
|
+
const { store, container } = renderStatus([
|
|
157
|
+
AGENT,
|
|
158
|
+
{ ...AGENT, id: "a2", identity: "claude-thread", name: "Claude Code" },
|
|
159
|
+
]);
|
|
160
|
+
act(() => store.set(attachmentsAtom, [AGENT]));
|
|
161
|
+
expect(
|
|
162
|
+
screen.queryByLabelText("Claude Code: Connected"),
|
|
163
|
+
).not.toBeInTheDocument();
|
|
164
|
+
act(() => store.set(attachmentsAtom, []));
|
|
165
|
+
expect(container).toBeEmptyDOMElement();
|
|
166
|
+
});
|
|
167
|
+
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import type React from "react";
|
|
4
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
4
5
|
import { forwardRef } from "react";
|
|
5
6
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
6
7
|
import { cn } from "@/utils/cn";
|
|
@@ -8,36 +9,43 @@ import { cn } from "@/utils/cn";
|
|
|
8
9
|
type FooterItemProps = {
|
|
9
10
|
selected: boolean;
|
|
10
11
|
tooltip: React.ReactNode;
|
|
12
|
+
asChild?: boolean;
|
|
11
13
|
} & React.HTMLAttributes<HTMLDivElement>;
|
|
12
14
|
|
|
13
15
|
export const FooterItem: React.FC<FooterItemProps> = forwardRef<
|
|
14
16
|
HTMLDivElement,
|
|
15
17
|
FooterItemProps
|
|
16
|
-
>(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{content}
|
|
36
|
-
</Tooltip>
|
|
18
|
+
>(
|
|
19
|
+
(
|
|
20
|
+
{ children, tooltip, selected, className, asChild = false, ...rest },
|
|
21
|
+
ref,
|
|
22
|
+
) => {
|
|
23
|
+
const Component = asChild ? SlotPrimitive.Slot : "div";
|
|
24
|
+
const content = (
|
|
25
|
+
<Component
|
|
26
|
+
ref={ref}
|
|
27
|
+
className={cn(
|
|
28
|
+
"h-full flex items-center p-2 text-sm shadow-inset font-mono cursor-pointer rounded",
|
|
29
|
+
!selected && "hover:bg-(--sage-3)",
|
|
30
|
+
selected && "bg-(--sage-4)",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
{children}
|
|
36
|
+
</Component>
|
|
37
37
|
);
|
|
38
|
-
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
if (tooltip) {
|
|
40
|
+
return (
|
|
41
|
+
<Tooltip content={tooltip} side="top" delayDuration={200}>
|
|
42
|
+
{content}
|
|
43
|
+
</Tooltip>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return content;
|
|
48
|
+
},
|
|
49
|
+
);
|
|
42
50
|
|
|
43
51
|
FooterItem.displayName = "FooterItem";
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { useAtomValue } from "jotai";
|
|
4
|
+
import { BotIcon } from "lucide-react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import {
|
|
7
|
+
Popover,
|
|
8
|
+
PopoverContent,
|
|
9
|
+
PopoverTrigger,
|
|
10
|
+
} from "@/components/ui/popover";
|
|
11
|
+
import {
|
|
12
|
+
type Attachment,
|
|
13
|
+
agentAttachmentsAtom,
|
|
14
|
+
attachmentLabel,
|
|
15
|
+
} from "@/core/attachments/state";
|
|
16
|
+
import { pairPreviewAtom } from "@/core/config/pair";
|
|
17
|
+
import { useTimeAgo } from "@/hooks/useFormatting";
|
|
18
|
+
import { Objects } from "@/utils/objects";
|
|
19
|
+
import { FooterItem } from "../footer-item";
|
|
20
|
+
|
|
21
|
+
export function AttachmentStatus() {
|
|
22
|
+
const pairPreview = useAtomValue(pairPreviewAtom);
|
|
23
|
+
const agents = useAtomValue(agentAttachmentsAtom);
|
|
24
|
+
if (!pairPreview) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const groups = Objects.groupBy(
|
|
28
|
+
agents,
|
|
29
|
+
(attachment) =>
|
|
30
|
+
attachment.identity
|
|
31
|
+
? `identity:${attachment.identity}`
|
|
32
|
+
: `attachment:${attachment.id}`,
|
|
33
|
+
(attachment) => attachment,
|
|
34
|
+
);
|
|
35
|
+
return Object.entries(groups).map(([identity, attachments]) => (
|
|
36
|
+
<AttachmentStatusItem key={identity} attachments={attachments} />
|
|
37
|
+
));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function AttachmentStatusItem({ attachments }: { attachments: Attachment[] }) {
|
|
41
|
+
const [open, setOpen] = useState(false);
|
|
42
|
+
const timeAgo = useTimeAgo();
|
|
43
|
+
const label = attachmentLabel(attachments[0]);
|
|
44
|
+
return (
|
|
45
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
46
|
+
<PopoverTrigger asChild={true}>
|
|
47
|
+
<FooterItem
|
|
48
|
+
asChild={true}
|
|
49
|
+
tooltip={`${label}: connected`}
|
|
50
|
+
selected={open}
|
|
51
|
+
data-testid="footer-attachment-status"
|
|
52
|
+
aria-label={`${label}: Connected`}
|
|
53
|
+
>
|
|
54
|
+
<button type="button">
|
|
55
|
+
<span className="flex items-center gap-1.5">
|
|
56
|
+
<BotIcon className="w-4 h-4" />
|
|
57
|
+
<span className="max-w-48 truncate">{label}</span>
|
|
58
|
+
</span>
|
|
59
|
+
</button>
|
|
60
|
+
</FooterItem>
|
|
61
|
+
</PopoverTrigger>
|
|
62
|
+
<PopoverContent className="w-64 text-sm">
|
|
63
|
+
<h4 className="font-medium">{label}</h4>
|
|
64
|
+
<ul className="space-y-2">
|
|
65
|
+
{attachments.map((attachment) => (
|
|
66
|
+
<li key={attachment.id}>
|
|
67
|
+
<p
|
|
68
|
+
className="truncate text-xs text-muted-foreground"
|
|
69
|
+
title={attachment.id}
|
|
70
|
+
>
|
|
71
|
+
{attachment.id}
|
|
72
|
+
</p>
|
|
73
|
+
<p className="text-muted-foreground">
|
|
74
|
+
Connected {timeAgo(attachment.since)}
|
|
75
|
+
</p>
|
|
76
|
+
</li>
|
|
77
|
+
))}
|
|
78
|
+
</ul>
|
|
79
|
+
</PopoverContent>
|
|
80
|
+
</Popover>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -12,6 +12,7 @@ import { ShowInKioskMode } from "../../kiosk-mode";
|
|
|
12
12
|
import { panelLayoutAtom, useChromeActions, useChromeState } from "../state";
|
|
13
13
|
import { FooterItem } from "./footer-item";
|
|
14
14
|
import { AIStatusIcon } from "./footer-items/ai-status";
|
|
15
|
+
import { AttachmentStatus } from "./footer-items/attachment-status";
|
|
15
16
|
import {
|
|
16
17
|
BackendConnectionStatus,
|
|
17
18
|
connectionStatusAtom,
|
|
@@ -107,6 +108,7 @@ export const Footer: React.FC = () => {
|
|
|
107
108
|
|
|
108
109
|
<div className="flex items-center shrink-0 min-w-0">
|
|
109
110
|
<MachineStats />
|
|
111
|
+
<AttachmentStatus />
|
|
110
112
|
<AIStatusIcon />
|
|
111
113
|
<CopilotStatusIcon />
|
|
112
114
|
<RTCStatus />
|