@marimo-team/islands 0.25.3-dev169 → 0.25.3-dev170
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-BbDrlHvG.js → ConnectedDataExplorerComponent-BbSXV-Xa.js} +8 -8
- package/dist/{ErrorBoundary-RaIwGWT3.js → ErrorBoundary-NE86qEWZ.js} +4 -4
- package/dist/{abnfDiagram-VCTEODGH-Dr-fo8_z.js → abnfDiagram-VCTEODGH-D7n07nXf.js} +2 -2
- package/dist/{architectureDiagram-5GKGNRK7-ByKIl9GG.js → architectureDiagram-5GKGNRK7-D6CjRib5.js} +1 -1
- package/dist/{chat-ui-BsV2WH-4.js → chat-ui-CC7GekpG.js} +34 -34
- package/dist/{chunk-IMKFNOWR-IKDP18MQ.js → chunk-IMKFNOWR-6dtPz7uS.js} +1 -1
- package/dist/{chunk-SHT3W25Y-LkIgegwh.js → chunk-SHT3W25Y-BwnFNKDA.js} +1 -1
- package/dist/{chunk-SVP7TREG-DReBYtnB.js → chunk-SVP7TREG-D2eV4vBJ.js} +1 -1
- package/dist/{chunk-TICWLB2K-DQ0A0-1D.js → chunk-TICWLB2K-BDs4-_-r.js} +1 -1
- package/dist/{classDiagram-ZZMXUADV-CwvXdCNE.js → classDiagram-ZZMXUADV-DCJnf_8v.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-D0XAxDsc.js → classDiagram-v2-VYDZK3BY-BOmSzPBD.js} +2 -2
- package/dist/{code-visibility-BMi0KLAQ.js → code-visibility-Bzvc6ajl.js} +23 -23
- package/dist/{common-BMkJrZsD.js → common-Ciw4zkh2.js} +3412 -3412
- package/dist/{cynefinDiagram-5FMLGOSQ-BFN68nHr.js → cynefinDiagram-5FMLGOSQ-Bln_Soky.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-CZt4rtLq.js → dagre-GXQ25YYZ-D-nf7WzW.js} +1 -1
- package/dist/{data-grid-overlay-editor-CCc1P42P.js → data-grid-overlay-editor-AQREmxI7.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-D5cOz47_.js → diagram-S7CK7UJ4-PsgSMkY2.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-Qgdppb4a.js → diagram-UQ7AKVKN-DfwfUuSw.js} +1 -1
- package/dist/{diagram-VX7I27RA-BsDCvily.js → diagram-VX7I27RA-C9_e-oMc.js} +1 -1
- package/dist/{diagram-Z3DM3KII-igTkGjKI.js → diagram-Z3DM3KII-CWLa5tuY.js} +1 -1
- package/dist/{dropdown-menu-BWnnAstC.js → dropdown-menu-B6ftyzOg.js} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-BHuZGjIr.js → ebnfDiagram-PWID7BFC-B1QRM58v.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-DKObXTVE.js → erDiagram-RLTQ6QDP-DJK_FqvW.js} +1 -1
- package/dist/{error-entries-BpUJSLUZ.js → error-entries-DgK3wUJR.js} +5640 -5591
- package/dist/{feedback-button-CMVkEos_.js → feedback-button-8a6SETmT.js} +24 -24
- package/dist/{flowDiagram-HODETNUW-DZI_kit0.js → flowDiagram-HODETNUW-Uxc25XSJ.js} +2 -2
- package/dist/{formats-CwJHWasD.js → formats-DQCyPd5Z.js} +1 -1
- package/dist/{glide-data-editor-BA2pcHSV.js → glide-data-editor-B70oke_v.js} +5 -5
- package/dist/{globals-B5jjJ0ms.js → globals-Cxd5hNlI.js} +2 -2
- package/dist/{html-to-image-CQr2-IDA.js → html-to-image-D4yG5Ru0.js} +25 -25
- package/dist/{infoDiagram-27XIBGKW-DdPl-7-n.js → infoDiagram-27XIBGKW-DmjxqwL0.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-DbyW6l59.js → ishikawaDiagram-5VMMS53U-NgCLHqQi.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-BMX9SyBS.js → kanban-definition-UXKFOSKX-CZaG-iam.js} +1 -1
- package/dist/main.js +187 -188
- package/dist/{mermaid-C8W8mTbA.js → mermaid-CSvw7c71.js} +34 -34
- package/dist/{mindmap-definition-YA3MSWOX-Zd_tAxWL.js → mindmap-definition-YA3MSWOX-DJYQBDH_.js} +1 -1
- package/dist/{number-overlay-editor-BIWiV-TU.js → number-overlay-editor-ChK-SKUk.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DjYydPdo.js → pegDiagram-XKGWAZYB-CHKO_dAe.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-R5LKjO2n.js → pieDiagram-E7YTZNPT-DVevbMAo.js} +1 -1
- package/dist/{process-output-Uw-VJE5V.js → process-output-DxvBAeL3.js} +3 -3
- package/dist/{railroadDiagram-O6MQD6OU-C7uNKtfm.js → railroadDiagram-O6MQD6OU-Detj1kcB.js} +2 -2
- package/dist/{requirementDiagram-BXWQKSXE-CxAIzQfl.js → requirementDiagram-BXWQKSXE-BLFD0T_Z.js} +1 -1
- package/dist/{reveal-component-XiecZ3Ua.js → reveal-component-CXMXeDZD.js} +6 -6
- package/dist/{sequenceDiagram-WJ2MYXX4-B5tmlPd5.js → sequenceDiagram-WJ2MYXX4-BZBgatQV.js} +1 -1
- package/dist/{spec-45FnujvG.js → spec-Mnkn3XEr.js} +1 -1
- package/dist/{stateDiagram-D77RDMKH-C1hc5H7Y.js → stateDiagram-D77RDMKH-4BZW9-6_.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-DRWeqQTn.js → stateDiagram-v2-MP3YSRHH-C4sKC8Iq.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-NTLas--s.js → swimlanes-42K2YHIH-SL5yeGe2.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-ChPggljD.js → swimlanesDiagram-VR7AAH4N-DqPmAYUv.js} +2 -2
- package/dist/{timeline-definition-24CTP7MA-B4CZ9srJ.js → timeline-definition-24CTP7MA-BfXUMWkq.js} +1 -1
- package/dist/{toDate-rySyYxqk.js → toDate-TMubKIVL.js} +22 -22
- package/dist/{useAsyncData-B7MiltyV.js → useAsyncData-DjMGFzFy.js} +1 -1
- package/dist/{useDeepCompareMemoize-DZmHBD_1.js → useDeepCompareMemoize-BQR5TJot.js} +1 -1
- package/dist/{useLifecycle-DRbRhzxg.js → useLifecycle-C_GvKWbQ.js} +26 -23
- package/dist/{useTheme-TLkqJsvo.js → useTheme-Bns2gJZ6.js} +179 -178
- package/dist/{vega-component-DC6P127L.js → vega-component-BsVptuhz.js} +5 -5
- package/dist/{vennDiagram-4TSXK5OY-DJIvMt44.js → vennDiagram-4TSXK5OY-CH65znGa.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-45H0zg0u.js → wardleyDiagram-VM6X3IG4-z9pWKb2_.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-ZT-XzcPN.js → xychartDiagram-S5SC5T6Z-MxyaWjjq.js} +1 -1
- package/package.json +1 -1
- package/src/__mocks__/requests.ts +0 -1
- package/src/components/editor/cell/StagedAICell.tsx +10 -2
- package/src/components/editor/cell/code/cell-editor.tsx +7 -14
- package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +92 -0
- package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
- package/src/core/ai/__tests__/staged-cells.test.ts +8 -5
- package/src/core/ai/staged-cells.ts +7 -2
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +3 -15
- package/src/core/ai/tools/edit-notebook-tool.ts +14 -3
- package/src/core/cells/__tests__/cells.test.ts +0 -297
- package/src/core/cells/__tests__/document.test.ts +410 -0
- package/src/core/cells/__tests__/flush-document.test.ts +40 -0
- package/src/core/cells/__tests__/notebook-outline.test.ts +1 -6
- package/src/core/cells/__tests__/with-document-save.test.ts +67 -0
- package/src/core/cells/cells.ts +27 -158
- package/src/core/cells/columns.ts +38 -0
- package/src/core/cells/document.ts +360 -0
- package/src/core/cells/types.ts +12 -0
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +27 -1
- package/src/core/codemirror/cells/extensions.ts +14 -0
- package/src/core/codemirror/format.ts +6 -5
- package/src/core/codemirror/language/__tests__/utils.test.ts +187 -15
- package/src/core/codemirror/language/cell-code.ts +114 -0
- package/src/core/codemirror/language/extension.ts +47 -30
- package/src/core/codemirror/language/languages/sql/sql.ts +7 -17
- package/src/core/codemirror/language/utils.ts +9 -39
- package/src/core/codemirror/lsp/notebook-lsp.ts +6 -5
- package/src/core/codemirror/rtc/extension.ts +0 -1
- package/src/core/edit-app.tsx +4 -3
- package/src/core/export/layout.ts +2 -2
- package/src/core/islands/bridge.ts +0 -1
- package/src/core/network/requests-lazy.ts +0 -1
- package/src/core/network/requests-network.ts +0 -9
- package/src/core/network/requests-static.ts +0 -1
- package/src/core/network/requests-toasting.tsx +0 -1
- package/src/core/network/types.ts +0 -5
- package/src/core/notebook/document/__tests__/codemirror.test.ts +76 -14
- package/src/core/notebook/document/__tests__/hold.test.ts +88 -0
- package/src/core/notebook/document/__tests__/hooks.test.tsx +3 -3
- package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +3 -3
- package/src/core/notebook/document/__tests__/model.test.ts +71 -15
- package/src/core/notebook/document/__tests__/scenario-fixture.ts +1 -1
- package/src/core/notebook/document/codemirror.ts +27 -122
- package/src/core/notebook/document/hooks.tsx +2 -2
- package/src/core/notebook/document/index.ts +9 -1
- package/src/core/notebook/document/model.ts +74 -24
- package/src/core/notebook/document/sync.ts +53 -4
- package/src/core/run-app.tsx +44 -41
- package/src/core/saving/save-component.tsx +2 -5
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +63 -3
- package/src/core/session/active-notebook.ts +4 -0
- package/src/core/session/useNotebookSession.tsx +39 -19
- package/src/core/wasm/__tests__/bridge.test.ts +3 -3
- package/src/core/wasm/bridge.ts +5 -12
- package/src/core/wasm/worker/worker.ts +0 -9
- package/src/utils/__tests__/{createReducer.test.ts → createReducer.test.tsx} +28 -0
- package/src/utils/createReducer.ts +42 -21
- package/src/core/cells/__tests__/apply-transaction.test.ts +0 -991
- package/src/core/cells/__tests__/document-changes.test.ts +0 -1140
- package/src/core/cells/__tests__/document-roundtrip.test.ts +0 -392
- package/src/core/cells/document-changes.ts +0 -944
|
@@ -3,17 +3,17 @@ import { g as a, h as o, t as s } from "./button-BQRdqQi1.js";
|
|
|
3
3
|
import { t as c } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as l } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { m as u, t as d } from "./tooltip-CJ4Rqasp.js";
|
|
6
|
-
import { D as f, t as p } from "./spec-
|
|
7
|
-
import { a as m, c as h, i as g, o as _, r as v, s as y, t as b } from "./useLifecycle-
|
|
6
|
+
import { D as f, t as p } from "./spec-Mnkn3XEr.js";
|
|
7
|
+
import { a as m, c as h, i as g, o as _, r as v, s as y, t as b } from "./useLifecycle-C_GvKWbQ.js";
|
|
8
8
|
import { a as x, t as S } from "./useDateFormatter-eCL_SdeG.js";
|
|
9
9
|
import { a as C, b as w, c as T, i as E, n as D, o as O, r as ee, s as te, t as ne } from "./select-CkF_GBxO.js";
|
|
10
10
|
import { t as k } from "./jsx-runtime-3BD1kT0s.js";
|
|
11
11
|
import { n as re } from "./error-banner-D40pmfQQ.js";
|
|
12
12
|
import { n as ie, t as ae } from "./label-D9_-zSg-.js";
|
|
13
|
-
import {
|
|
13
|
+
import { D as oe, O as se, S as ce, n as le, w as ue } from "./useTheme-Bns2gJZ6.js";
|
|
14
14
|
import { t as de } from "./invariant-DLmrl-hA.js";
|
|
15
15
|
import { t as fe } from "./objects-DCmMvZtn.js";
|
|
16
|
-
import { t as pe } from "./useAsyncData-
|
|
16
|
+
import { t as pe } from "./useAsyncData-DjMGFzFy.js";
|
|
17
17
|
import { D as me } from "./vega-loader.browser-B9Pz0EGP.js";
|
|
18
18
|
import { n as he, r as ge } from "./react-vega-C4T9Rb_w.js";
|
|
19
19
|
import { a as _e, n as ve } from "./loader-DOVB0Syl.js";
|
|
@@ -5906,7 +5906,7 @@ var { valueAtom: gu, useActions: _u } = g(hu, {
|
|
|
5906
5906
|
function vu() {
|
|
5907
5907
|
return _u();
|
|
5908
5908
|
}
|
|
5909
|
-
var yu =
|
|
5909
|
+
var yu = oe((e) => {
|
|
5910
5910
|
let t = e(gu);
|
|
5911
5911
|
if (!t.schema) return {};
|
|
5912
5912
|
let n = pu({
|
|
@@ -5930,7 +5930,7 @@ var yu = ce((e) => {
|
|
|
5930
5930
|
"size",
|
|
5931
5931
|
"shape"
|
|
5932
5932
|
], Su = (e) => {
|
|
5933
|
-
let t = (0, xe.c)(26), { schema: n, mark: r } = e, i =
|
|
5933
|
+
let t = (0, xe.c)(26), { schema: n, mark: r } = e, i = ue(gu), a = vu(), o = i.encoding.x && i.encoding.y, s;
|
|
5934
5934
|
t[0] !== a || t[1] !== o || t[2] !== n || t[3] !== i.encoding ? (s = (e) => /* @__PURE__ */ (0, $.jsx)(Cu, {
|
|
5935
5935
|
schema: n,
|
|
5936
5936
|
label: e,
|
|
@@ -6181,7 +6181,7 @@ var ku = (e) => {
|
|
|
6181
6181
|
return n && Object.keys(n).length > 0 && r.set(gu, n), t;
|
|
6182
6182
|
}, t[1] = e, t[2] = i), b(i);
|
|
6183
6183
|
let a;
|
|
6184
|
-
return t[3] === e ? a = t[4] : (a = /* @__PURE__ */ (0, $.jsx)(
|
|
6184
|
+
return t[3] === e ? a = t[4] : (a = /* @__PURE__ */ (0, $.jsx)(ce, {
|
|
6185
6185
|
store: r,
|
|
6186
6186
|
children: /* @__PURE__ */ (0, $.jsx)(ju, { ...e })
|
|
6187
6187
|
}), t[3] = e, t[4] = a), a;
|
|
@@ -6223,7 +6223,7 @@ var ju = (e) => {
|
|
|
6223
6223
|
}, t[0] = r, t[1] = n, t[2] = i) : i = t[2];
|
|
6224
6224
|
let a;
|
|
6225
6225
|
t[3] === n ? a = t[4] : (a = [n], t[3] = n, t[4] = a);
|
|
6226
|
-
let { data: c, isPending: l, error: u } = pe(i, a), { mark: f } =
|
|
6226
|
+
let { data: c, isPending: l, error: u } = pe(i, a), { mark: f } = ue(gu), m = ue(yu), { theme: h } = le();
|
|
6227
6227
|
if (u) {
|
|
6228
6228
|
let e;
|
|
6229
6229
|
return t[5] === u ? e = t[6] : (e = /* @__PURE__ */ (0, $.jsx)(re, { error: u }), t[5] = u, t[6] = e), e;
|
|
@@ -8,7 +8,7 @@ import { t as l } from "./react-dom-DUmH0GXv.js";
|
|
|
8
8
|
import { t as u } from "./jsx-runtime-3BD1kT0s.js";
|
|
9
9
|
import { Q as d, Y as f } from "./use-restore-focus-CmGwRNId.js";
|
|
10
10
|
import { a as p, i as m, o as h, r as g, s as _, t as v } from "./toast-Btbve3Lm.js";
|
|
11
|
-
import {
|
|
11
|
+
import { S as y, _ as b } from "./useTheme-Bns2gJZ6.js";
|
|
12
12
|
import { o as x, t as S } from "./dialog-DgeqyrEZ.js";
|
|
13
13
|
var C = c("plus", [["path", {
|
|
14
14
|
d: "M5 12h14",
|
|
@@ -135,7 +135,7 @@ function F(e) {
|
|
|
135
135
|
}
|
|
136
136
|
//#endregion
|
|
137
137
|
//#region src/components/editor/boundary/ErrorBoundary.tsx
|
|
138
|
-
var I = (0, T.lazy)(() => import("./feedback-button-
|
|
138
|
+
var I = (0, T.lazy)(() => import("./feedback-button-8a6SETmT.js").then((e) => ({ default: e.FeedbackModal }))), L = (e) => {
|
|
139
139
|
let t = (0, w.c)(2), n;
|
|
140
140
|
return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, j.jsx)(O, {
|
|
141
141
|
FallbackComponent: R,
|
|
@@ -161,8 +161,8 @@ var I = (0, T.lazy)(() => import("./feedback-button-CMVkEos_.js").then((e) => ({
|
|
|
161
161
|
})
|
|
162
162
|
}), t[3] = l) : l = t[3];
|
|
163
163
|
let u;
|
|
164
|
-
t[4] === r ? u = t[5] : (u = r && /* @__PURE__ */ (0, j.jsx)(
|
|
165
|
-
store:
|
|
164
|
+
t[4] === r ? u = t[5] : (u = r && /* @__PURE__ */ (0, j.jsx)(y, {
|
|
165
|
+
store: b,
|
|
166
166
|
children: /* @__PURE__ */ (0, j.jsxs)(s, { children: [/* @__PURE__ */ (0, j.jsx)(T.Suspense, {
|
|
167
167
|
fallback: null,
|
|
168
168
|
children: /* @__PURE__ */ (0, j.jsx)(I, {})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as e } from "./src-CA_m4ONl.js";
|
|
2
2
|
import { n as t } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
3
3
|
import "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
4
|
-
import "./mermaid-
|
|
4
|
+
import "./mermaid-CSvw7c71.js";
|
|
5
5
|
import { m as n, t as r } from "./mermaid-parser.core-DxuSfYwJ.js";
|
|
6
|
-
import { n as i, r as a, t as o } from "./chunk-SVP7TREG-
|
|
6
|
+
import { n as i, r as a, t as o } from "./chunk-SVP7TREG-D2eV4vBJ.js";
|
|
7
7
|
import { t as s } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/abnfDiagram-VCTEODGH.mjs
|
|
9
9
|
var c = n().RailroadAbnf.parser.LangiumParser, l = /* @__PURE__ */ t((e) => {
|
package/dist/{architectureDiagram-5GKGNRK7-ByKIl9GG.js → architectureDiagram-5GKGNRK7-D6CjRib5.js}
RENAMED
|
@@ -5,7 +5,7 @@ import { n as o } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
|
5
5
|
import { H as s, J as c, K as l, U as u, a as d, b as f, f as p, v as m, w as h, x as g, y as _, z as v } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
6
6
|
import { i as y, r as b, t as x } from "./chunk-PWAF6VOD-CQw5qATZ.js";
|
|
7
7
|
import { n as S } from "./chunk-GMAD6QVW-BhaJx0X3.js";
|
|
8
|
-
import { p as C } from "./mermaid-
|
|
8
|
+
import { p as C } from "./mermaid-CSvw7c71.js";
|
|
9
9
|
import { n as w } from "./mermaid-parser.core-DxuSfYwJ.js";
|
|
10
10
|
import { t as T } from "./chunk-JWPE2WC7-DJvv1t8U.js";
|
|
11
11
|
import { t as E } from "./cytoscape.esm-jJhXJpLB.js";
|
|
@@ -3,25 +3,25 @@ import { c as n, g as r, h as i, t as a } from "./button-BQRdqQi1.js";
|
|
|
3
3
|
import { t as o } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { i as c, t as l } from "./copy-icon-C1trdvVt.js";
|
|
6
|
-
import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as te, z as ne } from "./html-to-image-
|
|
6
|
+
import { F as u, H as d, U as f, V as p, X as m, Y as h, Z as g, _, a as v, c as y, d as b, f as x, g as S, h as C, l as w, m as T, n as E, p as D, r as O, t as k, v as A, x as ee, y as te, z as ne } from "./html-to-image-D4yG5Ru0.js";
|
|
7
7
|
import { m as j, t as re } from "./tooltip-CJ4Rqasp.js";
|
|
8
|
-
import { Ct as ie,
|
|
8
|
+
import { Ct as ie, Ft as ae, Ot as oe, Q as se, Tt as ce, Wt as le, at as ue, dn as de, gn as fe, gt as pe, h as me, i as he, lt as ge, nn as _e, nt as ve, pn as ye, r as be, t as xe, un as Se, ut as Ce, w as we, wt as Te, z as Ee, zt as De } from "./error-entries-DgK3wUJR.js";
|
|
9
9
|
import { A as Oe, C as ke, M as Ae, b as je } from "./select-CkF_GBxO.js";
|
|
10
|
-
import { _ as Me, f as Ne, h as Pe, i as Fe, n as Ie, t as Le } from "./dropdown-menu-
|
|
11
|
-
import { C as Re, d as ze } from "./toDate-
|
|
12
|
-
import { d as Be, f as Ve, i as He, n as Ue, t as We, u as Ge } from "./process-output-
|
|
10
|
+
import { _ as Me, f as Ne, h as Pe, i as Fe, n as Ie, t as Le } from "./dropdown-menu-B6ftyzOg.js";
|
|
11
|
+
import { C as Re, d as ze } from "./toDate-TMubKIVL.js";
|
|
12
|
+
import { d as Be, f as Ve, i as He, n as Ue, t as We, u as Ge } from "./process-output-DxvBAeL3.js";
|
|
13
13
|
import { t as Ke } from "./jsx-runtime-3BD1kT0s.js";
|
|
14
14
|
import { A as qe, C as Je, D as Ye, E as Xe, F as Ze, L as Qe, M as $e, O as et, P as tt, R as nt, S as rt, T as it, V as at, b as ot, j as st, v as ct, w as lt, x as ut, y as dt, z as ft } from "./use-restore-focus-CmGwRNId.js";
|
|
15
15
|
import { n as pt } from "./error-banner-D40pmfQQ.js";
|
|
16
16
|
import { t as mt } from "./label-D9_-zSg-.js";
|
|
17
17
|
import { t as ht } from "./isEmpty-BSZ1LaUo.js";
|
|
18
|
-
import { A as gt,
|
|
18
|
+
import { A as gt, E as _t, n as vt } from "./useTheme-Bns2gJZ6.js";
|
|
19
19
|
import { $ as yt, Mt as bt, Pt as xt, Rt as St, Vt as Ct, Z as wt, ht as Tt, jt as Et, mt as Dt, nt as Ot, tt as kt, zt as At } from "./dist-DoE4XJBC.js";
|
|
20
20
|
import { t as jt } from "./objects-DCmMvZtn.js";
|
|
21
21
|
import { n as Mt, o as Nt, r as Pt } from "./dist-CkTTIdBe.js";
|
|
22
22
|
import { n as Ft } from "./dist-CrSP_H1M.js";
|
|
23
23
|
import { n as It, t as Lt } from "./esm-AMFssoNp.js";
|
|
24
|
-
import { t as Rt } from "./useAsyncData-
|
|
24
|
+
import { t as Rt } from "./useAsyncData-DjMGFzFy.js";
|
|
25
25
|
var zt = j("ban", [["circle", {
|
|
26
26
|
cx: "12",
|
|
27
27
|
cy: "12",
|
|
@@ -3575,7 +3575,7 @@ var oo = class extends T {
|
|
|
3575
3575
|
super(), this.store = e;
|
|
3576
3576
|
}
|
|
3577
3577
|
getItems() {
|
|
3578
|
-
let e = this.store.get(
|
|
3578
|
+
let e = this.store.get(me), t = [];
|
|
3579
3579
|
for (let n of e.cellIds.inOrderIds) {
|
|
3580
3580
|
let r = lo(n, e), i = r.cellOutput;
|
|
3581
3581
|
if (!i) continue;
|
|
@@ -3653,7 +3653,7 @@ async function so(e, t, n) {
|
|
|
3653
3653
|
let i = e.filter((e) => e.shouldDownloadImage && e.outputType === "media");
|
|
3654
3654
|
if (i.length === 0) return [];
|
|
3655
3655
|
let a = i.flatMap((e) => {
|
|
3656
|
-
let i = document.getElementById(
|
|
3656
|
+
let i = document.getElementById(le.create(t));
|
|
3657
3657
|
return i ? {
|
|
3658
3658
|
cellId: t,
|
|
3659
3659
|
cellName: n,
|
|
@@ -3684,7 +3684,7 @@ function co(e) {
|
|
|
3684
3684
|
};
|
|
3685
3685
|
}
|
|
3686
3686
|
function lo(e, t, n) {
|
|
3687
|
-
let { includeConsoleOutput: r = !1 } = n || {}, i = t.cellRuntime[e], a = t.cellData[e], o = t.cellIds.inOrderIds.indexOf(e), s =
|
|
3687
|
+
let { includeConsoleOutput: r = !1 } = n || {}, i = t.cellRuntime[e], a = t.cellData[e], o = t.cellIds.inOrderIds.indexOf(e), s = Ee(a.name, o), c;
|
|
3688
3688
|
r && (c = i.consoleOutputs.map((e) => co(e)).filter((e) => e !== null));
|
|
3689
3689
|
let l, u = i.output;
|
|
3690
3690
|
return u && !v(u) && (l = co(u) ?? void 0), {
|
|
@@ -3699,7 +3699,7 @@ function lo(e, t, n) {
|
|
|
3699
3699
|
//#region src/core/ai/context/providers/error.ts
|
|
3700
3700
|
function uo(e, t) {
|
|
3701
3701
|
let n = [`Code:\n${e.cellCode}`];
|
|
3702
|
-
if (e.tracebackHtml && n.push(`Traceback:\n${
|
|
3702
|
+
if (e.tracebackHtml && n.push(`Traceback:\n${we(e.tracebackHtml)}`), e.errorData.length > 0 && n.push(e.errorData.map((e) => be(e)).join("\n\n")), e.errorData.some((e) => e.type === "sql-error")) {
|
|
3703
3703
|
let r = w(e.cellId, t);
|
|
3704
3704
|
r && n.push(`Database schema:\n${r}`);
|
|
3705
3705
|
}
|
|
@@ -3716,12 +3716,12 @@ function fo(e, t) {
|
|
|
3716
3716
|
});
|
|
3717
3717
|
}
|
|
3718
3718
|
function po(e) {
|
|
3719
|
-
return e.errorData.length === 1 ?
|
|
3719
|
+
return e.errorData.length === 1 ? xe(e.errorData[0]) : e.errorData.length > 1 ? `${e.errorData.length} errors` : e.tracebackHtml ? we(e.tracebackHtml).trim().split("\n").find((e) => e.trim())?.trim() || "traceback" : "error";
|
|
3720
3720
|
}
|
|
3721
3721
|
function mo(e) {
|
|
3722
3722
|
return `Error: ${e.cellName || `Cell ${e.cellId}`}`;
|
|
3723
3723
|
}
|
|
3724
|
-
var ho = new
|
|
3724
|
+
var ho = new pe("error", "errors"), go = class extends T {
|
|
3725
3725
|
title = "Errors";
|
|
3726
3726
|
mentionPrefix = "@";
|
|
3727
3727
|
contextType = "error";
|
|
@@ -3730,7 +3730,7 @@ var ho = new _e("error", "errors"), go = class extends T {
|
|
|
3730
3730
|
super(), this.store = e;
|
|
3731
3731
|
}
|
|
3732
3732
|
getItems() {
|
|
3733
|
-
let e =
|
|
3733
|
+
let e = he(this.store);
|
|
3734
3734
|
if (e.length === 0) return [];
|
|
3735
3735
|
let t = [{
|
|
3736
3736
|
uri: this.asURI("all"),
|
|
@@ -3795,7 +3795,7 @@ var ho = new _e("error", "errors"), go = class extends T {
|
|
|
3795
3795
|
formatContext(e) {
|
|
3796
3796
|
return (e.data.type === "all-errors" ? e.data.errors : [e.data.error]).map((e) => fo(e, this.store)).join("\n\n");
|
|
3797
3797
|
}
|
|
3798
|
-
}, _o =
|
|
3798
|
+
}, _o = ae(), vo = {
|
|
3799
3799
|
maxDepth: 3,
|
|
3800
3800
|
maxResults: 20,
|
|
3801
3801
|
defaultResultsLimit: 5,
|
|
@@ -3996,10 +3996,10 @@ var ho = new _e("error", "errors"), go = class extends T {
|
|
|
3996
3996
|
displayLabel: t,
|
|
3997
3997
|
detail: n.source === "memory" ? "in-memory" : n.source,
|
|
3998
3998
|
boost: n.source_type === "local" ? b.LOCAL_TABLE : b.REMOTE_TABLE,
|
|
3999
|
-
type:
|
|
3999
|
+
type: ce(n),
|
|
4000
4000
|
apply: `@${t}`,
|
|
4001
4001
|
section: {
|
|
4002
|
-
name:
|
|
4002
|
+
name: ce(n) === "dataframe" ? "Dataframe" : "Table",
|
|
4003
4003
|
rank: x.TABLE.rank
|
|
4004
4004
|
},
|
|
4005
4005
|
info: () => this.createTableInfoElement(t, n)
|
|
@@ -4086,7 +4086,7 @@ var ho = new _e("error", "errors"), go = class extends T {
|
|
|
4086
4086
|
detail: n.dataType ?? "",
|
|
4087
4087
|
type: this.contextType,
|
|
4088
4088
|
section: x.VARIABLE,
|
|
4089
|
-
info: () =>
|
|
4089
|
+
info: () => se(n)
|
|
4090
4090
|
};
|
|
4091
4091
|
}
|
|
4092
4092
|
formatContext(e) {
|
|
@@ -4104,11 +4104,11 @@ var ho = new _e("error", "errors"), go = class extends T {
|
|
|
4104
4104
|
//#endregion
|
|
4105
4105
|
//#region src/core/ai/context/context.ts
|
|
4106
4106
|
function So(e) {
|
|
4107
|
-
let t = e.get(
|
|
4107
|
+
let t = e.get(Te), n = e.get(ie), r = e.get(Ce);
|
|
4108
4108
|
return new C().register(new bo(n)).register(new xo(r, n)).register(new go(e)).register(new oo(e)).register(new y(t.connectionsMap, n));
|
|
4109
4109
|
}
|
|
4110
4110
|
function Co() {
|
|
4111
|
-
return new yo(
|
|
4111
|
+
return new yo(oe());
|
|
4112
4112
|
}
|
|
4113
4113
|
//#endregion
|
|
4114
4114
|
//#region src/components/editor/ai/completion-utils.ts
|
|
@@ -4342,7 +4342,7 @@ var jo = (e) => {
|
|
|
4342
4342
|
let m;
|
|
4343
4343
|
t[5] === Symbol.for("react.memo_cache_sentinel") ? (m = () => l(Po), t[5] = m) : m = t[5];
|
|
4344
4344
|
let h;
|
|
4345
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, q.jsx)(
|
|
4345
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, q.jsx)(fe, { className: "h-3.5 w-3.5 shrink-0" }), t[6] = h) : h = t[6];
|
|
4346
4346
|
let g;
|
|
4347
4347
|
t[7] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, q.jsx)("span", {
|
|
4348
4348
|
className: "font-semibold",
|
|
@@ -4439,7 +4439,7 @@ var Io = et({
|
|
|
4439
4439
|
let m;
|
|
4440
4440
|
t[10] === c ? m = t[11] : (m = c && /* @__PURE__ */ (0, q.jsxs)("div", {
|
|
4441
4441
|
className: "flex items-start gap-2",
|
|
4442
|
-
children: [/* @__PURE__ */ (0, q.jsx)(
|
|
4442
|
+
children: [/* @__PURE__ */ (0, q.jsx)(Se, { className: "h-3 w-3 text-(--blue-11) mt-0.5 shrink-0" }), /* @__PURE__ */ (0, q.jsx)("div", {
|
|
4443
4443
|
className: "text-xs text-foreground",
|
|
4444
4444
|
children: c
|
|
4445
4445
|
})]
|
|
@@ -4723,12 +4723,12 @@ var Wo = (e) => {
|
|
|
4723
4723
|
isActive: i
|
|
4724
4724
|
}, s);
|
|
4725
4725
|
case "source-document": return /* @__PURE__ */ (0, q.jsx)(Oo, {
|
|
4726
|
-
icon: /* @__PURE__ */ (0, q.jsx)(
|
|
4726
|
+
icon: /* @__PURE__ */ (0, q.jsx)(de, { className: "h-3 w-3 shrink-0" }),
|
|
4727
4727
|
title: o.title,
|
|
4728
4728
|
subtitle: o.filename
|
|
4729
4729
|
}, s);
|
|
4730
4730
|
case "source-url": return /* @__PURE__ */ (0, q.jsx)(Oo, {
|
|
4731
|
-
icon: /* @__PURE__ */ (0, q.jsx)(
|
|
4731
|
+
icon: /* @__PURE__ */ (0, q.jsx)(ye, { className: "h-3 w-3 shrink-0" }),
|
|
4732
4732
|
title: o.title ?? o.url,
|
|
4733
4733
|
subtitle: o.title ? o.url : void 0,
|
|
4734
4734
|
href: o.url
|
|
@@ -5303,8 +5303,8 @@ function Is(e) {
|
|
|
5303
5303
|
let t = document.createElement("div");
|
|
5304
5304
|
return t.textContent = e, { dom: t };
|
|
5305
5305
|
}
|
|
5306
|
-
|
|
5307
|
-
var Ls = "marimo:ai-prompt-history", Rs = new
|
|
5306
|
+
_e("marimo:ai-language", "python", ge);
|
|
5307
|
+
var Ls = "marimo:ai-prompt-history", Rs = new De(rt(Ze()), () => []), zs = (e) => {
|
|
5308
5308
|
let t = (0, M.c)(35), { value: n, placeholder: r, inputRef: a, className: o, onChange: s, onSubmit: c, onKeyDown: l, onClose: u, onAddFiles: d, additionalCompletions: f, maxHeight: p } = e, m = c, h = u, g = _t(), { theme: _ } = vt(), v;
|
|
5309
5309
|
t[0] === f ? v = t[1] : (v = (e) => f ? wo([f.triggerCompletionRegex], f.completions)(e) : null, t[0] = f, t[1] = v);
|
|
5310
5310
|
let y = gt(v), b, x, S, C;
|
|
@@ -5431,7 +5431,7 @@ var Gs = (e) => {
|
|
|
5431
5431
|
let t = i.messages.map((e) => ({
|
|
5432
5432
|
...e,
|
|
5433
5433
|
content: e.parts?.map((e) => "text" in e ? e.text : "").join("\n")
|
|
5434
|
-
})), n =
|
|
5434
|
+
})), n = ue();
|
|
5435
5435
|
T();
|
|
5436
5436
|
let s = new ReadableStream({
|
|
5437
5437
|
start(t) {
|
|
@@ -5510,21 +5510,21 @@ var Gs = (e) => {
|
|
|
5510
5510
|
let r = k.filter((e) => e.id !== t);
|
|
5511
5511
|
e.delete_chat_message({ index: n }), ee(r), e.setValue(r), r.length === 0 && T();
|
|
5512
5512
|
}
|
|
5513
|
-
}, le = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === !0,
|
|
5513
|
+
}, le = Array.isArray(e.allowAttachments) && e.allowAttachments.length > 0 || e.allowAttachments === !0, de = {
|
|
5514
5514
|
triggerCompletionRegex: /^\/(\w+)?/,
|
|
5515
5515
|
completions: e.prompts.map((e) => ({
|
|
5516
5516
|
label: `/${e}`,
|
|
5517
5517
|
displayLabel: e,
|
|
5518
5518
|
apply: e
|
|
5519
5519
|
}))
|
|
5520
|
-
},
|
|
5520
|
+
}, fe = e.prompts.length > 0 ? "Type your message here, / for prompts" : "Type your message here...";
|
|
5521
5521
|
(0, K.useEffect)(() => {
|
|
5522
5522
|
v.current?.scrollTo({
|
|
5523
5523
|
top: v.current.scrollHeight,
|
|
5524
5524
|
behavior: "smooth"
|
|
5525
5525
|
});
|
|
5526
5526
|
}, [k.length, v]);
|
|
5527
|
-
let
|
|
5527
|
+
let pe = () => {
|
|
5528
5528
|
let e = _.current?.view;
|
|
5529
5529
|
if (e) {
|
|
5530
5530
|
let t = e.state.doc.length;
|
|
@@ -5632,7 +5632,7 @@ var Gs = (e) => {
|
|
|
5632
5632
|
type: "text",
|
|
5633
5633
|
text: t
|
|
5634
5634
|
}, ...r ?? []]
|
|
5635
|
-
}),
|
|
5635
|
+
}), pe();
|
|
5636
5636
|
},
|
|
5637
5637
|
ref: g,
|
|
5638
5638
|
inert: e.disabled || void 0,
|
|
@@ -5647,13 +5647,13 @@ var Gs = (e) => {
|
|
|
5647
5647
|
onSelect: (e) => {
|
|
5648
5648
|
o(e), requestAnimationFrame(() => {
|
|
5649
5649
|
let e = _.current?.view;
|
|
5650
|
-
e?.focus(),
|
|
5650
|
+
e?.focus(), ve(e);
|
|
5651
5651
|
});
|
|
5652
5652
|
}
|
|
5653
5653
|
}),
|
|
5654
5654
|
/* @__PURE__ */ (0, q.jsx)(zs, {
|
|
5655
5655
|
className: "rounded-sm mr-2",
|
|
5656
|
-
placeholder:
|
|
5656
|
+
placeholder: fe,
|
|
5657
5657
|
value: t,
|
|
5658
5658
|
inputRef: _,
|
|
5659
5659
|
maxHeight: e.maxHeight ? `${e.maxHeight / 2}px` : void 0,
|
|
@@ -5662,7 +5662,7 @@ var Gs = (e) => {
|
|
|
5662
5662
|
t.trim() && g.current?.requestSubmit();
|
|
5663
5663
|
},
|
|
5664
5664
|
onClose: () => {},
|
|
5665
|
-
additionalCompletions:
|
|
5665
|
+
additionalCompletions: de
|
|
5666
5666
|
}),
|
|
5667
5667
|
f && f.length === 1 && /* @__PURE__ */ (0, q.jsx)("span", {
|
|
5668
5668
|
title: f[0].name,
|
|
@@ -3,7 +3,7 @@ import { g as t, s as n } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
3
3
|
import { n as r, t as i } from "./src-CA_m4ONl.js";
|
|
4
4
|
import { n as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
5
5
|
import { H as o, K as s, U as c, a as l, s as u, v as d, w as f, x as p, y as m } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
6
|
-
import { r as h } from "./mermaid-
|
|
6
|
+
import { r as h } from "./mermaid-CSvw7c71.js";
|
|
7
7
|
import { t as g } from "./chunk-F27PBJKO-ufseIn5y.js";
|
|
8
8
|
import { t as _ } from "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
9
9
|
import { t as v } from "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
@@ -5,7 +5,7 @@ import { n as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
|
5
5
|
import { G as o, H as s, K as c, U as l, a as u, d, k as f, rt as p, s as ee, v as m, w as h, x as g, y as _ } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
6
6
|
import { t as te } from "./channel-CPObtJXj.js";
|
|
7
7
|
import { i as ne } from "./chunk-4HAMMTFA-D4eFPyFh.js";
|
|
8
|
-
import { a as re, i as v, n as y, r as b } from "./mermaid-
|
|
8
|
+
import { a as re, i as v, n as y, r as b } from "./mermaid-CSvw7c71.js";
|
|
9
9
|
import { t as x } from "./chunk-5VM5RSS4-DKsmPCL6.js";
|
|
10
10
|
import { t as S } from "./chunk-F27PBJKO-ufseIn5y.js";
|
|
11
11
|
import { t as C } from "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as e } from "./src-CA_m4ONl.js";
|
|
2
2
|
import { n as t } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
3
3
|
import { D as n, a as r, b as i, c as a, x as o, z as s } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
4
|
-
import { p as c } from "./mermaid-
|
|
4
|
+
import { p as c } from "./mermaid-CSvw7c71.js";
|
|
5
5
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SVP7TREG.mjs
|
|
6
6
|
var l = "", u = "", d = "", f = [], p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ t((e) => s(e, o()), "sanitizeText"), h = /* @__PURE__ */ t((e) => {
|
|
7
7
|
switch (e.type) {
|
|
@@ -3,7 +3,7 @@ import { c as t, g as n } from "./chunk-75Z2AOVW-D7gxIs2Q.js";
|
|
|
3
3
|
import { n as r, t as i } from "./src-CA_m4ONl.js";
|
|
4
4
|
import { n as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
|
|
5
5
|
import { H as o, K as s, M as c, U as l, a as u, s as d, v as f, w as p, x as m, y as h, z as g } from "./chunk-DU6HZSFF-BwiyaNpg.js";
|
|
6
|
-
import { n as _, r as v } from "./mermaid-
|
|
6
|
+
import { n as _, r as v } from "./mermaid-CSvw7c71.js";
|
|
7
7
|
import { t as y } from "./chunk-5VM5RSS4-DKsmPCL6.js";
|
|
8
8
|
import { t as b } from "./chunk-F27PBJKO-ufseIn5y.js";
|
|
9
9
|
import { t as x } from "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
@@ -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-CSvw7c71.js";
|
|
13
13
|
import "./chunk-F27PBJKO-ufseIn5y.js";
|
|
14
14
|
import "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
15
15
|
import "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
16
|
-
import { i as t, n, r, t as i } from "./chunk-TICWLB2K-
|
|
16
|
+
import { i as t, n, r, t as i } from "./chunk-TICWLB2K-BDs4-_-r.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-ZZMXUADV.mjs
|
|
18
18
|
var a = {
|
|
19
19
|
parser: n,
|
|
@@ -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-CSvw7c71.js";
|
|
13
13
|
import "./chunk-F27PBJKO-ufseIn5y.js";
|
|
14
14
|
import "./chunk-XXDRQBXY-Dnl5VBqG.js";
|
|
15
15
|
import "./chunk-POPQ4Y6H-hYOXbYH_.js";
|
|
16
|
-
import { i as t, n, r, t as i } from "./chunk-TICWLB2K-
|
|
16
|
+
import { i as t, n, r, t as i } from "./chunk-TICWLB2K-BDs4-_-r.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-VYDZK3BY.mjs
|
|
18
18
|
var a = {
|
|
19
19
|
parser: n,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { g as e } from "./button-BQRdqQi1.js";
|
|
2
2
|
import { t } from "./compiler-runtime-CldRdSsv.js";
|
|
3
|
-
import {
|
|
3
|
+
import { J as n, q as r } from "./error-entries-DgK3wUJR.js";
|
|
4
4
|
import { C as i } from "./select-CkF_GBxO.js";
|
|
5
|
-
import { _ as a, c as o, x as s, y as c } from "./toDate-
|
|
6
|
-
import {
|
|
5
|
+
import { _ as a, c as o, x as s, y as c } from "./toDate-TMubKIVL.js";
|
|
6
|
+
import { D as l, a as u, w as d, x as f } from "./useTheme-Bns2gJZ6.js";
|
|
7
7
|
//#region src/core/islands/state.ts
|
|
8
|
-
var p = t(), m =
|
|
8
|
+
var p = t(), m = l(!1), h = l(/* @__PURE__ */ new Set()), g = l((e) => e(h)?.size === 0), _ = l(!1), v = l((e) => e(_) && e(m) === !1), y = l({
|
|
9
9
|
isInstantiated: !1,
|
|
10
10
|
error: null
|
|
11
|
-
}), b =
|
|
11
|
+
}), b = l(!1);
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/core/meta/state.ts
|
|
14
14
|
function x() {
|
|
@@ -18,11 +18,11 @@ function x() {
|
|
|
18
18
|
return e.warn("Failed to get version from mount config"), null;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
var S = x() || "0.25.3-
|
|
22
|
-
|
|
21
|
+
var S = x() || "0.25.3-dev170", C = l(S), w = l(!0);
|
|
22
|
+
l(null);
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/core/wasm/state.ts
|
|
25
|
-
var T =
|
|
25
|
+
var T = l({
|
|
26
26
|
kind: "loading",
|
|
27
27
|
message: "Initializing..."
|
|
28
28
|
}), E = {
|
|
@@ -34,7 +34,7 @@ var T = u({
|
|
|
34
34
|
kind: "wasm",
|
|
35
35
|
label: "Pyodide",
|
|
36
36
|
capabilities: E,
|
|
37
|
-
state:
|
|
37
|
+
state: l((e) => {
|
|
38
38
|
let t = e(T);
|
|
39
39
|
switch (t.kind) {
|
|
40
40
|
case "loading": return {
|
|
@@ -60,23 +60,23 @@ var T = u({
|
|
|
60
60
|
canRestart: !0,
|
|
61
61
|
supportsLsp: !0
|
|
62
62
|
},
|
|
63
|
-
state:
|
|
64
|
-
let t = e(
|
|
63
|
+
state: l((e) => {
|
|
64
|
+
let t = e(r);
|
|
65
65
|
switch (t.state) {
|
|
66
|
-
case
|
|
67
|
-
case
|
|
66
|
+
case n.OPEN: return { kind: "ready" };
|
|
67
|
+
case n.CONNECTING: return {
|
|
68
68
|
kind: "connecting",
|
|
69
69
|
progress: { label: "Connecting…" }
|
|
70
70
|
};
|
|
71
|
-
case
|
|
71
|
+
case n.NOT_STARTED: return {
|
|
72
72
|
kind: "connecting",
|
|
73
73
|
progress: { label: "Not connected" }
|
|
74
74
|
};
|
|
75
|
-
case
|
|
76
|
-
case
|
|
75
|
+
case n.CLOSING:
|
|
76
|
+
case n.CLOSED: return {
|
|
77
77
|
kind: "failed",
|
|
78
78
|
error: {
|
|
79
|
-
message: t.state ===
|
|
79
|
+
message: t.state === n.CLOSED ? t.reason : "Disconnecting",
|
|
80
80
|
errorKind: "runtime"
|
|
81
81
|
}
|
|
82
82
|
};
|
|
@@ -86,12 +86,12 @@ var T = u({
|
|
|
86
86
|
kind: "static",
|
|
87
87
|
label: "Static",
|
|
88
88
|
capabilities: E,
|
|
89
|
-
state:
|
|
89
|
+
state: l({ kind: "ready" })
|
|
90
90
|
}, A = {
|
|
91
91
|
kind: "islands",
|
|
92
92
|
label: "Islands",
|
|
93
93
|
capabilities: E,
|
|
94
|
-
state:
|
|
94
|
+
state: l((e) => {
|
|
95
95
|
let t = e(m);
|
|
96
96
|
return t === !0 ? { kind: "ready" } : typeof t == "string" ? {
|
|
97
97
|
kind: "failed",
|
|
@@ -108,15 +108,15 @@ var T = u({
|
|
|
108
108
|
function j() {
|
|
109
109
|
return o() ? k : f() ? A : s() ? D : O;
|
|
110
110
|
}
|
|
111
|
-
var M =
|
|
112
|
-
|
|
111
|
+
var M = l(j());
|
|
112
|
+
l((e) => {
|
|
113
113
|
let t = e(M);
|
|
114
114
|
return e(t.state).kind !== "ready" || t.kind === "static" ? !1 : t.kind !== "remote" || e(y).isInstantiated;
|
|
115
115
|
});
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region src/core/meta/code-visibility.ts
|
|
118
118
|
function N(e) {
|
|
119
|
-
let t = (0, p.c)(2), n =
|
|
119
|
+
let t = (0, p.c)(2), n = d(a), { mode: r } = d(c), o = d(w), s = d(M).kind;
|
|
120
120
|
if (n && s === "remote") return !0;
|
|
121
121
|
switch (r) {
|
|
122
122
|
case "edit":
|
|
@@ -124,7 +124,7 @@ function N(e) {
|
|
|
124
124
|
case "home":
|
|
125
125
|
case "gallery": return !1;
|
|
126
126
|
case "read": {
|
|
127
|
-
if (!o || new URLSearchParams(window.location.search).get(
|
|
127
|
+
if (!o || new URLSearchParams(window.location.search).get(u.includeCode) === "false") return !1;
|
|
128
128
|
let n;
|
|
129
129
|
return t[0] === e ? n = t[1] : (n = e.some(P), t[0] = e, t[1] = n), n;
|
|
130
130
|
}
|