@marimo-team/islands 0.26.1-dev108 → 0.26.1-dev112
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/{ErrorBoundary-BW4TciqU.js → ErrorBoundary-pNKOBKXw.js} +1 -1
- package/dist/{chat-ui-Be9X-W22.js → chat-ui-C9NZA-bk.js} +3 -3
- package/dist/{code-visibility-BKmktPMd.js → code-visibility-B9s3Hl8z.js} +2 -2
- package/dist/{common-CSJAjJGa.js → common-Bn3jx0X6.js} +6 -4
- package/dist/{data-grid-overlay-editor-DTibdR4H.js → data-grid-overlay-editor-mxwwRaQy.js} +1 -1
- package/dist/{error-entries-23Z_1oDM.js → error-entries-1DC4BiYB.js} +166 -155
- package/dist/{feedback-button-CPu5SV3b.js → feedback-button-BrzbnRTT.js} +3 -3
- package/dist/{glide-data-editor-CC9_NDNi.js → glide-data-editor-Cnsv3NcI.js} +3 -3
- package/dist/{globals-BFlYTNoR.js → globals-BGqfFPx8.js} +1 -1
- package/dist/{html-to-image-Cw7o1IbE.js → html-to-image-CsvAOgd3.js} +1 -1
- package/dist/main.js +10 -10
- package/dist/{number-overlay-editor-qDcRKPE0.js → number-overlay-editor-DuSCOMTK.js} +1 -1
- package/dist/{process-output-DdBM0lmd.js → process-output-CtfJ_Gbp.js} +2 -2
- package/dist/{reveal-component-BE1xhtNc.js → reveal-component-DzmiQyN9.js} +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/editor/__tests__/cell-renders.test.tsx +327 -1
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +12 -20
- package/src/components/editor/ai/ai-completion-editor.tsx +391 -289
- package/src/components/editor/ai/completion-utils.ts +9 -7
- package/src/components/editor/cell/CellDeleteShoulder.tsx +82 -0
- package/src/components/editor/cell/DeleteButton.tsx +11 -2
- package/src/components/editor/cell/__tests__/CellDeleteShoulder.test.tsx +181 -0
- package/src/components/editor/cell/code/cell-editor.tsx +15 -25
- package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +26 -2
- package/src/components/editor/chrome/panels/logs-panel.tsx +27 -11
- package/src/components/editor/notebook-cell.tsx +20 -40
- package/src/core/ai/state.ts +6 -0
- package/src/core/cells/__tests__/cells.test.ts +34 -20
- package/src/core/cells/cell-log-chunks.ts +31 -0
- package/src/core/cells/cells.ts +10 -6
- package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +1 -1
- package/src/core/codemirror/lsp/__tests__/transports.test.ts +1 -1
- package/src/core/islands/__tests__/bridge.test.ts +2 -5
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +10 -1
- package/src/css/common.css +11 -0
- package/src/hooks/useFinePointer.ts +30 -0
- package/src/stories/log-viewer.stories.tsx +48 -44
|
@@ -2319,7 +2319,7 @@ function ni(e, t, n) {
|
|
|
2319
2319
|
}) };
|
|
2320
2320
|
}
|
|
2321
2321
|
var ri = S((e) => {
|
|
2322
|
-
let t = e(
|
|
2322
|
+
let t = e(za);
|
|
2323
2323
|
return ni(e(ei), (e) => t[e] ?? null, e(Jr));
|
|
2324
2324
|
}), ii = () => b(ri), ai = S((e) => e(ri).columns.length);
|
|
2325
2325
|
function oi(e, t) {
|
|
@@ -2431,9 +2431,20 @@ S(null, (e, t, { cellId: n }) => {
|
|
|
2431
2431
|
return t.delete(n), t;
|
|
2432
2432
|
});
|
|
2433
2433
|
});
|
|
2434
|
+
function _i(e, t) {
|
|
2435
|
+
if (t.length === 0) return e;
|
|
2436
|
+
let n = [...e], r = n.at(-1), i = 0;
|
|
2437
|
+
if (r && r.length < 128) {
|
|
2438
|
+
let e = [...r];
|
|
2439
|
+
for (; i < t.length && e.length < 128;) e.push(t[i]), i++;
|
|
2440
|
+
n[n.length - 1] = e;
|
|
2441
|
+
}
|
|
2442
|
+
for (; i < t.length; i += 128) n.push(t.slice(i, i + 128));
|
|
2443
|
+
return n;
|
|
2444
|
+
}
|
|
2434
2445
|
//#endregion
|
|
2435
2446
|
//#region src/utils/timeout.ts
|
|
2436
|
-
function
|
|
2447
|
+
function vi(e, t) {
|
|
2437
2448
|
let { retries: r, delay: i, initialDelay: a = 0 } = t, o = 0, s = () => {
|
|
2438
2449
|
if (o < r) {
|
|
2439
2450
|
try {
|
|
@@ -2448,20 +2459,20 @@ function _i(e, t) {
|
|
|
2448
2459
|
}
|
|
2449
2460
|
//#endregion
|
|
2450
2461
|
//#region src/components/editor/navigation/focus-utils.ts
|
|
2451
|
-
function
|
|
2452
|
-
|
|
2462
|
+
function yi(e) {
|
|
2463
|
+
vi(() => (e.focus(), e.hasFocus), {
|
|
2453
2464
|
retries: 5,
|
|
2454
2465
|
delay: 20
|
|
2455
2466
|
});
|
|
2456
2467
|
}
|
|
2457
|
-
function
|
|
2468
|
+
function bi(e, t) {
|
|
2458
2469
|
let r = document.getElementById(V.create(e));
|
|
2459
|
-
r ?
|
|
2470
|
+
r ? Si(r, t) : n.warn(`[CellFocusManager] focusCell: element not found: ${e}`);
|
|
2460
2471
|
}
|
|
2461
|
-
function
|
|
2472
|
+
function xi() {
|
|
2462
2473
|
return document.activeElement instanceof HTMLElement && document.activeElement.classList.contains("marimo-cell");
|
|
2463
2474
|
}
|
|
2464
|
-
function
|
|
2475
|
+
function Si(e, t) {
|
|
2465
2476
|
try {
|
|
2466
2477
|
e.focus(t);
|
|
2467
2478
|
} catch {
|
|
@@ -2470,18 +2481,18 @@ function xi(e, t) {
|
|
|
2470
2481
|
}
|
|
2471
2482
|
//#endregion
|
|
2472
2483
|
//#region src/core/network/requests.ts
|
|
2473
|
-
var
|
|
2474
|
-
function
|
|
2475
|
-
let e = b(
|
|
2484
|
+
var Ci = S(null);
|
|
2485
|
+
function wi() {
|
|
2486
|
+
let e = b(Ci);
|
|
2476
2487
|
return T(e, "useRequestClient() requires setting requestClientAtom."), e;
|
|
2477
2488
|
}
|
|
2478
|
-
function
|
|
2479
|
-
let e = C.get(
|
|
2489
|
+
function Ti() {
|
|
2490
|
+
let e = C.get(Ci);
|
|
2480
2491
|
return T(e, "getRequestClient() requires requestClientAtom to be set."), e;
|
|
2481
2492
|
}
|
|
2482
2493
|
//#endregion
|
|
2483
2494
|
//#region src/utils/storage/storage.ts
|
|
2484
|
-
var
|
|
2495
|
+
var Ei = class {
|
|
2485
2496
|
store = /* @__PURE__ */ new Map();
|
|
2486
2497
|
get length() {
|
|
2487
2498
|
return this.store.size;
|
|
@@ -2502,16 +2513,16 @@ var Ti = class {
|
|
|
2502
2513
|
this.store.set(e, t);
|
|
2503
2514
|
}
|
|
2504
2515
|
};
|
|
2505
|
-
function
|
|
2516
|
+
function Di() {
|
|
2506
2517
|
let { hasLocalStorage: e, hasSessionStorage: t } = Se();
|
|
2507
|
-
return e ? window.localStorage : t ? window.sessionStorage : new
|
|
2518
|
+
return e ? window.localStorage : t ? window.sessionStorage : new Ei();
|
|
2508
2519
|
}
|
|
2509
|
-
var
|
|
2510
|
-
function
|
|
2511
|
-
return
|
|
2520
|
+
var Oi = Di(), ki = /(https?:\/\/[^\s"<>`{}|\\^]+)/, Ai = /\.(png|jpe?g|gif|webp|svg|ico)(\?.*)?$/i, ji = /^data:image\//i, Mi = ["avatars.githubusercontent.com"];
|
|
2521
|
+
function Ni(e) {
|
|
2522
|
+
return ji.test(e) ? [{
|
|
2512
2523
|
type: "image",
|
|
2513
2524
|
url: e
|
|
2514
|
-
}] : e.split(
|
|
2525
|
+
}] : e.split(ki).filter((e) => e !== "").map((e) => ki.test(e) ? Ai.test(e) || ji.test(e) || Mi.some((t) => e.includes(t)) ? {
|
|
2515
2526
|
type: "image",
|
|
2516
2527
|
url: e
|
|
2517
2528
|
} : {
|
|
@@ -2524,48 +2535,48 @@ function Mi(e) {
|
|
|
2524
2535
|
}
|
|
2525
2536
|
//#endregion
|
|
2526
2537
|
//#region src/utils/json/json-parser.ts
|
|
2527
|
-
var
|
|
2538
|
+
var Pi = new RegExp(ki.source, "g");
|
|
2528
2539
|
BigInt.prototype.toJSON = function() {
|
|
2529
2540
|
return JSON.rawJSON(this.toString());
|
|
2530
2541
|
};
|
|
2531
|
-
function
|
|
2542
|
+
function Fi(e) {
|
|
2532
2543
|
try {
|
|
2533
|
-
return JSON.parse(e, (e, t) =>
|
|
2544
|
+
return JSON.parse(e, (e, t) => zi(t));
|
|
2534
2545
|
} catch {}
|
|
2535
2546
|
if (e == null || e === "") return {};
|
|
2536
2547
|
try {
|
|
2537
|
-
return e ??= "", e = e.replaceAll(/(?<=\s|^|\[|,|:)(NaN|-Infinity|Infinity)(?=(?:[^"'\\]*(\\.|'([^'\\]*\\.)*[^'\\]*'|"([^"\\]*\\.)*[^"\\]*"))*[^"']*$)/g, "\"◐$1◐\""), JSON.parse(e, (e, t) => typeof t == "string" ? t === "◐NaN◐" ? NaN : t === "◐Infinity◐" ? Infinity : t === "◐-Infinity◐" ? -Infinity :
|
|
2548
|
+
return e ??= "", e = e.replaceAll(/(?<=\s|^|\[|,|:)(NaN|-Infinity|Infinity)(?=(?:[^"'\\]*(\\.|'([^'\\]*\\.)*[^'\\]*'|"([^"\\]*\\.)*[^"\\]*"))*[^"']*$)/g, "\"◐$1◐\""), JSON.parse(e, (e, t) => typeof t == "string" ? t === "◐NaN◐" ? NaN : t === "◐Infinity◐" ? Infinity : t === "◐-Infinity◐" ? -Infinity : zi(t) : zi(t));
|
|
2538
2549
|
} catch {
|
|
2539
2550
|
return {};
|
|
2540
2551
|
}
|
|
2541
2552
|
}
|
|
2542
|
-
function
|
|
2553
|
+
function Ii(e) {
|
|
2543
2554
|
if (e.length === 0) return "";
|
|
2544
2555
|
let t = Object.keys(e[0]);
|
|
2545
2556
|
return [
|
|
2546
2557
|
`| ${t.join(" | ")} |`,
|
|
2547
2558
|
`|${t.map(() => "---").join("|")}|`,
|
|
2548
|
-
...e.map((e) => `| ${t.map((t) =>
|
|
2559
|
+
...e.map((e) => `| ${t.map((t) => Li(e[t])).join(" | ")} |`)
|
|
2549
2560
|
].join("\n");
|
|
2550
2561
|
}
|
|
2551
|
-
function
|
|
2562
|
+
function Li(e) {
|
|
2552
2563
|
if (e == null) return "";
|
|
2553
|
-
if (Array.isArray(e) || typeof e == "object") return
|
|
2564
|
+
if (Array.isArray(e) || typeof e == "object") return Ri(JSON.stringify(e));
|
|
2554
2565
|
let t = String(e), n = /\[([^\]]+)]\((https?:\/\/[^)]+)\)/g, r = /* @__PURE__ */ new Map(), i = 0;
|
|
2555
2566
|
t = t.replaceAll(n, (e) => {
|
|
2556
2567
|
let t = `__MDLINK_${i++}__`;
|
|
2557
2568
|
return r.set(t, e), t;
|
|
2558
|
-
}), t = t.replaceAll(
|
|
2569
|
+
}), t = t.replaceAll(Pi, "[$1]($1)");
|
|
2559
2570
|
for (let [e, n] of r) t = t.replace(e, n);
|
|
2560
|
-
return
|
|
2571
|
+
return Ri(t);
|
|
2561
2572
|
}
|
|
2562
|
-
function
|
|
2573
|
+
function Ri(e) {
|
|
2563
2574
|
return e.replaceAll("\\", "\\\\").replaceAll("|", "\\|").replaceAll("\n", " ").replaceAll("\r", "");
|
|
2564
2575
|
}
|
|
2565
|
-
function
|
|
2576
|
+
function zi(e) {
|
|
2566
2577
|
return typeof e == "object" && e && "$bigint" in e && typeof e.$bigint == "string" ? BigInt(e.$bigint) : e;
|
|
2567
2578
|
}
|
|
2568
|
-
var
|
|
2579
|
+
var Bi = new class {
|
|
2569
2580
|
getFilename() {
|
|
2570
2581
|
return this.getSearchParam("filename");
|
|
2571
2582
|
}
|
|
@@ -2592,20 +2603,20 @@ var zi = new class {
|
|
|
2592
2603
|
}();
|
|
2593
2604
|
//#endregion
|
|
2594
2605
|
//#region src/core/dom/htmlUtils.ts
|
|
2595
|
-
function Bi(e) {
|
|
2596
|
-
return Pi(e ?? "");
|
|
2597
|
-
}
|
|
2598
2606
|
function Vi(e) {
|
|
2599
|
-
return
|
|
2607
|
+
return Fi(e ?? "");
|
|
2608
|
+
}
|
|
2609
|
+
function Hi(e) {
|
|
2610
|
+
return le.mapValues(e.dataset, (e) => typeof e == "string" ? Vi(e) : e);
|
|
2600
2611
|
}
|
|
2601
|
-
function
|
|
2612
|
+
function Ui(e, t) {
|
|
2602
2613
|
let n = e.parentElement ? er.parse(e.parentElement) : void 0;
|
|
2603
|
-
return n && t.has(n) ? t.lookupValue(n) :
|
|
2614
|
+
return n && t.has(n) ? t.lookupValue(n) : Vi(e.dataset.initialValue);
|
|
2604
2615
|
}
|
|
2605
|
-
function
|
|
2616
|
+
function Wi() {
|
|
2606
2617
|
if (ae()) return document.title || null;
|
|
2607
2618
|
if (be()) {
|
|
2608
|
-
let e =
|
|
2619
|
+
let e = Bi.getFilename();
|
|
2609
2620
|
if (e) return e;
|
|
2610
2621
|
}
|
|
2611
2622
|
let e = document.querySelector("marimo-filename");
|
|
@@ -2615,16 +2626,16 @@ function Ui() {
|
|
|
2615
2626
|
}
|
|
2616
2627
|
//#endregion
|
|
2617
2628
|
//#region src/core/saving/file-state.ts
|
|
2618
|
-
var K = S(
|
|
2629
|
+
var K = S(Wi());
|
|
2619
2630
|
S(null);
|
|
2620
|
-
var
|
|
2631
|
+
var Gi = S(null);
|
|
2621
2632
|
S(void 0);
|
|
2622
2633
|
//#endregion
|
|
2623
2634
|
//#region src/utils/storage/typed.ts
|
|
2624
|
-
var
|
|
2635
|
+
var Ki = class {
|
|
2625
2636
|
defaultValue;
|
|
2626
2637
|
storage;
|
|
2627
|
-
constructor(e, t =
|
|
2638
|
+
constructor(e, t = Oi) {
|
|
2628
2639
|
this.defaultValue = e, this.storage = t;
|
|
2629
2640
|
}
|
|
2630
2641
|
get(e) {
|
|
@@ -2641,11 +2652,11 @@ var Gi = class {
|
|
|
2641
2652
|
remove(e) {
|
|
2642
2653
|
this.storage.removeItem(e);
|
|
2643
2654
|
}
|
|
2644
|
-
},
|
|
2655
|
+
}, qi = class {
|
|
2645
2656
|
schema;
|
|
2646
2657
|
getDefaultValue;
|
|
2647
2658
|
storage;
|
|
2648
|
-
constructor(e, t, n =
|
|
2659
|
+
constructor(e, t, n = Oi) {
|
|
2649
2660
|
this.schema = e, this.getDefaultValue = t, this.storage = n;
|
|
2650
2661
|
}
|
|
2651
2662
|
get(e) {
|
|
@@ -2664,7 +2675,7 @@ var Gi = class {
|
|
|
2664
2675
|
remove(e) {
|
|
2665
2676
|
this.storage.removeItem(e);
|
|
2666
2677
|
}
|
|
2667
|
-
},
|
|
2678
|
+
}, Ji = class extends qi {
|
|
2668
2679
|
filename;
|
|
2669
2680
|
unsubscribeFromFilename;
|
|
2670
2681
|
constructor(e, t, n) {
|
|
@@ -2730,7 +2741,7 @@ var Gi = class {
|
|
|
2730
2741
|
In: "in",
|
|
2731
2742
|
As: "as",
|
|
2732
2743
|
Import: "import"
|
|
2733
|
-
},
|
|
2744
|
+
}, Yi = /* @__PURE__ */ new Set([
|
|
2734
2745
|
q.FunctionDefinition,
|
|
2735
2746
|
q.LambdaExpression,
|
|
2736
2747
|
q.ArrayComprehensionExpression,
|
|
@@ -2742,13 +2753,13 @@ var Gi = class {
|
|
|
2742
2753
|
q.Comment, q.String, q.FormatString;
|
|
2743
2754
|
//#endregion
|
|
2744
2755
|
//#region src/core/codemirror/utils.ts
|
|
2745
|
-
function
|
|
2756
|
+
function Xi(e) {
|
|
2746
2757
|
e && e.dispatch({ selection: {
|
|
2747
2758
|
anchor: e.state.doc.length,
|
|
2748
2759
|
head: e.state.doc.length
|
|
2749
2760
|
} });
|
|
2750
2761
|
}
|
|
2751
|
-
function
|
|
2762
|
+
function Zi(e) {
|
|
2752
2763
|
requestAnimationFrame(() => {
|
|
2753
2764
|
e.dom.closest(".marimo-cell")?.scrollIntoView({
|
|
2754
2765
|
behavior: "instant",
|
|
@@ -2759,8 +2770,8 @@ function Xi(e) {
|
|
|
2759
2770
|
}
|
|
2760
2771
|
//#endregion
|
|
2761
2772
|
//#region src/core/codemirror/go-to-definition/commands.ts
|
|
2762
|
-
var
|
|
2763
|
-
function
|
|
2773
|
+
var Qi = /* @__PURE__ */ new Set([q.ClassDefinition]);
|
|
2774
|
+
function $i(e, t) {
|
|
2764
2775
|
requestAnimationFrame(() => {
|
|
2765
2776
|
e.focus(), e.dispatch({
|
|
2766
2777
|
selection: {
|
|
@@ -2769,9 +2780,9 @@ function Qi(e, t) {
|
|
|
2769
2780
|
},
|
|
2770
2781
|
effects: pe.scrollIntoView(t, { y: "center" })
|
|
2771
2782
|
});
|
|
2772
|
-
}),
|
|
2783
|
+
}), Zi(e);
|
|
2773
2784
|
}
|
|
2774
|
-
function
|
|
2785
|
+
function ea(e, t) {
|
|
2775
2786
|
let n = me(e), r = null;
|
|
2776
2787
|
return n.iterate({ enter: (n) => {
|
|
2777
2788
|
if (r !== null) return !1;
|
|
@@ -2779,9 +2790,9 @@ function $i(e, t) {
|
|
|
2779
2790
|
if (n.name === q.Comment || n.name === q.String) return !1;
|
|
2780
2791
|
} }), r;
|
|
2781
2792
|
}
|
|
2782
|
-
function
|
|
2793
|
+
function ta(e, t) {
|
|
2783
2794
|
let n = [], r = e.resolveInner(t, 0);
|
|
2784
|
-
for (; r;)
|
|
2795
|
+
for (; r;) Yi.has(r.name) && (n.some((e) => e.type === q.FunctionDefinition || e.type === q.LambdaExpression) && r.name === q.ClassDefinition || n.push({
|
|
2785
2796
|
id: r.from,
|
|
2786
2797
|
type: r.name
|
|
2787
2798
|
})), r = r.parent;
|
|
@@ -2796,12 +2807,12 @@ function Y(e, t, n) {
|
|
|
2796
2807
|
from: n
|
|
2797
2808
|
});
|
|
2798
2809
|
}
|
|
2799
|
-
function
|
|
2810
|
+
function na(e, t) {
|
|
2800
2811
|
if (e.firstChild()) do
|
|
2801
2812
|
t(e.node);
|
|
2802
2813
|
while (e.nextSibling());
|
|
2803
2814
|
}
|
|
2804
|
-
function
|
|
2815
|
+
function ra(e, t) {
|
|
2805
2816
|
let { state: n, variableName: r, scopeId: i, declarations: a } = t;
|
|
2806
2817
|
switch (e.name) {
|
|
2807
2818
|
case q.VariableName:
|
|
@@ -2812,13 +2823,13 @@ function na(e, t) {
|
|
|
2812
2823
|
let n = e.node.cursor();
|
|
2813
2824
|
n.firstChild();
|
|
2814
2825
|
do
|
|
2815
|
-
|
|
2826
|
+
ra(n, t);
|
|
2816
2827
|
while (n.nextSibling());
|
|
2817
2828
|
break;
|
|
2818
2829
|
}
|
|
2819
2830
|
}
|
|
2820
2831
|
}
|
|
2821
|
-
function
|
|
2832
|
+
function ia(e, t) {
|
|
2822
2833
|
let { state: n, variableName: r, scopeId: i, declarations: a } = t, o = e.cursor();
|
|
2823
2834
|
o.firstChild();
|
|
2824
2835
|
do {
|
|
@@ -2830,18 +2841,18 @@ function ra(e, t) {
|
|
|
2830
2841
|
while (e.nextSibling());
|
|
2831
2842
|
} while (o.nextSibling());
|
|
2832
2843
|
}
|
|
2833
|
-
function
|
|
2844
|
+
function aa(e, t) {
|
|
2834
2845
|
let n = e.cursor();
|
|
2835
2846
|
n.firstChild();
|
|
2836
2847
|
let r = !1;
|
|
2837
2848
|
do
|
|
2838
2849
|
if (n.name === J.For) r = !0;
|
|
2839
2850
|
else if (r && n.name === J.In) break;
|
|
2840
|
-
else r &&
|
|
2851
|
+
else r && ra(n, t);
|
|
2841
2852
|
while (n.nextSibling());
|
|
2842
2853
|
}
|
|
2843
|
-
function
|
|
2844
|
-
let { state: n, variableName: r, scopeStack: i, declarations: a } = t, o = e.cursor(), s = o.name, c = o.from, l =
|
|
2854
|
+
function oa(e, t) {
|
|
2855
|
+
let { state: n, variableName: r, scopeStack: i, declarations: a } = t, o = e.cursor(), s = o.name, c = o.from, l = Yi.has(s) ? [...i, c] : i, u = l[l.length - 1] ?? -1;
|
|
2845
2856
|
switch (s) {
|
|
2846
2857
|
case q.FunctionDefinition:
|
|
2847
2858
|
case q.ClassDefinition: {
|
|
@@ -2853,7 +2864,7 @@ function aa(e, t) {
|
|
|
2853
2864
|
break;
|
|
2854
2865
|
}
|
|
2855
2866
|
while (t.nextSibling());
|
|
2856
|
-
s === q.FunctionDefinition &&
|
|
2867
|
+
s === q.FunctionDefinition && ia(e, {
|
|
2857
2868
|
state: n,
|
|
2858
2869
|
variableName: r,
|
|
2859
2870
|
scopeId: c,
|
|
@@ -2862,7 +2873,7 @@ function aa(e, t) {
|
|
|
2862
2873
|
break;
|
|
2863
2874
|
}
|
|
2864
2875
|
case q.LambdaExpression:
|
|
2865
|
-
|
|
2876
|
+
ia(e, {
|
|
2866
2877
|
state: n,
|
|
2867
2878
|
variableName: r,
|
|
2868
2879
|
scopeId: c,
|
|
@@ -2874,7 +2885,7 @@ function aa(e, t) {
|
|
|
2874
2885
|
case q.SetComprehensionExpression:
|
|
2875
2886
|
case q.ComprehensionExpression:
|
|
2876
2887
|
case q.ForStatement:
|
|
2877
|
-
|
|
2888
|
+
aa(e, {
|
|
2878
2889
|
state: n,
|
|
2879
2890
|
variableName: r,
|
|
2880
2891
|
scopeId: u,
|
|
@@ -2892,7 +2903,7 @@ function aa(e, t) {
|
|
|
2892
2903
|
let s = e.cursor();
|
|
2893
2904
|
s.firstChild();
|
|
2894
2905
|
do
|
|
2895
|
-
s.from < o &&
|
|
2906
|
+
s.from < o && ra(s, {
|
|
2896
2907
|
state: n,
|
|
2897
2908
|
variableName: r,
|
|
2898
2909
|
scopeId: u,
|
|
@@ -2927,8 +2938,8 @@ function aa(e, t) {
|
|
|
2927
2938
|
break;
|
|
2928
2939
|
}
|
|
2929
2940
|
}
|
|
2930
|
-
|
|
2931
|
-
|
|
2941
|
+
na(o, (e) => {
|
|
2942
|
+
oa(e, {
|
|
2932
2943
|
state: n,
|
|
2933
2944
|
variableName: r,
|
|
2934
2945
|
scopeStack: l,
|
|
@@ -2936,27 +2947,27 @@ function aa(e, t) {
|
|
|
2936
2947
|
});
|
|
2937
2948
|
});
|
|
2938
2949
|
}
|
|
2939
|
-
function
|
|
2950
|
+
function sa(e, t, n) {
|
|
2940
2951
|
let r = me(e), i = [];
|
|
2941
|
-
|
|
2952
|
+
oa(r, {
|
|
2942
2953
|
state: e,
|
|
2943
2954
|
variableName: t,
|
|
2944
2955
|
scopeStack: [],
|
|
2945
2956
|
declarations: i
|
|
2946
2957
|
});
|
|
2947
2958
|
let a = Math.max(0, Math.min(n, e.doc.length));
|
|
2948
|
-
for (let e of
|
|
2949
|
-
let t = i.filter((t) => t.scopeId === e.id).filter((t) => !
|
|
2959
|
+
for (let e of ta(r, a)) {
|
|
2960
|
+
let t = i.filter((t) => t.scopeId === e.id).filter((t) => !Qi.has(e.type) || t.from <= a).toSorted((e, t) => e.from - t.from)[0];
|
|
2950
2961
|
if (t) return t.from;
|
|
2951
2962
|
}
|
|
2952
2963
|
return null;
|
|
2953
2964
|
}
|
|
2954
|
-
function
|
|
2955
|
-
let { state: r } = e, i = n === void 0 ?
|
|
2956
|
-
return i !== null && (
|
|
2965
|
+
function ca(e, t, n) {
|
|
2966
|
+
let { state: r } = e, i = n === void 0 ? ea(r, t) : sa(r, t, n);
|
|
2967
|
+
return i !== null && ($i(e, i), !0);
|
|
2957
2968
|
}
|
|
2958
|
-
function
|
|
2959
|
-
return
|
|
2969
|
+
function la(e, t) {
|
|
2970
|
+
return $i(e, e.state.doc.line(t).from), !0;
|
|
2960
2971
|
}
|
|
2961
2972
|
//#endregion
|
|
2962
2973
|
//#region src/core/network/connection.ts
|
|
@@ -2965,11 +2976,11 @@ v(null, (e, t) => t === null ? null : {
|
|
|
2965
2976
|
phase: t.phase,
|
|
2966
2977
|
logs: t.log_mode === "append" && e?.phase === t.phase ? e.logs + t.logs : t.logs
|
|
2967
2978
|
});
|
|
2968
|
-
function
|
|
2979
|
+
function ua() {
|
|
2969
2980
|
return ne(X, (e) => e.state === A.OPEN);
|
|
2970
2981
|
}
|
|
2971
|
-
function
|
|
2972
|
-
return _e() ?
|
|
2982
|
+
function da() {
|
|
2983
|
+
return _e() ? ua() : Promise.resolve();
|
|
2973
2984
|
}
|
|
2974
2985
|
S((e) => e(X).state === A.CONNECTING), S((e) => e(X).state === A.OPEN), S((e) => {
|
|
2975
2986
|
let t = e(X);
|
|
@@ -2977,7 +2988,7 @@ S((e) => e(X).state === A.CONNECTING), S((e) => e(X).state === A.OPEN), S((e) =>
|
|
|
2977
2988
|
}), S((e) => e(X).state === A.CLOSED);
|
|
2978
2989
|
//#endregion
|
|
2979
2990
|
//#region src/components/ui/checkbox.tsx
|
|
2980
|
-
var
|
|
2991
|
+
var fa = E.forwardRef((e, t) => {
|
|
2981
2992
|
let n = (0, Nn.c)(13), i, a;
|
|
2982
2993
|
n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
|
|
2983
2994
|
let o;
|
|
@@ -2997,16 +3008,16 @@ var da = E.forwardRef((e, t) => {
|
|
|
2997
3008
|
children: c
|
|
2998
3009
|
}), n[8] = a, n[9] = t, n[10] = o, n[11] = c, n[12] = l) : l = n[12], l;
|
|
2999
3010
|
});
|
|
3000
|
-
|
|
3011
|
+
fa.displayName = Pe.displayName;
|
|
3001
3012
|
//#endregion
|
|
3002
3013
|
//#region src/core/cells/scrollCellIntoView.ts
|
|
3003
|
-
function
|
|
3014
|
+
function pa({ cellId: e, cell: t, isCodeHidden: r, codeFocus: i, variableName: a }) {
|
|
3004
3015
|
if (!t) return;
|
|
3005
3016
|
let o = document.getElementById(V.create(e));
|
|
3006
3017
|
if (!o) n.warn("scrollCellIntoView: element not found");
|
|
3007
|
-
else if (
|
|
3018
|
+
else if (xi()) Si(o);
|
|
3008
3019
|
else {
|
|
3009
|
-
if (r)
|
|
3020
|
+
if (r) Si(o);
|
|
3010
3021
|
else {
|
|
3011
3022
|
Vn.promote(e);
|
|
3012
3023
|
let r = t.current?.editorView;
|
|
@@ -3015,7 +3026,7 @@ function fa({ cellId: e, cell: t, isCodeHidden: r, codeFocus: i, variableName: a
|
|
|
3015
3026
|
return;
|
|
3016
3027
|
}
|
|
3017
3028
|
if (r.hasFocus || !document.hasFocus()) return;
|
|
3018
|
-
if (
|
|
3029
|
+
if (yi(r), i === "top") r.dispatch({ selection: {
|
|
3019
3030
|
anchor: 0,
|
|
3020
3031
|
head: 0
|
|
3021
3032
|
} });
|
|
@@ -3025,7 +3036,7 @@ function fa({ cellId: e, cell: t, isCodeHidden: r, codeFocus: i, variableName: a
|
|
|
3025
3036
|
anchor: e.from,
|
|
3026
3037
|
head: e.from
|
|
3027
3038
|
} });
|
|
3028
|
-
} else a &&
|
|
3039
|
+
} else a && ca(r, a);
|
|
3029
3040
|
}
|
|
3030
3041
|
o.scrollIntoView({
|
|
3031
3042
|
behavior: "smooth",
|
|
@@ -3033,20 +3044,20 @@ function fa({ cellId: e, cell: t, isCodeHidden: r, codeFocus: i, variableName: a
|
|
|
3033
3044
|
});
|
|
3034
3045
|
}
|
|
3035
3046
|
}
|
|
3036
|
-
function
|
|
3047
|
+
function ma() {
|
|
3037
3048
|
let e = document.getElementById("App");
|
|
3038
3049
|
e?.scrollTo({
|
|
3039
3050
|
top: e.scrollHeight,
|
|
3040
3051
|
behavior: "smooth"
|
|
3041
3052
|
});
|
|
3042
3053
|
}
|
|
3043
|
-
function
|
|
3054
|
+
function ha() {
|
|
3044
3055
|
document.getElementById("App")?.scrollTo({
|
|
3045
3056
|
top: 0,
|
|
3046
3057
|
behavior: "smooth"
|
|
3047
3058
|
});
|
|
3048
3059
|
}
|
|
3049
|
-
function
|
|
3060
|
+
function ga(e) {
|
|
3050
3061
|
let t = document.getElementById(V.create(e));
|
|
3051
3062
|
return t?.scrollIntoView({
|
|
3052
3063
|
behavior: "smooth",
|
|
@@ -3055,64 +3066,64 @@ function ha(e) {
|
|
|
3055
3066
|
}
|
|
3056
3067
|
//#endregion
|
|
3057
3068
|
//#region src/core/cells/utils.ts
|
|
3058
|
-
function
|
|
3069
|
+
function _a(e) {
|
|
3059
3070
|
return e.cellIds.map((t) => e.cellData[t]);
|
|
3060
3071
|
}
|
|
3061
|
-
function
|
|
3072
|
+
function va(e) {
|
|
3062
3073
|
let { cellIds: t, cellData: n } = e, r = [];
|
|
3063
3074
|
for (let e of t) n[e].config.disabled && r.push(e);
|
|
3064
3075
|
return r;
|
|
3065
3076
|
}
|
|
3066
|
-
function
|
|
3077
|
+
function ya(e) {
|
|
3067
3078
|
let { cellIds: t, cellData: n } = e, r = [];
|
|
3068
3079
|
for (let e of t) n[e].config.disabled || r.push(e);
|
|
3069
3080
|
return r;
|
|
3070
3081
|
}
|
|
3071
|
-
function
|
|
3082
|
+
function ba(e) {
|
|
3072
3083
|
return e.history.length > 0;
|
|
3073
3084
|
}
|
|
3074
|
-
function
|
|
3085
|
+
function xa(e) {
|
|
3075
3086
|
let t = e.history[e.history.length - 1];
|
|
3076
3087
|
return t && t.type === "move" ? "Undo move" : "Undo cell deletion";
|
|
3077
3088
|
}
|
|
3078
|
-
function
|
|
3079
|
-
return e.status === "idle" ?
|
|
3089
|
+
function Sa(e, t, n) {
|
|
3090
|
+
return e.status === "idle" ? Ea(e) && n.code.trim() ? "not-run" : t.sourceChanged ? "source" : e.outcome === "cancelled" ? "interrupted" : t.inputsChanged && !n.config.disabled && !e.blocked ? "inputs" : null : null;
|
|
3080
3091
|
}
|
|
3081
|
-
function*
|
|
3092
|
+
function* Ca(e, t, n) {
|
|
3082
3093
|
for (let r of e.cellIds) {
|
|
3083
|
-
let i = Jt(t, r), a = n(r), o =
|
|
3084
|
-
o === null ? a.sourceChanged &&
|
|
3094
|
+
let i = Jt(t, r), a = n(r), o = Sa(i, a, e.cellData[r]);
|
|
3095
|
+
o === null ? a.sourceChanged && Ta(t.executions, r) && (yield [r, "source"]) : yield [r, o];
|
|
3085
3096
|
}
|
|
3086
3097
|
}
|
|
3087
|
-
function
|
|
3098
|
+
function wa(e, t, n) {
|
|
3088
3099
|
let r = null;
|
|
3089
|
-
for (let [, i] of
|
|
3100
|
+
for (let [, i] of Ca(e, t, n)) {
|
|
3090
3101
|
if (i !== "inputs") return i;
|
|
3091
3102
|
r = i;
|
|
3092
3103
|
}
|
|
3093
3104
|
return r;
|
|
3094
3105
|
}
|
|
3095
|
-
function
|
|
3106
|
+
function Ta(e, t) {
|
|
3096
3107
|
let n = e.latest.get(t), r = n === void 0 ? void 0 : e.executions.get(n)?.record;
|
|
3097
3108
|
return r !== void 0 && r.state.status !== "completed";
|
|
3098
3109
|
}
|
|
3099
|
-
function
|
|
3110
|
+
function Ea({ status: e, outcome: t, live: n }) {
|
|
3100
3111
|
return (t === null || !n) && e !== "queued" && e !== "running";
|
|
3101
3112
|
}
|
|
3102
|
-
function
|
|
3113
|
+
function Da({ errored: e, stopped: t }) {
|
|
3103
3114
|
return {
|
|
3104
3115
|
published: !0,
|
|
3105
3116
|
"has-error": e,
|
|
3106
3117
|
stopped: t
|
|
3107
3118
|
};
|
|
3108
3119
|
}
|
|
3109
|
-
function
|
|
3120
|
+
function Oa({ errored: e, interrupted: t, stopped: n, output: r, showErrorTracebacks: i }) {
|
|
3110
3121
|
let a = Wn(r?.mimetype), o = i && a && Array.isArray(r?.data) && r.data.some((e) => e.type === "exception" && "traceback" in e && e.traceback);
|
|
3111
3122
|
return (e || t || n || a) && !o;
|
|
3112
3123
|
}
|
|
3113
3124
|
//#endregion
|
|
3114
3125
|
//#region src/core/cells/cells.ts
|
|
3115
|
-
function
|
|
3126
|
+
function ka(e) {
|
|
3116
3127
|
let t = {
|
|
3117
3128
|
column: 0,
|
|
3118
3129
|
hide_code: !1,
|
|
@@ -3138,8 +3149,8 @@ function Oa(e) {
|
|
|
3138
3149
|
}
|
|
3139
3150
|
};
|
|
3140
3151
|
}
|
|
3141
|
-
function
|
|
3142
|
-
return
|
|
3152
|
+
function Aa() {
|
|
3153
|
+
return ka({
|
|
3143
3154
|
cellIds: [],
|
|
3144
3155
|
cellData: {},
|
|
3145
3156
|
cellRuntime: {},
|
|
@@ -3149,7 +3160,7 @@ function ka() {
|
|
|
3149
3160
|
cellLogs: []
|
|
3150
3161
|
});
|
|
3151
3162
|
}
|
|
3152
|
-
var { reducer:
|
|
3163
|
+
var { reducer: ja, createActions: Ma, getActionsForStore: Na, useActions: Pa, valueAtom: Z } = fe(Aa, {
|
|
3153
3164
|
startCellConsole: (e, { cellId: t }) => Q({
|
|
3154
3165
|
state: e,
|
|
3155
3166
|
cellId: t,
|
|
@@ -3172,10 +3183,10 @@ var { reducer: Aa, createActions: ja, getActionsForStore: Ma, useActions: Na, va
|
|
|
3172
3183
|
});
|
|
3173
3184
|
return i || t.op === "pdb-output" ? a : {
|
|
3174
3185
|
...a,
|
|
3175
|
-
cellLogs:
|
|
3186
|
+
cellLogs: _i(a.cellLogs, jr({
|
|
3176
3187
|
cell_id: n,
|
|
3177
3188
|
console: r
|
|
3178
|
-
})
|
|
3189
|
+
}))
|
|
3179
3190
|
};
|
|
3180
3191
|
},
|
|
3181
3192
|
hideConsoleInputs: (e, { cellId: t, executionId: n, inputIds: r }) => {
|
|
@@ -3211,13 +3222,13 @@ var { reducer: Aa, createActions: ja, getActionsForStore: Ma, useActions: Na, va
|
|
|
3211
3222
|
cellRuntime: t
|
|
3212
3223
|
};
|
|
3213
3224
|
},
|
|
3214
|
-
addLogs: (e, t) =>
|
|
3225
|
+
addLogs: (e, t) => t.logs.length === 0 ? e : {
|
|
3215
3226
|
...e,
|
|
3216
|
-
cellLogs:
|
|
3217
|
-
}
|
|
3227
|
+
cellLogs: _i(e.cellLogs, t.logs)
|
|
3228
|
+
},
|
|
3218
3229
|
reconcileDocument: (e, t) => {
|
|
3219
3230
|
let n = fi(e, t);
|
|
3220
|
-
for (let t of e.cellIds) t in n.cellData ||
|
|
3231
|
+
for (let t of e.cellIds) t in n.cellData || Za(t);
|
|
3221
3232
|
return n;
|
|
3222
3233
|
},
|
|
3223
3234
|
setStdinResponse: (e, t) => {
|
|
@@ -3249,7 +3260,7 @@ var { reducer: Aa, createActions: ja, getActionsForStore: Ma, useActions: Na, va
|
|
|
3249
3260
|
let t = e.scrollKey;
|
|
3250
3261
|
if (t === null) return e;
|
|
3251
3262
|
let n = t;
|
|
3252
|
-
return
|
|
3263
|
+
return pa({
|
|
3253
3264
|
cellId: n,
|
|
3254
3265
|
cell: e.cellHandles[n],
|
|
3255
3266
|
isCodeHidden: hi(e.cellData[n]?.config.hide_code, C.get(G), n),
|
|
@@ -3260,7 +3271,7 @@ var { reducer: Aa, createActions: ja, getActionsForStore: Ma, useActions: Na, va
|
|
|
3260
3271
|
scrollKey: null
|
|
3261
3272
|
};
|
|
3262
3273
|
},
|
|
3263
|
-
foldAll: (e) => (In(Object.keys(e.cellHandles).map((e) =>
|
|
3274
|
+
foldAll: (e) => (In(Object.keys(e.cellHandles).map((e) => $a(e))), e),
|
|
3264
3275
|
unfoldAll: (e) => (Ln(Object.values(e.cellHandles).map((e) => e.current?.editorView)), e),
|
|
3265
3276
|
clearLogs: (e) => ({
|
|
3266
3277
|
...e,
|
|
@@ -3291,13 +3302,13 @@ function Q({ state: e, cellId: t, cellReducer: r }) {
|
|
|
3291
3302
|
}
|
|
3292
3303
|
} : (n.warn(`Cell ${t} not found in state`), e);
|
|
3293
3304
|
}
|
|
3294
|
-
var
|
|
3295
|
-
C.set(Z, (t) =>
|
|
3305
|
+
var Fa = Ma((e) => {
|
|
3306
|
+
C.set(Z, (t) => ja(t, e));
|
|
3296
3307
|
}).addLogs, $ = S((e) => e(Z).cellIds);
|
|
3297
|
-
S((e) => e($).length === 1), S((e) =>
|
|
3298
|
-
var
|
|
3299
|
-
S((e) => e(
|
|
3300
|
-
var
|
|
3308
|
+
S((e) => e($).length === 1), S((e) => va(e(Z)).length > 0), S((e) => ya(e(Z)).length > 0), S((e) => ba(e(Z))), S((e) => xa(e(Z)));
|
|
3309
|
+
var Ia = S((e) => wa(e(Z), e(mn), e(_n)));
|
|
3310
|
+
S((e) => e(Ia) !== null);
|
|
3311
|
+
var La = S((e) => {
|
|
3301
3312
|
let { cellIds: t, cellData: n } = e(Z);
|
|
3302
3313
|
return t.map((t) => {
|
|
3303
3314
|
let r = e(z(t)), { name: i } = n[t];
|
|
@@ -3315,30 +3326,30 @@ var Ia = S((e) => {
|
|
|
3315
3326
|
}
|
|
3316
3327
|
return null;
|
|
3317
3328
|
}).filter(Boolean);
|
|
3318
|
-
}),
|
|
3329
|
+
}), Ra = w(S((e) => {
|
|
3319
3330
|
let t = [];
|
|
3320
3331
|
for (let n of e($)) {
|
|
3321
3332
|
let r = e(wn(n));
|
|
3322
3333
|
r && r.items.length > 0 && t.push([n, r]);
|
|
3323
3334
|
}
|
|
3324
3335
|
return t;
|
|
3325
|
-
}), t.identity, y),
|
|
3336
|
+
}), t.identity, y), za = w(Ra, (e) => Object.fromEntries(e), y), Ba = w(Ra, (e) => ({ items: e.flatMap(([e, t]) => t.items.map((t) => ({
|
|
3326
3337
|
...t,
|
|
3327
3338
|
cellId: e
|
|
3328
3339
|
}))) }));
|
|
3329
|
-
S((e) => e(
|
|
3330
|
-
var
|
|
3340
|
+
S((e) => e(La).length);
|
|
3341
|
+
var Va = te(S((e) => {
|
|
3331
3342
|
let { cellIds: t, cellData: n } = e(Z);
|
|
3332
3343
|
return le.fromEntries(t.map((e) => [e, n[e]?.name]));
|
|
3333
3344
|
}));
|
|
3334
3345
|
S((e) => e(Z).scrollKey);
|
|
3335
|
-
var
|
|
3346
|
+
var Ha = () => b($), Ua = () => b(Va), Wa = () => C.get(Z), Ga = () => C.get(Z).cellIds, Ka = () => {
|
|
3336
3347
|
let { cellIds: e, cellData: t } = C.get(Z);
|
|
3337
3348
|
return e.map((e) => t[e]?.name).filter(Boolean);
|
|
3338
3349
|
};
|
|
3339
3350
|
h(w(Z, (e) => e.cellIds.map((t) => e.cellData[t]))), S((e) => e(Z).cellIds.length > 0);
|
|
3340
|
-
var
|
|
3341
|
-
let t = S((t) => Wr(t, e, t(m))), n = S((t) => t(Z).cellRuntime[e] ??
|
|
3351
|
+
var qa = _((e) => S((t) => t(Z).cellData[e])), Ja = Vr(), Ya = _((e) => {
|
|
3352
|
+
let t = S((t) => Wr(t, e, t(m))), n = S((t) => t(Z).cellRuntime[e] ?? Ja), r = S((e) => {
|
|
3342
3353
|
let r = e(t), i = e(m), a = i && e(i.shownDocumentAtom)?.cells;
|
|
3343
3354
|
return {
|
|
3344
3355
|
local: e(n),
|
|
@@ -3347,22 +3358,22 @@ var Ka = _((e) => S((t) => t(Z).cellData[e])), qa = Vr(), Ja = _((e) => {
|
|
|
3347
3358
|
};
|
|
3348
3359
|
}), i = w(r, Gr);
|
|
3349
3360
|
return S((e) => e(i).rendered);
|
|
3350
|
-
}),
|
|
3351
|
-
function
|
|
3352
|
-
|
|
3361
|
+
}), Xa = _((e) => S((t) => t(Z).cellHandles[e]));
|
|
3362
|
+
function Za(e) {
|
|
3363
|
+
qa.remove(e), Ya.remove(e), Xa.remove(e), Tn(e);
|
|
3353
3364
|
}
|
|
3354
|
-
var
|
|
3365
|
+
var Qa = (e) => {
|
|
3355
3366
|
let { cellHandles: t } = C.get(Z);
|
|
3356
3367
|
return t[e]?.current?.editorView ?? void 0;
|
|
3357
|
-
},
|
|
3368
|
+
}, $a = (e) => (Vn.promote(e), Qa(e));
|
|
3358
3369
|
S((e) => e($).map((t) => ({
|
|
3359
|
-
...e(
|
|
3360
|
-
...e(
|
|
3370
|
+
...e(qa(t)),
|
|
3371
|
+
...e(Ya(t)),
|
|
3361
3372
|
output: e(z(t))
|
|
3362
3373
|
})));
|
|
3363
3374
|
//#endregion
|
|
3364
3375
|
//#region src/core/errors/error-entries.ts
|
|
3365
|
-
function
|
|
3376
|
+
function eo(e) {
|
|
3366
3377
|
if (Hn(e.mimetype)) {
|
|
3367
3378
|
if (!Array.isArray(e.data)) return null;
|
|
3368
3379
|
let t = e.data.filter((e) => !e.type.includes("ancestor"));
|
|
@@ -3373,23 +3384,23 @@ function $a(e) {
|
|
|
3373
3384
|
tracebackHtml: e.data
|
|
3374
3385
|
} : null;
|
|
3375
3386
|
}
|
|
3376
|
-
function
|
|
3387
|
+
function to(e) {
|
|
3377
3388
|
return e.some((e) => "traceback" in e && e.traceback);
|
|
3378
3389
|
}
|
|
3379
|
-
function
|
|
3390
|
+
function no(e) {
|
|
3380
3391
|
let t = e?.find((e) => Un(e.mimetype));
|
|
3381
3392
|
if (t && typeof t.data == "string" && t.data.length !== 0) return t.data;
|
|
3382
3393
|
}
|
|
3383
|
-
function
|
|
3394
|
+
function ro(e, t) {
|
|
3384
3395
|
if (e.tracebackHtml) return e.tracebackHtml;
|
|
3385
|
-
if (!
|
|
3396
|
+
if (!to(e.errorData)) return no(t);
|
|
3386
3397
|
}
|
|
3387
|
-
function
|
|
3398
|
+
function io(e) {
|
|
3388
3399
|
let { cellIds: t, cellData: n } = e.get(Z), r = [];
|
|
3389
3400
|
for (let [i, a] of t.entries()) {
|
|
3390
3401
|
let t = e.get(z(a));
|
|
3391
3402
|
if (t === null || !Wn(t.mimetype)) continue;
|
|
3392
|
-
let o =
|
|
3403
|
+
let o = eo(t);
|
|
3393
3404
|
if (!o) continue;
|
|
3394
3405
|
let s = Lr(n[a].name, i), c = t.code ?? n[a].code;
|
|
3395
3406
|
r.push({
|
|
@@ -3397,21 +3408,21 @@ function ro(e) {
|
|
|
3397
3408
|
cellName: s,
|
|
3398
3409
|
cellCode: c,
|
|
3399
3410
|
errorData: o.errorData,
|
|
3400
|
-
tracebackHtml:
|
|
3411
|
+
tracebackHtml: ro(o, e.get(Ya(a)).consoleOutputs)
|
|
3401
3412
|
});
|
|
3402
3413
|
}
|
|
3403
3414
|
return r;
|
|
3404
3415
|
}
|
|
3405
|
-
function
|
|
3416
|
+
function ao(e) {
|
|
3406
3417
|
return e.type === "diagnostic" ? e.msg : e.type === "setup-refs" ? "The setup cell cannot have references" : e.type === "cycle" ? "This cell is in a cycle" : e.type === "multiple-defs" ? `The variable '${e.name}' was defined by another cell` : e.type === "import-star" || e.type === "lazy-import" || e.type === "ancestor-stopped" || e.type === "ancestor-prevented" || e.type === "exception" || e.type === "strict-exception" ? e.msg : e.type === "interruption" ? "This cell was interrupted and needs to be re-run" : e.type === "syntax" || e.type === "unknown" || e.type === "sql-error" ? e.msg : e.type === "internal" ? e.msg || "An internal error occurred" : (d(e), "Unknown error");
|
|
3407
3418
|
}
|
|
3408
|
-
function
|
|
3409
|
-
let t =
|
|
3419
|
+
function oo(e) {
|
|
3420
|
+
let t = ao(e);
|
|
3410
3421
|
return "traceback" in e && e.traceback && (t += `\n\nTraceback:\n${W(e.traceback)}`), t;
|
|
3411
3422
|
}
|
|
3412
|
-
function
|
|
3423
|
+
function so(e) {
|
|
3413
3424
|
let t = [e.cellName];
|
|
3414
|
-
return e.tracebackHtml && t.push(W(e.tracebackHtml)), e.errorData.length > 0 && t.push(e.errorData.map(
|
|
3425
|
+
return e.tracebackHtml && t.push(W(e.tracebackHtml)), e.errorData.length > 0 && t.push(e.errorData.map(oo).join("\n\n")), t.join("\n\n");
|
|
3415
3426
|
}
|
|
3416
3427
|
//#endregion
|
|
3417
|
-
export { hi as $, mt as $t,
|
|
3428
|
+
export { hi as $, mt as $t, fa as A, V as At, Gi as B, pn as Bt, _a as C, jr as Ct, ma as D, rr as Dt, pa as E, br as Et, Xi as F, Kn as Ft, Ii as G, En as Gt, Hi as H, wn as Ht, Ji as I, qn as It, Ti as J, Dn as Jt, Ni as K, dn as Kt, Ki as L, Pn as Lt, ua as M, Zn as Mt, da as N, er as Nt, ga as O, Qn as Ot, la as P, $n as Pt, yi as Q, ht as Qt, qi as R, Mn as Rt, Ea as S, Fr as St, Oa as T, W as Tt, Ui as U, z as Ut, Vi as V, Cn as Vt, Fi as W, R as Wt, wi as X, jn as Xt, Ci as Y, kn as Yt, bi as Z, Jt as Zt, Ba as _, Wr as _t, Fa as a, He as an, Yr as at, Ha as b, Ir as bt, Ya as c, oi as ct, Na as d, li as dt, Qe as en, gi as et, Ka as f, ri as ft, Z as g, Kr as gt, Aa as h, ii as ht, io as i, Xe as in, Jr as it, X as j, B as jt, ha as k, tr as kt, Ma as l, ci as lt, Wa as m, ai as mt, so as n, Ue as nn, mi as nt, qa as o, we as on, si as ot, Ga as p, Zr as pt, Oi as q, An as qt, oo as r, qe as rn, pi as rt, $ as s, Ce as sn, Xr as st, ao as t, A as tn, G as tt, $a as u, ui as ut, ja as v, Ur as vt, Da as w, Dr as wt, Ua as x, Rr as xt, Za as y, Lr as yt, K as z, Sn as zt };
|