@marimo-team/islands 0.20.5-dev83 → 0.20.5-dev88
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-pQ4sWAoT.js → ConnectedDataExplorerComponent-Bh11efrC.js} +6 -6
- package/dist/main.js +54 -44
- package/dist/style.css +1 -1
- package/dist/{vega-component-D2knjGgv.js → vega-component-CnO3mkFC.js} +2 -2
- package/package.json +1 -1
- package/src/components/editor/cell/cell-context-menu.tsx +2 -6
- package/src/components/editor/output/console/ConsoleOutput.tsx +51 -2
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +94 -3
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +8 -1
- package/src/plugins/impl/vega/vega-component.tsx +7 -1
- package/src/plugins/impl/vega/vega.css +4 -11
- package/src/utils/__tests__/copy.test.ts +129 -0
- package/src/utils/copy.ts +43 -0
|
@@ -6211,11 +6211,11 @@ const DataExplorerComponent = (e3) => {
|
|
|
6211
6211
|
let P = j, F;
|
|
6212
6212
|
p[11] !== D || p[12] !== A || p[13] !== k || p[14] !== E ? (F = () => {
|
|
6213
6213
|
if (!A) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ColumnSummary, { schema: k });
|
|
6214
|
-
let e4 = A.spec;
|
|
6214
|
+
let e4 = A.spec, p2 = makeResponsive(e4), m2 = augmentSpecWithData(p2, D);
|
|
6215
6215
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6216
|
-
className: "flex overflow-y-auto justify-center items-center flex-1 w-[90%]",
|
|
6216
|
+
className: cn("flex overflow-y-auto justify-center items-center flex-1 w-[90%]", p2.width === "container" && "vega-container-width"),
|
|
6217
6217
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(q, {
|
|
6218
|
-
spec:
|
|
6218
|
+
spec: m2,
|
|
6219
6219
|
options: chartOptions(E)
|
|
6220
6220
|
})
|
|
6221
6221
|
});
|
|
@@ -6272,11 +6272,11 @@ const DataExplorerComponent = (e3) => {
|
|
|
6272
6272
|
} else W = p[32];
|
|
6273
6273
|
let J;
|
|
6274
6274
|
p[38] === W ? J = p[39] : (J = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HorizontalCarousel, { children: W }), p[38] = W, p[39] = J);
|
|
6275
|
-
let
|
|
6276
|
-
return p[40] !== J || p[41] !== z ? (
|
|
6275
|
+
let Z;
|
|
6276
|
+
return p[40] !== J || p[41] !== z ? (Z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6277
6277
|
className: "flex flex-col gap-2",
|
|
6278
6278
|
children: [z, J]
|
|
6279
|
-
}), p[40] = J, p[41] = z, p[42] =
|
|
6279
|
+
}), p[40] = J, p[41] = z, p[42] = Z) : Z = p[42], Z;
|
|
6280
6280
|
};
|
|
6281
6281
|
var HorizontalCarousel = (e3) => {
|
|
6282
6282
|
let p = (0, import_compiler_runtime.c)(2), { children: m } = e3;
|
package/dist/main.js
CHANGED
|
@@ -70720,7 +70720,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
70720
70720
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
70721
70721
|
}
|
|
70722
70722
|
}
|
|
70723
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.5-
|
|
70723
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.5-dev88"), showCodeInRunModeAtom = atom(true);
|
|
70724
70724
|
atom(null);
|
|
70725
70725
|
var import_compiler_runtime$89 = require_compiler_runtime();
|
|
70726
70726
|
function useKeydownOnElement(e, r) {
|
|
@@ -82375,7 +82375,7 @@ ${c}
|
|
|
82375
82375
|
fullWidth: y,
|
|
82376
82376
|
children: G
|
|
82377
82377
|
}), r[19] = y, r[20] = S, r[21] = c, r[22] = G, r[23] = q) : q = r[23], q;
|
|
82378
|
-
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-
|
|
82378
|
+
}, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-Bh11efrC.js"));
|
|
82379
82379
|
const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object$1({
|
|
82380
82380
|
label: string().nullish(),
|
|
82381
82381
|
data: string()
|
|
@@ -93462,7 +93462,7 @@ ${c}
|
|
|
93462
93462
|
return true;
|
|
93463
93463
|
}
|
|
93464
93464
|
}
|
|
93465
|
-
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-
|
|
93465
|
+
var LazyVegaComponent = import_react.lazy(() => import("./vega-component-CnO3mkFC.js")), VegaPlugin = class {
|
|
93466
93466
|
constructor() {
|
|
93467
93467
|
__publicField(this, "tagName", "marimo-vega");
|
|
93468
93468
|
__publicField(this, "validator", object$1({
|
|
@@ -100209,6 +100209,16 @@ ${c}
|
|
|
100209
100209
|
}, e[0] = c, e[1] = r, e[2] = d) : d = e[2], d;
|
|
100210
100210
|
}
|
|
100211
100211
|
var import_compiler_runtime$4 = require_compiler_runtime();
|
|
100212
|
+
function useDebouncedConsoleOutputs(e) {
|
|
100213
|
+
let [r, c] = (0, import_react.useState)(e), d = (0, import_react.useRef)(null);
|
|
100214
|
+
return e.length > 0 && r !== e && (d.current !== null && (clearTimeout(d.current), d.current = null), c(e)), (0, import_react.useEffect)(() => (e.length === 0 && d.current === null && (d.current = setTimeout(() => {
|
|
100215
|
+
d.current = null, c([]);
|
|
100216
|
+
}, 200)), () => {
|
|
100217
|
+
d.current !== null && (clearTimeout(d.current), d.current = null);
|
|
100218
|
+
}), [
|
|
100219
|
+
e
|
|
100220
|
+
]), r;
|
|
100221
|
+
}
|
|
100212
100222
|
const ConsoleOutput = (e) => {
|
|
100213
100223
|
let r = (0, import_compiler_runtime$4.c)(2), c;
|
|
100214
100224
|
return r[0] === e ? c = r[1] : (c = (0, import_jsx_runtime.jsx)(ErrorBoundary, {
|
|
@@ -100223,26 +100233,26 @@ ${c}
|
|
|
100223
100233
|
value: y,
|
|
100224
100234
|
setValue: S
|
|
100225
100235
|
}, r[0] = y, r[1] = w);
|
|
100226
|
-
let E = useInputHistory(w), { consoleOutputs: O, stale: M, cellName: I, cellId: z, onSubmitDebugger: G, onClear: q, onRefactorWithAI: IY, className: LY } = e, RY = O.length > 0,
|
|
100227
|
-
if (r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
100236
|
+
let E = useInputHistory(w), { consoleOutputs: O, stale: M, cellName: I, cellId: z, onSubmitDebugger: G, onClear: q, onRefactorWithAI: IY, className: LY } = e, RY = useDebouncedConsoleOutputs(O), zY = RY.length > 0, BY = useSelectAllContent(zY), VY = useOverflowDetection(c, zY), HY;
|
|
100237
|
+
if (r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (HY = () => {
|
|
100228
100238
|
let e2 = c.current;
|
|
100229
100239
|
if (!e2) return;
|
|
100230
100240
|
let r2 = e2.scrollHeight - e2.clientHeight;
|
|
100231
100241
|
r2 - e2.scrollTop < 120 && (e2.scrollTop = r2);
|
|
100232
|
-
}, r[2] =
|
|
100233
|
-
let
|
|
100234
|
-
if (r[3] !== z || r[4] !== LY || r[5] !==
|
|
100242
|
+
}, r[2] = HY) : HY = r[2], (0, import_react.useLayoutEffect)(HY), !zY && isInternalCellName(I)) return null;
|
|
100243
|
+
let UY, WY, GY, KY, qY, JY, YY, XY, ZY, QY;
|
|
100244
|
+
if (r[3] !== z || r[4] !== LY || r[5] !== RY || r[6] !== zY || r[7] !== E || r[8] !== _ || r[9] !== VY || r[10] !== q || r[11] !== IY || r[12] !== G || r[13] !== BY || r[14] !== v || r[15] !== f || r[16] !== M || r[17] !== y || r[18] !== d) {
|
|
100235
100245
|
let e2 = [
|
|
100236
|
-
...
|
|
100237
|
-
].reverse(), w2 = e2.some(_temp$2),
|
|
100238
|
-
r[29] ===
|
|
100239
|
-
let
|
|
100240
|
-
|
|
100246
|
+
...RY
|
|
100247
|
+
].reverse(), w2 = e2.some(_temp$2), O2 = e2.findIndex(_temp2$2), I2;
|
|
100248
|
+
r[29] === RY ? I2 = r[30] : (I2 = () => RY.filter(_temp3$1).map(_temp4$1).join("\n"), r[29] = RY, r[30] = I2);
|
|
100249
|
+
let HY2 = I2;
|
|
100250
|
+
UY = "relative group", r[31] !== HY2 || r[32] !== zY || r[33] !== _ || r[34] !== VY || r[35] !== v || r[36] !== f || r[37] !== d ? (WY = zY && (0, import_jsx_runtime.jsxs)("div", {
|
|
100241
100251
|
className: "absolute top-1 right-4 z-10 opacity-0 group-hover:opacity-100 flex items-center gap-1 print:hidden",
|
|
100242
100252
|
children: [
|
|
100243
100253
|
(0, import_jsx_runtime.jsx)(CopyClipboardIcon, {
|
|
100244
100254
|
tooltip: "Copy console output",
|
|
100245
|
-
value:
|
|
100255
|
+
value: HY2,
|
|
100246
100256
|
className: "h-4 w-4"
|
|
100247
100257
|
}),
|
|
100248
100258
|
(0, import_jsx_runtime.jsx)(Tooltip, {
|
|
@@ -100259,7 +100269,7 @@ ${c}
|
|
|
100259
100269
|
})
|
|
100260
100270
|
})
|
|
100261
100271
|
}),
|
|
100262
|
-
(
|
|
100272
|
+
(VY || _) && (0, import_jsx_runtime.jsx)(Button, {
|
|
100263
100273
|
"aria-label": _ ? "Collapse output" : "Expand output",
|
|
100264
100274
|
className: "p-0 mb-px",
|
|
100265
100275
|
onClick: () => v(!_),
|
|
@@ -100278,16 +100288,16 @@ ${c}
|
|
|
100278
100288
|
})
|
|
100279
100289
|
})
|
|
100280
100290
|
]
|
|
100281
|
-
}), r[31] =
|
|
100282
|
-
let $Y2 = M && "marimo-output-stale", eX2 =
|
|
100283
|
-
r[39] !== LY || r[40] !== $Y2 || r[41] !== eX2 ? (
|
|
100291
|
+
}), r[31] = HY2, r[32] = zY, r[33] = _, r[34] = VY, r[35] = v, r[36] = f, r[37] = d, r[38] = WY) : WY = r[38], GY = M ? "This console output is stale" : void 0, KY = "console-output-area", qY = c, JY = BY, YY = 0;
|
|
100292
|
+
let $Y2 = M && "marimo-output-stale", eX2 = zY ? "p-5" : "p-3";
|
|
100293
|
+
r[39] !== LY || r[40] !== $Y2 || r[41] !== eX2 ? (XY = cn("console-output-area overflow-hidden rounded-b-lg flex flex-col-reverse w-full gap-1 focus:outline-hidden", $Y2, eX2, LY), r[39] = LY, r[40] = $Y2, r[41] = eX2, r[42] = XY) : XY = r[42], r[43] === _ ? ZY = r[44] : (ZY = _ ? {
|
|
100284
100294
|
maxHeight: "none"
|
|
100285
|
-
} : void 0, r[43] = _, r[44] =
|
|
100295
|
+
} : void 0, r[43] = _, r[44] = ZY), QY = e2.map((e3, r2) => {
|
|
100286
100296
|
if (e3.channel === "pdb") return null;
|
|
100287
100297
|
if (e3.channel === "stdin") {
|
|
100288
100298
|
invariant(typeof e3.data == "string", "Expected data to be a string");
|
|
100289
|
-
let c2 =
|
|
100290
|
-
return e3.response == null &&
|
|
100299
|
+
let c2 = RY.length - r2 - 1, d2 = e3.mimetype === "text/password";
|
|
100300
|
+
return e3.response == null && O2 === r2 ? (0, import_jsx_runtime.jsx)(StdInput, {
|
|
100291
100301
|
output: e3.data,
|
|
100292
100302
|
isPdb: w2,
|
|
100293
100303
|
isPassword: d2,
|
|
@@ -100310,36 +100320,36 @@ ${c}
|
|
|
100310
100320
|
wrapText: d
|
|
100311
100321
|
})
|
|
100312
100322
|
}, r2);
|
|
100313
|
-
}), r[3] = z, r[4] = LY, r[5] =
|
|
100314
|
-
} else
|
|
100315
|
-
let
|
|
100316
|
-
r[45] !== z || r[46] !== I ? (
|
|
100323
|
+
}), r[3] = z, r[4] = LY, r[5] = RY, r[6] = zY, r[7] = E, r[8] = _, r[9] = VY, r[10] = q, r[11] = IY, r[12] = G, r[13] = BY, r[14] = v, r[15] = f, r[16] = M, r[17] = y, r[18] = d, r[19] = UY, r[20] = WY, r[21] = GY, r[22] = KY, r[23] = qY, r[24] = JY, r[25] = YY, r[26] = XY, r[27] = ZY, r[28] = QY;
|
|
100324
|
+
} else UY = r[19], WY = r[20], GY = r[21], KY = r[22], qY = r[23], JY = r[24], YY = r[25], XY = r[26], ZY = r[27], QY = r[28];
|
|
100325
|
+
let $Y;
|
|
100326
|
+
r[45] !== z || r[46] !== I ? ($Y = (0, import_jsx_runtime.jsx)(NameCellContentEditable, {
|
|
100317
100327
|
value: I,
|
|
100318
100328
|
cellId: z,
|
|
100319
100329
|
className: "bg-(--slate-4) border-(--slate-4) hover:bg-(--slate-5) dark:border-(--sky-5) dark:bg-(--sky-6) dark:text-(--sky-12) text-(--slate-12) rounded-l rounded-br-lg absolute right-0 bottom-0 text-xs px-1.5 py-0.5 font-mono max-w-[75%] whitespace-nowrap overflow-hidden"
|
|
100320
|
-
}), r[45] = z, r[46] = I, r[47] =
|
|
100321
|
-
let $Y;
|
|
100322
|
-
r[48] !== QY || r[49] !== WY || r[50] !== GY || r[51] !== KY || r[52] !== qY || r[53] !== JY || r[54] !== YY || r[55] !== XY || r[56] !== ZY ? ($Y = (0, import_jsx_runtime.jsxs)("div", {
|
|
100323
|
-
title: WY,
|
|
100324
|
-
"data-testid": GY,
|
|
100325
|
-
ref: KY,
|
|
100326
|
-
...qY,
|
|
100327
|
-
tabIndex: JY,
|
|
100328
|
-
className: YY,
|
|
100329
|
-
style: XY,
|
|
100330
|
-
children: [
|
|
100331
|
-
ZY,
|
|
100332
|
-
QY
|
|
100333
|
-
]
|
|
100334
|
-
}), r[48] = QY, r[49] = WY, r[50] = GY, r[51] = KY, r[52] = qY, r[53] = JY, r[54] = YY, r[55] = XY, r[56] = ZY, r[57] = $Y) : $Y = r[57];
|
|
100330
|
+
}), r[45] = z, r[46] = I, r[47] = $Y) : $Y = r[47];
|
|
100335
100331
|
let eX;
|
|
100336
|
-
|
|
100337
|
-
|
|
100332
|
+
r[48] !== $Y || r[49] !== GY || r[50] !== KY || r[51] !== qY || r[52] !== JY || r[53] !== YY || r[54] !== XY || r[55] !== ZY || r[56] !== QY ? (eX = (0, import_jsx_runtime.jsxs)("div", {
|
|
100333
|
+
title: GY,
|
|
100334
|
+
"data-testid": KY,
|
|
100335
|
+
ref: qY,
|
|
100336
|
+
...JY,
|
|
100337
|
+
tabIndex: YY,
|
|
100338
|
+
className: XY,
|
|
100339
|
+
style: ZY,
|
|
100338
100340
|
children: [
|
|
100339
|
-
|
|
100341
|
+
QY,
|
|
100340
100342
|
$Y
|
|
100341
100343
|
]
|
|
100342
|
-
}), r[
|
|
100344
|
+
}), r[48] = $Y, r[49] = GY, r[50] = KY, r[51] = qY, r[52] = JY, r[53] = YY, r[54] = XY, r[55] = ZY, r[56] = QY, r[57] = eX) : eX = r[57];
|
|
100345
|
+
let tX;
|
|
100346
|
+
return r[58] !== UY || r[59] !== WY || r[60] !== eX ? (tX = (0, import_jsx_runtime.jsxs)("div", {
|
|
100347
|
+
className: UY,
|
|
100348
|
+
children: [
|
|
100349
|
+
WY,
|
|
100350
|
+
eX
|
|
100351
|
+
]
|
|
100352
|
+
}), r[58] = UY, r[59] = WY, r[60] = eX, r[61] = tX) : tX = r[61], tX;
|
|
100343
100353
|
}, StdInput = (e) => {
|
|
100344
100354
|
let r = (0, import_compiler_runtime$4.c)(25), { value: c, setValue: d, inputHistory: f, output: _, isPassword: v, isPdb: y, onSubmit: S, onClear: w } = e, { navigateUp: E, navigateDown: O, addToHistory: M } = f, I;
|
|
100345
100355
|
r[0] === _ ? I = r[1] : (I = renderText(_), r[0] = _, r[1] = I);
|