@marimo-team/islands 0.23.4-dev0 → 0.23.4-dev5

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.
@@ -1,6 +1,6 @@
1
1
  import { s as __toESM } from "./chunk-BNovOVIE.js";
2
2
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
3
- import { it as parseHtmlContent, rt as ansiToPlainText } from "./html-to-image-DBosi5GK.js";
3
+ import { it as parseHtmlContent, rt as ansiToPlainText } from "./html-to-image-CzFE0Irw.js";
4
4
  import { u as createLucideIcon } from "./dist-ESg7xyoD.js";
5
5
  import { t as Strings } from "./strings-B_FOH6eV.js";
6
6
  import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
@@ -10,85 +10,64 @@ var File = createLucideIcon("file", [["path", {
10
10
  }], ["path", {
11
11
  d: "M14 2v5a1 1 0 0 0 1 1h5",
12
12
  key: "wfsgrz"
13
- }]]), Trash2 = createLucideIcon("trash-2", [
14
- ["path", {
15
- d: "M10 11v6",
16
- key: "nco0om"
17
- }],
18
- ["path", {
19
- d: "M14 11v6",
20
- key: "outv1u"
21
- }],
22
- ["path", {
23
- d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
24
- key: "miytrc"
25
- }],
26
- ["path", {
27
- d: "M3 6h18",
28
- key: "d0wm0j"
29
- }],
30
- ["path", {
31
- d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
32
- key: "e791ji"
33
- }]
34
- ]);
13
+ }]]);
35
14
  function deserializeBlob(e) {
36
15
  var _a;
37
- let [g, _] = e.split(",", 2), v = (_a = /^data:(.+);base64$/.exec(g)) == null ? void 0 : _a[1], y = atob(_), b = y.length, x = new Uint8Array(b);
38
- for (let e2 = 0; e2 < b; e2++) x[e2] = y.charCodeAt(e2);
39
- return new Blob([x], { type: v });
16
+ let [h, g] = e.split(",", 2), _ = (_a = /^data:(.+);base64$/.exec(h)) == null ? void 0 : _a[1], v = atob(g), y = v.length, b = new Uint8Array(y);
17
+ for (let e2 = 0; e2 < y; e2++) b[e2] = v.charCodeAt(e2);
18
+ return new Blob([b], { type: _ });
40
19
  }
41
20
  function defineCustomEvent(e) {
42
21
  return () => ({
43
22
  TYPE: e,
44
- is(g) {
45
- return g.type === e;
23
+ is(h) {
24
+ return h.type === e;
46
25
  },
47
- create(g) {
48
- return new CustomEvent(e, g);
26
+ create(h) {
27
+ return new CustomEvent(e, h);
49
28
  }
50
29
  });
51
30
  }
52
31
  const MarimoValueInputEvent = defineCustomEvent("marimo-value-input")(), MarimoValueUpdateEvent = defineCustomEvent("marimo-value-update")(), MarimoValueReadyEvent = defineCustomEvent("marimo-value-ready")(), MarimoIncomingMessageEvent = defineCustomEvent("marimo-incoming-message")();
53
- function createInputEvent(e, g) {
32
+ function createInputEvent(e, h) {
54
33
  return MarimoValueInputEvent.create({
55
34
  bubbles: true,
56
35
  composed: true,
57
36
  detail: {
58
37
  value: e,
59
- element: g
38
+ element: h
60
39
  }
61
40
  });
62
41
  }
63
42
  var import_compiler_runtime = require_compiler_runtime(), import_jsx_runtime = /* @__PURE__ */ __toESM(require_jsx_runtime(), 1);
64
43
  const PythonIcon = (e) => {
65
- let g = (0, import_compiler_runtime.c)(4), _, v;
66
- g[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Python Logo" }), v = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }), g[0] = _, g[1] = v) : (_ = g[0], v = g[1]);
67
- let y;
68
- return g[2] === e ? y = g[3] : (y = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
44
+ let h = (0, import_compiler_runtime.c)(4), g, _;
45
+ h[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("title", { children: "Python Logo" }), _ = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }), h[0] = g, h[1] = _) : (g = h[0], _ = h[1]);
46
+ let v;
47
+ return h[2] === e ? v = h[3] : (v = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
69
48
  xmlns: "http://www.w3.org/2000/svg",
70
49
  width: "1em",
71
50
  height: "1em",
72
51
  fill: "currentColor",
73
52
  viewBox: "0 0 448 512",
74
53
  ...e,
75
- children: [_, v]
76
- }), g[2] = e, g[3] = y), y;
54
+ children: [g, _]
55
+ }), h[2] = e, h[3] = v), v;
77
56
  };
78
- function blobToString(e, g) {
79
- return new Promise((_) => {
80
- let v = new FileReader();
81
- v.readAsDataURL(e), v.onload = (e2) => {
57
+ function blobToString(e, h) {
58
+ return new Promise((g) => {
59
+ let _ = new FileReader();
60
+ _.readAsDataURL(e), _.onload = (e2) => {
82
61
  var _a;
83
62
  if ((_a = e2.target) == null ? void 0 : _a.result) {
84
- let v2 = e2.target.result;
85
- _(g === "base64" ? v2.slice(v2.indexOf(",") + 1) : v2);
63
+ let _2 = e2.target.result;
64
+ g(h === "base64" ? _2.slice(_2.indexOf(",") + 1) : _2);
86
65
  }
87
66
  };
88
67
  });
89
68
  }
90
69
  function filesToBase64(e) {
91
- return Promise.all(e.map((e2) => blobToString(e2, "base64").then((g) => [e2.name, g])));
70
+ return Promise.all(e.map((e2) => blobToString(e2, "base64").then((h) => [e2.name, h])));
92
71
  }
93
72
  function processOutput(e) {
94
73
  return e.mimetype.startsWith("application/vnd.marimo") || e.mimetype === "text/html" ? parseHtmlContent(Strings.asString(e.data)) : ansiToPlainText(Strings.asString(e.data));
@@ -96,8 +75,7 @@ function processOutput(e) {
96
75
  export {
97
76
  MarimoIncomingMessageEvent as a,
98
77
  MarimoValueUpdateEvent as c,
99
- Trash2 as d,
100
- File as f,
78
+ File as d,
101
79
  PythonIcon as i,
102
80
  createInputEvent as l,
103
81
  blobToString as n,
@@ -6,9 +6,9 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
6
6
  import { _ as Logger, h as Events, l as useEventListener, t as Button } from "./button-CA5pI2YF.js";
7
7
  import { t as require_react } from "./react-DA-nE2FX.js";
8
8
  import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
9
- import "./html-to-image-DBosi5GK.js";
9
+ import "./html-to-image-CzFE0Irw.js";
10
10
  import "./chunk-5FQGJX7Z-CO1e63h_.js";
11
- import { Dt as EyeOff, Ot as Expand, a as Slide, i as SlideSidebar, n as DEFAULT_SLIDE_TYPE, t as DEFAULT_DECK_TRANSITION } from "./slide-form-DgMI37ES.js";
11
+ import { At as Expand, a as Slide, i as SlideSidebar, kt as EyeOff, n as DEFAULT_SLIDE_TYPE, t as DEFAULT_DECK_TRANSITION } from "./slide-form-kI-kSHC_.js";
12
12
  import "./input-Drx1pguW.js";
13
13
  import "./toDate-yqOcZ_tY.js";
14
14
  import "./react-dom-BWRJ_g_k.js";