@marimo-team/islands 0.25.3-dev312 → 0.25.3-dev316
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-CCrWQ8Zi.js → ErrorBoundary-C3G05Nb1.js} +1 -1
- package/dist/{chat-ui-DkuxGEDp.js → chat-ui-DASKYW38.js} +13 -13
- package/dist/{code-visibility-DLBADpvq.js → code-visibility-B3_gXvem.js} +31 -32
- package/dist/{common-Cc-bvilP.js → common-Vd6TgXHQ.js} +5074 -5074
- package/dist/{config-BVYA1P0C.js → config-CL7mwGLX.js} +87 -129
- package/dist/{data-grid-overlay-editor-CAEih52I.js → data-grid-overlay-editor-DLEPVcX1.js} +1 -1
- package/dist/{error-entries-istW7Xbs.js → error-entries-kb4H6PAT.js} +533 -508
- package/dist/feedback-button-gqE30Uez.js +370 -0
- package/dist/{formats-CMa7L3E8.js → formats-qhBmYb0l.js} +1 -1
- package/dist/{glide-data-editor-hsf5AOwE.js → glide-data-editor-BmtEcZoo.js} +3 -3
- package/dist/{globals-Blgj9EWO.js → globals-BIt_qRYC.js} +1 -1
- package/dist/{html-to-image-pPbR2cDx.js → html-to-image-DR8VPB7E.js} +4018 -4021
- package/dist/main.js +606 -607
- package/dist/{number-overlay-editor-BgNsDtQP.js → number-overlay-editor-Bbxt9i1c.js} +1 -1
- package/dist/{process-output-BySO1nIs.js → process-output-BDMtqL6K.js} +2 -2
- package/dist/{reveal-component-MUD9gGln.js → reveal-component-DXFsIk5S.js} +4 -4
- package/dist/static-state-Dtocd9UO.js +68 -0
- package/dist/{vega-component-Bly2lDhz.js → vega-component-CeN8zClP.js} +9 -9
- package/package.json +1 -1
- package/src/__tests__/mount.test.ts +17 -58
- package/src/components/editor/actions/useRestartKernel.tsx +0 -5
- package/src/components/editor/cell/__tests__/useRunCells.test.tsx +0 -3
- package/src/components/editor/cell/useRunCells.ts +2 -2
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +2 -16
- package/src/components/editor/renderers/cell-array.tsx +0 -3
- package/src/core/edit-app.tsx +2 -7
- package/src/core/executions/__tests__/run.test.ts +0 -3
- package/src/core/executions/index.ts +1 -1
- package/src/core/executions/run.ts +1 -14
- package/src/core/islands/bootstrap.ts +0 -1
- package/src/core/network/__tests__/requests-network.test.ts +0 -16
- package/src/core/network/connection.ts +0 -5
- package/src/core/network/requests-toasting.tsx +1 -49
- package/src/core/network/resolve.ts +1 -5
- package/src/core/notebook/replica/__tests__/replica.test.ts +3 -3
- package/src/core/notebook/replica/connection.ts +1 -5
- package/src/core/runtime/__tests__/createWsUrl.test.ts +4 -16
- package/src/core/runtime/__tests__/runtime.test.ts +58 -168
- package/src/core/runtime/adapter.ts +1 -8
- package/src/core/runtime/config.ts +4 -59
- package/src/core/runtime/runtime.ts +1 -31
- package/src/core/runtime/types.ts +0 -5
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +5 -5
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +125 -29
- package/src/core/session/connection-utils.ts +2 -14
- package/src/core/session/useNotebookSession.tsx +19 -12
- package/src/mount.tsx +3 -9
- package/src/utils/errors.ts +0 -7
- package/dist/feedback-button-BJvIOw-c.js +0 -371
- package/dist/toDate-5qPtZ6HL.js +0 -94
- package/src/components/editor/alerts/connecting-alert.tsx +0 -27
- package/src/core/network/__tests__/requests-lazy.test.ts +0 -322
- package/src/core/network/requests-lazy.ts +0 -222
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
2
|
import { g as t } from "./button-BuSV-mLI.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import "./useEvent-xDnF2X04.js";
|
|
8
|
-
import { _ as l, a as u, c as d, f, s as p, v as m } from "./toDate-5qPtZ6HL.js";
|
|
9
|
-
var h = r("circle-question-mark", [
|
|
3
|
+
import { h as n } from "./tooltip-BekOCQ3v.js";
|
|
4
|
+
import { Rt as r, d as i, m as a, yt as o } from "./use-restore-focus-DyrKLdSB.js";
|
|
5
|
+
import { i as s, m as c, n as l } from "./static-state-Dtocd9UO.js";
|
|
6
|
+
var u = n("circle-question-mark", [
|
|
10
7
|
["circle", {
|
|
11
8
|
cx: "12",
|
|
12
9
|
cy: "12",
|
|
@@ -21,14 +18,7 @@ var h = r("circle-question-mark", [
|
|
|
21
18
|
d: "M12 17h.01",
|
|
22
19
|
key: "p32p05"
|
|
23
20
|
}]
|
|
24
|
-
])
|
|
25
|
-
n();
|
|
26
|
-
function g(e) {
|
|
27
|
-
return e === m.NOT_STARTED;
|
|
28
|
-
}
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/utils/Deferred.ts
|
|
31
|
-
var _ = class {
|
|
21
|
+
]), d = class {
|
|
32
22
|
promise;
|
|
33
23
|
resolve;
|
|
34
24
|
reject;
|
|
@@ -39,17 +29,17 @@ var _ = class {
|
|
|
39
29
|
this.reject = (e) => {
|
|
40
30
|
this.status = "rejected", t(e);
|
|
41
31
|
}, this.resolve = (t) => {
|
|
42
|
-
this.status = "resolved",
|
|
32
|
+
this.status = "resolved", f(t) || (this.value = t), e(t);
|
|
43
33
|
};
|
|
44
34
|
});
|
|
45
35
|
}
|
|
46
36
|
};
|
|
47
|
-
function
|
|
37
|
+
function f(e) {
|
|
48
38
|
return typeof e == "object" && !!e && "then" in e && typeof e.then == "function";
|
|
49
39
|
}
|
|
50
40
|
//#endregion
|
|
51
41
|
//#region ../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js
|
|
52
|
-
var
|
|
42
|
+
var p = /* @__PURE__ */ e(((e) => {
|
|
53
43
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.toBig = e.shrSL = e.shrSH = e.rotrSL = e.rotrSH = e.rotrBL = e.rotrBH = e.rotr32L = e.rotr32H = e.rotlSL = e.rotlSH = e.rotlBL = e.rotlBH = e.add5L = e.add5H = e.add4L = e.add4H = e.add3L = e.add3H = void 0, e.add = v, e.fromBig = r, e.split = i;
|
|
54
44
|
var t = /* @__PURE__ */ BigInt(2 ** 32 - 1), n = /* @__PURE__ */ BigInt(32);
|
|
55
45
|
function r(e, r = !1) {
|
|
@@ -137,11 +127,11 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
137
127
|
add5H: w,
|
|
138
128
|
add5L: C
|
|
139
129
|
};
|
|
140
|
-
})),
|
|
130
|
+
})), m = /* @__PURE__ */ e(((e) => {
|
|
141
131
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.crypto = void 0, e.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
142
|
-
})),
|
|
143
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = n, e.anumber = r, e.abytes = i, e.ahash = a, e.aexists = o, e.aoutput = s, e.u8 = c, e.u32 = l, e.clean = u, e.createView = d, e.rotr = f, e.rotl = p, e.byteSwap =
|
|
144
|
-
var t =
|
|
132
|
+
})), h = /* @__PURE__ */ e(((e) => {
|
|
133
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = n, e.anumber = r, e.abytes = i, e.ahash = a, e.aexists = o, e.aoutput = s, e.u8 = c, e.u32 = l, e.clean = u, e.createView = d, e.rotr = f, e.rotl = p, e.byteSwap = h, e.byteSwap32 = g, e.bytesToHex = y, e.hexToBytes = S, e.asyncLoop = C, e.utf8ToBytes = w, e.bytesToUtf8 = T, e.toBytes = E, e.kdfInputToBytes = D, e.concatBytes = O, e.checkOpts = k, e.createHasher = A, e.createOptHasher = j, e.createXOFer = M, e.randomBytes = N;
|
|
134
|
+
var t = m();
|
|
145
135
|
function n(e) {
|
|
146
136
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
147
137
|
}
|
|
@@ -184,23 +174,23 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
184
174
|
return e << t | e >>> 32 - t >>> 0;
|
|
185
175
|
}
|
|
186
176
|
e.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
187
|
-
function
|
|
177
|
+
function h(e) {
|
|
188
178
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
189
179
|
}
|
|
190
|
-
e.swap8IfBE = e.isLE ? (e) => e : (e) =>
|
|
191
|
-
function
|
|
192
|
-
for (let t = 0; t < e.length; t++) e[t] =
|
|
180
|
+
e.swap8IfBE = e.isLE ? (e) => e : (e) => h(e), e.byteSwapIfBE = e.swap8IfBE;
|
|
181
|
+
function g(e) {
|
|
182
|
+
for (let t = 0; t < e.length; t++) e[t] = h(e[t]);
|
|
193
183
|
return e;
|
|
194
184
|
}
|
|
195
|
-
e.swap32IfBE = e.isLE ? (e) => e :
|
|
196
|
-
var
|
|
197
|
-
function
|
|
198
|
-
if (i(e),
|
|
185
|
+
e.swap32IfBE = e.isLE ? (e) => e : g;
|
|
186
|
+
var _ = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", v = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
187
|
+
function y(e) {
|
|
188
|
+
if (i(e), _) return e.toHex();
|
|
199
189
|
let t = "";
|
|
200
|
-
for (let n = 0; n < e.length; n++) t +=
|
|
190
|
+
for (let n = 0; n < e.length; n++) t += v[e[n]];
|
|
201
191
|
return t;
|
|
202
192
|
}
|
|
203
|
-
var
|
|
193
|
+
var b = {
|
|
204
194
|
_0: 48,
|
|
205
195
|
_9: 57,
|
|
206
196
|
A: 65,
|
|
@@ -209,13 +199,13 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
209
199
|
f: 102
|
|
210
200
|
};
|
|
211
201
|
function x(e) {
|
|
212
|
-
if (e >=
|
|
213
|
-
if (e >=
|
|
214
|
-
if (e >=
|
|
202
|
+
if (e >= b._0 && e <= b._9) return e - b._0;
|
|
203
|
+
if (e >= b.A && e <= b.F) return e - (b.A - 10);
|
|
204
|
+
if (e >= b.a && e <= b.f) return e - (b.a - 10);
|
|
215
205
|
}
|
|
216
206
|
function S(e) {
|
|
217
207
|
if (typeof e != "string") throw Error("hex string expected, got " + typeof e);
|
|
218
|
-
if (
|
|
208
|
+
if (_) return Uint8Array.fromHex(e);
|
|
219
209
|
let t = e.length, n = t / 2;
|
|
220
210
|
if (t % 2) throw Error("hex string expected, got unpadded hex of length " + t);
|
|
221
211
|
let r = new Uint8Array(n);
|
|
@@ -287,38 +277,38 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
287
277
|
if (t.crypto && typeof t.crypto.randomBytes == "function") return Uint8Array.from(t.crypto.randomBytes(e));
|
|
288
278
|
throw Error("crypto.getRandomValues must be defined");
|
|
289
279
|
}
|
|
290
|
-
})),
|
|
291
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.shake256 = e.shake128 = e.keccak_512 = e.keccak_384 = e.keccak_256 = e.keccak_224 = e.sha3_512 = e.sha3_384 = e.sha3_256 = e.sha3_224 = e.Keccak = void 0, e.keccakP =
|
|
292
|
-
var t =
|
|
280
|
+
})), g = /* @__PURE__ */ e(((e) => {
|
|
281
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.shake256 = e.shake128 = e.keccak_512 = e.keccak_384 = e.keccak_256 = e.keccak_224 = e.sha3_512 = e.sha3_384 = e.sha3_256 = e.sha3_224 = e.Keccak = void 0, e.keccakP = y;
|
|
282
|
+
var t = p(), n = h(), r = BigInt(0), i = BigInt(1), a = BigInt(2), o = BigInt(7), s = BigInt(256), c = BigInt(113), l = [], u = [], d = [];
|
|
293
283
|
for (let e = 0, t = i, n = 1, f = 0; e < 24; e++) {
|
|
294
284
|
[n, f] = [f, (2 * n + 3 * f) % 5], l.push(2 * (5 * f + n)), u.push((e + 1) * (e + 2) / 2 % 64);
|
|
295
285
|
let p = r;
|
|
296
286
|
for (let e = 0; e < 7; e++) t = (t << i ^ (t >> o) * c) % s, t & a && (p ^= i << (i << /* @__PURE__ */ BigInt(e)) - i);
|
|
297
287
|
d.push(p);
|
|
298
288
|
}
|
|
299
|
-
var f = (0, t.split)(d, !0),
|
|
300
|
-
function
|
|
289
|
+
var f = (0, t.split)(d, !0), m = f[0], g = f[1], _ = (e, n, r) => r > 32 ? (0, t.rotlBH)(e, n, r) : (0, t.rotlSH)(e, n, r), v = (e, n, r) => r > 32 ? (0, t.rotlBL)(e, n, r) : (0, t.rotlSL)(e, n, r);
|
|
290
|
+
function y(e, t = 24) {
|
|
301
291
|
let r = /* @__PURE__ */ new Uint32Array(10);
|
|
302
292
|
for (let n = 24 - t; n < 24; n++) {
|
|
303
293
|
for (let t = 0; t < 10; t++) r[t] = e[t] ^ e[t + 10] ^ e[t + 20] ^ e[t + 30] ^ e[t + 40];
|
|
304
294
|
for (let t = 0; t < 10; t += 2) {
|
|
305
|
-
let n = (t + 8) % 10, i = (t + 2) % 10, a = r[i], o = r[i + 1], s =
|
|
295
|
+
let n = (t + 8) % 10, i = (t + 2) % 10, a = r[i], o = r[i + 1], s = _(a, o, 1) ^ r[n], c = v(a, o, 1) ^ r[n + 1];
|
|
306
296
|
for (let n = 0; n < 50; n += 10) e[t + n] ^= s, e[t + n + 1] ^= c;
|
|
307
297
|
}
|
|
308
298
|
let t = e[2], i = e[3];
|
|
309
299
|
for (let n = 0; n < 24; n++) {
|
|
310
|
-
let r = u[n], a =
|
|
300
|
+
let r = u[n], a = _(t, i, r), o = v(t, i, r), s = l[n];
|
|
311
301
|
t = e[s], i = e[s + 1], e[s] = a, e[s + 1] = o;
|
|
312
302
|
}
|
|
313
303
|
for (let t = 0; t < 50; t += 10) {
|
|
314
304
|
for (let n = 0; n < 10; n++) r[n] = e[t + n];
|
|
315
305
|
for (let n = 0; n < 10; n++) e[t + n] ^= ~r[(n + 2) % 10] & r[(n + 4) % 10];
|
|
316
306
|
}
|
|
317
|
-
e[0] ^=
|
|
307
|
+
e[0] ^= m[n], e[1] ^= g[n];
|
|
318
308
|
}
|
|
319
309
|
(0, n.clean)(r);
|
|
320
310
|
}
|
|
321
|
-
var
|
|
311
|
+
var b = class e extends n.Hash {
|
|
322
312
|
constructor(e, t, r, i = !1, a = 24) {
|
|
323
313
|
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = e, this.suffix = t, this.outputLen = r, this.enableXOF = i, this.rounds = a, (0, n.anumber)(r), !(0 < e && e < 200)) throw Error("only keccak-f1600 function is supported");
|
|
324
314
|
this.state = /* @__PURE__ */ new Uint8Array(200), this.state32 = (0, n.u32)(this.state);
|
|
@@ -327,7 +317,7 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
327
317
|
return this._cloneInto();
|
|
328
318
|
}
|
|
329
319
|
keccak() {
|
|
330
|
-
(0, n.swap32IfBE)(this.state32),
|
|
320
|
+
(0, n.swap32IfBE)(this.state32), y(this.state32, this.rounds), (0, n.swap32IfBE)(this.state32), this.posOut = 0, this.pos = 0;
|
|
331
321
|
}
|
|
332
322
|
update(e) {
|
|
333
323
|
(0, n.aexists)(this), e = (0, n.toBytes)(e), (0, n.abytes)(e);
|
|
@@ -377,13 +367,13 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
377
367
|
return t ||= new e(n, r, i, o, a), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = a, t.suffix = r, t.outputLen = i, t.enableXOF = o, t.destroyed = this.destroyed, t;
|
|
378
368
|
}
|
|
379
369
|
};
|
|
380
|
-
e.Keccak =
|
|
381
|
-
var
|
|
382
|
-
e.sha3_224 =
|
|
383
|
-
var S = (e, t, r) => (0, n.createXOFer)((n = {}) => new
|
|
370
|
+
e.Keccak = b;
|
|
371
|
+
var x = (e, t, r) => (0, n.createHasher)(() => new b(t, e, r));
|
|
372
|
+
e.sha3_224 = x(6, 144, 28), e.sha3_256 = x(6, 136, 32), e.sha3_384 = x(6, 104, 48), e.sha3_512 = x(6, 72, 64), e.keccak_224 = x(1, 144, 28), e.keccak_256 = x(1, 136, 32), e.keccak_384 = x(1, 104, 48), e.keccak_512 = x(1, 72, 64);
|
|
373
|
+
var S = (e, t, r) => (0, n.createXOFer)((n = {}) => new b(t, e, n.dkLen === void 0 ? r : n.dkLen, !0));
|
|
384
374
|
e.shake128 = S(31, 168, 16), e.shake256 = S(31, 136, 32);
|
|
385
|
-
})),
|
|
386
|
-
var { sha3_512: n } =
|
|
375
|
+
})), _ = /* @__PURE__ */ e(((e, t) => {
|
|
376
|
+
var { sha3_512: n } = g(), r = 24, i = 32, a = (e = 4, t = Math.random) => {
|
|
387
377
|
let n = "";
|
|
388
378
|
for (; n.length < e;) n += Math.floor(t() * 36).toString(36);
|
|
389
379
|
return n;
|
|
@@ -413,19 +403,19 @@ var y = /* @__PURE__ */ e(((e) => {
|
|
|
413
403
|
defaultLength: r,
|
|
414
404
|
bigLength: i
|
|
415
405
|
}), t.exports.init = p, t.exports.createId = m, t.exports.bufToBigInt = o, t.exports.createCounter = d, t.exports.createFingerprint = u, t.exports.isCuid = h;
|
|
416
|
-
})),
|
|
417
|
-
var { createId: n, init: r, getConstants: i, isCuid: a } =
|
|
406
|
+
})), v = /* @__PURE__ */ e(((e, t) => {
|
|
407
|
+
var { createId: n, init: r, getConstants: i, isCuid: a } = _();
|
|
418
408
|
t.exports.createId = n, t.exports.init = r, t.exports.getConstants = i, t.exports.isCuid = a;
|
|
419
|
-
})),
|
|
420
|
-
function
|
|
409
|
+
})), y = v();
|
|
410
|
+
function b(e) {
|
|
421
411
|
let t = new URL(window.location.href);
|
|
422
412
|
e(t.searchParams), window.history.replaceState({}, "", t.toString());
|
|
423
413
|
}
|
|
424
|
-
var
|
|
425
|
-
function
|
|
426
|
-
return typeof e == "string" &&
|
|
414
|
+
var x = /^(https?:\/\/\S+)$/;
|
|
415
|
+
function S(e) {
|
|
416
|
+
return typeof e == "string" && x.test(e);
|
|
427
417
|
}
|
|
428
|
-
function
|
|
418
|
+
function C({ href: e, queryParams: t, keys: n }) {
|
|
429
419
|
let r = typeof t == "string" ? new URLSearchParams(t) : t;
|
|
430
420
|
if (r.size === 0 || e.startsWith("http://") || e.startsWith("https://")) return e;
|
|
431
421
|
let i = e.startsWith("#"), a = i && e.includes("?");
|
|
@@ -446,41 +436,35 @@ function k({ href: e, queryParams: t, keys: n }) {
|
|
|
446
436
|
}
|
|
447
437
|
//#endregion
|
|
448
438
|
//#region src/core/kernel/session.ts
|
|
449
|
-
var
|
|
450
|
-
function
|
|
451
|
-
return `s_${
|
|
439
|
+
var w = r(null), T = (0, y.init)({ length: 6 });
|
|
440
|
+
function E() {
|
|
441
|
+
return `s_${T()}`;
|
|
452
442
|
}
|
|
453
|
-
function
|
|
443
|
+
function D(e) {
|
|
454
444
|
return e ? /^s_[\da-z]{6}$/.test(e) : !1;
|
|
455
445
|
}
|
|
456
|
-
var
|
|
457
|
-
function
|
|
458
|
-
let e =
|
|
459
|
-
return
|
|
460
|
-
e ? t.has(
|
|
461
|
-
}), r === null ? (t.debug("Starting a new session", { sessionId: n }),
|
|
446
|
+
var O = null;
|
|
447
|
+
function k() {
|
|
448
|
+
let e = o.get(s) === "edit", n = new URL(window.location.href).searchParams.get(a.sessionId), r = D(n) ? n : null;
|
|
449
|
+
return b((t) => {
|
|
450
|
+
e ? t.has(a.kiosk) || t.delete(a.sessionId) : (t.delete(a.sessionId), t.delete(a.kiosk));
|
|
451
|
+
}), r === null ? (t.debug("Starting a new session", { sessionId: n }), E()) : e ? (t.debug("Connecting to existing session", { sessionId: r }), r) : (t.debug("Ignoring session_id from URL outside the editor", { sessionId: r }), E());
|
|
462
452
|
}
|
|
463
|
-
function
|
|
464
|
-
return
|
|
453
|
+
function A() {
|
|
454
|
+
return O === null && (O = k()), O;
|
|
465
455
|
}
|
|
466
456
|
//#endregion
|
|
467
457
|
//#region src/core/runtime/runtime.ts
|
|
468
|
-
var
|
|
469
|
-
initialHealthyCheck = new
|
|
470
|
-
starting;
|
|
458
|
+
var j = new Set(Object.values(a)), M = class {
|
|
459
|
+
initialHealthyCheck = new d();
|
|
471
460
|
config;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
this.config = e, this.lazy = t;
|
|
461
|
+
constructor(e) {
|
|
462
|
+
this.config = e;
|
|
475
463
|
try {
|
|
476
464
|
new URL(this.config.url);
|
|
477
465
|
} catch (e) {
|
|
478
466
|
throw Error(`Invalid runtime URL: ${this.config.url}. ${e instanceof Error ? e.message : "Unknown error"}`, { cause: e });
|
|
479
467
|
}
|
|
480
|
-
this.lazy || this.init();
|
|
481
|
-
}
|
|
482
|
-
get isLazy() {
|
|
483
|
-
return this.lazy;
|
|
484
468
|
}
|
|
485
469
|
get httpURL() {
|
|
486
470
|
return new URL(this.config.url);
|
|
@@ -489,23 +473,23 @@ var L = new Set(Object.values(o)), R = class {
|
|
|
489
473
|
return this.httpURL.origin === window.location.origin;
|
|
490
474
|
}
|
|
491
475
|
get isServerless() {
|
|
492
|
-
return
|
|
476
|
+
return c() || i() || l();
|
|
493
477
|
}
|
|
494
478
|
formatHttpURL({ path: e = "", searchParams: t, restrictToKnownQueryParams: n = !0 }) {
|
|
495
479
|
let r = this.httpURL, i = new URLSearchParams(window.location.search);
|
|
496
480
|
if (t) for (let [e, n] of t.entries()) r.searchParams.set(e, n);
|
|
497
|
-
for (let [e, t] of i.entries()) (!n ||
|
|
481
|
+
for (let [e, t] of i.entries()) (!n || j.has(e)) && r.searchParams.set(e, t);
|
|
498
482
|
return r.pathname = `${r.pathname.replace(/\/$/, "")}/${e.replace(/^\//, "")}`, r.hash = "", r;
|
|
499
483
|
}
|
|
500
484
|
appendCrossOriginAuth(e) {
|
|
501
|
-
return !this.isSameOrigin && this.config.authToken && e.searchParams.set(
|
|
485
|
+
return !this.isSameOrigin && this.config.authToken && e.searchParams.set(a.accessToken, this.config.authToken), e;
|
|
502
486
|
}
|
|
503
487
|
formatNavigableHttpURL(e, t) {
|
|
504
488
|
let n = this.formatHttpURL({
|
|
505
489
|
path: e,
|
|
506
490
|
searchParams: t
|
|
507
491
|
});
|
|
508
|
-
return n.searchParams.delete(
|
|
492
|
+
return n.searchParams.delete(a.accessToken), this.appendCrossOriginAuth(n);
|
|
509
493
|
}
|
|
510
494
|
formatWsURL(e, t) {
|
|
511
495
|
let n = this.formatHttpURL({
|
|
@@ -513,25 +497,25 @@ var L = new Set(Object.values(o)), R = class {
|
|
|
513
497
|
searchParams: t,
|
|
514
498
|
restrictToKnownQueryParams: !1
|
|
515
499
|
});
|
|
516
|
-
return
|
|
500
|
+
return N(this.appendCrossOriginAuth(n).toString());
|
|
517
501
|
}
|
|
518
502
|
getSessionURL(e, t) {
|
|
519
503
|
let n = this.formatHttpURL({ path: e }), r = new URLSearchParams(this.httpURL.search), i = new URLSearchParams(window.location.search);
|
|
520
504
|
for (let e of i.keys()) r.delete(e);
|
|
521
505
|
for (let [e, t] of i) r.append(e, t);
|
|
522
|
-
return r.delete(
|
|
506
|
+
return r.delete(a.accessToken), r.delete("refresh_token"), r.delete(a.sessionId), n.searchParams.set("query_params", r.toString()), n.searchParams.set(a.sessionId, t), n;
|
|
523
507
|
}
|
|
524
508
|
getWsURL(e) {
|
|
525
509
|
let t = this.getSessionURL("/ws", e);
|
|
526
|
-
return
|
|
510
|
+
return N(this.appendCrossOriginAuth(t).toString());
|
|
527
511
|
}
|
|
528
512
|
getSseURL(e) {
|
|
529
513
|
let t = this.getSessionURL("/sse", e);
|
|
530
|
-
return t.searchParams.delete(
|
|
514
|
+
return t.searchParams.delete(a.accessToken), t;
|
|
531
515
|
}
|
|
532
516
|
getNotebookURL(e) {
|
|
533
517
|
let t = this.formatHttpURL({ path: `/api/marimo/v1/notebooks/${encodeURIComponent(e)}` });
|
|
534
|
-
return t.searchParams.delete(
|
|
518
|
+
return t.searchParams.delete(a.accessToken), t;
|
|
535
519
|
}
|
|
536
520
|
getTerminalWsURL(e) {
|
|
537
521
|
let t = this.formatWsURL("/terminal/ws");
|
|
@@ -539,8 +523,8 @@ var L = new Set(Object.values(o)), R = class {
|
|
|
539
523
|
}
|
|
540
524
|
getLSPURL(e) {
|
|
541
525
|
if (e === "copilot") {
|
|
542
|
-
let t = this.formatWsURL(`/lsp/${e}`), n = t.searchParams.get(
|
|
543
|
-
return t.search = "", n && t.searchParams.set(
|
|
526
|
+
let t = this.formatWsURL(`/lsp/${e}`), n = t.searchParams.get(a.accessToken);
|
|
527
|
+
return t.search = "", n && t.searchParams.set(a.accessToken, n), t;
|
|
544
528
|
}
|
|
545
529
|
return this.formatWsURL(`/lsp/${e}`);
|
|
546
530
|
}
|
|
@@ -595,24 +579,19 @@ var L = new Set(Object.values(o)), R = class {
|
|
|
595
579
|
async waitForHealthy() {
|
|
596
580
|
return this.initialHealthyCheck.promise;
|
|
597
581
|
}
|
|
598
|
-
start() {
|
|
599
|
-
return this.starting ??= this.init().then(() => this.waitForHealthy()).catch((e) => {
|
|
600
|
-
throw this.starting = void 0, this.initialHealthyCheck = new _(), e;
|
|
601
|
-
}), this.starting;
|
|
602
|
-
}
|
|
603
582
|
headers() {
|
|
604
583
|
let e = {
|
|
605
|
-
"Marimo-Session-Id":
|
|
584
|
+
"Marimo-Session-Id": A(),
|
|
606
585
|
"Marimo-Server-Token": this.config.serverToken ?? "",
|
|
607
586
|
"x-runtime-url": this.httpURL.toString()
|
|
608
587
|
};
|
|
609
588
|
return this.config.authToken && (e.Authorization = `Bearer ${this.config.authToken}`), e;
|
|
610
589
|
}
|
|
611
590
|
sessionHeaders() {
|
|
612
|
-
return { "Marimo-Session-Id":
|
|
591
|
+
return { "Marimo-Session-Id": A() };
|
|
613
592
|
}
|
|
614
593
|
};
|
|
615
|
-
function
|
|
594
|
+
function N(e) {
|
|
616
595
|
if (!e.startsWith("http")) {
|
|
617
596
|
t.warn(`URL must start with http: ${e}`);
|
|
618
597
|
let n = new URL(e);
|
|
@@ -622,39 +601,18 @@ function z(e) {
|
|
|
622
601
|
}
|
|
623
602
|
//#endregion
|
|
624
603
|
//#region src/core/runtime/config.ts
|
|
625
|
-
function
|
|
604
|
+
function P() {
|
|
626
605
|
let e = new URL(document.baseURI);
|
|
627
606
|
return e.search = "", e.hash = "", e.toString();
|
|
628
607
|
}
|
|
629
|
-
var
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}, H = i(V), U = i((e) => {
|
|
633
|
-
let t = e(H);
|
|
634
|
-
return new R(t, t.lazy);
|
|
635
|
-
});
|
|
636
|
-
function W() {
|
|
637
|
-
return s.get(U);
|
|
608
|
+
var F = { url: P() }, I = r(F), L = r((e) => new M(e(I)));
|
|
609
|
+
function R() {
|
|
610
|
+
return o.get(L);
|
|
638
611
|
}
|
|
639
|
-
|
|
640
|
-
let e = W();
|
|
641
|
-
if (!e.isServerless && e.isLazy) {
|
|
642
|
-
g(s.get(d).state) && s.set(d, { state: m.CONNECTING });
|
|
643
|
-
try {
|
|
644
|
-
await e.start();
|
|
645
|
-
} catch (e) {
|
|
646
|
-
throw s.get(d).state === m.CONNECTING && s.set(d, {
|
|
647
|
-
state: m.CLOSED,
|
|
648
|
-
code: l.KERNEL_STARTUP_ERROR,
|
|
649
|
-
reason: c(e)
|
|
650
|
-
}), e;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
function K(e) {
|
|
612
|
+
function z(e) {
|
|
655
613
|
if (e.startsWith("http")) return new URL(e);
|
|
656
|
-
let t =
|
|
614
|
+
let t = R().httpURL.toString();
|
|
657
615
|
return t.startsWith("blob:") && (t = t.replace("blob:", "")), new URL(e, t);
|
|
658
616
|
}
|
|
659
617
|
//#endregion
|
|
660
|
-
export {
|
|
618
|
+
export { S as a, d as c, C as i, u as l, R as n, b as o, w as r, v as s, z as t };
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { t } from "./react-CHbZqgBF.js";
|
|
3
3
|
import { t as n } from "./react-dom-DhWGW7e0.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-CSElxhxo.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-
|
|
5
|
+
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-BmtEcZoo.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
|
|
7
7
|
var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
|
|
8
8
|
name: "DataGridOverlayEditorStyle",
|