@pie-element/multi-trait-rubric 8.1.2-next.8 → 8.1.2-next.9
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/browser/{Typography-CcoC1x2M.js → Typography-smriu_fg.js} +776 -774
- package/dist/browser/Typography-smriu_fg.js.map +1 -0
- package/dist/browser/author/index.js +42 -21
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/index.iife.js +21 -21
- package/package.json +5 -5
- package/dist/browser/Typography-CcoC1x2M.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, Ct as r, D as i, Dt as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, Ot as v, P as y, Q as b, R as x, S, St as C, T as w, Tt as ee, U as te, V as T, W as E, X as D, Y as ne, Z as re, _t as O, a as ie, at as ae, b as oe, c as se, ct as ce, d as le, dt as ue, et as de, f as fe, ft as k, g as pe, gt as me, h as he, i as ge, it as A, j as _e, k as ve, kt as ye, l as be, lt as xe, m as Se, mt as Ce, n as we, nt as Te, o as Ee, ot as j, p as De, pt as Oe, q as ke, r as Ae, rt as je, s as Me, st as Ne, t as Pe, tt as Fe, u as Ie, ut as Le, v as Re, vt as ze, w as Be, wt as Ve, x as He, xt as Ue, y as We, yt as Ge, z as Ke } from "../Typography-
|
|
1
|
+
import { $ as e, A as t, B as n, Ct as r, D as i, Dt as a, E as o, Et as s, F as c, G as l, H as u, I as d, J as f, K as p, L as m, M as h, N as g, O as _, Ot as v, P as y, Q as b, R as x, S, St as C, T as w, Tt as ee, U as te, V as T, W as E, X as D, Y as ne, Z as re, _t as O, a as ie, at as ae, b as oe, c as se, ct as ce, d as le, dt as ue, et as de, f as fe, ft as k, g as pe, gt as me, h as he, i as ge, it as A, j as _e, k as ve, kt as ye, l as be, lt as xe, m as Se, mt as Ce, n as we, nt as Te, o as Ee, ot as j, p as De, pt as Oe, q as ke, r as Ae, rt as je, s as Me, st as Ne, t as Pe, tt as Fe, u as Ie, ut as Le, v as Re, vt as ze, w as Be, wt as Ve, x as He, xt as Ue, y as We, yt as Ge, z as Ke } from "../Typography-smriu_fg.js";
|
|
2
2
|
import * as M from "react";
|
|
3
3
|
import N, { Component as qe, createContext as Je, createElement as Ye, createRef as Xe, forwardRef as Ze, memo as Qe, useCallback as $e, useContext as et, useDebugValue as tt, useEffect as P, useLayoutEffect as nt, useMemo as rt, useReducer as it, useRef as at, useState as ot, version as st } from "react";
|
|
4
4
|
import { createRoot as ct } from "react-dom/client";
|
|
@@ -41478,34 +41478,55 @@ var cX = ax.create({
|
|
|
41478
41478
|
},
|
|
41479
41479
|
addNodeView() {
|
|
41480
41480
|
if (!this.options.resize || !this.options.resize.enabled || typeof document > "u") return null;
|
|
41481
|
-
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize
|
|
41482
|
-
|
|
41483
|
-
|
|
41484
|
-
|
|
41481
|
+
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize, i = /* @__PURE__ */ new Set([
|
|
41482
|
+
"src",
|
|
41483
|
+
"width",
|
|
41484
|
+
"height"
|
|
41485
|
+
]);
|
|
41486
|
+
return ({ node: a, getPos: o, HTMLAttributes: s, editor: c }) => {
|
|
41487
|
+
let l = document.createElement("img");
|
|
41488
|
+
l.draggable = !1;
|
|
41489
|
+
let u = qy(this.options.HTMLAttributes, s);
|
|
41490
|
+
Object.entries(u).forEach(([e, t]) => {
|
|
41485
41491
|
if (t != null) switch (e) {
|
|
41492
|
+
case "src":
|
|
41486
41493
|
case "width":
|
|
41487
41494
|
case "height": break;
|
|
41488
|
-
default:
|
|
41489
|
-
c.setAttribute(e, t);
|
|
41490
|
-
break;
|
|
41495
|
+
default: l.setAttribute(e, t);
|
|
41491
41496
|
}
|
|
41492
|
-
}),
|
|
41493
|
-
let
|
|
41494
|
-
|
|
41495
|
-
|
|
41496
|
-
|
|
41497
|
-
|
|
41497
|
+
}), u.src !== null && (l.src = u.src);
|
|
41498
|
+
let d = { ...s }, f = (e) => {
|
|
41499
|
+
if (typeof e == "string" && e !== "") {
|
|
41500
|
+
l.getAttribute("src") !== e && (l.src = e);
|
|
41501
|
+
return;
|
|
41502
|
+
}
|
|
41503
|
+
l.hasAttribute("src") && l.removeAttribute("src"), l.src !== "" && (l.src = "");
|
|
41504
|
+
};
|
|
41505
|
+
f(s.src);
|
|
41506
|
+
let p = new Mx({
|
|
41507
|
+
element: l,
|
|
41508
|
+
editor: c,
|
|
41509
|
+
node: a,
|
|
41510
|
+
getPos: o,
|
|
41498
41511
|
onResize: (e, t) => {
|
|
41499
|
-
|
|
41512
|
+
l.style.width = `${e}px`, l.style.height = `${t}px`;
|
|
41500
41513
|
},
|
|
41501
41514
|
onCommit: (e, t) => {
|
|
41502
|
-
let n =
|
|
41515
|
+
let n = o();
|
|
41503
41516
|
n !== void 0 && this.editor.chain().setNodeSelection(n).updateAttributes(this.name, {
|
|
41504
41517
|
width: e,
|
|
41505
41518
|
height: t
|
|
41506
41519
|
}).run();
|
|
41507
41520
|
},
|
|
41508
|
-
onUpdate: (e
|
|
41521
|
+
onUpdate: (e) => {
|
|
41522
|
+
if (e.type !== a.type) return !1;
|
|
41523
|
+
let t = Jy(e, c.extensionManager.attributes.filter((t) => t.type === e.type.name));
|
|
41524
|
+
return Object.keys(d).forEach((e) => {
|
|
41525
|
+
!i.has(e) && !(e in t) && l.removeAttribute(e);
|
|
41526
|
+
}), Object.entries(t).forEach(([e, t]) => {
|
|
41527
|
+
i.has(e) || (t == null ? l.removeAttribute(e) : l.setAttribute(e, t));
|
|
41528
|
+
}), f(t.src), d = t, !0;
|
|
41529
|
+
},
|
|
41509
41530
|
options: {
|
|
41510
41531
|
directions: e,
|
|
41511
41532
|
min: {
|
|
@@ -41514,10 +41535,10 @@ var cX = ax.create({
|
|
|
41514
41535
|
},
|
|
41515
41536
|
preserveAspectRatio: r === !0
|
|
41516
41537
|
}
|
|
41517
|
-
}),
|
|
41518
|
-
|
|
41519
|
-
|
|
41520
|
-
|
|
41538
|
+
}), m = p.dom, h = () => {
|
|
41539
|
+
m.style.visibility = "", m.style.pointerEvents = "";
|
|
41540
|
+
};
|
|
41541
|
+
return m.style.visibility = "hidden", m.style.pointerEvents = "none", l.complete && l.naturalWidth > 0 ? h() : (l.onload = h, l.onerror = h), p;
|
|
41521
41542
|
};
|
|
41522
41543
|
},
|
|
41523
41544
|
addCommands() {
|