@marimo-team/islands 0.23.1-dev9 → 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.
Files changed (84) hide show
  1. package/dist/{ConnectedDataExplorerComponent-tho8l5GC.js → ConnectedDataExplorerComponent-P92i6wYx.js} +148 -148
  2. package/dist/{ImageComparisonComponent-DY3J_vIU.js → ImageComparisonComponent-HF4AY8_n.js} +2 -2
  3. package/dist/{Plot-BxlSHo0G.js → Plot-CK0oVgQL.js} +2 -2
  4. package/dist/{any-language-editor-Caoda-MR.js → any-language-editor-BCvLfvzI.js} +7 -7
  5. package/dist/{button-Cn59RsBF.js → button-D1C3g5GI.js} +72 -71
  6. package/dist/{capabilities-Bml77Di-.js → capabilities-BwpUgo4S.js} +1 -1
  7. package/dist/{chat-ui-Bs4egzxg.js → chat-ui-CNHw9Osh.js} +2829 -2829
  8. package/dist/{check-C51PA02v.js → check-BgrdTLuv.js} +1 -1
  9. package/dist/{chunk-5FQGJX7Z-C428iZBW.js → chunk-5FQGJX7Z-VIref9gx.js} +4 -4
  10. package/dist/{click-outside-container-vCXhHl-R.js → click-outside-container-D3t6KDni.js} +1 -1
  11. package/dist/{code-block-37QAKDTI-D9EnJeBI.js → code-block-37QAKDTI-FQEoMOU1.js} +2 -2
  12. package/dist/{compiler-runtime-B_OLMU9S.js → compiler-runtime-CEbnTgxf.js} +1 -1
  13. package/dist/{copy-DzOz_Au7.js → copy-Bp6CK_Fg.js} +9 -9
  14. package/dist/{data-grid-overlay-editor-lKF301ME.js → data-grid-overlay-editor-C_sKPpLu.js} +4 -4
  15. package/dist/{dist-CjLQ79mo.js → dist-CTtLBPLZ.js} +11 -11
  16. package/dist/{dist-BoNJsA65.js → dist-DUFd1bhm.js} +1 -1
  17. package/dist/{error-banner-BQcJXy6k.js → error-banner-B_ioHva3.js} +121 -121
  18. package/dist/{esm-hRljRgfG.js → esm-CDHI9cuO.js} +15 -15
  19. package/dist/{glide-data-editor-D2X4D_xi.js → glide-data-editor-BFqEJGJW.js} +948 -948
  20. package/dist/{input-BRN2Mjzx.js → input-CSVEkmaZ.js} +288 -288
  21. package/dist/{label-J1N4mVcg.js → label-BebYlsDV.js} +257 -257
  22. package/dist/{loader-JmfPBSx5.js → loader-ZFbGsMN1.js} +15 -15
  23. package/dist/main.js +7178 -7046
  24. package/dist/mermaid-4DMBBIKO-BjtqcdX4.js +6 -0
  25. package/dist/{mermaid-UMKVHs_g.js → mermaid-BbhZNQeB.js} +18 -18
  26. package/dist/{number-overlay-editor-DxLoVuuE.js → number-overlay-editor-B02-t7Ar.js} +2 -2
  27. package/dist/{process-output-BK6F4vqt.js → process-output-Bekznt_B.js} +865 -864
  28. package/dist/{react-dom-BSUuJjCR.js → react-dom-D5FDLRUB.js} +1 -1
  29. package/dist/{react-vega-DayQmZjG.js → react-vega-BkjdpVsR.js} +2 -2
  30. package/dist/{react-vega-CzRAIHrv.js → react-vega-DBwal82H.js} +1 -1
  31. package/dist/{slides-component-_3tukGh-.js → slides-component-DLxprlqo.js} +26 -26
  32. package/dist/{spec-rP6otrXw.js → spec-3EPbPQZH.js} +4 -4
  33. package/dist/style.css +1 -1
  34. package/dist/{toDate-CfGr2xZ1.js → toDate-B1AzlBoW.js} +15 -15
  35. package/dist/{tooltip-CygUI9oH.js → tooltip-DwNnFsxZ.js} +132 -133
  36. package/dist/{types-D4CFUmPq.js → types-pwjdK009.js} +15 -15
  37. package/dist/{useAsyncData-BzS3Ai32.js → useAsyncData-BL98MPIy.js} +3 -3
  38. package/dist/{useDeepCompareMemoize-AjORjhpL.js → useDeepCompareMemoize-CsyOnnjc.js} +25 -25
  39. package/dist/{useIframeCapabilities---aRgGdv.js → useIframeCapabilities-CsTUYYj7.js} +3 -3
  40. package/dist/{useLifecycle-B90lJH4p.js → useLifecycle-DrGGIsgp.js} +36 -36
  41. package/dist/{useTheme-ytmywQ5O.js → useTheme-CzwDokKe.js} +4 -4
  42. package/dist/{vega-component-1icm1Ykb.js → vega-component-KBJXEDZz.js} +42 -42
  43. package/dist/{zod-D4UoCYGu.js → zod-W5ZEjzaE.js} +23 -23
  44. package/package.json +4 -4
  45. package/src/core/islands/__tests__/bridge.test.ts +2 -12
  46. package/src/core/islands/__tests__/islands-harness.test.ts +348 -0
  47. package/src/core/islands/__tests__/parse.test.ts +466 -24
  48. package/src/core/islands/__tests__/test-utils.tsx +263 -0
  49. package/src/core/islands/bootstrap.ts +265 -0
  50. package/src/core/islands/bridge.ts +154 -75
  51. package/src/core/islands/components/IslandControls.tsx +103 -0
  52. package/src/core/islands/components/__tests__/IslandControls.test.tsx +185 -0
  53. package/src/core/islands/components/__tests__/useIslandControls.test.ts +208 -0
  54. package/src/core/islands/components/output-wrapper.tsx +76 -93
  55. package/src/core/islands/components/useIslandControls.ts +60 -0
  56. package/src/core/islands/components/web-components.tsx +168 -40
  57. package/src/core/islands/constants.ts +28 -0
  58. package/src/core/islands/main.ts +7 -205
  59. package/src/core/islands/parse.ts +73 -26
  60. package/src/core/islands/worker-factory.ts +86 -0
  61. package/src/plugins/core/RenderHTML.tsx +9 -0
  62. package/src/plugins/core/__test__/RenderHTML.test.ts +27 -0
  63. package/src/plugins/core/__test__/trusted-url.test.ts +48 -0
  64. package/src/plugins/core/registerReactComponent.tsx +11 -8
  65. package/src/plugins/core/trusted-url.ts +20 -0
  66. package/src/plugins/impl/ButtonPlugin.tsx +4 -6
  67. package/src/plugins/impl/CodeEditorPlugin.tsx +15 -18
  68. package/src/plugins/impl/DataEditorPlugin.tsx +8 -14
  69. package/src/plugins/impl/DataTablePlugin.tsx +8 -9
  70. package/src/plugins/impl/FileUploadPlugin.tsx +39 -43
  71. package/src/plugins/impl/FormPlugin.tsx +2 -6
  72. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +27 -1
  73. package/src/plugins/impl/anywidget/widget-binding.ts +13 -0
  74. package/src/plugins/impl/chat/ChatPlugin.tsx +17 -20
  75. package/src/plugins/impl/data-explorer/DataExplorerPlugin.tsx +5 -8
  76. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +21 -0
  77. package/src/plugins/impl/mpl-interactive/__tests__/MplInteractivePlugin.test.tsx +119 -0
  78. package/src/plugins/impl/panel/PanelPlugin.tsx +31 -10
  79. package/src/plugins/impl/panel/__tests__/PanelPlugin.test.ts +60 -0
  80. package/src/plugins/impl/vega/VegaPlugin.tsx +5 -8
  81. package/src/plugins/layout/NavigationMenuPlugin.tsx +2 -6
  82. package/dist/mermaid-4DMBBIKO-Cw46o6DN.js +0 -6
  83. /package/dist/{clsx-yW_RAw0K.js → clsx-CwTY0BxM.js} +0 -0
  84. /package/dist/{react-Bs6Z0kvn.js → react-DA-nE2FX.js} +0 -0
@@ -0,0 +1,6 @@
1
+ import "./react-DA-nE2FX.js";
2
+ import { a as tt } from "./chunk-5FQGJX7Z-VIref9gx.js";
3
+ import "./jsx-runtime-9hcJiI23.js";
4
+ export {
5
+ tt as Mermaid
6
+ };
@@ -1,15 +1,15 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { t as require_react } from "./react-Bs6Z0kvn.js";
3
- import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
4
- import { g as Logger } from "./button-Cn59RsBF.js";
5
- import "./react-dom-BSUuJjCR.js";
2
+ import { _ as Logger } 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 "./react-dom-D5FDLRUB.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-9hcJiI23.js";
7
- import "./zod-D4UoCYGu.js";
8
- import { n as ErrorBanner } from "./error-banner-BQcJXy6k.js";
7
+ import "./zod-W5ZEjzaE.js";
8
+ import { n as ErrorBanner } from "./error-banner-B_ioHva3.js";
9
9
  import { t as isEmpty_default } from "./isEmpty-B7FX9wKt.js";
10
- import { n as useTheme } from "./useTheme-ytmywQ5O.js";
10
+ import { n as useTheme } from "./useTheme-CzwDokKe.js";
11
11
  import { t as purify } from "./purify.es-hTCfRGdl.js";
12
- import { t as useAsyncData } from "./useAsyncData-BzS3Ai32.js";
12
+ import { t as useAsyncData } from "./useAsyncData-BL98MPIy.js";
13
13
  import { a as decodeEntities, f as isDetailedError, g as utils_default, h as removeDirectives, i as cleanAndMerge, o as encodeEntities } from "./chunk-S3R3BYOJ-B0UOFJwq.js";
14
14
  import { a as setLogLevel, i as log, r as __name, t as select_default } from "./src-DbP20yFZ.js";
15
15
  import { t as package_default } from "./chunk-DR5Q36YT-C40cYcy5.js";
@@ -1053,39 +1053,39 @@ ${e.themeCSS}`), e.fontFamily !== void 0 && (C += `
1053
1053
  }, () => "abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random() * 26)]).join("");
1054
1054
  }
1055
1055
  mermaid_default = (e) => {
1056
- let S = (0, import_compiler_runtime.c)(13), { diagram: C } = e, [T] = (0, import_react.useState)(_temp), D = useTheme().theme === "dark";
1056
+ let C = (0, import_compiler_runtime.c)(13), { diagram: w } = e, [T] = (0, import_react.useState)(_temp), D = useTheme().theme === "dark";
1057
1057
  mermaid_default$1.initialize({
1058
1058
  ...DEFAULT_CONFIG,
1059
1059
  theme: D ? "dark" : "forest",
1060
1060
  darkMode: D
1061
1061
  });
1062
1062
  let k;
1063
- S[0] === C ? k = S[1] : (k = C.trim(), S[0] = C, S[1] = k);
1063
+ C[0] === w ? k = C[1] : (k = w.trim(), C[0] = w, C[1] = k);
1064
1064
  let j = k, M;
1065
- S[2] !== T || S[3] !== j ? (M = async () => (await mermaid_default$1.render(T, j, void 0).catch((e2) => {
1065
+ C[2] !== T || C[3] !== j ? (M = async () => (await mermaid_default$1.render(T, j, void 0).catch((e2) => {
1066
1066
  var _a2;
1067
1067
  throw (_a2 = document.getElementById(T)) == null ? void 0 : _a2.remove(), Logger.warn("Failed to render mermaid diagram", e2), e2;
1068
- })).svg, S[2] = T, S[3] = j, S[4] = M) : M = S[4];
1068
+ })).svg, C[2] = T, C[3] = j, C[4] = M) : M = C[4];
1069
1069
  let N;
1070
- S[5] !== D || S[6] !== T || S[7] !== j ? (N = [
1070
+ C[5] !== D || C[6] !== T || C[7] !== j ? (N = [
1071
1071
  j,
1072
1072
  T,
1073
1073
  D
1074
- ], S[5] = D, S[6] = T, S[7] = j, S[8] = N) : N = S[8];
1074
+ ], C[5] = D, C[6] = T, C[7] = j, C[8] = N) : N = C[8];
1075
1075
  let { data: P, error: F } = useAsyncData(M, N);
1076
1076
  if (F) {
1077
1077
  let e2;
1078
- return S[9] === F ? e2 = S[10] : (e2 = (0, import_jsx_runtime.jsx)(ErrorBanner, {
1078
+ return C[9] === F ? e2 = C[10] : (e2 = (0, import_jsx_runtime.jsx)(ErrorBanner, {
1079
1079
  error: F
1080
- }), S[9] = F, S[10] = e2), e2;
1080
+ }), C[9] = F, C[10] = e2), e2;
1081
1081
  }
1082
1082
  if (!P) return null;
1083
1083
  let I;
1084
- return S[11] === P ? I = S[12] : (I = (0, import_jsx_runtime.jsx)("div", {
1084
+ return C[11] === P ? I = C[12] : (I = (0, import_jsx_runtime.jsx)("div", {
1085
1085
  dangerouslySetInnerHTML: {
1086
1086
  __html: P
1087
1087
  }
1088
- }), S[11] = P, S[12] = I), I;
1088
+ }), C[11] = P, C[12] = I), I;
1089
1089
  };
1090
1090
  function _temp() {
1091
1091
  return randomAlpha();
@@ -1,6 +1,6 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
- import { t as require_react } from "./react-Bs6Z0kvn.js";
3
- import { t as styled_default } from "./dist-BoNJsA65.js";
2
+ import { t as require_react } from "./react-DA-nE2FX.js";
3
+ import { t as styled_default } from "./dist-DUFd1bhm.js";
4
4
  var import_react = /* @__PURE__ */ __toESM(require_react());
5
5
  const NumberOverlayEditorStyle = /* @__PURE__ */ styled_default("div")({
6
6
  name: "NumberOverlayEditorStyle",