@marimo-team/islands 0.21.2-dev2 → 0.21.2-dev21
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/main.js +171 -92
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/app-config/user-config-form.tsx +5 -4
- package/src/components/ui/range-slider.tsx +108 -1
- package/src/core/codemirror/lsp/notebook-lsp.ts +28 -2
- package/src/css/md.css +7 -0
- package/src/plugins/core/sanitize-html.ts +25 -18
- package/src/plugins/impl/SliderPlugin.tsx +1 -3
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +120 -0
- package/src/utils/__tests__/download.test.tsx +2 -2
- package/src/utils/download.ts +4 -3
- package/src/utils/html-to-image.ts +6 -0
package/dist/main.js
CHANGED
|
@@ -29325,6 +29325,8 @@ ${c.sqlString}
|
|
|
29325
29325
|
var NotebookLanguageServerClient = (_a = class {
|
|
29326
29326
|
constructor(e, r, c = defaultGetNotebookEditors) {
|
|
29327
29327
|
__publicField(this, "completionItemCache", new LRUCache(10));
|
|
29328
|
+
__publicField(this, "latestDiagnosticsVersion", null);
|
|
29329
|
+
__publicField(this, "forwardedDiagnosticsVersion", 0);
|
|
29328
29330
|
this.documentUri = getLSPDocument(), this.getNotebookEditors = c, this.initialSettings = r, this.client = e, this.patchProcessNotification(), this.initializePromise.then(() => {
|
|
29329
29331
|
invariant(isClientWithNotify(this.client), "notify is not a method on the client"), this.client.notify("workspace/didChangeConfiguration", {
|
|
29330
29332
|
settings: r
|
|
@@ -29372,7 +29374,7 @@ ${c.sqlString}
|
|
|
29372
29374
|
settings: this.initialSettings
|
|
29373
29375
|
});
|
|
29374
29376
|
let { lens: e, version: r } = this.snapshotter.snapshot();
|
|
29375
|
-
await this.client.textDocumentDidOpen({
|
|
29377
|
+
this.latestDiagnosticsVersion = null, this.forwardedDiagnosticsVersion = 0, await this.client.textDocumentDidOpen({
|
|
29376
29378
|
textDocument: {
|
|
29377
29379
|
languageId: "python",
|
|
29378
29380
|
text: e.mergedText,
|
|
@@ -29570,39 +29572,49 @@ ${c.sqlString}
|
|
|
29570
29572
|
invariant("processNotification" in this.client, "processNotification is not a method on the client");
|
|
29571
29573
|
let r = this.client.processNotification.bind(this.client), c = (c2) => {
|
|
29572
29574
|
if (c2.method === "textDocument/publishDiagnostics") {
|
|
29575
|
+
let d = c2.params.version;
|
|
29576
|
+
if (d != null) {
|
|
29577
|
+
let e = this.latestDiagnosticsVersion;
|
|
29578
|
+
if (e !== null && Number.isFinite(d) && d < e) {
|
|
29579
|
+
Logger.debug("[lsp] dropping stale diagnostics notification", c2);
|
|
29580
|
+
return;
|
|
29581
|
+
}
|
|
29582
|
+
this.latestDiagnosticsVersion = d;
|
|
29583
|
+
}
|
|
29573
29584
|
Logger.debug("[lsp] handling diagnostics", c2);
|
|
29574
|
-
let
|
|
29575
|
-
for (let e of
|
|
29576
|
-
|
|
29585
|
+
let f = this.snapshotter.getLatestSnapshot(), _ = c2.params.diagnostics, { lens: v } = f, y = ++this.forwardedDiagnosticsVersion, S = /* @__PURE__ */ new Map();
|
|
29586
|
+
for (let e of _) for (let r2 of v.cellIds) if (v.isInRange(e.range, r2)) {
|
|
29587
|
+
S.has(r2) || S.set(r2, []);
|
|
29577
29588
|
let c3 = {
|
|
29578
29589
|
...e,
|
|
29579
|
-
range:
|
|
29590
|
+
range: v.reverseRange(e.range, r2)
|
|
29580
29591
|
};
|
|
29581
|
-
|
|
29592
|
+
S.get(r2).push(c3);
|
|
29582
29593
|
break;
|
|
29583
29594
|
}
|
|
29584
|
-
let
|
|
29585
|
-
_a.pruneSeenCellUris(
|
|
29586
|
-
let
|
|
29587
|
-
for (let [e, d2] of
|
|
29595
|
+
let w = new Set(v.cellIds);
|
|
29596
|
+
_a.pruneSeenCellUris(w);
|
|
29597
|
+
let E = new Set(_a.SEEN_CELL_DOCUMENT_URIS);
|
|
29598
|
+
for (let [e, d2] of S.entries()) {
|
|
29588
29599
|
Logger.debug("[lsp] diagnostics for cell", e, d2);
|
|
29589
29600
|
let f2 = CellDocumentUri.of(e);
|
|
29590
|
-
|
|
29601
|
+
E.delete(f2), r({
|
|
29591
29602
|
...c2,
|
|
29592
29603
|
params: {
|
|
29593
29604
|
...c2.params,
|
|
29594
29605
|
uri: f2,
|
|
29595
|
-
version:
|
|
29606
|
+
version: y,
|
|
29596
29607
|
diagnostics: d2
|
|
29597
29608
|
}
|
|
29598
29609
|
});
|
|
29599
29610
|
}
|
|
29600
|
-
if (
|
|
29601
|
-
Logger.debug("[lsp] clearing diagnostics",
|
|
29602
|
-
for (let e of
|
|
29611
|
+
if (E.size > 0) {
|
|
29612
|
+
Logger.debug("[lsp] clearing diagnostics", E);
|
|
29613
|
+
for (let e of E) r({
|
|
29603
29614
|
method: "textDocument/publishDiagnostics",
|
|
29604
29615
|
params: {
|
|
29605
29616
|
uri: e,
|
|
29617
|
+
version: y,
|
|
29606
29618
|
diagnostics: []
|
|
29607
29619
|
}
|
|
29608
29620
|
});
|
|
@@ -32264,12 +32276,14 @@ ${c.sqlString}
|
|
|
32264
32276
|
afterCursorCode: getEditorCodeAsPython(e, v)
|
|
32265
32277
|
};
|
|
32266
32278
|
}
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32270
|
-
|
|
32271
|
-
|
|
32272
|
-
|
|
32279
|
+
if (typeof document < "u") {
|
|
32280
|
+
let e = "data-temp-href-target";
|
|
32281
|
+
purify.addHook("beforeSanitizeAttributes", (r) => {
|
|
32282
|
+
r.tagName === "A" && (r.hasAttribute("target") || r.setAttribute("target", "_self"), r.hasAttribute("target") && r.setAttribute(e, r.getAttribute("target") || ""));
|
|
32283
|
+
}), purify.addHook("afterSanitizeAttributes", (r) => {
|
|
32284
|
+
r.tagName === "A" && r.hasAttribute(e) && (r.setAttribute("target", r.getAttribute(e) || ""), r.removeAttribute(e), r.getAttribute("target") === "_blank" && r.setAttribute("rel", "noopener noreferrer"));
|
|
32285
|
+
});
|
|
32286
|
+
}
|
|
32273
32287
|
function sanitizeHtml(e) {
|
|
32274
32288
|
let r = {
|
|
32275
32289
|
USE_PROFILES: {
|
|
@@ -58976,9 +58990,16 @@ ${r}
|
|
|
58976
58990
|
}
|
|
58977
58991
|
var isSlotElement = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", isSVGElement = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
58978
58992
|
async function cloneChildren(e, r, c) {
|
|
58993
|
+
var _a3;
|
|
58979
58994
|
if (isSVGElement(r)) return r;
|
|
58980
58995
|
let d = [];
|
|
58981
|
-
|
|
58996
|
+
if (isSlotElement(e) && e.assignedNodes) d = toArray(e.assignedNodes());
|
|
58997
|
+
else if (isInstanceOfElement(e, HTMLIFrameElement)) try {
|
|
58998
|
+
((_a3 = e.contentDocument) == null ? void 0 : _a3.body) && (d = toArray(e.contentDocument.body.childNodes));
|
|
58999
|
+
} catch {
|
|
59000
|
+
}
|
|
59001
|
+
else d = toArray((e.shadowRoot ?? e).childNodes);
|
|
59002
|
+
return d.length === 0 || isInstanceOfElement(e, HTMLVideoElement) || await d.reduce((e2, d2) => e2.then(() => cloneNode(d2, c)).then((e3) => {
|
|
58982
59003
|
e3 && r.appendChild(e3);
|
|
58983
59004
|
}), Promise.resolve()), r;
|
|
58984
59005
|
}
|
|
@@ -59190,12 +59211,13 @@ ${r}
|
|
|
59190
59211
|
return getWebFontRules(await getCSSRules(toArray(e.ownerDocument.styleSheets), r));
|
|
59191
59212
|
}
|
|
59192
59213
|
function normalizeFontFamily(e) {
|
|
59193
|
-
return e.trim().replace(/["']/g, "");
|
|
59214
|
+
return (e || "").trim().replace(/["']/g, "");
|
|
59194
59215
|
}
|
|
59195
59216
|
function getUsedFonts(e) {
|
|
59196
59217
|
let r = /* @__PURE__ */ new Set();
|
|
59197
59218
|
function c(e2) {
|
|
59198
|
-
|
|
59219
|
+
let d = e2.style.fontFamily || getComputedStyle(e2).fontFamily;
|
|
59220
|
+
d && d.split(",").forEach((e3) => {
|
|
59199
59221
|
r.add(normalizeFontFamily(e3));
|
|
59200
59222
|
}), Array.from(e2.children).forEach((e3) => {
|
|
59201
59223
|
e3 instanceof HTMLElement && c(e3);
|
|
@@ -59211,7 +59233,7 @@ ${r}
|
|
|
59211
59233
|
}))).join("\n");
|
|
59212
59234
|
}
|
|
59213
59235
|
async function embedWebFonts(e, r) {
|
|
59214
|
-
let c = r.fontEmbedCSS == null ? r.skipFonts ? null : await getWebFontCSS(e, r) : r.fontEmbedCSS, d = r.extraStyleContent == null ? c :
|
|
59236
|
+
let c = r.fontEmbedCSS == null ? r.skipFonts ? null : await getWebFontCSS(e, r) : r.fontEmbedCSS, d = r.extraStyleContent == null ? c : (c || "").concat(r.extraStyleContent);
|
|
59215
59237
|
if (d) {
|
|
59216
59238
|
let r2 = document.createElement("style"), c2 = document.createTextNode(d);
|
|
59217
59239
|
r2.appendChild(c2), e.firstChild ? e.insertBefore(r2, e.firstChild) : e.appendChild(r2);
|
|
@@ -59240,6 +59262,7 @@ ${r}
|
|
|
59240
59262
|
return Logger.error("Error filtering node:", e2), true;
|
|
59241
59263
|
}
|
|
59242
59264
|
},
|
|
59265
|
+
imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQABNjN9GQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAA0lEQVQI12P4z8BQDwAEgAF/QualIQAAAABJRU5ErkJggg==",
|
|
59243
59266
|
onImageErrorHandler: (e) => {
|
|
59244
59267
|
Logger.error("Error loading image:", e);
|
|
59245
59268
|
},
|
|
@@ -59423,10 +59446,10 @@ Defaulting to \`null\`.`;
|
|
|
59423
59446
|
d && (v = d(r));
|
|
59424
59447
|
try {
|
|
59425
59448
|
downloadByURL(await toPng(r), Filenames.toPNG(c));
|
|
59426
|
-
} catch {
|
|
59427
|
-
toast({
|
|
59428
|
-
title: "
|
|
59429
|
-
description:
|
|
59449
|
+
} catch (e2) {
|
|
59450
|
+
Logger.error("Error downloading as PNG", e2), toast({
|
|
59451
|
+
title: "Failed to download as PNG",
|
|
59452
|
+
description: prettyError(e2),
|
|
59430
59453
|
variant: "danger"
|
|
59431
59454
|
});
|
|
59432
59455
|
} finally {
|
|
@@ -70777,7 +70800,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
70777
70800
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
70778
70801
|
}
|
|
70779
70802
|
}
|
|
70780
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-
|
|
70803
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev21"), showCodeInRunModeAtom = atom(true);
|
|
70781
70804
|
atom(null);
|
|
70782
70805
|
var import_compiler_runtime$89 = require_compiler_runtime();
|
|
70783
70806
|
function useKeydownOnElement(e, r) {
|
|
@@ -92685,21 +92708,75 @@ ${c}
|
|
|
92685
92708
|
}), r[13] = c, r[14] = e.label, r[15] = f, r[16] = O, r[17] = M) : M = r[17], M;
|
|
92686
92709
|
};
|
|
92687
92710
|
var import_compiler_runtime$28 = require_compiler_runtime(), RangeSlider = import_react.forwardRef((e, r) => {
|
|
92688
|
-
let c = (0, import_compiler_runtime$28.c)(
|
|
92689
|
-
c[0] ===
|
|
92690
|
-
let O;
|
|
92691
|
-
c[
|
|
92692
|
-
let M;
|
|
92693
|
-
c[
|
|
92711
|
+
let c = (0, import_compiler_runtime$28.c)(56), d, f, _;
|
|
92712
|
+
c[0] === e ? (d = c[1], f = c[2], _ = c[3]) : ({ className: d, valueMap: _, ...f } = e, c[0] = e, c[1] = d, c[2] = f, c[3] = _);
|
|
92713
|
+
let [v, y] = useBoolean(false), { locale: S } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), w = import_react.useRef(false), E = import_react.useRef(0), O = import_react.useRef(0), M;
|
|
92714
|
+
c[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = [], c[4] = M) : M = c[4];
|
|
92715
|
+
let I = import_react.useRef(M), z;
|
|
92716
|
+
c[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = [], c[5] = z) : z = c[5];
|
|
92717
|
+
let G = import_react.useRef(z), q = import_react.useRef(null), IY = import_react.useRef(null), LY = import_react.useRef(null), RY;
|
|
92718
|
+
c[6] === r ? RY = c[7] : (RY = (e2) => {
|
|
92719
|
+
q.current = e2, typeof r == "function" ? r(e2) : r && (r.current = e2);
|
|
92720
|
+
}, c[6] = r, c[7] = RY);
|
|
92721
|
+
let zY = RY, BY;
|
|
92722
|
+
c[8] !== f.disabled || c[9] !== f.value ? (BY = (e2) => {
|
|
92723
|
+
var _a3;
|
|
92724
|
+
!f.value || f.value.length !== 2 || f.disabled || (e2.preventDefault(), e2.stopPropagation(), w.current = true, E.current = e2.clientX, O.current = e2.clientY, I.current = [
|
|
92725
|
+
...f.value
|
|
92726
|
+
], G.current = [
|
|
92727
|
+
...f.value
|
|
92728
|
+
], LY.current = ((_a3 = IY.current) == null ? void 0 : _a3.getBoundingClientRect()) ?? null, e2.currentTarget.setPointerCapture(e2.pointerId));
|
|
92729
|
+
}, c[8] = f.disabled, c[9] = f.value, c[10] = BY) : BY = c[10];
|
|
92730
|
+
let VY = BY, HY;
|
|
92731
|
+
c[11] === f ? HY = c[12] : (HY = (e2) => {
|
|
92732
|
+
var _a3;
|
|
92733
|
+
if (!w.current) return;
|
|
92734
|
+
e2.stopPropagation();
|
|
92735
|
+
let r2 = LY.current;
|
|
92736
|
+
if (!r2) return;
|
|
92737
|
+
let c2 = f.orientation === "vertical", d2 = f.min ?? 0, _2 = f.max ?? 100, v2 = _2 - d2, y2;
|
|
92738
|
+
if (c2) {
|
|
92739
|
+
let c3 = r2.height;
|
|
92740
|
+
y2 = -((e2.clientY - O.current) / c3) * v2;
|
|
92741
|
+
} else {
|
|
92742
|
+
let c3 = r2.width;
|
|
92743
|
+
y2 = (e2.clientX - E.current) / c3 * v2;
|
|
92744
|
+
}
|
|
92745
|
+
let [S2, M2] = I.current, z2 = M2 - S2, q2 = f.steps, IY2 = q2 && q2.length > 1 ? Math.min(...q2.slice(1).map((e3, r3) => e3 - q2[r3])) : f.step ?? 1, RY2 = Math.round(y2 / IY2) * IY2, zY2 = S2 + Math.max(d2 - S2, Math.min(_2 - M2, RY2)), BY2 = zY2 + z2;
|
|
92746
|
+
G.current = [
|
|
92747
|
+
zY2,
|
|
92748
|
+
BY2
|
|
92749
|
+
], (_a3 = f.onValueChange) == null ? void 0 : _a3.call(f, [
|
|
92750
|
+
zY2,
|
|
92751
|
+
BY2
|
|
92752
|
+
]);
|
|
92753
|
+
}, c[11] = f, c[12] = HY);
|
|
92754
|
+
let UY = HY, WY;
|
|
92755
|
+
c[13] === f ? WY = c[14] : (WY = (e2) => {
|
|
92756
|
+
var _a3;
|
|
92757
|
+
w.current && (e2.currentTarget.releasePointerCapture(e2.pointerId), w.current = false, G.current.length === 2 && ((_a3 = f.onValueCommit) == null ? void 0 : _a3.call(f, G.current)));
|
|
92758
|
+
}, c[13] = f, c[14] = WY);
|
|
92759
|
+
let GY = WY, KY;
|
|
92760
|
+
c[15] === d ? KY = c[16] : (KY = cn("relative flex touch-none select-none hover:cursor-pointer", "data-[orientation=horizontal]:w-full data-[orientation=horizontal]:items-center", "data-[orientation=vertical]:h-full data-[orientation=vertical]:justify-center", "data-disabled:cursor-not-allowed", d), c[15] = d, c[16] = KY);
|
|
92761
|
+
let qY;
|
|
92762
|
+
c[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (qY = cn("relative grow overflow-hidden rounded-full bg-slate-200 dark:bg-accent/60", "data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full", "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2"), c[17] = qY) : qY = c[17];
|
|
92763
|
+
let JY;
|
|
92764
|
+
c[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (JY = cn("absolute bg-blue-500 dark:bg-primary", "data-[orientation=horizontal]:h-full", "data-[orientation=vertical]:w-full", "data-disabled:opacity-50", "hover:cursor-grab active:cursor-grabbing"), c[18] = JY) : JY = c[18];
|
|
92765
|
+
let YY;
|
|
92766
|
+
c[19] !== VY || c[20] !== UY || c[21] !== GY ? (YY = (0, import_jsx_runtime.jsx)(Track, {
|
|
92767
|
+
ref: IY,
|
|
92694
92768
|
"data-testid": "track",
|
|
92695
|
-
className:
|
|
92769
|
+
className: qY,
|
|
92696
92770
|
children: (0, import_jsx_runtime.jsx)(Range, {
|
|
92697
92771
|
"data-testid": "range",
|
|
92698
|
-
className:
|
|
92772
|
+
className: JY,
|
|
92773
|
+
onPointerDown: VY,
|
|
92774
|
+
onPointerMove: UY,
|
|
92775
|
+
onPointerUp: GY
|
|
92699
92776
|
})
|
|
92700
|
-
}), c[
|
|
92701
|
-
let
|
|
92702
|
-
c[
|
|
92777
|
+
}), c[19] = VY, c[20] = UY, c[21] = GY, c[22] = YY) : YY = c[22];
|
|
92778
|
+
let XY;
|
|
92779
|
+
c[23] !== y.setFalse || c[24] !== y.setTrue ? (XY = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
|
|
92703
92780
|
asChild: true,
|
|
92704
92781
|
children: (0, import_jsx_runtime.jsx)(Thumb, {
|
|
92705
92782
|
"data-testid": "thumb",
|
|
@@ -92709,28 +92786,30 @@ ${c}
|
|
|
92709
92786
|
onMouseEnter: y.setTrue,
|
|
92710
92787
|
onMouseLeave: y.setFalse
|
|
92711
92788
|
})
|
|
92712
|
-
}), c[
|
|
92713
|
-
let
|
|
92714
|
-
|
|
92789
|
+
}), c[23] = y.setFalse, c[24] = y.setTrue, c[25] = XY) : XY = c[25];
|
|
92790
|
+
let ZY;
|
|
92791
|
+
c[26] !== S || c[27] !== f.value || c[28] !== _ ? (ZY = f.value != null && f.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
|
|
92792
|
+
children: prettyScientificNumber(_(f.value[0]), {
|
|
92715
92793
|
locale: S
|
|
92716
92794
|
})
|
|
92717
|
-
},
|
|
92718
|
-
|
|
92719
|
-
|
|
92720
|
-
|
|
92721
|
-
|
|
92722
|
-
|
|
92795
|
+
}, f.value[0]), c[26] = S, c[27] = f.value, c[28] = _, c[29] = ZY) : ZY = c[29];
|
|
92796
|
+
let QY;
|
|
92797
|
+
c[30] === ZY ? QY = c[31] : (QY = (0, import_jsx_runtime.jsx)(TooltipPortal, {
|
|
92798
|
+
children: ZY
|
|
92799
|
+
}), c[30] = ZY, c[31] = QY);
|
|
92800
|
+
let $Y;
|
|
92801
|
+
c[32] !== v || c[33] !== XY || c[34] !== QY ? ($Y = (0, import_jsx_runtime.jsx)(TooltipProvider, {
|
|
92723
92802
|
children: (0, import_jsx_runtime.jsxs)(TooltipRoot, {
|
|
92724
92803
|
delayDuration: 0,
|
|
92725
92804
|
open: v,
|
|
92726
92805
|
children: [
|
|
92727
|
-
|
|
92728
|
-
|
|
92806
|
+
XY,
|
|
92807
|
+
QY
|
|
92729
92808
|
]
|
|
92730
92809
|
})
|
|
92731
|
-
}), c[
|
|
92732
|
-
let
|
|
92733
|
-
c[
|
|
92810
|
+
}), c[32] = v, c[33] = XY, c[34] = QY, c[35] = $Y) : $Y = c[35];
|
|
92811
|
+
let eX;
|
|
92812
|
+
c[36] !== y.setFalse || c[37] !== y.setTrue ? (eX = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
|
|
92734
92813
|
asChild: true,
|
|
92735
92814
|
children: (0, import_jsx_runtime.jsx)(Thumb, {
|
|
92736
92815
|
"data-testid": "thumb",
|
|
@@ -92740,39 +92819,39 @@ ${c}
|
|
|
92740
92819
|
onMouseEnter: y.setTrue,
|
|
92741
92820
|
onMouseLeave: y.setFalse
|
|
92742
92821
|
})
|
|
92743
|
-
}), c[
|
|
92744
|
-
let
|
|
92745
|
-
|
|
92822
|
+
}), c[36] = y.setFalse, c[37] = y.setTrue, c[38] = eX) : eX = c[38];
|
|
92823
|
+
let tX;
|
|
92824
|
+
c[39] !== S || c[40] !== f.value || c[41] !== _ ? (tX = f.value != null && f.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
|
|
92825
|
+
children: prettyScientificNumber(_(f.value[1]), {
|
|
92746
92826
|
locale: S
|
|
92747
92827
|
})
|
|
92748
|
-
},
|
|
92749
|
-
|
|
92750
|
-
|
|
92751
|
-
|
|
92752
|
-
|
|
92753
|
-
|
|
92754
|
-
|
|
92755
|
-
|
|
92756
|
-
|
|
92757
|
-
|
|
92758
|
-
|
|
92759
|
-
|
|
92760
|
-
|
|
92761
|
-
|
|
92762
|
-
|
|
92763
|
-
|
|
92764
|
-
|
|
92765
|
-
|
|
92766
|
-
|
|
92767
|
-
|
|
92768
|
-
|
|
92769
|
-
..._,
|
|
92828
|
+
}, f.value[1]), c[39] = S, c[40] = f.value, c[41] = _, c[42] = tX) : tX = c[42];
|
|
92829
|
+
let nX;
|
|
92830
|
+
c[43] === tX ? nX = c[44] : (nX = (0, import_jsx_runtime.jsx)(TooltipPortal, {
|
|
92831
|
+
children: tX
|
|
92832
|
+
}), c[43] = tX, c[44] = nX);
|
|
92833
|
+
let rX;
|
|
92834
|
+
c[45] !== v || c[46] !== eX || c[47] !== nX ? (rX = (0, import_jsx_runtime.jsx)(TooltipProvider, {
|
|
92835
|
+
children: (0, import_jsx_runtime.jsxs)(TooltipRoot, {
|
|
92836
|
+
delayDuration: 0,
|
|
92837
|
+
open: v,
|
|
92838
|
+
children: [
|
|
92839
|
+
eX,
|
|
92840
|
+
nX
|
|
92841
|
+
]
|
|
92842
|
+
})
|
|
92843
|
+
}), c[45] = v, c[46] = eX, c[47] = nX, c[48] = rX) : rX = c[48];
|
|
92844
|
+
let iX;
|
|
92845
|
+
return c[49] !== zY || c[50] !== f || c[51] !== YY || c[52] !== $Y || c[53] !== rX || c[54] !== KY ? (iX = (0, import_jsx_runtime.jsxs)(Root$1, {
|
|
92846
|
+
ref: zY,
|
|
92847
|
+
className: KY,
|
|
92848
|
+
...f,
|
|
92770
92849
|
children: [
|
|
92771
|
-
|
|
92772
|
-
|
|
92773
|
-
|
|
92850
|
+
YY,
|
|
92851
|
+
$Y,
|
|
92852
|
+
rX
|
|
92774
92853
|
]
|
|
92775
|
-
}), c[
|
|
92854
|
+
}), c[49] = zY, c[50] = f, c[51] = YY, c[52] = $Y, c[53] = rX, c[54] = KY, c[55] = iX) : iX = c[55], iX;
|
|
92776
92855
|
});
|
|
92777
92856
|
RangeSlider.displayName = Root$1.displayName;
|
|
92778
92857
|
var import_compiler_runtime$27 = require_compiler_runtime(), RangeSliderPlugin = class {
|
|
@@ -93082,7 +93161,7 @@ ${c}
|
|
|
93082
93161
|
});
|
|
93083
93162
|
}
|
|
93084
93163
|
}, SliderComponent = (e) => {
|
|
93085
|
-
let r = (0, import_compiler_runtime$26.c)(
|
|
93164
|
+
let r = (0, import_compiler_runtime$26.c)(54), { label: c, setValue: d, value: f, start: _, stop: v, step: y, debounce: S, orientation: w, showValue: E, fullWidth: O, valueMap: M, includeInput: I, disabled: z } = e, G = (0, import_react.useId)(), { locale: q } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), [IY, LY] = (0, import_react.useState)(f), RY, zY;
|
|
93086
93165
|
r[0] === f ? (RY = r[1], zY = r[2]) : (RY = () => {
|
|
93087
93166
|
LY(f);
|
|
93088
93167
|
}, zY = [
|
|
@@ -93128,10 +93207,10 @@ ${c}
|
|
|
93128
93207
|
})
|
|
93129
93208
|
}), r[27] = IY, r[28] = q, r[29] = E, r[30] = M, r[31] = ZY) : ZY = r[31];
|
|
93130
93209
|
let QY;
|
|
93131
|
-
r[32] !==
|
|
93210
|
+
r[32] !== z || r[33] !== I || r[34] !== IY || r[35] !== c || r[36] !== d || r[37] !== _ || r[38] !== y || r[39] !== v || r[40] !== M ? (QY = I && (0, import_jsx_runtime.jsx)(NumberField, {
|
|
93132
93211
|
value: M(IY),
|
|
93133
93212
|
onChange: (e2) => {
|
|
93134
|
-
(e2 == null || Number.isNaN(e2)) && (e2 = Number(_)), LY(e2),
|
|
93213
|
+
(e2 == null || Number.isNaN(e2)) && (e2 = Number(_)), LY(e2), d(e2);
|
|
93135
93214
|
},
|
|
93136
93215
|
minValue: _,
|
|
93137
93216
|
maxValue: v,
|
|
@@ -93139,25 +93218,25 @@ ${c}
|
|
|
93139
93218
|
className: "w-24",
|
|
93140
93219
|
"aria-label": `${c || "Slider"} value input`,
|
|
93141
93220
|
isDisabled: z
|
|
93142
|
-
}), r[32] =
|
|
93221
|
+
}), r[32] = z, r[33] = I, r[34] = IY, r[35] = c, r[36] = d, r[37] = _, r[38] = y, r[39] = v, r[40] = M, r[41] = QY) : QY = r[41];
|
|
93143
93222
|
let $Y;
|
|
93144
|
-
r[
|
|
93223
|
+
r[42] !== XY || r[43] !== ZY || r[44] !== QY || r[45] !== WY ? ($Y = (0, import_jsx_runtime.jsxs)("div", {
|
|
93145
93224
|
className: WY,
|
|
93146
93225
|
children: [
|
|
93147
93226
|
XY,
|
|
93148
93227
|
ZY,
|
|
93149
93228
|
QY
|
|
93150
93229
|
]
|
|
93151
|
-
}), r[
|
|
93230
|
+
}), r[42] = XY, r[43] = ZY, r[44] = QY, r[45] = WY, r[46] = $Y) : $Y = r[46];
|
|
93152
93231
|
let eX;
|
|
93153
|
-
return r[
|
|
93232
|
+
return r[47] !== O || r[48] !== G || r[49] !== c || r[50] !== $Y || r[51] !== BY || r[52] !== HY ? (eX = (0, import_jsx_runtime.jsx)(Labeled, {
|
|
93154
93233
|
label: c,
|
|
93155
93234
|
id: G,
|
|
93156
93235
|
align: BY,
|
|
93157
93236
|
fullWidth: O,
|
|
93158
93237
|
className: HY,
|
|
93159
93238
|
children: $Y
|
|
93160
|
-
}), r[
|
|
93239
|
+
}), r[47] = O, r[48] = G, r[49] = c, r[50] = $Y, r[51] = BY, r[52] = HY, r[53] = eX) : eX = r[53], eX;
|
|
93161
93240
|
}, import_compiler_runtime$25 = require_compiler_runtime(), SwitchPlugin = class {
|
|
93162
93241
|
constructor() {
|
|
93163
93242
|
__publicField(this, "tagName", "marimo-switch");
|