@marimo-team/islands 0.23.1-dev9 → 0.23.2-dev1
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-tho8l5GC.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-Caoda-MR.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-Bs4egzxg.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-hRljRgfG.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 +7216 -7050
- 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-BK6F4vqt.js → process-output-Bekznt_B.js} +865 -864
- 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-CygUI9oH.js → tooltip-DwNnFsxZ.js} +132 -133
- 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-1icm1Ykb.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/RenderHTML.tsx +9 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +27 -0
- package/src/plugins/core/__test__/trusted-url.test.ts +48 -0
- package/src/plugins/core/registerReactComponent.tsx +11 -8
- package/src/plugins/core/trusted-url.ts +20 -0
- package/src/plugins/impl/ButtonPlugin.tsx +4 -6
- package/src/plugins/impl/CodeEditorPlugin.tsx +15 -18
- package/src/plugins/impl/DataEditorPlugin.tsx +8 -14
- package/src/plugins/impl/DataTablePlugin.tsx +8 -9
- package/src/plugins/impl/FileUploadPlugin.tsx +39 -43
- package/src/plugins/impl/FormPlugin.tsx +2 -6
- 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/chat/ChatPlugin.tsx +17 -20
- package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +5 -8
- 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/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +50 -0
- package/src/plugins/impl/plotly/__tests__/selection.test.ts +82 -0
- package/src/plugins/impl/plotly/selection.ts +62 -3
- package/src/plugins/impl/vega/VegaPlugin.tsx +5 -8
- package/src/plugins/layout/NavigationMenuPlugin.tsx +2 -6
- 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
|
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
var _a, _b, _c, _d, _e;
|
|
5
|
-
import {
|
|
5
|
+
import { _ as Logger, c as Objects } from "./button-D1C3g5GI.js";
|
|
6
6
|
import { St as isObject, a as loader, c as typeParsers$1, gt as isArray, o as read$1, wt as isString } from "./vega-loader.browser-DqEcFOPD.js";
|
|
7
7
|
var pkg = { version: "1.1.0" };
|
|
8
8
|
function formatValue(m2, U, G, K) {
|
|
@@ -171,8 +171,8 @@ function getContainerWidth(m2) {
|
|
|
171
171
|
if ("spec" in m2) return getContainerWidth(m2.spec);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
function getVegaFieldTypes(
|
|
175
|
-
return !
|
|
174
|
+
function getVegaFieldTypes(m2) {
|
|
175
|
+
return !m2 || Object.keys(m2).length === 0 ? "auto" : Objects.mapValues(m2, (m3) => m3 === "date" || m3 === "time" ? "string" : m3 === "datetime" ? "date" : m3);
|
|
176
176
|
}
|
|
177
177
|
const MAGIC = Uint8Array.of(65, 82, 82, 79, 87, 49), Version = {
|
|
178
178
|
V1: 0,
|
|
@@ -1345,24 +1345,24 @@ var previousIntegerParser = typeParsers.integer, previousNumberParser = typePars
|
|
|
1345
1345
|
return Number.isNaN(U) ? m2 : U;
|
|
1346
1346
|
}, () => {
|
|
1347
1347
|
typeParsers.integer = previousIntegerParser, typeParsers.number = previousNumberParser;
|
|
1348
|
-
}), DATE_MIDDLEWARE = () => (typeParsers.date = (
|
|
1349
|
-
if (
|
|
1350
|
-
if (
|
|
1351
|
-
if (!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(
|
|
1348
|
+
}), DATE_MIDDLEWARE = () => (typeParsers.date = (U) => {
|
|
1349
|
+
if (U === "") return "";
|
|
1350
|
+
if (U == null) return null;
|
|
1351
|
+
if (!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(U)) return U;
|
|
1352
1352
|
try {
|
|
1353
|
-
let
|
|
1354
|
-
return Number.isNaN(
|
|
1353
|
+
let m2 = new Date(U);
|
|
1354
|
+
return Number.isNaN(m2.getTime()) ? U : m2;
|
|
1355
1355
|
} catch {
|
|
1356
|
-
return Logger.warn(`Failed to parse date: ${
|
|
1356
|
+
return Logger.warn(`Failed to parse date: ${U}`), U;
|
|
1357
1357
|
}
|
|
1358
1358
|
}, () => {
|
|
1359
1359
|
typeParsers.date = previousDateParser;
|
|
1360
1360
|
});
|
|
1361
1361
|
typeParsers.boolean = (m2) => m2 === "True" ? true : m2 === "False" ? false : previousBooleanParser(m2);
|
|
1362
1362
|
const vegaLoader = createBatchedLoader();
|
|
1363
|
-
async function vegaLoadData(
|
|
1363
|
+
async function vegaLoadData(m2, W, G = {}) {
|
|
1364
1364
|
let { handleBigIntAndNumberLike: K = false, replacePeriod: q = false } = G;
|
|
1365
|
-
if (
|
|
1365
|
+
if (m2.endsWith(".arrow") || (W == null ? void 0 : W.type) === "arrow") return tableFromIPC(await batchedArrowLoader(m2), {
|
|
1366
1366
|
useProxy: true,
|
|
1367
1367
|
useDate: true,
|
|
1368
1368
|
useBigInt: K
|
|
@@ -1371,7 +1371,7 @@ async function vegaLoadData(U, W, G = {}) {
|
|
|
1371
1371
|
K && J.push(BIG_INT_MIDDLEWARE);
|
|
1372
1372
|
let Y = [];
|
|
1373
1373
|
try {
|
|
1374
|
-
let G2 = await vegaLoader.load(
|
|
1374
|
+
let G2 = await vegaLoader.load(m2);
|
|
1375
1375
|
if (!W) {
|
|
1376
1376
|
if (typeof G2 == "string") try {
|
|
1377
1377
|
JSON.parse(G2), W = { type: "json" };
|
|
@@ -1386,12 +1386,12 @@ async function vegaLoadData(U, W, G = {}) {
|
|
|
1386
1386
|
let K2 = (W == null ? void 0 : W.type) === "csv";
|
|
1387
1387
|
K2 && typeof G2 == "string" && (G2 = uniquifyColumnNames(G2)), K2 && typeof G2 == "string" && q && (G2 = replacePeriodsInColumnNames(G2));
|
|
1388
1388
|
let X = (W == null ? void 0 : W.parse) || "auto";
|
|
1389
|
-
return typeof X == "object" && (X = Objects.mapValues(X, (
|
|
1389
|
+
return typeof X == "object" && (X = Objects.mapValues(X, (m3) => m3 === "time" ? "string" : m3 === "datetime" ? "date" : m3)), Y = J.map((m3) => m3()), K2 ? read(G2, {
|
|
1390
1390
|
...W,
|
|
1391
1391
|
parse: X
|
|
1392
1392
|
}) : read(G2, W);
|
|
1393
1393
|
} finally {
|
|
1394
|
-
Y.forEach((
|
|
1394
|
+
Y.forEach((m3) => m3());
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
function parseCsvData(m2, U = true) {
|