@marimo-team/islands 0.25.3-dev297 → 0.25.3-dev298
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-7bB09iEz.js → ErrorBoundary-CGZL97vx.js} +1 -1
- package/dist/{chat-ui-BKIXISv1.js → chat-ui-Bmq_eXaQ.js} +3 -3
- package/dist/{code-visibility-CkF3s0y2.js → code-visibility-C9sK6yOX.js} +2 -2
- package/dist/{common-DBM4MzLV.js → common-B8pdD546.js} +3 -3
- package/dist/{data-grid-overlay-editor-BRqdT555.js → data-grid-overlay-editor-BNxfCzls.js} +1 -1
- package/dist/{error-entries-CXWVDDkS.js → error-entries-BhO7ciHW.js} +449 -448
- package/dist/{feedback-button-CgqRRJ4F.js → feedback-button-DBQeBTBM.js} +3 -3
- package/dist/{glide-data-editor-BPs-HHRj.js → glide-data-editor--LlldDKb.js} +3 -3
- package/dist/{globals-CvV8y9Lx.js → globals-DGuVN_qI.js} +1 -1
- package/dist/{html-to-image-WEuC6fGr.js → html-to-image-DDHiKZ88.js} +5 -1
- package/dist/main.js +10 -10
- package/dist/{number-overlay-editor-BWWxAhYs.js → number-overlay-editor-Wmy4_z_6.js} +1 -1
- package/dist/{process-output-Bkhpf9e-.js → process-output-ze6-eHz1.js} +2 -2
- package/dist/{reveal-component-TUg0taRY.js → reveal-component-BFNszW8U.js} +3 -3
- package/package.json +1 -1
- package/src/components/markdown/__tests__/markdown-renderer.test.tsx +32 -2
- package/src/components/markdown/markdown-renderer.tsx +4 -0
- package/src/plugins/core/__test__/sanitize.test.ts +8 -0
- package/src/plugins/core/sanitize-html.ts +6 -0
|
@@ -3,14 +3,14 @@ import { h as t, t as n } from "./button-DZuNnIZO.js";
|
|
|
3
3
|
import { t as r } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { t as a } from "./copy-icon-CtllOdmg.js";
|
|
6
|
-
import { D as o, E as s, F as c, Gt as l, L as u, i as d, j as f, n as p, q as m } from "./error-entries-
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
6
|
+
import { D as o, E as s, F as c, Gt as l, L as u, i as d, j as f, n as p, q as m } from "./error-entries-BhO7ciHW.js";
|
|
7
|
+
import { n as h, t as ee } from "./globals-DGuVN_qI.js";
|
|
8
8
|
import { r as g } from "./assertNever-B-YzWzbL.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-3BD1kT0s.js";
|
|
10
10
|
import { Ft as te, p as v, yt as ne } from "./use-restore-focus-CosX7-gx.js";
|
|
11
11
|
import { a as re, i as ie, n as ae, r as oe } from "./dialog-CaYm5imE.js";
|
|
12
12
|
import { t as se } from "./useAsyncData-Ci4AvJff.js";
|
|
13
|
-
import { t as ce } from "./code-visibility-
|
|
13
|
+
import { t as ce } from "./code-visibility-C9sK6yOX.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = _(), S = (e) => {
|
|
16
16
|
let n = (0, b.c)(8), r, i;
|
|
@@ -14,7 +14,7 @@ import { t as P } from "./jsx-runtime-3BD1kT0s.js";
|
|
|
14
14
|
import { u as oe } from "./use-restore-focus-CosX7-gx.js";
|
|
15
15
|
import { t as F } from "./useEvent-BRH-aCqi.js";
|
|
16
16
|
import { n as I, t as se } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
17
|
-
import { t as ce } from "./ErrorBoundary-
|
|
17
|
+
import { t as ce } from "./ErrorBoundary-CGZL97vx.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 _e, O as L, P as ve, R as ye, S as be, T as xe, _ as Se, a as R, b as Ce, c as z, d as we, f as B, g as V, h as Te, i as Ee, j as H, k as U, l as De, m as Oe, n as ke, o as Ae, p as je, r as W, s as Me, t as Ne, u as Pe, v as Fe, w as Ie, x as Le, y as Re, z as ze } from "./data-grid-types-0PJ-9N5n.js";
|
|
19
19
|
//#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
20
20
|
function Be(e) {
|
|
@@ -7068,7 +7068,7 @@ function us(e, t, n, r, i) {
|
|
|
7068
7068
|
}
|
|
7069
7069
|
//#endregion
|
|
7070
7070
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7071
|
-
var ds = /* @__PURE__ */ e(wr(), 1), fs = /* @__PURE__ */ e(Or(), 1), ps = G.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7071
|
+
var ds = /* @__PURE__ */ e(wr(), 1), fs = /* @__PURE__ */ e(Or(), 1), ps = G.lazy(async () => await import("./data-grid-overlay-editor-BNxfCzls.js")), ms = 0;
|
|
7072
7072
|
function hs(e) {
|
|
7073
7073
|
return (0, ds.default)((0, fs.default)((0, fs.default)(e).filter((e) => e.span !== void 0).map((e) => (0, io.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7074
7074
|
}
|
|
@@ -9299,7 +9299,7 @@ function Js(e, t, n, r, i) {
|
|
|
9299
9299
|
}
|
|
9300
9300
|
//#endregion
|
|
9301
9301
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_27cffe7f1bc30287d59ac27db3240c5b/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9302
|
-
var Ys = G.lazy(async () => await import("./number-overlay-editor-
|
|
9302
|
+
var Ys = G.lazy(async () => await import("./number-overlay-editor-Wmy4_z_6.js")), Xs = {
|
|
9303
9303
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9304
9304
|
kind: W.Number,
|
|
9305
9305
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-DMMiOn2f.js";
|
|
2
2
|
import { yt as t } from "./use-restore-focus-CosX7-gx.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-C9sK6yOX.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",
|
|
@@ -9,7 +9,7 @@ import { a as ne, i as re, o as D, r as O, s as k, t as ie } from "./useLifecycl
|
|
|
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-DsoP1qe8.js";
|
|
10
10
|
import { Y as pe, mt as me, q as he } from "./dropdown-menu-Bb0bFOIk.js";
|
|
11
11
|
import { c as ge, l as _e, n as ve } from "./config-C8MFHQ2E.js";
|
|
12
|
-
import { C as A, E as j, Et as ye, G as be, I as xe, It as Se, K as M, L as N, Nt as Ce, O as we, Ot as Te, P as Ee, R as De, Rt as Oe, S as ke, T as Ae, Ut as je, _ as Me, _t as Ne, a as Pe, at as Fe, bt as Ie, dt as Le, f as Re, ft as ze, gt as Be, h as Ve, ht as He, it as Ue, k as We, mt as Ge, o as Ke, p as qe, pt as Je, rt as Ye, s as Xe, v as Ze, vt as Qe, wt as $e, x as et, xt as tt, yt as nt, zt as rt } from "./error-entries-
|
|
12
|
+
import { C as A, E as j, Et as ye, G as be, I as xe, It as Se, K as M, L as N, Nt as Ce, O as we, Ot as Te, P as Ee, R as De, Rt as Oe, S as ke, T as Ae, Ut as je, _ as Me, _t as Ne, a as Pe, at as Fe, bt as Ie, dt as Le, f as Re, ft as ze, gt as Be, h as Ve, ht as He, it as Ue, k as We, mt as Ge, o as Ke, p as qe, pt as Je, rt as Ye, s as Xe, v as Ze, vt as Qe, wt as $e, x as et, xt as tt, yt as nt, zt as rt } from "./error-entries-BhO7ciHW.js";
|
|
13
13
|
import { n as it } from "./assertNever-B-YzWzbL.js";
|
|
14
14
|
import { t as at } from "./react-dom-DUmH0GXv.js";
|
|
15
15
|
import { t as ot } from "./jsx-runtime-3BD1kT0s.js";
|
|
@@ -28175,6 +28175,10 @@ var cS = (e) => {
|
|
|
28175
28175
|
attributes: {
|
|
28176
28176
|
...v.attributes,
|
|
28177
28177
|
"*": [...v.attributes?.["*"] ?? [], "className"]
|
|
28178
|
+
},
|
|
28179
|
+
protocols: {
|
|
28180
|
+
...v.protocols,
|
|
28181
|
+
href: [...v.protocols?.href ?? [], "zotero"]
|
|
28178
28182
|
}
|
|
28179
28183
|
}, fS = Object.values({
|
|
28180
28184
|
...x,
|
package/dist/main.js
CHANGED
|
@@ -3,20 +3,20 @@ 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,
|
|
|
3
3
|
import { t as y } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as b } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { i as x, n as S, r as C, t as w } from "./copy-icon-CtllOdmg.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, Z as ae, _ as oe, _t as se, a as ce, at as le, b as ue, bt as de, c as fe, ct as pe, dt as me, i as he, it as ge, j as _e, jt as ve, lt as ye, mt as be, n as xe, o as Se, ot as Ce, q as we, rt as Te, ut as Ee, vt as De, yt as Oe, z as ke, zt as Ae } from "./html-to-image-
|
|
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, Z as ae, _ as oe, _t as se, a as ce, at as le, b as ue, bt as de, c as fe, ct as pe, dt as me, i as he, it as ge, j as _e, jt as ve, lt as ye, mt as be, n as xe, o as Se, ot as Ce, q as we, rt as Te, ut as Ee, vt as De, yt as Oe, z as ke, zt as Ae } from "./html-to-image-DDHiKZ88.js";
|
|
7
7
|
import { a as je, f as Me, h as Ne, i as Pe, m as Fe, n as Ie, o as Le, r as Re, t as ze } from "./tooltip-DMMiOn2f.js";
|
|
8
8
|
import { D as Be, E as Ve, O 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-BZMDxAu7.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, Dt as xt, E as St, En as Ct, Et as wt, F as Tt, Ft as Et, G as Dt, Gt as Ot, H as kt, Ht as At, I as jt, It as Mt, J as Nt, Jt as Pt, K as Ft, Kt as It, L as Lt, Lt as Rt, M as zt, Mt as Bt, N as Vt, Nt as Ht, O as Ut, Ot as Wt, P as Gt, Pt as Kt, Qt as qt, R as Jt, Rt as Yt, S as Xt, Sn as Zt, T as Qt, Tn as $t, Tt as en, U as tn, Ut as nn, V as rn, Vt as an, W as on, Wt as sn, X as cn, Xt as ln, Y as un, Yt as dn, Z as fn, Zt as pn, _ as mn, _t as hn, an as gn, at as _n, b as vn, bn as yn, bt as bn, c as xn, cn as Sn, ct as Cn, d as wn, dn as Tn, dt as En, en as Dn, f as On, fn as kn, ft as An, g as jn, gn as Mn, gt as Nn, h as Pn, hn as Fn, ht as In, in as Ln, it as Rn, j as zn, jt as Bn, k as Vn, kt as Hn, ln as Un, lt as Wn, m as Gn, mn as Kn, mt as qn, nn as Jn, nt as Yn, on as Xn, ot as Zn, p as Qn, pn as $n, pt as er, q as tr, qt as nr, r as rr, rn as ir, rt as ar, sn as or, st as sr, t as cr, tn as lr, tt as ur, u as dr, un as fr, ut as pr, v as mr, vn as hr, vt as gr, w as _r, wn as vr, wt as yr, x as br, xn as xr, y as Sr, yn as Cr, yt as wr, z as Tr, zt as Er } 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, Dt as xt, E as St, En as Ct, Et as wt, F as Tt, Ft as Et, G as Dt, Gt as Ot, H as kt, Ht as At, I as jt, It as Mt, J as Nt, Jt as Pt, K as Ft, Kt as It, L as Lt, Lt as Rt, M as zt, Mt as Bt, N as Vt, Nt as Ht, O as Ut, Ot as Wt, P as Gt, Pt as Kt, Qt as qt, R as Jt, Rt as Yt, S as Xt, Sn as Zt, T as Qt, Tn as $t, Tt as en, U as tn, Ut as nn, V as rn, Vt as an, W as on, Wt as sn, X as cn, Xt as ln, Y as un, Yt as dn, Z as fn, Zt as pn, _ as mn, _t as hn, an as gn, at as _n, b as vn, bn as yn, bt as bn, c as xn, cn as Sn, ct as Cn, d as wn, dn as Tn, dt as En, en as Dn, f as On, fn as kn, ft as An, g as jn, gn as Mn, gt as Nn, h as Pn, hn as Fn, ht as In, in as Ln, it as Rn, j as zn, jt as Bn, k as Vn, kt as Hn, ln as Un, lt as Wn, m as Gn, mn as Kn, mt as qn, nn as Jn, nt as Yn, on as Xn, ot as Zn, p as Qn, pn as $n, pt as er, q as tr, qt as nr, r as rr, rn as ir, rt as ar, sn as or, st as sr, t as cr, tn as lr, tt as ur, u as dr, un as fr, ut as pr, v as mr, vn as hr, vt as gr, w as _r, wn as vr, wt as yr, x as br, xn as xr, y as Sr, yn as Cr, yt as wr, z as Tr, zt as Er } from "./common-B8pdD546.js";
|
|
10
10
|
import { a as Dr, n as Or, s as kr, t as Ar } from "./useLifecycle-SniivYmC.js";
|
|
11
11
|
import { t as jr } from "./check-XFzZeH-y.js";
|
|
12
12
|
import { A as Mr, C as Nr, D as Pr, M as Fr, O as Ir, a as Lr, c as Rr, d as zr, i as Br, k as Vr, l as Hr, n as Ur, o as Wr, r as Gr, s as Kr, t as qr, w as Jr, x as Yr } from "./select-DsoP1qe8.js";
|
|
13
13
|
import { B as Xr, C as Zr, J as Qr, Mt as $r, Q as ei, S as ti, Sn as ni, W as ri, X as ii, Y as ai, Z as oi, _ as si, _t as ci, a as li, bn as ui, c as di, f as fi, g as pi, h as mi, i as hi, kt as gi, m as _i, n as vi, nt as yi, p as bi, pt as xi, r as Si, s as Ci, t as wi, v as Ti, w as Ei, xn as Di, y as Oi, z as ki } from "./dropdown-menu-Bb0bFOIk.js";
|
|
14
14
|
import { c as Ai, i as ji, l as Mi, o as Ni, s as Pi, t as Fi } from "./config-C8MFHQ2E.js";
|
|
15
|
-
import { A as Ii, At as Li, B as Ri, Ct as zi, E as Bi, Et as Vi, Ft as Hi, H as Ui, Ht as Wi, J as Gi, K as Ki, Lt as qi, Mt as Ji, P as Yi, Pt as Xi, Q as Zi, St as Qi, Ut as $i, V as ea, Vt as ta, X as na, Y as ra, Z as ia, _ as aa, c as oa, d as sa, dt as ca, g as la, h as ua, j as da, jt as fa, kt as pa, lt as ma, m as ha, ot as ga, p as _a, q as va, s as ya, st as ba, ut as xa, z as Sa, zt as Ca } from "./error-entries-
|
|
16
|
-
import { a as wa, c as Ta, d as Ea, f as Da, i as Oa, l as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa } from "./process-output-
|
|
15
|
+
import { A as Ii, At as Li, B as Ri, Ct as zi, E as Bi, Et as Vi, Ft as Hi, H as Ui, Ht as Wi, J as Gi, K as Ki, Lt as qi, Mt as Ji, P as Yi, Pt as Xi, Q as Zi, St as Qi, Ut as $i, V as ea, Vt as ta, X as na, Y as ra, Z as ia, _ as aa, c as oa, d as sa, dt as ca, g as la, h as ua, j as da, jt as fa, kt as pa, lt as ma, m as ha, ot as ga, p as _a, q as va, s as ya, st as ba, ut as xa, z as Sa, zt as Ca } from "./error-entries-BhO7ciHW.js";
|
|
16
|
+
import { a as wa, c as Ta, d as Ea, f as Da, i as Oa, l as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa } from "./process-output-ze6-eHz1.js";
|
|
17
17
|
import { t as Fa } from "./pencil-DYUlSKxZ.js";
|
|
18
18
|
import { a as Ia, c as La, d as Ra, f as za, i as Ba, l as Va, r as Ha } from "./glide-utils-BSQr4d90.js";
|
|
19
|
-
import { n as Ua, t as Wa } from "./globals-
|
|
19
|
+
import { n as Ua, t as Wa } from "./globals-DGuVN_qI.js";
|
|
20
20
|
import { a as Ga, i as Ka, n as qa, r as Ja, s as Ya, t as Xa } from "./assertNever-B-YzWzbL.js";
|
|
21
21
|
import { t as Za } from "./react-dom-DUmH0GXv.js";
|
|
22
22
|
import { t as Qa } from "./jsx-runtime-3BD1kT0s.js";
|
|
@@ -40,10 +40,10 @@ import { n as qs, t as Js } from "./esm-BDqqT86j.js";
|
|
|
40
40
|
import { p as Ys } from "./dist-B8pkfkzc.js";
|
|
41
41
|
import { t as Xs } from "./useAsyncData-Ci4AvJff.js";
|
|
42
42
|
import { t as Zs } from "./semaphore-89jsoHtS.js";
|
|
43
|
-
import { t as Qs } from "./ErrorBoundary-
|
|
43
|
+
import { t as Qs } from "./ErrorBoundary-CGZL97vx.js";
|
|
44
44
|
import { D as $s, O as ec } from "./vega-loader.browser-B9Pz0EGP.js";
|
|
45
45
|
import { a as tc, n as nc } from "./loader-DZvtzQoD.js";
|
|
46
|
-
import { a as rc, c as ic, i as ac, l as oc, o as sc, s as cc, t as lc } from "./code-visibility-
|
|
46
|
+
import { a as rc, c as ic, i as ac, l as oc, o as sc, s as cc, t as lc } from "./code-visibility-C9sK6yOX.js";
|
|
47
47
|
import { t as uc } from "./useDeepCompareMemoize-NaaWoFlX.js";
|
|
48
48
|
import { t as dc } from "./esm-BgKjMvWw.js";
|
|
49
49
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
@@ -11929,7 +11929,7 @@ var xE = (e) => {
|
|
|
11929
11929
|
output: t
|
|
11930
11930
|
};
|
|
11931
11931
|
} };
|
|
11932
|
-
} }, DE = J.lazy(() => import("./chat-ui-
|
|
11932
|
+
} }, DE = J.lazy(() => import("./chat-ui-Bmq_eXaQ.js").then((e) => ({ default: e.Chatbot }))), OE = H(K({
|
|
11933
11933
|
id: W(),
|
|
11934
11934
|
role: V([
|
|
11935
11935
|
"system",
|
|
@@ -12398,7 +12398,7 @@ function ED(e, t) {
|
|
|
12398
12398
|
}
|
|
12399
12399
|
//#endregion
|
|
12400
12400
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
12401
|
-
var DD = J.lazy(() => import("./glide-data-editor
|
|
12401
|
+
var DD = J.lazy(() => import("./glide-data-editor--LlldDKb.js").then((e) => e.t)), OD = cE("marimo-data-editor", { cssStyles: [jE, ME] }).withData(K({
|
|
12402
12402
|
initialValue: K({ edits: H(K({
|
|
12403
12403
|
rowIdx: U(),
|
|
12404
12404
|
columnId: W(),
|
|
@@ -32188,7 +32188,7 @@ function DH(e) {
|
|
|
32188
32188
|
}
|
|
32189
32189
|
//#endregion
|
|
32190
32190
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32191
|
-
var OH = J.lazy(() => import("./reveal-component-
|
|
32191
|
+
var OH = J.lazy(() => import("./reveal-component-BFNszW8U.js")), kH = (e) => {
|
|
32192
32192
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = lo(Fs), s = a === "read" || o, c = lo(Qi) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32193
32193
|
t[0] !== i || t[1] !== n ? (d = TR(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32194
32194
|
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-Cb76FRpK.js";
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor
|
|
3
|
+
import { a as n } from "./glide-data-editor--LlldDKb.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.0_27cffe7f1bc30287d59ac27db3240c5b/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-DDHiKZ88.js";
|
|
2
2
|
import { h as t } from "./tooltip-DMMiOn2f.js";
|
|
3
|
-
import { et as n, tt as r } from "./error-entries-
|
|
3
|
+
import { et as n, tt as r } from "./error-entries-BhO7ciHW.js";
|
|
4
4
|
import { r as i } from "./assertNever-B-YzWzbL.js";
|
|
5
5
|
import { n as a } from "./semaphore-89jsoHtS.js";
|
|
6
6
|
var o = t("file", [["path", {
|
|
@@ -3,15 +3,15 @@ import { g as t, h as n, i as r, m as i, t as a } from "./button-DZuNnIZO.js";
|
|
|
3
3
|
import { t as o } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { h as c, t as l } from "./tooltip-DMMiOn2f.js";
|
|
6
|
-
import { $ as u, Q as d, _n as f, an as p, bn as m, et as h, gn as g, i as _, l as v, n as y, on as b, r as x, t as S, u as C } from "./common-
|
|
6
|
+
import { $ as u, Q as d, _n as f, an as p, bn as m, et as h, gn as g, i as _, l as v, n as y, on as b, r as x, t as S, u as C } from "./common-B8pdD546.js";
|
|
7
7
|
import { M as w } from "./select-DsoP1qe8.js";
|
|
8
8
|
import { Y as T } from "./dropdown-menu-Bb0bFOIk.js";
|
|
9
|
-
import { Ft as E } from "./error-entries-
|
|
9
|
+
import { Ft as E } from "./error-entries-BhO7ciHW.js";
|
|
10
10
|
import { t as D } from "./jsx-runtime-3BD1kT0s.js";
|
|
11
11
|
import { Ft as O, Rt as k, d as A, r as ee } from "./use-restore-focus-CosX7-gx.js";
|
|
12
12
|
import { t as j } from "./useEvent-BRH-aCqi.js";
|
|
13
13
|
import { o as te } from "./static-state-D-Q-Ajaa.js";
|
|
14
|
-
import { n as ne, t as re } from "./code-visibility-
|
|
14
|
+
import { n as ne, t as re } from "./code-visibility-C9sK6yOX.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
import { render, screen, waitFor } from "@testing-library/react";
|
|
3
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
4
|
import { MarkdownRenderer } from "../markdown-renderer";
|
|
5
5
|
|
|
6
6
|
describe("MarkdownRenderer", () => {
|
|
@@ -40,4 +40,34 @@ describe("MarkdownRenderer", () => {
|
|
|
40
40
|
expect(container.querySelector(".safe")).toBeInTheDocument();
|
|
41
41
|
expect(container.querySelector("script")).not.toBeInTheDocument();
|
|
42
42
|
});
|
|
43
|
+
|
|
44
|
+
it("keeps supported custom URI schemes in Streamdown's link-safety flow", async () => {
|
|
45
|
+
render(
|
|
46
|
+
<MarkdownRenderer content="[PDF](zotero://open-pdf/library/items/IDT2EG5W)" />,
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
expect(
|
|
50
|
+
await screen.findByRole("button", { name: "PDF" }),
|
|
51
|
+
).toBeInTheDocument();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("opens the original custom URI from Streamdown's link-safety dialog", async () => {
|
|
55
|
+
const url = "zotero://open-pdf/library/items/IDT2EG5W?page=1";
|
|
56
|
+
const windowOpen = vi.spyOn(window, "open").mockImplementation(() => null);
|
|
57
|
+
|
|
58
|
+
render(<MarkdownRenderer content={`[PDF](${url})`} />);
|
|
59
|
+
|
|
60
|
+
fireEvent.click(await screen.findByRole("button", { name: "PDF" }));
|
|
61
|
+
|
|
62
|
+
fireEvent.click(await screen.findByRole("button", { name: "Open link" }));
|
|
63
|
+
|
|
64
|
+
expect(windowOpen).toHaveBeenCalledWith(url, "_blank", "noreferrer");
|
|
65
|
+
windowOpen.mockRestore();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("removes unsafe URI schemes from links", async () => {
|
|
69
|
+
render(<MarkdownRenderer content="[Unsafe](javascript:alert(1))" />);
|
|
70
|
+
|
|
71
|
+
expect(await screen.findByText(/Unsafe\s+\[blocked\]/)).toBeInTheDocument();
|
|
72
|
+
});
|
|
43
73
|
});
|
|
@@ -160,6 +160,10 @@ const sanitizeSchema = {
|
|
|
160
160
|
...defaultSchema.attributes,
|
|
161
161
|
"*": [...(defaultSchema.attributes?.["*"] ?? []), "className"],
|
|
162
162
|
},
|
|
163
|
+
protocols: {
|
|
164
|
+
...defaultSchema.protocols,
|
|
165
|
+
href: [...(defaultSchema.protocols?.href ?? []), "zotero"],
|
|
166
|
+
},
|
|
163
167
|
};
|
|
164
168
|
|
|
165
169
|
// Keep Streamdown's other rehype plugins (raw, harden) so scripts and unsafe
|
|
@@ -68,6 +68,14 @@ describe("sanitizeHtml", () => {
|
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
70
|
|
|
71
|
+
test("preserves supported custom URI schemes in anchors", () => {
|
|
72
|
+
const html =
|
|
73
|
+
'<a href="zotero://open-pdf/library/items/IDT2EG5W?page=1">PDF</a>';
|
|
74
|
+
expect(sanitizeHtml(html)).toMatchInlineSnapshot(
|
|
75
|
+
`"<a href="zotero://open-pdf/library/items/IDT2EG5W?page=1" target="_self">PDF</a>"`,
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
|
|
71
79
|
test("adds target=_self to anchor without target", () => {
|
|
72
80
|
const html = '<a href="https://example.com">Link</a>';
|
|
73
81
|
expect(sanitizeHtml(html)).toMatchInlineSnapshot(
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
import DOMPurify, { type Config } from "dompurify";
|
|
3
3
|
|
|
4
|
+
// Keep DOMPurify's default safe URI schemes and explicitly allow supported
|
|
5
|
+
// custom schemes without allowing arbitrary unknown protocols.
|
|
6
|
+
const ALLOWED_URI_REGEXP =
|
|
7
|
+
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix|zotero):|[^a-z]|[-a-z+.]+(?:[^-a-z+.:]|$))/i;
|
|
8
|
+
|
|
4
9
|
// preserve target=_blank https://github.com/cure53/DOMPurify/issues/317#issuecomment-912474068
|
|
5
10
|
// Guard for non-browser environments (e.g. Node.js in the marimo-lsp extension)
|
|
6
11
|
// where `document` is not available.
|
|
@@ -43,6 +48,7 @@ export function sanitizeHtml(html: string) {
|
|
|
43
48
|
// for SVGs that reference <defs> (e.g., Matplotlib SVG output).
|
|
44
49
|
ADD_TAGS: ["use"],
|
|
45
50
|
ADD_ATTR: ["href", "xlink:href"],
|
|
51
|
+
ALLOWED_URI_REGEXP,
|
|
46
52
|
// glue elements like style, script or others to document.body and prevent unintuitive browser behavior in several edge-cases
|
|
47
53
|
FORCE_BODY: true,
|
|
48
54
|
CUSTOM_ELEMENT_HANDLING: {
|