@marimo-team/islands 0.25.3-dev430 → 0.25.3-dev431
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/{ErrorBoundary-DfxSbqEP.js → ErrorBoundary-CRk39Htl.js} +2 -2
- package/dist/{any-language-editor-CvTbmCdJ.js → any-language-editor-Cw4VtZvb.js} +1 -1
- package/dist/{chat-ui-DxD-0lMF.js → chat-ui-BrqZd6Qb.js} +4 -4
- package/dist/{code-visibility-YAauUwBF.js → code-visibility-IOaiwld2.js} +2 -2
- package/dist/{common-DWEsduk5.js → common-e3QeLbF6.js} +4 -4
- package/dist/{copy-icon-CeOpTht4.js → copy-icon-Bv5SAA0w.js} +25 -19
- package/dist/{data-grid-overlay-editor-DFXvOhW0.js → data-grid-overlay-editor-BNtYFq14.js} +1 -1
- package/dist/{error-entries-BNzYy3Ci.js → error-entries-BbxtqUQ4.js} +1 -1
- package/dist/{feedback-button-Cuc1CIl1.js → feedback-button-DEHXkqTr.js} +4 -4
- package/dist/{glide-data-editor-DgNyC_0T.js → glide-data-editor-CcmkcHzC.js} +4 -4
- package/dist/{globals-Lu2ZB5If.js → globals-Bwn2Opww.js} +1 -1
- package/dist/{html-to-image-CO_NVoKY.js → html-to-image-ffxLmS29.js} +3 -3
- package/dist/main.js +11 -11
- package/dist/{number-overlay-editor-274iS3jz.js → number-overlay-editor-iF4C4jgs.js} +1 -1
- package/dist/{process-output-CznNfcKe.js → process-output-BEi2k7G4.js} +2 -2
- package/dist/{reveal-component-B6xzPGLx.js → reveal-component-Lmc4rqUp.js} +3 -3
- package/package.json +1 -1
- package/src/components/icons/__tests__/copy-icon.test.tsx +63 -0
- package/src/components/icons/copy-icon.tsx +9 -2
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { h as t, t as n } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as r } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { a, t as o } from "./copy-icon-
|
|
5
|
+
import { a, t as o } from "./copy-icon-Bv5SAA0w.js";
|
|
6
6
|
import { i as s } from "./tooltip-DsQZP310.js";
|
|
7
7
|
import { t as c } from "./react-dom-DdqGVp5N.js";
|
|
8
8
|
import { t as l } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -129,7 +129,7 @@ function N(e) {
|
|
|
129
129
|
}
|
|
130
130
|
//#endregion
|
|
131
131
|
//#region src/components/editor/boundary/ErrorBoundary.tsx
|
|
132
|
-
var P = (0, C.lazy)(() => import("./feedback-button-
|
|
132
|
+
var P = (0, C.lazy)(() => import("./feedback-button-DEHXkqTr.js").then((e) => ({ default: e.FeedbackModal }))), F = (e) => {
|
|
133
133
|
let t = (0, S.c)(2), n;
|
|
134
134
|
return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, k.jsx)(E, {
|
|
135
135
|
FallbackComponent: I,
|
|
@@ -2,7 +2,7 @@ import "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { g as e } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as n } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { t as r } from "./copy-icon-
|
|
5
|
+
import { t as r } from "./copy-icon-Bv5SAA0w.js";
|
|
6
6
|
import { t as i } from "./jsx-runtime-D8btoEHk.js";
|
|
7
7
|
import { n as a } from "./error-banner-BRkKwvku.js";
|
|
8
8
|
import { t as o } from "./esm-Bwp_FHP0.js";
|
|
@@ -2,14 +2,14 @@ import { a as e, t } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { g as n, h as r, i, t as a } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as o } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { i as c, t as l } from "./copy-icon-
|
|
6
|
-
import { $ as u, Ct as d, Dt as f, Et as p, It as m, J as h, Lt as g, M as _, Nt as v, Pt as y, Tt as b, U as x, V as S, Vt as C, W as w, a as T, bt as E, et as D, f as O, g as k, h as A, kt as j, l as M, m as N, mt as ee, n as te, ot as ne, p as P, r as re, t as ie, tt as ae, u as oe, ut as se, v as ce, zt as le } from "./html-to-image-
|
|
5
|
+
import { i as c, t as l } from "./copy-icon-Bv5SAA0w.js";
|
|
6
|
+
import { $ as u, Ct as d, Dt as f, Et as p, It as m, J as h, Lt as g, M as _, Nt as v, Pt as y, Tt as b, U as x, V as S, Vt as C, W as w, a as T, bt as E, et as D, f as O, g as k, h as A, kt as j, l as M, m as N, mt as ee, n as te, ot as ne, p as P, r as re, t as ie, tt as ae, u as oe, ut as se, v as ce, zt as le } from "./html-to-image-ffxLmS29.js";
|
|
7
7
|
import { h as F, t as ue } from "./tooltip-DsQZP310.js";
|
|
8
8
|
import { d as de } from "./select-Brvb-RwP.js";
|
|
9
9
|
import { Cn as fe, _ as pe, f as me, h as he, i as ge, n as _e, t as ve, xn as ye } from "./dropdown-menu-DzhAnAhr.js";
|
|
10
10
|
import { a as be, l as xe } from "./config-EJnOxh0i.js";
|
|
11
|
-
import { $ as Se, Ct as Ce, P as we, Rt as Te, W as Ee, en as De, h as Oe, i as ke, j as Ae, ot as je, r as Me, t as Ne } from "./error-entries-
|
|
12
|
-
import { c as Pe, d as Fe, l as Ie, n as Le, t as Re, u as ze } from "./process-output-
|
|
11
|
+
import { $ as Se, Ct as Ce, P as we, Rt as Te, W as Ee, en as De, h as Oe, i as ke, j as Ae, ot as je, r as Me, t as Ne } from "./error-entries-BbxtqUQ4.js";
|
|
12
|
+
import { c as Pe, d as Fe, l as Ie, n as Le, t as Re, u as ze } from "./process-output-BEi2k7G4.js";
|
|
13
13
|
import { t as Be } from "./pencil-DWRFEz2B.js";
|
|
14
14
|
import { n as Ve, r as He, s as Ue } from "./assertNever-ChGm2jYv.js";
|
|
15
15
|
import { t as We } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as e } from "./button-qQhINE7z.js";
|
|
2
|
-
import { D as t, Wt as n, Yt as r } from "./error-entries-
|
|
2
|
+
import { D as t, Wt as n, Yt as r } from "./error-entries-BbxtqUQ4.js";
|
|
3
3
|
import { n as i } from "./assertNever-ChGm2jYv.js";
|
|
4
4
|
import { Bt as a, Et as o, Lt as s, f as c, h as l } from "./use-restore-focus-CTa7IRP6.js";
|
|
5
5
|
import { c as u, m as d, n as f, o as p } from "./static-state-BhCfPRoz.js";
|
|
@@ -14,7 +14,7 @@ function y() {
|
|
|
14
14
|
return e.warn("Failed to get version from mount config"), null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
var b = y() || "0.25.3-
|
|
17
|
+
var b = y() || "0.25.3-dev431", x = a(b), S = a(!0);
|
|
18
18
|
a(null);
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/core/wasm/state.ts
|
|
@@ -2,8 +2,8 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { _ as t, f as n, g as r, h as i, i as a, m as o, n as s, p as c, r as l, t as u } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as d } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as f } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { i as p, n as m, r as h, t as g } from "./copy-icon-
|
|
6
|
-
import { A as _, At as v, C as y, D as b, Dt as x, G as S, Gt as C, H as w, Ht as T, It as E, J as D, K as O, Lt as k, M as A, Mt as j, N as M, Pt as N, Q as P, Rt as F, S as I, Tt as L, U as R, Ut as z, V as B, Vt as ee, W as te, Wt as ne, X as V, Z as re, d as ie, dt as ae, ft as oe, ht as se, it as ce, k as le, n as ue, pt as de, r as fe, s as pe, t as me, w as he, wt as ge, x as _e, y as ve, z as ye } from "./html-to-image-
|
|
5
|
+
import { i as p, n as m, r as h, t as g } from "./copy-icon-Bv5SAA0w.js";
|
|
6
|
+
import { A as _, At as v, C as y, D as b, Dt as x, G as S, Gt as C, H as w, Ht as T, It as E, J as D, K as O, Lt as k, M as A, Mt as j, N as M, Pt as N, Q as P, Rt as F, S as I, Tt as L, U as R, Ut as z, V as B, Vt as ee, W as te, Wt as ne, X as V, Z as re, d as ie, dt as ae, ft as oe, ht as se, it as ce, k as le, n as ue, pt as de, r as fe, s as pe, t as me, w as he, wt as ge, x as _e, y as ve, z as ye } from "./html-to-image-ffxLmS29.js";
|
|
7
7
|
import { a as be, f as xe, h as H, n as Se, o as Ce, r as we, t as U } from "./tooltip-DsQZP310.js";
|
|
8
8
|
import { r as Te, s as Ee } from "./useLifecycle-Bw0JtmoB.js";
|
|
9
9
|
import { a as De, i as Oe, n as ke, o as Ae, r as je, t as Me } from "./useDateFormatter-CRuBYwR6.js";
|
|
@@ -11,7 +11,7 @@ import { t as Ne } from "./check-BHRB6N0I.js";
|
|
|
11
11
|
import { A as Pe, C as Fe, M as Ie, S as Le, T as Re, _ as ze, b as Be, c as Ve, d as He, f as Ue, g as We, h as Ge, i as Ke, l as qe, m as Je, n as Ye, s as Xe, t as Ze, u as Qe, v as $e, x as et, y as tt } from "./select-Brvb-RwP.js";
|
|
12
12
|
import { $ as nt, $t as rt, A as it, At as at, B as ot, Bt as st, C as ct, Cn as lt, Ct as ut, D as dt, Dt as ft, E as pt, Et as mt, F as ht, Ft as gt, G as _t, Gt as vt, H as yt, Ht as bt, I as xt, It as St, J as Ct, Jt as wt, K as Tt, Kt as Et, L as Dt, Lt as Ot, M as kt, Mt as At, N as jt, Nt as Mt, O as Nt, Ot as Pt, P as Ft, Pt as It, Q as Lt, Qt as Rt, R as zt, Rt as Bt, S as Vt, Sn as Ht, St as Ut, Tt as Wt, U as Gt, Ut as Kt, V as qt, Vt as Jt, W as Yt, Wt as Xt, Xt as Zt, Yt as Qt, Z as $t, Zt as en, _ as tn, _n as nn, _t as rn, a as an, at as on, bn as sn, bt as cn, cn as ln, ct as un, d as dn, dn as fn, dt as pn, en as mn, et as hn, f as gn, fn as _n, ft as vn, gn as yn, gt as bn, h as xn, hn as Sn, ht as Cn, i as wn, in as Tn, it as En, j as Dn, jt as On, k as kn, kt as An, l as jn, ln as Mn, lt as Nn, mn as Pn, n as Fn, nn as In, nt as Ln, o as Rn, on as zn, ot as Bn, pt as Vn, q as Hn, qt as Un, rn as Wn, rt as Gn, s as Kn, sn as qn, st as Jn, t as Yn, tn as Xn, tt as Zn, u as Qn, ut as $n, vn as er, vt as tr, w as nr, wt as rr, x as ir, xn as ar, xt as or, yn as sr, yt as cr, z as lr, zt as ur } from "./dropdown-menu-DzhAnAhr.js";
|
|
13
13
|
import { a as dr, n as fr, r as pr, t as mr } from "./config-EJnOxh0i.js";
|
|
14
|
-
import { $ as hr, $t as gr, A as _r, B as vr, Ct as yr, E as br, F as xr, Ft as Sr, H as Cr, It as wr, K as Tr, Mt as Er, Qt as Dr, Rt as Or, V as kr, W as Ar, Z as jr, b as Mr, en as Nr, et as Pr, h as Fr, l as Ir, ot as Lr, qt as Rr, t as zr, u as Br, w as Vr, wt as Hr, y as Ur, zt as Wr } from "./error-entries-
|
|
14
|
+
import { $ as hr, $t as gr, A as _r, B as vr, Ct as yr, E as br, F as xr, Ft as Sr, H as Cr, It as wr, K as Tr, Mt as Er, Qt as Dr, Rt as Or, V as kr, W as Ar, Z as jr, b as Mr, en as Nr, et as Pr, h as Fr, l as Ir, ot as Lr, qt as Rr, t as zr, u as Br, w as Vr, wt as Hr, y as Ur, zt as Wr } from "./error-entries-BbxtqUQ4.js";
|
|
15
15
|
import { n as Gr, o as Kr, r as qr, s as Jr, t as Yr } from "./assertNever-ChGm2jYv.js";
|
|
16
16
|
import { t as Xr } from "./clsx-CoeGtWvn.js";
|
|
17
17
|
import { t as Zr } from "./react-dom-DdqGVp5N.js";
|
|
@@ -33,7 +33,7 @@ import { o as ba } from "./dist-DNkrY12t.js";
|
|
|
33
33
|
import { a as xa, i as Sa, n as Ca, o as wa, r as Ta, t as Ea } from "./dialog-B8vU2hHC.js";
|
|
34
34
|
import { t as Da } from "./useAsyncData-P5-Oovhq.js";
|
|
35
35
|
import { n as W, t as G } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
36
|
-
import { t as Oa } from "./ErrorBoundary-
|
|
36
|
+
import { t as Oa } from "./ErrorBoundary-CRk39Htl.js";
|
|
37
37
|
import { W as ka, n as Aa } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
38
38
|
import { a as ja, n as Ma, r as Na, t as Pa } from "./loader-Bin_dutt.js";
|
|
39
39
|
import { t as Fa } from "./useIframeCapabilities-HTZiVlGV.js";
|
|
@@ -160,30 +160,36 @@ async function D(e, n) {
|
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region src/components/icons/copy-icon.tsx
|
|
162
162
|
var O = l(), k = (e) => {
|
|
163
|
-
let t = (0, u.c)(
|
|
164
|
-
t[0]
|
|
163
|
+
let t = (0, u.c)(17), { value: i, className: a, buttonClassName: o, tooltip: l, toastTitle: f, ariaLabel: p } = e, [m, h] = (0, d.useState)(!1), g, _;
|
|
164
|
+
t[0] === m ? (g = t[1], _ = t[2]) : (g = () => {
|
|
165
|
+
if (!m) return;
|
|
166
|
+
let e = setTimeout(() => h(!1), 2e3);
|
|
167
|
+
return () => clearTimeout(e);
|
|
168
|
+
}, _ = [m], t[0] = m, t[1] = g, t[2] = _), (0, d.useEffect)(g, _);
|
|
169
|
+
let v;
|
|
170
|
+
t[3] !== f || t[4] !== i ? (v = r.stopPropagation(async (e) => {
|
|
165
171
|
await D(typeof i == "function" ? i(e) : i).then(() => {
|
|
166
|
-
h(!0),
|
|
172
|
+
h(!0), f && C({ title: f });
|
|
167
173
|
});
|
|
168
|
-
}), t[
|
|
169
|
-
let
|
|
170
|
-
t[
|
|
171
|
-
let
|
|
172
|
-
t[
|
|
174
|
+
}), t[3] = f, t[4] = i, t[5] = v) : v = t[5];
|
|
175
|
+
let y = v, b = p ?? "Copy to clipboard", x;
|
|
176
|
+
t[6] !== a || t[7] !== m ? (x = m ? /* @__PURE__ */ (0, O.jsx)(c, { className: n(a, "text-(--grass-11)") }) : /* @__PURE__ */ (0, O.jsx)(E, { className: a }), t[6] = a, t[7] = m, t[8] = x) : x = t[8];
|
|
177
|
+
let S;
|
|
178
|
+
t[9] !== o || t[10] !== y || t[11] !== b || t[12] !== x ? (S = /* @__PURE__ */ (0, O.jsx)("button", {
|
|
173
179
|
type: "button",
|
|
174
|
-
onClick:
|
|
175
|
-
"aria-label":
|
|
180
|
+
onClick: y,
|
|
181
|
+
"aria-label": b,
|
|
176
182
|
className: o,
|
|
177
|
-
children: y
|
|
178
|
-
}), t[6] = o, t[7] = _, t[8] = v, t[9] = y, t[10] = b) : b = t[10];
|
|
179
|
-
let x = b;
|
|
180
|
-
if (l === !1) return x;
|
|
181
|
-
let S = m ? "Copied!" : l ?? "Copy to clipboard", w;
|
|
182
|
-
return t[11] !== x || t[12] !== S ? (w = /* @__PURE__ */ (0, O.jsx)(s, {
|
|
183
|
-
content: S,
|
|
184
|
-
delayDuration: 400,
|
|
185
183
|
children: x
|
|
186
|
-
}), t[11] =
|
|
184
|
+
}), t[9] = o, t[10] = y, t[11] = b, t[12] = x, t[13] = S) : S = t[13];
|
|
185
|
+
let w = S;
|
|
186
|
+
if (l === !1) return w;
|
|
187
|
+
let T = m ? "Copied!" : l ?? "Copy to clipboard", k;
|
|
188
|
+
return t[14] !== w || t[15] !== T ? (k = /* @__PURE__ */ (0, O.jsx)(s, {
|
|
189
|
+
content: T,
|
|
190
|
+
delayDuration: 400,
|
|
191
|
+
children: w
|
|
192
|
+
}), t[14] = w, t[15] = T, t[16] = k) : k = t[16], k;
|
|
187
193
|
};
|
|
188
194
|
//#endregion
|
|
189
195
|
export { w as a, C as i, D as n, E as r, k as t };
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
3
|
import { t as n } from "./react-dom-DdqGVp5N.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-DIX_pCco.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-
|
|
5
|
+
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-CcmkcHzC.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
|
|
7
7
|
var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
|
|
8
8
|
name: "DataGridOverlayEditorStyle",
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { g as t, h as n, p as r } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as i } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as a } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { i as o } from "./copy-icon-
|
|
5
|
+
import { i as o } from "./copy-icon-Bv5SAA0w.js";
|
|
6
6
|
import { f as s, h as c } from "./tooltip-DsQZP310.js";
|
|
7
7
|
import { t as l } from "./check-BHRB6N0I.js";
|
|
8
8
|
import { n as u, r as d } from "./assertNever-ChGm2jYv.js";
|
|
@@ -2,15 +2,15 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { h as t, t as n } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as r } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { t as a } from "./copy-icon-
|
|
6
|
-
import { D as o, E as s, F as c, G as l, N as u, Yt as d, en as f, i as p, n as m } from "./error-entries-
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
5
|
+
import { t as a } from "./copy-icon-Bv5SAA0w.js";
|
|
6
|
+
import { D as o, E as s, F as c, G as l, N as u, Yt as d, en as f, i as p, n as m } from "./error-entries-BbxtqUQ4.js";
|
|
7
|
+
import { n as h, t as ee } from "./globals-Bwn2Opww.js";
|
|
8
8
|
import { r as g } from "./assertNever-ChGm2jYv.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Lt as v, m as y, xt as te } from "./use-restore-focus-CTa7IRP6.js";
|
|
11
11
|
import { a as ne, i as re, n as ie, r as ae } from "./dialog-B8vU2hHC.js";
|
|
12
12
|
import { t as oe } from "./useAsyncData-P5-Oovhq.js";
|
|
13
|
-
import { t as se } from "./code-visibility-
|
|
13
|
+
import { t as se } from "./code-visibility-IOaiwld2.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var b = /* @__PURE__ */ e(r(), 1), x = i(), S = _(), ce = (e) => {
|
|
16
16
|
let n = (0, x.c)(8), r, i;
|
|
@@ -2,7 +2,7 @@ import { a as e, r as t, t as n } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { m as r, t as i } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as a } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as o } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { i as s, n as c, r as l } from "./copy-icon-
|
|
5
|
+
import { i as s, n as c, r as l } from "./copy-icon-Bv5SAA0w.js";
|
|
6
6
|
import { d as u } from "./tooltip-DsQZP310.js";
|
|
7
7
|
import { c as d, d as f, i as p, n as m, s as h, t as g } from "./select-Brvb-RwP.js";
|
|
8
8
|
import { J as _, d as v, h as y, i as b, l as x, n as S, o as C, s as w, t as T, u as E, xn as D } from "./dropdown-menu-DzhAnAhr.js";
|
|
@@ -14,7 +14,7 @@ import { t as F } from "./jsx-runtime-D8btoEHk.js";
|
|
|
14
14
|
import { d as ae, r as I } from "./use-restore-focus-CTa7IRP6.js";
|
|
15
15
|
import { t as oe } from "./useEvent-BoN7U38T.js";
|
|
16
16
|
import { n as L, t as se } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
17
|
-
import { t as ce } from "./ErrorBoundary-
|
|
17
|
+
import { t as ce } from "./ErrorBoundary-CRk39Htl.js";
|
|
18
18
|
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, L as he, M as ge, N as R, O as z, P as _e, R as ve, S as ye, T as be, _ as xe, a as Se, b as B, c as Ce, d as we, f as V, g as Te, h as Ee, i as De, j as H, k as Oe, l as ke, m as Ae, n as je, o as Me, p as Ne, r as U, s as Pe, t as Fe, u as Ie, v as Le, w as Re, x as ze, y as Be, z as Ve } from "./data-grid-types-DIX_pCco.js";
|
|
19
19
|
//#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
20
20
|
function He(e) {
|
|
@@ -7061,7 +7061,7 @@ function ds(e, t, n, r, i) {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
//#endregion
|
|
7063
7063
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7064
|
-
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7064
|
+
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-BNtYFq14.js")), hs = 0;
|
|
7065
7065
|
function gs(e) {
|
|
7066
7066
|
return (0, fs.default)((0, ps.default)((0, ps.default)(e).filter((e) => e.span !== void 0).map((e) => (0, ao.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7067
7067
|
}
|
|
@@ -9284,7 +9284,7 @@ function Ys(e, t, n, r, i) {
|
|
|
9284
9284
|
}
|
|
9285
9285
|
//#endregion
|
|
9286
9286
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9287
|
-
var Xs = W.lazy(async () => await import("./number-overlay-editor-
|
|
9287
|
+
var Xs = W.lazy(async () => await import("./number-overlay-editor-iF4C4jgs.js")), Zs = {
|
|
9288
9288
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9289
9289
|
kind: U.Number,
|
|
9290
9290
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-DsQZP310.js";
|
|
2
2
|
import { xt as t } from "./use-restore-focus-CTa7IRP6.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-IOaiwld2.js";
|
|
4
4
|
var r = e("triangle-alert", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
@@ -2,14 +2,14 @@ import { a as e, i as t, n, r, t as i } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { g as a, h as o, p as s, r as c, s as l, t as u, u as d } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as f } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as p } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { i as m, n as h, t as g } from "./copy-icon-
|
|
5
|
+
import { i as m, n as h, t as g } from "./copy-icon-Bv5SAA0w.js";
|
|
6
6
|
import { c as _, l as v, o as y, r as b, s as x } from "./chunk-7TTQLYRW-DBSfUUe5.js";
|
|
7
7
|
import { c as S, h as C, i as w, l as T, s as ee, t as te, u as E } from "./tooltip-DsQZP310.js";
|
|
8
8
|
import { a as D, i as ne, o as re, r as O, s as k, t as ie } from "./useLifecycle-Bw0JtmoB.js";
|
|
9
9
|
import { a as ae, c as oe, i as se, n as ce, o as le, r as ue, s as de, t as fe } from "./select-Brvb-RwP.js";
|
|
10
10
|
import { J as pe, X as me, ht as he } from "./dropdown-menu-DzhAnAhr.js";
|
|
11
11
|
import { c as ge, l as _e, n as ve } from "./config-EJnOxh0i.js";
|
|
12
|
-
import { Bt as A, C as j, E as ye, Et as be, F as xe, Ft as Se, Gt as Ce, I as M, Kt as we, Lt as Te, M as Ee, O as De, P as Oe, Pt as ke, Qt as Ae, Rt as je, S as Me, St as Ne, T as Pe, U as Fe, Ut as Ie, Vt as Le, W as Re, Xt as ze, _ as Be, _t as Ve, a as He, dt as Ue, f as We, ft as Ge, gt as Ke, h as qe, ht as Je, jt as Ye, k as Xe, lt as Ze, mt as Qe, nt as $e, o as et, p as tt, pt as nt, qt as rt, rt as it, s as at, tt as ot, ut as st, v as ct, vt as lt, wt as ut, x as dt, yt as ft } from "./error-entries-
|
|
12
|
+
import { Bt as A, C as j, E as ye, Et as be, F as xe, Ft as Se, Gt as Ce, I as M, Kt as we, Lt as Te, M as Ee, O as De, P as Oe, Pt as ke, Qt as Ae, Rt as je, S as Me, St as Ne, T as Pe, U as Fe, Ut as Ie, Vt as Le, W as Re, Xt as ze, _ as Be, _t as Ve, a as He, dt as Ue, f as We, ft as Ge, gt as Ke, h as qe, ht as Je, jt as Ye, k as Xe, lt as Ze, mt as Qe, nt as $e, o as et, p as tt, pt as nt, qt as rt, rt as it, s as at, tt as ot, ut as st, v as ct, vt as lt, wt as ut, x as dt, yt as ft } from "./error-entries-BbxtqUQ4.js";
|
|
13
13
|
import { n as pt } from "./assertNever-ChGm2jYv.js";
|
|
14
14
|
import { t as mt } from "./react-dom-DdqGVp5N.js";
|
|
15
15
|
import { t as ht } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -28132,7 +28132,7 @@ function IS(e) {
|
|
|
28132
28132
|
}
|
|
28133
28133
|
//#endregion
|
|
28134
28134
|
//#region src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx
|
|
28135
|
-
var LS = (0, R.lazy)(() => import("./any-language-editor-
|
|
28135
|
+
var LS = (0, R.lazy)(() => import("./any-language-editor-Cw4VtZvb.js")), RS = [mn.lineWrapping], zS = (0, R.createContext)(!0);
|
|
28136
28136
|
function BS(e, t) {
|
|
28137
28137
|
return e ? e === "python" ? {
|
|
28138
28138
|
language: e,
|
package/dist/main.js
CHANGED
|
@@ -2,21 +2,21 @@ import { a as e, i as t, n, r, t as i } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { _ as a, a as o, d as s, g as c, h as l, i as u, l as d, m as f, n as p, p as m, r as h, s as g, t as _, v } from "./button-qQhINE7z.js";
|
|
3
3
|
import { t as y } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as b } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
|
-
import { i as x, n as S, r as C, t as w } from "./copy-icon-
|
|
6
|
-
import { B as T, Bt as E, Dt as D, E as O, F as k, Ft as A, Ht as j, I as M, It as N, L as P, Lt as F, M as I, O as L, Ot as R, P as z, Pt as B, R as ee, Rt as te, St as ne, Ut as re, X as ie, Y as ae, _ as oe, _t as se, a as ce, at as le, b as ue, c as de, ct as fe, gt as pe, i as me, it as he, j as ge, jt as _e, lt as ve, n as ye, nt as be, o as xe, pt as Se, q as Ce, rt as we, st as Te, ut as Ee, vt as De, xt as Oe, yt as ke, z as Ae, zt as je } from "./html-to-image-
|
|
5
|
+
import { i as x, n as S, r as C, t as w } from "./copy-icon-Bv5SAA0w.js";
|
|
6
|
+
import { B as T, Bt as E, Dt as D, E as O, F as k, Ft as A, Ht as j, I as M, It as N, L as P, Lt as F, M as I, O as L, Ot as R, P as z, Pt as B, R as ee, Rt as te, St as ne, Ut as re, X as ie, Y as ae, _ as oe, _t as se, a as ce, at as le, b as ue, c as de, ct as fe, gt as pe, i as me, it as he, j as ge, jt as _e, lt as ve, n as ye, nt as be, o as xe, pt as Se, q as Ce, rt as we, st as Te, ut as Ee, vt as De, xt as Oe, yt as ke, z as Ae, zt as je } from "./html-to-image-ffxLmS29.js";
|
|
7
7
|
import { a as Me, f as Ne, h as Pe, i as Fe, m as Ie, n as Le, o as Re, r as ze, t as Be } from "./tooltip-DsQZP310.js";
|
|
8
8
|
import { D as Ve, E as He, S as Ue, T as We, _ as Ge, a as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, i as Qe, l as $e, m as et, n as tt, o as nt, p as rt, r as it, s as at, t as ot, u as st, v as ct, w as lt, x as ut, y as dt } from "./spec-BWpscSQi.js";
|
|
9
|
-
import { $t as ft, A as pt, At as mt, B as ht, Bt as gt, C as _t, Cn as vt, Ct as yt, D as bt, Dn as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mt as Vt, N as Ht, Nt as Ut, O as Wt, On as Gt, Ot as Kt, P as qt, Pt as Jt, Qt as Yt, R as Xt, Rt as Zt, S as Qt, Sn as $t, T as en, Tn as tn, Tt as nn, U as rn, Ut as an, V as on, Vt as sn, W as cn, Wt as ln, X as un, Xt as dn, Y as fn, Yt as pn, Z as mn, Zt as hn, _ as gn, _n, _t as vn, an as yn, at as bn, b as xn, bn as Sn, bt as Cn, c as wn, cn as Tn, ct as En, d as Dn, dn as On, dt as kn, en as An, f as jn, fn as Mn, ft as Nn, g as Pn, gn as Fn, gt as In, h as Ln, hn as Rn, ht as zn, in as Bn, it as Vn, j as Hn, jt as Un, k as Wn, kt as Gn, ln as Kn, lt as qn, m as Jn, mn as Yn, mt as Xn, nn as Zn, nt as Qn, on as $n, ot as er, p as tr, pn as nr, pt as rr, q as ir, qt as ar, r as or, rn as sr, rt as cr, sn as lr, st as ur, t as dr, tn as fr, tt as pr, u as mr, un as hr, ut as gr, v as _r, vn as vr, vt as yr, w as br, wn as xr, wt as Sr, x as Cr, xn as wr, y as Tr, yt as Er, z as Dr, zt as Or } from "./common-
|
|
9
|
+
import { $t as ft, A as pt, At as mt, B as ht, Bt as gt, C as _t, Cn as vt, Ct as yt, D as bt, Dn as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mt as Vt, N as Ht, Nt as Ut, O as Wt, On as Gt, Ot as Kt, P as qt, Pt as Jt, Qt as Yt, R as Xt, Rt as Zt, S as Qt, Sn as $t, T as en, Tn as tn, Tt as nn, U as rn, Ut as an, V as on, Vt as sn, W as cn, Wt as ln, X as un, Xt as dn, Y as fn, Yt as pn, Z as mn, Zt as hn, _ as gn, _n, _t as vn, an as yn, at as bn, b as xn, bn as Sn, bt as Cn, c as wn, cn as Tn, ct as En, d as Dn, dn as On, dt as kn, en as An, f as jn, fn as Mn, ft as Nn, g as Pn, gn as Fn, gt as In, h as Ln, hn as Rn, ht as zn, in as Bn, it as Vn, j as Hn, jt as Un, k as Wn, kt as Gn, ln as Kn, lt as qn, m as Jn, mn as Yn, mt as Xn, nn as Zn, nt as Qn, on as $n, ot as er, p as tr, pn as nr, pt as rr, q as ir, qt as ar, r as or, rn as sr, rt as cr, sn as lr, st as ur, t as dr, tn as fr, tt as pr, u as mr, un as hr, ut as gr, v as _r, vn as vr, vt as yr, w as br, wn as xr, wt as Sr, x as Cr, xn as wr, y as Tr, yt as Er, z as Dr, zt as Or } from "./common-e3QeLbF6.js";
|
|
10
10
|
import { a as kr, n as Ar, s as jr, t as Mr } from "./useLifecycle-Bw0JtmoB.js";
|
|
11
11
|
import { t as Nr } from "./check-BHRB6N0I.js";
|
|
12
12
|
import { A as Pr, C as Fr, D as Ir, M as Lr, O as Rr, a as zr, c as Br, d as Vr, i as Hr, k as Ur, l as Wr, n as Gr, o as Kr, r as qr, s as Jr, t as Yr, w as Xr, x as Zr } from "./select-Brvb-RwP.js";
|
|
13
13
|
import { $ as Qr, At as $r, B as ei, C as ti, Cn as ni, G as ri, Nt as ii, Q as ai, Sn as oi, T as si, V as ci, X as li, Y as ui, Z as di, _ as fi, a as pi, b as mi, c as hi, f as gi, g as _i, h as vi, i as yi, m as bi, mt as xi, n as Si, p as Ci, r as wi, rt as Ti, s as Ei, t as Di, v as Oi, vt as ki, w as Ai, xn as ji, y as Mi } from "./dropdown-menu-DzhAnAhr.js";
|
|
14
14
|
import { c as Ni, i as Pi, l as Fi, o as Ii, s as Li, t as Ri } from "./config-EJnOxh0i.js";
|
|
15
|
-
import { At as zi, B as Bi, Dt as Vi, E as Hi, Ft as Ui, G as Wi, Ht as Gi, J as Ki, Jt as qi, K as Ji, L as Yi, M as Xi, Mt as Zi, Nt as Qi, Ot as $i, R as ea, W as ta, Wt as na, X as ra, Y as ia, Yt as aa, Zt as oa, _ as sa, at as ca, bt as la, c as ua, ct as da, d as fa, g as pa, h as ma, it as ha, kt as ga, lt as _a, m as va, p as ya, q as ba, qt as xa, s as Sa, st as Ca, wt as wa, xt as Ta, z as Ea } from "./error-entries-
|
|
16
|
-
import { a as Da, d as Oa, i as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa, u as Fa } from "./process-output-
|
|
15
|
+
import { At as zi, B as Bi, Dt as Vi, E as Hi, Ft as Ui, G as Wi, Ht as Gi, J as Ki, Jt as qi, K as Ji, L as Yi, M as Xi, Mt as Zi, Nt as Qi, Ot as $i, R as ea, W as ta, Wt as na, X as ra, Y as ia, Yt as aa, Zt as oa, _ as sa, at as ca, bt as la, c as ua, ct as da, d as fa, g as pa, h as ma, it as ha, kt as ga, lt as _a, m as va, p as ya, q as ba, qt as xa, s as Sa, st as Ca, wt as wa, xt as Ta, z as Ea } from "./error-entries-BbxtqUQ4.js";
|
|
16
|
+
import { a as Da, d as Oa, i as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa, u as Fa } from "./process-output-BEi2k7G4.js";
|
|
17
17
|
import { t as Ia } from "./pencil-DWRFEz2B.js";
|
|
18
18
|
import { a as La, c as Ra, d as za, f as Ba, i as Va, l as Ha, r as Ua } from "./glide-utils-BzjESEmr.js";
|
|
19
|
-
import { n as Wa, t as Ga } from "./globals-
|
|
19
|
+
import { n as Wa, t as Ga } from "./globals-Bwn2Opww.js";
|
|
20
20
|
import { a as Ka, i as qa, n as Ja, r as Ya, s as Xa, t as Za } from "./assertNever-ChGm2jYv.js";
|
|
21
21
|
import { t as Qa } from "./react-dom-DdqGVp5N.js";
|
|
22
22
|
import { t as $a } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -40,10 +40,10 @@ import { n as Xs, t as Zs } from "./esm-Bwp_FHP0.js";
|
|
|
40
40
|
import { p as Qs } from "./dist-DpYpG8Yc.js";
|
|
41
41
|
import { t as $s } from "./useAsyncData-P5-Oovhq.js";
|
|
42
42
|
import { n as ec, r as tc, t as nc } from "./useDeepCompareMemoize-B2RNcTmn.js";
|
|
43
|
-
import { t as rc } from "./ErrorBoundary-
|
|
43
|
+
import { t as rc } from "./ErrorBoundary-CRk39Htl.js";
|
|
44
44
|
import { G as ic, W as ac } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
45
45
|
import { a as oc, n as sc } from "./loader-Bin_dutt.js";
|
|
46
|
-
import { a as cc, c as lc, i as uc, l as dc, o as fc, s as pc, t as mc } from "./code-visibility-
|
|
46
|
+
import { a as cc, c as lc, i as uc, l as dc, o as fc, s as pc, t as mc } from "./code-visibility-IOaiwld2.js";
|
|
47
47
|
import { t as hc } from "./esm-B9n0caHs.js";
|
|
48
48
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
49
49
|
var gc = Object.freeze({
|
|
@@ -12489,7 +12489,7 @@ var cD = (e) => {
|
|
|
12489
12489
|
output: t
|
|
12490
12490
|
};
|
|
12491
12491
|
} };
|
|
12492
|
-
} }, mD = J.lazy(() => import("./chat-ui-
|
|
12492
|
+
} }, mD = J.lazy(() => import("./chat-ui-BrqZd6Qb.js").then((e) => ({ default: e.Chatbot }))), hD = G(W({
|
|
12493
12493
|
id: U(),
|
|
12494
12494
|
role: H([
|
|
12495
12495
|
"system",
|
|
@@ -12958,7 +12958,7 @@ function pO(e, t) {
|
|
|
12958
12958
|
}
|
|
12959
12959
|
//#endregion
|
|
12960
12960
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
12961
|
-
var mO = J.lazy(() => import("./glide-data-editor-
|
|
12961
|
+
var mO = J.lazy(() => import("./glide-data-editor-CcmkcHzC.js").then((e) => e.t)), hO = YE("marimo-data-editor", { cssStyles: [vD, yD] }).withData(W({
|
|
12962
12962
|
initialValue: W({ edits: G(W({
|
|
12963
12963
|
rowIdx: K(),
|
|
12964
12964
|
columnId: U(),
|
|
@@ -32704,7 +32704,7 @@ function _U(e) {
|
|
|
32704
32704
|
}
|
|
32705
32705
|
//#endregion
|
|
32706
32706
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32707
|
-
var vU = J.lazy(() => import("./reveal-component-
|
|
32707
|
+
var vU = J.lazy(() => import("./reveal-component-Lmc4rqUp.js")), yU = (e) => {
|
|
32708
32708
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = _o(Rs), s = a === "read" || o, c = _o(la) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32709
32709
|
t[0] !== i || t[1] !== n ? (d = hz(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32710
32710
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor-
|
|
3
|
+
import { a as n } from "./glide-data-editor-CcmkcHzC.js";
|
|
4
4
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.1_57c124ac5a994dbbf13fd11838cf9ba9/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js
|
|
5
5
|
var r = /* @__PURE__ */ e(t()), i = /*#__PURE__*/ n("div")({
|
|
6
6
|
name: "NumberOverlayEditorStyle",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as e } from "./html-to-image-
|
|
1
|
+
import { T as e } from "./html-to-image-ffxLmS29.js";
|
|
2
2
|
import { h as t } from "./tooltip-DsQZP310.js";
|
|
3
|
-
import { $ as n, Q as r } from "./error-entries-
|
|
3
|
+
import { $ as n, Q as r } from "./error-entries-BbxtqUQ4.js";
|
|
4
4
|
import { r as i } from "./assertNever-ChGm2jYv.js";
|
|
5
5
|
var a = t("file", [["path", {
|
|
6
6
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
@@ -3,15 +3,15 @@ import { g as t, h as n, i as r, m as i, t as a } from "./button-qQhINE7z.js";
|
|
|
3
3
|
import { t as o } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { h as c, t as l } from "./tooltip-DsQZP310.js";
|
|
6
|
-
import { $ as u, Q as d, Sn as f, an as p, et as m, i as h, l as g, n as _, on as v, r as y, t as b, u as x, vn as S, yn as C } from "./common-
|
|
6
|
+
import { $ as u, Q as d, Sn as f, an as p, et as m, i as h, l as g, n as _, on as v, r as y, t as b, u as x, vn as S, yn as C } from "./common-e3QeLbF6.js";
|
|
7
7
|
import { M as w } from "./select-Brvb-RwP.js";
|
|
8
8
|
import { X as T } from "./dropdown-menu-DzhAnAhr.js";
|
|
9
|
-
import { Nt as E } from "./error-entries-
|
|
9
|
+
import { Nt as E } from "./error-entries-BbxtqUQ4.js";
|
|
10
10
|
import { t as D } from "./jsx-runtime-D8btoEHk.js";
|
|
11
11
|
import { Bt as O, Lt as k, f as A, i as ee } from "./use-restore-focus-CTa7IRP6.js";
|
|
12
12
|
import { t as j } from "./useEvent-BoN7U38T.js";
|
|
13
13
|
import { o as te } from "./static-state-BhCfPRoz.js";
|
|
14
|
-
import { n as ne, t as re } from "./code-visibility-
|
|
14
|
+
import { n as ne, t as re } from "./code-visibility-IOaiwld2.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
var M = c("sticky-note", [["path", {
|
|
17
17
|
d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
|
package/package.json
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
import { act, fireEvent, render } from "@testing-library/react";
|
|
3
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { copyToClipboard } from "@/utils/copy";
|
|
5
|
+
import { CopyClipboardIcon } from "../copy-icon";
|
|
6
|
+
|
|
7
|
+
vi.mock("@/utils/copy", () => ({
|
|
8
|
+
copyToClipboard: vi.fn().mockResolvedValue(undefined),
|
|
9
|
+
}));
|
|
10
|
+
|
|
11
|
+
describe("CopyClipboardIcon", () => {
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
vi.useFakeTimers();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
vi.useRealTimers();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("shows copy confirmation for two seconds", async () => {
|
|
21
|
+
const { getByRole, container } = render(
|
|
22
|
+
<CopyClipboardIcon value="copied text" tooltip={false} />,
|
|
23
|
+
);
|
|
24
|
+
await act(async () => {
|
|
25
|
+
fireEvent.click(getByRole("button"));
|
|
26
|
+
});
|
|
27
|
+
expect(copyToClipboard).toHaveBeenCalledWith("copied text");
|
|
28
|
+
expect(container.querySelector(".lucide-check")).toBeInTheDocument();
|
|
29
|
+
act(() => vi.advanceTimersByTime(1999));
|
|
30
|
+
expect(container.querySelector(".lucide-check")).toBeInTheDocument();
|
|
31
|
+
act(() => vi.advanceTimersByTime(1));
|
|
32
|
+
expect(container.querySelector(".lucide-copy")).toBeInTheDocument();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("releases the pending confirmation reset when unmounted", async () => {
|
|
36
|
+
const { getByRole, unmount } = render(
|
|
37
|
+
<CopyClipboardIcon value="text" tooltip={false} />,
|
|
38
|
+
);
|
|
39
|
+
await act(async () => {
|
|
40
|
+
fireEvent.click(getByRole("button"));
|
|
41
|
+
});
|
|
42
|
+
expect(vi.getTimerCount()).toBe(1);
|
|
43
|
+
unmount();
|
|
44
|
+
expect(vi.getTimerCount()).toBe(0);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("does not schedule a reset if the clipboard finishes after unmount", async () => {
|
|
48
|
+
let finishCopy: (() => void) | undefined;
|
|
49
|
+
vi.mocked(copyToClipboard).mockImplementationOnce(
|
|
50
|
+
() =>
|
|
51
|
+
new Promise<void>((resolve) => {
|
|
52
|
+
finishCopy = resolve;
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
const { getByRole, unmount } = render(
|
|
56
|
+
<CopyClipboardIcon value="text" tooltip={false} />,
|
|
57
|
+
);
|
|
58
|
+
fireEvent.click(getByRole("button"));
|
|
59
|
+
unmount();
|
|
60
|
+
await act(async () => finishCopy?.());
|
|
61
|
+
expect(vi.getTimerCount()).toBe(0);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import { CheckIcon, Copy } from "lucide-react";
|
|
3
3
|
import type React from "react";
|
|
4
|
-
import { useState } from "react";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
5
|
import { cn } from "@/utils/cn";
|
|
6
6
|
import { copyToClipboard } from "@/utils/copy";
|
|
7
7
|
import { Events } from "@/utils/events";
|
|
@@ -27,11 +27,18 @@ export const CopyClipboardIcon: React.FC<Props> = ({
|
|
|
27
27
|
}) => {
|
|
28
28
|
const [isCopied, setIsCopied] = useState(false);
|
|
29
29
|
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!isCopied) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const timeout = setTimeout(() => setIsCopied(false), 2000);
|
|
35
|
+
return () => clearTimeout(timeout);
|
|
36
|
+
}, [isCopied]);
|
|
37
|
+
|
|
30
38
|
const handleCopy = Events.stopPropagation(async (event: React.MouseEvent) => {
|
|
31
39
|
const valueToCopy = typeof value === "function" ? value(event) : value;
|
|
32
40
|
await copyToClipboard(valueToCopy).then(() => {
|
|
33
41
|
setIsCopied(true);
|
|
34
|
-
setTimeout(() => setIsCopied(false), 2000);
|
|
35
42
|
if (toastTitle) {
|
|
36
43
|
toast({ title: toastTitle });
|
|
37
44
|
}
|