@marimo-team/islands 0.23.1-dev8 → 0.23.1
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 +7237 -7101
- 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/matplotlib/matplotlib-renderer.ts +38 -14
- 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/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
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
2
|
+
import { g as cn, h as Events } 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 { n as Copy, r as toast, t as copyToClipboard } from "./copy-Bp6CK_Fg.js";
|
|
6
|
+
import { t as Check } from "./check-BgrdTLuv.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
|
|
8
|
-
import { t as Tooltip } from "./tooltip-
|
|
8
|
+
import { t as Tooltip } from "./tooltip-DwNnFsxZ.js";
|
|
9
9
|
import { $ as ViewPlugin, A as indentString, At as Prec, B as tags, Bt as combineConfig, C as foldKeymap, Ct as ChangeSet, D as getIndentation, Dt as EditorState, E as getIndentUnit, Et as EditorSelection, F as syntaxHighlighting, Ft as StateField, H as NodeProp, Ht as findClusterBreak, I as syntaxTree, It as Text, Lt as Transaction, Mt as RangeSetBuilder, N as matchBrackets, Ot as Facet, Pt as StateEffect, Rt as codePointAt, St as ChangeDesc, Ut as fromCodePoint, Vt as countColumn, X as Direction, Y as Decoration, Z as EditorView, _t as showDialog, a as HighlightStyle, bt as crelt, ct as highlightActiveLineGutter, dt as keymap, et as WidgetType, ft as lineNumbers, g as defaultHighlightStyle, gt as runScopeHandlers, ht as rectangularSelection, it as getPanel, j as indentUnit, jt as RangeSet, k as indentOnInput, lt as highlightSpecialChars, mt as placeholder, nt as drawSelection, o as IndentContext, p as bracketMatching, pt as logException, rt as dropCursor, st as highlightActiveLine, tt as crosshairCursor, ut as hoverTooltip, vt as showPanel, wt as CharCategory, x as foldGutter, xt as Annotation, zt as codePointSize } from "./dist-CxZvoNao.js";
|
|
10
10
|
import { a as closeBracketsKeymap, c as completionKeymap, i as closeBrackets, r as autocompletion } from "./dist-DGNtjMZu.js";
|
|
11
11
|
var import_compiler_runtime = require_compiler_runtime(), import_react = /* @__PURE__ */ __toESM(require_react(), 1), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1);
|
|
12
12
|
const CopyClipboardIcon = (e6) => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
await copyToClipboard(typeof
|
|
13
|
+
let C = (0, import_compiler_runtime.c)(14), { value: w, className: k, buttonClassName: j, tooltip: M, toastTitle: N, ariaLabel: P } = e6, [F, I] = (0, import_react.useState)(false), L;
|
|
14
|
+
C[0] !== N || C[1] !== w ? (L = Events.stopPropagation(async (e7) => {
|
|
15
|
+
await copyToClipboard(typeof w == "function" ? w(e7) : w).then(() => {
|
|
16
16
|
I(true), setTimeout(() => I(false), 2e3), N && toast({ title: N });
|
|
17
17
|
});
|
|
18
|
-
}),
|
|
18
|
+
}), C[0] = N, C[1] = w, C[2] = L) : L = C[2];
|
|
19
19
|
let R = L, z = P ?? "Copy to clipboard", B;
|
|
20
|
-
|
|
20
|
+
C[3] !== k || C[4] !== F ? (B = F ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Check, { className: cn(k, "text-(--grass-11)") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Copy, { className: k }), C[3] = k, C[4] = F, C[5] = B) : B = C[5];
|
|
21
21
|
let V;
|
|
22
|
-
|
|
22
|
+
C[6] !== j || C[7] !== R || C[8] !== z || C[9] !== B ? (V = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
23
23
|
type: "button",
|
|
24
24
|
onClick: R,
|
|
25
25
|
"aria-label": z,
|
|
26
26
|
className: j,
|
|
27
27
|
children: B
|
|
28
|
-
}),
|
|
28
|
+
}), C[6] = j, C[7] = R, C[8] = z, C[9] = B, C[10] = V) : V = C[10];
|
|
29
29
|
let H = V;
|
|
30
30
|
if (M === false) return H;
|
|
31
31
|
let U = F ? "Copied!" : M ?? "Copy to clipboard", W;
|
|
32
|
-
return
|
|
32
|
+
return C[11] !== H || C[12] !== U ? (W = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tooltip, {
|
|
33
33
|
content: U,
|
|
34
34
|
delayDuration: 400,
|
|
35
35
|
children: H
|
|
36
|
-
}),
|
|
36
|
+
}), C[11] = H, C[12] = U, C[13] = W) : W = C[13], W;
|
|
37
37
|
};
|
|
38
38
|
var toggleComment = (e6) => {
|
|
39
39
|
let { state: x } = e6, S = x.doc.lineAt(x.selection.main.from), C = getConfig(e6.state, S.from);
|