@marimo-team/islands 0.23.1-dev21 → 0.23.1-dev23
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-Eq8bCe49.js → ConnectedDataExplorerComponent-P92i6wYx.js} +148 -148
- package/dist/{ImageComparisonComponent-DY3J_vIU.js → ImageComparisonComponent-HF4AY8_n.js} +2 -2
- package/dist/{Plot-BxlSHo0G.js → Plot-CK0oVgQL.js} +2 -2
- package/dist/{any-language-editor-BF8ew8wu.js → any-language-editor-BCvLfvzI.js} +7 -7
- package/dist/{button-Cn59RsBF.js → button-D1C3g5GI.js} +72 -71
- package/dist/{capabilities-Bml77Di-.js → capabilities-BwpUgo4S.js} +1 -1
- package/dist/{chat-ui-BdrC6z8t.js → chat-ui-CNHw9Osh.js} +2829 -2829
- package/dist/{check-C51PA02v.js → check-BgrdTLuv.js} +1 -1
- package/dist/{chunk-5FQGJX7Z-C428iZBW.js → chunk-5FQGJX7Z-VIref9gx.js} +4 -4
- package/dist/{click-outside-container-vCXhHl-R.js → click-outside-container-D3t6KDni.js} +1 -1
- package/dist/{code-block-37QAKDTI-D9EnJeBI.js → code-block-37QAKDTI-FQEoMOU1.js} +2 -2
- package/dist/{compiler-runtime-B_OLMU9S.js → compiler-runtime-CEbnTgxf.js} +1 -1
- package/dist/{copy-DzOz_Au7.js → copy-Bp6CK_Fg.js} +9 -9
- package/dist/{data-grid-overlay-editor-lKF301ME.js → data-grid-overlay-editor-C_sKPpLu.js} +4 -4
- package/dist/{dist-CjLQ79mo.js → dist-CTtLBPLZ.js} +11 -11
- package/dist/{dist-BoNJsA65.js → dist-DUFd1bhm.js} +1 -1
- package/dist/{error-banner-BQcJXy6k.js → error-banner-B_ioHva3.js} +121 -121
- package/dist/{esm-BmYNigxi.js → esm-CDHI9cuO.js} +15 -15
- package/dist/{glide-data-editor-D2X4D_xi.js → glide-data-editor-BFqEJGJW.js} +948 -948
- package/dist/{input-BRN2Mjzx.js → input-CSVEkmaZ.js} +288 -288
- package/dist/{label-J1N4mVcg.js → label-BebYlsDV.js} +257 -257
- package/dist/{loader-JmfPBSx5.js → loader-ZFbGsMN1.js} +15 -15
- package/dist/main.js +7114 -6962
- package/dist/mermaid-4DMBBIKO-BjtqcdX4.js +6 -0
- package/dist/{mermaid-UMKVHs_g.js → mermaid-BbhZNQeB.js} +18 -18
- package/dist/{number-overlay-editor-DxLoVuuE.js → number-overlay-editor-B02-t7Ar.js} +2 -2
- package/dist/{process-output-D3Q6xBZJ.js → process-output-Bekznt_B.js} +863 -863
- package/dist/{react-dom-BSUuJjCR.js → react-dom-D5FDLRUB.js} +1 -1
- package/dist/{react-vega-DayQmZjG.js → react-vega-BkjdpVsR.js} +2 -2
- package/dist/{react-vega-CzRAIHrv.js → react-vega-DBwal82H.js} +1 -1
- package/dist/{slides-component-_3tukGh-.js → slides-component-DLxprlqo.js} +26 -26
- package/dist/{spec-rP6otrXw.js → spec-3EPbPQZH.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/{toDate-CfGr2xZ1.js → toDate-B1AzlBoW.js} +15 -15
- package/dist/{tooltip-BusGYw7Q.js → tooltip-DwNnFsxZ.js} +132 -132
- package/dist/{types-D4CFUmPq.js → types-pwjdK009.js} +15 -15
- package/dist/{useAsyncData-BzS3Ai32.js → useAsyncData-BL98MPIy.js} +3 -3
- package/dist/{useDeepCompareMemoize-AjORjhpL.js → useDeepCompareMemoize-CsyOnnjc.js} +25 -25
- package/dist/{useIframeCapabilities---aRgGdv.js → useIframeCapabilities-CsTUYYj7.js} +3 -3
- package/dist/{useLifecycle-B90lJH4p.js → useLifecycle-DrGGIsgp.js} +36 -36
- package/dist/{useTheme-ytmywQ5O.js → useTheme-CzwDokKe.js} +4 -4
- package/dist/{vega-component-C3akWtJ1.js → vega-component-KBJXEDZz.js} +42 -42
- package/dist/{zod-D4UoCYGu.js → zod-W5ZEjzaE.js} +23 -23
- package/package.json +4 -4
- package/src/core/islands/__tests__/bridge.test.ts +2 -12
- package/src/core/islands/__tests__/islands-harness.test.ts +348 -0
- package/src/core/islands/__tests__/parse.test.ts +466 -24
- package/src/core/islands/__tests__/test-utils.tsx +263 -0
- package/src/core/islands/bootstrap.ts +265 -0
- package/src/core/islands/bridge.ts +154 -75
- package/src/core/islands/components/IslandControls.tsx +103 -0
- package/src/core/islands/components/__tests__/IslandControls.test.tsx +185 -0
- package/src/core/islands/components/__tests__/useIslandControls.test.ts +208 -0
- package/src/core/islands/components/output-wrapper.tsx +76 -93
- package/src/core/islands/components/useIslandControls.ts +60 -0
- package/src/core/islands/components/web-components.tsx +168 -40
- package/src/core/islands/constants.ts +28 -0
- package/src/core/islands/main.ts +7 -205
- package/src/core/islands/parse.ts +73 -26
- package/src/core/islands/worker-factory.ts +86 -0
- package/src/plugins/core/__test__/trusted-url.test.ts +48 -0
- package/src/plugins/core/trusted-url.ts +20 -0
- package/src/plugins/impl/DataTablePlugin.tsx +7 -3
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +27 -1
- package/src/plugins/impl/anywidget/widget-binding.ts +13 -0
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +21 -0
- package/src/plugins/impl/mpl-interactive/__tests__/MplInteractivePlugin.test.tsx +119 -0
- package/src/plugins/impl/panel/PanelPlugin.tsx +31 -10
- package/src/plugins/impl/panel/__tests__/PanelPlugin.test.ts +60 -0
- package/dist/mermaid-4DMBBIKO-Cw46o6DN.js +0 -6
- /package/dist/{clsx-yW_RAw0K.js → clsx-CwTY0BxM.js} +0 -0
- /package/dist/{react-Bs6Z0kvn.js → react-DA-nE2FX.js} +0 -0
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { a as __toCommonJS, n as __esmMin, r as __export, s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import { c as
|
|
9
|
-
import "./react-dom-
|
|
2
|
+
import { _ as Logger, c as Objects, g as cn, t as Button } from "./button-D1C3g5GI.js";
|
|
3
|
+
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
|
+
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
+
import { u as createLucideIcon } from "./dist-CTtLBPLZ.js";
|
|
6
|
+
import { A as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, F as ListFilter, P as SquareFunction, t as augmentSpecWithData } from "./spec-3EPbPQZH.js";
|
|
7
|
+
import { a as Type, c as Calendar, i as createReducerAndAtoms, o as ToggleLeft, r as Badge, s as Hash, t as useOnMount } from "./useLifecycle-DrGGIsgp.js";
|
|
8
|
+
import { a as SelectContent, c as SelectLabel, d as SelectValue, i as Select, l as SelectSeparator, n as Strings, o as SelectGroup, s as SelectItem, t as Label, u as SelectTrigger, w as $a916eb452884faea$export$b7a616150fdb9f44 } from "./label-BebYlsDV.js";
|
|
9
|
+
import "./react-dom-D5FDLRUB.js";
|
|
10
10
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
11
|
-
import "./zod-
|
|
12
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
13
|
-
import { t as Tooltip } from "./tooltip-
|
|
14
|
-
import { b as createStore, g as useAtomValue, m as Provider, n as useTheme, y as atom } from "./useTheme-
|
|
11
|
+
import "./zod-W5ZEjzaE.js";
|
|
12
|
+
import { n as ErrorBanner } from "./error-banner-B_ioHva3.js";
|
|
13
|
+
import { t as Tooltip } from "./tooltip-DwNnFsxZ.js";
|
|
14
|
+
import { b as createStore, g as useAtomValue, m as Provider, n as useTheme, y as atom } from "./useTheme-CzwDokKe.js";
|
|
15
15
|
import { t as invariant } from "./invariant-e8eBgdux.js";
|
|
16
16
|
import "./vega-loader.browser-DqEcFOPD.js";
|
|
17
|
-
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-
|
|
18
|
-
import { t as useAsyncData } from "./useAsyncData-
|
|
19
|
-
import { n as q, r as contains } from "./react-vega-
|
|
17
|
+
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-ZFbGsMN1.js";
|
|
18
|
+
import { t as useAsyncData } from "./useAsyncData-BL98MPIy.js";
|
|
19
|
+
import { n as q, r as contains } from "./react-vega-DBwal82H.js";
|
|
20
20
|
import "./defaultLocale-qS7DaAmi.js";
|
|
21
21
|
import "./defaultLocale-Bxoo2-30.js";
|
|
22
22
|
var ChartColumnBig = createLucideIcon("chart-column-big", [
|
|
@@ -5361,14 +5361,14 @@ const PRIMITIVE_TYPE_ICON = {
|
|
|
5361
5361
|
};
|
|
5362
5362
|
var COLUMN_LIMIT = 12;
|
|
5363
5363
|
const ColumnSummary = (e3) => {
|
|
5364
|
-
let p = (0, import_compiler_runtime$2.c)(45), { schema: m } = e3, [h, g] = (0, import_react.useState)(), [_, v] = (0, import_react.useState)(),
|
|
5364
|
+
let p = (0, import_compiler_runtime$2.c)(45), { schema: m } = e3, [h, g] = (0, import_react.useState)(), [_, v] = (0, import_react.useState)(), x, S, C, w, E, D, k, A;
|
|
5365
5365
|
if (p[0] !== m || p[1] !== h || p[2] !== _) {
|
|
5366
|
-
|
|
5366
|
+
x = m.fieldNames();
|
|
5367
5367
|
let e4;
|
|
5368
5368
|
p[11] !== m || p[12] !== h ? (e4 = h ? m.stats({
|
|
5369
5369
|
field: h,
|
|
5370
5370
|
channel: "x"
|
|
5371
|
-
}) : void 0, p[11] = m, p[12] = h, p[13] = e4) : e4 = p[13],
|
|
5371
|
+
}) : void 0, p[11] = m, p[12] = h, p[13] = e4) : e4 = p[13], C = e4;
|
|
5372
5372
|
let v2;
|
|
5373
5373
|
p[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ChartColumnBig, {
|
|
5374
5374
|
className: "text-muted-foreground",
|
|
@@ -5376,13 +5376,13 @@ const ColumnSummary = (e3) => {
|
|
|
5376
5376
|
height: 40,
|
|
5377
5377
|
strokeWidth: 1.5
|
|
5378
5378
|
}), p[14] = v2) : v2 = p[14];
|
|
5379
|
-
let
|
|
5380
|
-
|
|
5379
|
+
let b = v2, j2 = _ ? x : x.slice(0, COLUMN_LIMIT);
|
|
5380
|
+
S = x.length > COLUMN_LIMIT, D = "flex flex-col justify-center items-center h-full flex-1 gap-2", k = b, A = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
5381
5381
|
className: "text-muted-foreground font-semibold",
|
|
5382
|
-
children: [
|
|
5383
|
-
}),
|
|
5384
|
-
let
|
|
5385
|
-
p[15] !== m || p[16] !== h ? (
|
|
5382
|
+
children: [x.length > 0 ? x.length : "No", " fields"]
|
|
5383
|
+
}), w = "hidden lg:grid grid-cols-2 xl:grid-cols-3 gap-2 p-2 bg-(--slate-1) border rounded lg:items-center items-start w-fit grid-flow-dense max-h-[300px] overflow-auto";
|
|
5384
|
+
let M2;
|
|
5385
|
+
p[15] !== m || p[16] !== h ? (M2 = (e5) => {
|
|
5386
5386
|
let p2 = m.cardinality({
|
|
5387
5387
|
channel: "x",
|
|
5388
5388
|
field: e5
|
|
@@ -5409,31 +5409,31 @@ const ColumnSummary = (e3) => {
|
|
|
5409
5409
|
})
|
|
5410
5410
|
]
|
|
5411
5411
|
}, e5);
|
|
5412
|
-
}, p[15] = m, p[16] = h, p[17] =
|
|
5413
|
-
} else
|
|
5414
|
-
let
|
|
5415
|
-
p[18] !==
|
|
5412
|
+
}, p[15] = m, p[16] = h, p[17] = M2) : M2 = p[17], E = j2.map(M2), p[0] = m, p[1] = h, p[2] = _, p[3] = x, p[4] = S, p[5] = C, p[6] = w, p[7] = E, p[8] = D, p[9] = k, p[10] = A;
|
|
5413
|
+
} else x = p[3], S = p[4], C = p[5], w = p[6], E = p[7], D = p[8], k = p[9], A = p[10];
|
|
5414
|
+
let j;
|
|
5415
|
+
p[18] !== S || p[19] !== _ ? (j = S && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, {
|
|
5416
5416
|
"data-testid": "marimo-plugin-data-explorer-show-more-columns",
|
|
5417
5417
|
variant: "link",
|
|
5418
5418
|
size: "sm",
|
|
5419
5419
|
className: "self-center col-span-3 -mt-1",
|
|
5420
5420
|
onClick: () => v(_temp$2),
|
|
5421
5421
|
children: _ ? "Show less" : "Show more"
|
|
5422
|
-
}), p[18] =
|
|
5423
|
-
let
|
|
5424
|
-
p[21] !==
|
|
5425
|
-
className:
|
|
5426
|
-
children: [
|
|
5427
|
-
}), p[21] =
|
|
5428
|
-
let
|
|
5429
|
-
p[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
5422
|
+
}), p[18] = S, p[19] = _, p[20] = j) : j = p[20];
|
|
5423
|
+
let M;
|
|
5424
|
+
p[21] !== w || p[22] !== E || p[23] !== j ? (M = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
5425
|
+
className: w,
|
|
5426
|
+
children: [E, j]
|
|
5427
|
+
}), p[21] = w, p[22] = E, p[23] = j, p[24] = M) : M = p[24];
|
|
5428
|
+
let P = h || "", F = x.length === 0, I;
|
|
5429
|
+
p[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = (e4) => {
|
|
5430
5430
|
g(e4);
|
|
5431
|
-
}, p[25] =
|
|
5432
|
-
let
|
|
5433
|
-
p[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
5431
|
+
}, p[25] = I) : I = p[25];
|
|
5432
|
+
let L;
|
|
5433
|
+
p[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectTrigger, {
|
|
5434
5434
|
className: "min-w-[210px] h-full",
|
|
5435
5435
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectValue, { placeholder: "Select a column" })
|
|
5436
|
-
}), p[26] =
|
|
5436
|
+
}), p[26] = L) : L = p[26];
|
|
5437
5437
|
let z;
|
|
5438
5438
|
p[27] === m ? z = p[28] : (z = m.fieldNames().map((e4) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItem, {
|
|
5439
5439
|
value: e4.toString(),
|
|
@@ -5458,39 +5458,39 @@ const ColumnSummary = (e3) => {
|
|
|
5458
5458
|
}, e4)), p[27] = m, p[28] = z);
|
|
5459
5459
|
let H;
|
|
5460
5460
|
p[29] === z ? H = p[30] : (H = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectGroup, { children: z }) }), p[29] = z, p[30] = H);
|
|
5461
|
-
let
|
|
5462
|
-
p[31] !== H || p[32] !==
|
|
5461
|
+
let U;
|
|
5462
|
+
p[31] !== H || p[32] !== P || p[33] !== F ? (U = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
5463
5463
|
className: "lg:hidden",
|
|
5464
5464
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Select, {
|
|
5465
5465
|
"data-testid": "marimo-plugin-data-explorer-column-select",
|
|
5466
|
-
value:
|
|
5467
|
-
disabled:
|
|
5468
|
-
onValueChange:
|
|
5469
|
-
children: [
|
|
5466
|
+
value: P,
|
|
5467
|
+
disabled: F,
|
|
5468
|
+
onValueChange: I,
|
|
5469
|
+
children: [L, H]
|
|
5470
5470
|
})
|
|
5471
|
-
}), p[31] = H, p[32] =
|
|
5472
|
-
let
|
|
5473
|
-
p[35] !== h || p[36] !==
|
|
5471
|
+
}), p[31] = H, p[32] = P, p[33] = F, p[34] = U) : U = p[34];
|
|
5472
|
+
let J;
|
|
5473
|
+
p[35] !== h || p[36] !== C ? (J = h && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
5474
5474
|
className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-2 p-2 text-sm",
|
|
5475
5475
|
children: STAT_KEYS.map((e4) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
5476
5476
|
className: "flex flex-row gap-2 min-w-[100px]",
|
|
5477
5477
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
5478
5478
|
className: "font-semibold",
|
|
5479
5479
|
children: e4
|
|
5480
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormatStat, { value:
|
|
5480
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormatStat, { value: C == null ? void 0 : C[e4] }) })]
|
|
5481
5481
|
}, e4))
|
|
5482
|
-
}), p[35] = h, p[36] =
|
|
5483
|
-
let
|
|
5484
|
-
return p[38] !==
|
|
5485
|
-
className:
|
|
5482
|
+
}), p[35] = h, p[36] = C, p[37] = J) : J = p[37];
|
|
5483
|
+
let X;
|
|
5484
|
+
return p[38] !== U || p[39] !== J || p[40] !== D || p[41] !== k || p[42] !== A || p[43] !== M ? (X = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
5485
|
+
className: D,
|
|
5486
5486
|
children: [
|
|
5487
|
-
|
|
5488
|
-
D,
|
|
5487
|
+
k,
|
|
5489
5488
|
A,
|
|
5490
|
-
|
|
5491
|
-
|
|
5489
|
+
M,
|
|
5490
|
+
U,
|
|
5491
|
+
J
|
|
5492
5492
|
]
|
|
5493
|
-
}), p[38] =
|
|
5493
|
+
}), p[38] = U, p[39] = J, p[40] = D, p[41] = k, p[42] = A, p[43] = M, p[44] = X) : X = p[44], X;
|
|
5494
5494
|
};
|
|
5495
5495
|
var STAT_KEYS = [
|
|
5496
5496
|
"distinct",
|
|
@@ -5647,23 +5647,23 @@ function toFieldQuery(e3, p) {
|
|
|
5647
5647
|
};
|
|
5648
5648
|
}
|
|
5649
5649
|
function fromFieldQuery(e3) {
|
|
5650
|
-
let { aggregate: p, bin: m, timeUnit: h, field: g, scale:
|
|
5651
|
-
if (isWildcard(
|
|
5652
|
-
|
|
5653
|
-
let
|
|
5650
|
+
let { aggregate: p, bin: m, timeUnit: h, field: g, scale: v, legend: y, axis: b, sort: x, description: S } = e3, { type: C } = e3;
|
|
5651
|
+
if (isWildcard(C)) throw Error("Wildcard not support");
|
|
5652
|
+
C === "ordinal" && (Logger.warn("Ordinal type is not supported. Using nominal type instead."), C = "nominal");
|
|
5653
|
+
let w = fromFieldQueryFunctionMixins({
|
|
5654
5654
|
aggregate: p,
|
|
5655
5655
|
bin: m,
|
|
5656
5656
|
timeUnit: h
|
|
5657
5657
|
});
|
|
5658
5658
|
return invariant(g !== void 0, "Field is required for fieldQ"), removeUndefined({
|
|
5659
5659
|
field: g,
|
|
5660
|
-
fn:
|
|
5661
|
-
type:
|
|
5662
|
-
sort:
|
|
5663
|
-
scale:
|
|
5664
|
-
axis:
|
|
5665
|
-
legend:
|
|
5666
|
-
description:
|
|
5660
|
+
fn: w,
|
|
5661
|
+
type: C,
|
|
5662
|
+
sort: x,
|
|
5663
|
+
scale: v,
|
|
5664
|
+
axis: b,
|
|
5665
|
+
legend: y,
|
|
5666
|
+
description: S
|
|
5667
5667
|
});
|
|
5668
5668
|
}
|
|
5669
5669
|
function toSpecQuery(e3) {
|
|
@@ -5938,18 +5938,18 @@ const QueryForm = (e3) => {
|
|
|
5938
5938
|
className: "col-span-2 text-sm font-semibold w-full border-t border-divider flex items-center justify-between pt-2 pr-[30px]",
|
|
5939
5939
|
children: [j, D]
|
|
5940
5940
|
}), p[18] = D, p[19] = M);
|
|
5941
|
-
let
|
|
5942
|
-
p[20] === b ?
|
|
5943
|
-
let
|
|
5944
|
-
return p[22] !== M || p[23] !==
|
|
5941
|
+
let P;
|
|
5942
|
+
p[20] === b ? P = p[21] : (P = MARK_ENCODINGS.map(b), p[20] = b, p[21] = P);
|
|
5943
|
+
let F;
|
|
5944
|
+
return p[22] !== M || p[23] !== P || p[24] !== A ? (F = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
5945
5945
|
className: "grid gap-x-2 gap-y-4 justify-items-start py-3 pl-4 pr-2 bg-(--slate-1) border rounded items-center grid-template-columns-[repeat(2,_minmax(0,_min-content))] self-start",
|
|
5946
5946
|
children: [
|
|
5947
5947
|
k,
|
|
5948
5948
|
A,
|
|
5949
5949
|
M,
|
|
5950
|
-
|
|
5950
|
+
P
|
|
5951
5951
|
]
|
|
5952
|
-
}), p[22] = M, p[23] =
|
|
5952
|
+
}), p[22] = M, p[23] = P, p[24] = A, p[25] = F) : F = p[25], F;
|
|
5953
5953
|
};
|
|
5954
5954
|
var FieldSelect = (e3) => {
|
|
5955
5955
|
let p = (0, import_compiler_runtime$1.c)(43), { label: m, schema: h, fieldDefinition: g, disabled: _, onChange: v } = e3, y;
|
|
@@ -6023,16 +6023,16 @@ var FieldSelect = (e3) => {
|
|
|
6023
6023
|
]
|
|
6024
6024
|
})
|
|
6025
6025
|
}, e4)), p[17] = h, p[18] = M);
|
|
6026
|
-
let
|
|
6027
|
-
p[19] === h ?
|
|
6026
|
+
let P;
|
|
6027
|
+
p[19] === h ? P = p[20] : (P = h.fieldNames().length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItem, {
|
|
6028
6028
|
disabled: true,
|
|
6029
6029
|
value: "--",
|
|
6030
6030
|
children: "No columns"
|
|
6031
|
-
}), p[19] = h, p[20] =
|
|
6031
|
+
}), p[19] = h, p[20] = P);
|
|
6032
|
+
let F;
|
|
6033
|
+
p[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectSeparator, {}), p[21] = F) : F = p[21];
|
|
6032
6034
|
let I;
|
|
6033
|
-
p[
|
|
6034
|
-
let z;
|
|
6035
|
-
p[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItem, {
|
|
6035
|
+
p[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectItem, {
|
|
6036
6036
|
value: "*",
|
|
6037
6037
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", {
|
|
6038
6038
|
className: "flex items-center gap-1 flex-1",
|
|
@@ -6041,36 +6041,36 @@ var FieldSelect = (e3) => {
|
|
|
6041
6041
|
children: "Count"
|
|
6042
6042
|
})]
|
|
6043
6043
|
})
|
|
6044
|
-
}, "*"), p[22] =
|
|
6045
|
-
let
|
|
6046
|
-
p[23] !==
|
|
6044
|
+
}, "*"), p[22] = I) : I = p[22];
|
|
6045
|
+
let L;
|
|
6046
|
+
p[23] !== P || p[24] !== M ? (L = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(SelectGroup, { children: [
|
|
6047
6047
|
M,
|
|
6048
|
+
P,
|
|
6048
6049
|
F,
|
|
6049
|
-
I
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
p[26] !== _ || p[27] !== w || p[28] !== W || p[29] !== D || p[30] !== j ? (G = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Select, {
|
|
6050
|
+
I
|
|
6051
|
+
] }) }), p[23] = P, p[24] = M, p[25] = L) : L = p[25];
|
|
6052
|
+
let z;
|
|
6053
|
+
p[26] !== _ || p[27] !== w || p[28] !== L || p[29] !== D || p[30] !== j ? (z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Select, {
|
|
6054
6054
|
value: w,
|
|
6055
6055
|
disabled: _,
|
|
6056
6056
|
onValueChange: D,
|
|
6057
|
-
children: [j,
|
|
6058
|
-
}), p[26] = _, p[27] = w, p[28] =
|
|
6059
|
-
let
|
|
6060
|
-
p[32] !== g || p[33] !== v ? (
|
|
6057
|
+
children: [j, L]
|
|
6058
|
+
}), p[26] = _, p[27] = w, p[28] = L, p[29] = D, p[30] = j, p[31] = z) : z = p[31];
|
|
6059
|
+
let B;
|
|
6060
|
+
p[32] !== g || p[33] !== v ? (B = g && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldOptions, {
|
|
6061
6061
|
field: g,
|
|
6062
6062
|
onChange: v
|
|
6063
|
-
}), p[32] = g, p[33] = v, p[34] =
|
|
6064
|
-
let
|
|
6065
|
-
p[35] ===
|
|
6063
|
+
}), p[32] = g, p[33] = v, p[34] = B) : B = p[34];
|
|
6064
|
+
let U;
|
|
6065
|
+
p[35] === B ? U = p[36] : (U = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6066
6066
|
className: "w-[26px]",
|
|
6067
|
-
children:
|
|
6068
|
-
}), p[35] =
|
|
6067
|
+
children: B
|
|
6068
|
+
}), p[35] = B, p[36] = U);
|
|
6069
6069
|
let X;
|
|
6070
|
-
p[37] !==
|
|
6070
|
+
p[37] !== z || p[38] !== U ? (X = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6071
6071
|
className: "flex flex-row gap-1 h-[26px]",
|
|
6072
|
-
children: [
|
|
6073
|
-
}), p[37] =
|
|
6072
|
+
children: [z, U]
|
|
6073
|
+
}), p[37] = z, p[38] = U, p[39] = X) : X = p[39];
|
|
6074
6074
|
let Z;
|
|
6075
6075
|
return p[40] !== X || p[41] !== E ? (Z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [E, X] }), p[40] = X, p[41] = E, p[42] = Z) : Z = p[42], Z;
|
|
6076
6076
|
}, NONE_FN = "__", FieldOptions = (e3) => {
|
|
@@ -6106,13 +6106,13 @@ var FieldSelect = (e3) => {
|
|
|
6106
6106
|
y,
|
|
6107
6107
|
b,
|
|
6108
6108
|
e4.map(_temp3)
|
|
6109
|
-
] }),
|
|
6110
|
-
p[6] !== m.fn || p[7] !== _ || p[8] !== x ? (
|
|
6109
|
+
] }), S;
|
|
6110
|
+
p[6] !== m.fn || p[7] !== _ || p[8] !== x ? (S = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Select, {
|
|
6111
6111
|
"data-testid": "marimo-plugin-data-explorer-field-options",
|
|
6112
6112
|
value: m.fn,
|
|
6113
6113
|
onValueChange: _,
|
|
6114
6114
|
children: [v, x]
|
|
6115
|
-
}), p[6] = m.fn, p[7] = _, p[8] = x, p[9] =
|
|
6115
|
+
}), p[6] = m.fn, p[7] = _, p[8] = x, p[9] = S) : S = p[9], g = S;
|
|
6116
6116
|
break bb0;
|
|
6117
6117
|
}
|
|
6118
6118
|
}
|
|
@@ -6192,57 +6192,57 @@ const DataExplorerComponent = (e3) => {
|
|
|
6192
6192
|
}, p[0] = h, p[1] = m, p[2] = g) : g = p[2];
|
|
6193
6193
|
let _;
|
|
6194
6194
|
p[3] === m ? _ = p[4] : (_ = [m], p[3] = m, p[4] = _);
|
|
6195
|
-
let { data:
|
|
6196
|
-
if (
|
|
6195
|
+
let { data: x, isPending: S, error: C } = useAsyncData(g, _), { mark: w } = useAtomValue(chartSpecAtom), D = useAtomValue(relatedChartSpecsAtom), { theme: A } = useTheme();
|
|
6196
|
+
if (C) {
|
|
6197
6197
|
let e4;
|
|
6198
|
-
return p[5] ===
|
|
6198
|
+
return p[5] === C ? e4 = p[6] : (e4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ErrorBanner, { error: C }), p[5] = C, p[6] = e4), e4;
|
|
6199
6199
|
}
|
|
6200
|
-
if (!
|
|
6200
|
+
if (!x) {
|
|
6201
6201
|
let e4;
|
|
6202
6202
|
return p[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}), p[7] = e4) : e4 = p[7], e4;
|
|
6203
6203
|
}
|
|
6204
|
-
let { chartData:
|
|
6205
|
-
if (
|
|
6204
|
+
let { chartData: j, schema: M } = x;
|
|
6205
|
+
if (S || !M) {
|
|
6206
6206
|
let e4;
|
|
6207
6207
|
return p[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {}), p[8] = e4) : e4 = p[8], e4;
|
|
6208
6208
|
}
|
|
6209
|
-
let
|
|
6210
|
-
p[9] === (
|
|
6211
|
-
let
|
|
6212
|
-
p[11] !==
|
|
6213
|
-
if (!
|
|
6214
|
-
let e4 =
|
|
6209
|
+
let P = (_b = (_a = D.main) == null ? void 0 : _a.plots) == null ? void 0 : _b[0], I;
|
|
6210
|
+
p[9] === (P == null ? void 0 : P.fieldInfos) ? I = p[10] : (I = new Set(P == null ? void 0 : P.fieldInfos.map(_temp)), p[9] = P == null ? void 0 : P.fieldInfos, p[10] = I);
|
|
6211
|
+
let L = I, R;
|
|
6212
|
+
p[11] !== j || p[12] !== P || p[13] !== M || p[14] !== A ? (R = () => {
|
|
6213
|
+
if (!P) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ColumnSummary, { schema: M });
|
|
6214
|
+
let e4 = P.spec, p2 = augmentSpecWithData(makeResponsive(e4), j);
|
|
6215
6215
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6216
6216
|
className: cn("flex overflow-y-auto justify-center items-center flex-1 w-[90%]"),
|
|
6217
6217
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(q, {
|
|
6218
6218
|
"data-container-width": getContainerWidth(p2),
|
|
6219
6219
|
spec: p2,
|
|
6220
|
-
options: chartOptions(
|
|
6220
|
+
options: chartOptions(A)
|
|
6221
6221
|
})
|
|
6222
6222
|
});
|
|
6223
|
-
}, p[11] =
|
|
6224
|
-
let
|
|
6225
|
-
p[16] !==
|
|
6226
|
-
mark:
|
|
6227
|
-
schema:
|
|
6228
|
-
}), p[16] =
|
|
6229
|
-
let
|
|
6230
|
-
p[19] ===
|
|
6231
|
-
let
|
|
6232
|
-
p[21] !==
|
|
6223
|
+
}, p[11] = j, p[12] = P, p[13] = M, p[14] = A, p[15] = R) : R = p[15];
|
|
6224
|
+
let z = R, B;
|
|
6225
|
+
p[16] !== w || p[17] !== M ? (B = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryForm, {
|
|
6226
|
+
mark: w,
|
|
6227
|
+
schema: M
|
|
6228
|
+
}), p[16] = w, p[17] = M, p[18] = B) : B = p[18];
|
|
6229
|
+
let V;
|
|
6230
|
+
p[19] === z ? V = p[20] : (V = z(), p[19] = z, p[20] = V);
|
|
6231
|
+
let H;
|
|
6232
|
+
p[21] !== B || p[22] !== V ? (H = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6233
6233
|
className: "flex items-center gap-2",
|
|
6234
|
-
children: [
|
|
6235
|
-
}), p[21] =
|
|
6236
|
-
let
|
|
6237
|
-
if (p[24] !== h || p[25] !==
|
|
6234
|
+
children: [B, V]
|
|
6235
|
+
}), p[21] = B, p[22] = V, p[23] = H) : H = p[23];
|
|
6236
|
+
let U = (_c = D.histograms) == null ? void 0 : _c.plots, W = (_d2 = D.addCategoricalField) == null ? void 0 : _d2.plots, G = (_e = D.addQuantitativeField) == null ? void 0 : _e.plots, J = (_f2 = D.addTemporalField) == null ? void 0 : _f2.plots, Y;
|
|
6237
|
+
if (p[24] !== h || p[25] !== j || p[26] !== L || p[27] !== G || p[28] !== J || p[29] !== U || p[30] !== W || p[31] !== A) {
|
|
6238
6238
|
let e4;
|
|
6239
|
-
p[33] !== h || p[34] !==
|
|
6239
|
+
p[33] !== h || p[34] !== j || p[35] !== L || p[36] !== A ? (e4 = (e5, p2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HorizontalCarouselItem, {
|
|
6240
6240
|
title: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
6241
6241
|
className: "flex flex-row gap-1",
|
|
6242
6242
|
children: e5.fieldInfos.map((e6) => {
|
|
6243
6243
|
let p3 = e6.fieldDef.field === "*" ? "Count" : e6.fieldDef.fn ? `${e6.fieldDef.fn}(${e6.fieldDef.field})` : e6.fieldDef.field.toString();
|
|
6244
6244
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Badge, {
|
|
6245
|
-
variant:
|
|
6245
|
+
variant: L.has(e6.fieldDef.field) ? "secondary" : "defaultOutline",
|
|
6246
6246
|
children: p3
|
|
6247
6247
|
}, p3);
|
|
6248
6248
|
})
|
|
@@ -6261,23 +6261,23 @@ const DataExplorerComponent = (e3) => {
|
|
|
6261
6261
|
})
|
|
6262
6262
|
}),
|
|
6263
6263
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(q, {
|
|
6264
|
-
options: chartOptions(
|
|
6265
|
-
spec: augmentSpecWithData(e5.spec,
|
|
6264
|
+
options: chartOptions(A),
|
|
6265
|
+
spec: augmentSpecWithData(e5.spec, j)
|
|
6266
6266
|
}, p2)
|
|
6267
|
-
}, p2), p[33] = h, p[34] =
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
].filter(Boolean).flat().map(e4), p[24] = h, p[25] =
|
|
6273
|
-
} else
|
|
6274
|
-
let
|
|
6275
|
-
p[38] ===
|
|
6267
|
+
}, p2), p[33] = h, p[34] = j, p[35] = L, p[36] = A, p[37] = e4) : e4 = p[37], Y = [
|
|
6268
|
+
U,
|
|
6269
|
+
W,
|
|
6270
|
+
G,
|
|
6271
|
+
J
|
|
6272
|
+
].filter(Boolean).flat().map(e4), p[24] = h, p[25] = j, p[26] = L, p[27] = G, p[28] = J, p[29] = U, p[30] = W, p[31] = A, p[32] = Y;
|
|
6273
|
+
} else Y = p[32];
|
|
6274
|
+
let X;
|
|
6275
|
+
p[38] === Y ? X = p[39] : (X = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HorizontalCarousel, { children: Y }), p[38] = Y, p[39] = X);
|
|
6276
6276
|
let Z;
|
|
6277
|
-
return p[40] !==
|
|
6277
|
+
return p[40] !== X || p[41] !== H ? (Z = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
6278
6278
|
className: "flex flex-col gap-2",
|
|
6279
|
-
children: [
|
|
6280
|
-
}), p[40] =
|
|
6279
|
+
children: [H, X]
|
|
6280
|
+
}), p[40] = X, p[41] = H, p[42] = Z) : Z = p[42], Z;
|
|
6281
6281
|
};
|
|
6282
6282
|
var HorizontalCarousel = (e3) => {
|
|
6283
6283
|
let p = (0, import_compiler_runtime.c)(2), { children: m } = e3;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
2
|
-
import { t as require_react } from "./react-
|
|
3
|
-
import { t as require_compiler_runtime } from "./compiler-runtime-
|
|
2
|
+
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
|
+
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
4
4
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
5
5
|
var require_dist$1 = /* @__PURE__ */ __commonJSMin((() => {
|
|
6
6
|
(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
2
|
-
import { t as require_react } from "./react-
|
|
3
|
-
import { t as require_compiler_runtime } from "./compiler-runtime-
|
|
2
|
+
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
3
|
+
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
4
4
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
5
5
|
var require_plotly = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
6
6
|
(function(e2, n) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import "./react-dom-
|
|
2
|
+
import { _ as Logger } from "./button-D1C3g5GI.js";
|
|
3
|
+
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
|
+
import "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
+
import "./react-dom-D5FDLRUB.js";
|
|
6
6
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
7
|
-
import "./zod-
|
|
8
|
-
import { n as ErrorBanner } from "./error-banner-
|
|
9
|
-
import { t as esm_default, u as CopyClipboardIcon } from "./esm-
|
|
7
|
+
import "./zod-W5ZEjzaE.js";
|
|
8
|
+
import { n as ErrorBanner } from "./error-banner-B_ioHva3.js";
|
|
9
|
+
import { t as esm_default, u as CopyClipboardIcon } from "./esm-CDHI9cuO.js";
|
|
10
10
|
import "./dist-CxZvoNao.js";
|
|
11
11
|
import "./dist-DbnBiLNH.js";
|
|
12
12
|
import "./dist-B43sbpd0.js";
|