@pygmalionjs/pygmalion 0.25.0 → 0.26.0
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,5 +1,5 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { n as C, R as g, aM as P, cl as R, cm as E, Y as k, cn as I, a7 as m, a4 as b } from "./runtime-
|
|
2
|
+
import { n as C, R as g, aM as P, cl as R, cm as E, Y as k, cn as I, a7 as m, a4 as b } from "./runtime-Bb9_M0iT.js";
|
|
3
3
|
import { useRef as L, useLayoutEffect as h } from "react";
|
|
4
4
|
function v(n) {
|
|
5
5
|
return `translate(${n.panX}px, ${n.panY}px) scale(${n.zoom})`;
|
package/dist-lib/pygmalion.js
CHANGED
|
@@ -2,10 +2,10 @@ var TS = Object.defineProperty;
|
|
|
2
2
|
var DS = (e, t, n) => t in e ? TS(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var bt = (e, t, n) => DS(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsxs as b, jsx as l, Fragment as Ve } from "react/jsx-runtime";
|
|
5
|
-
import { c as aa, d as Ar, a as Ni, D as rt, r as Ul, b as Un, m as Lt, e as ov, f as no, g as Qa, I as jS, h as zS, i as _m, v as vo, j as Tn, T as Yf, k as FS, l as LS, u as kc, n as zt, o as VS, p as Mt, q as Pt, s as BS, t as _S, w as WS, x as qS, F as HS, y as KS, z as Bp, A as sv, B as av, C as Wm, E as tn, G as qm, H as US, J as Lu, K as GS, L as JS, R as Hm, M as YS, N as XS, O as ZS, P as QS, Q as eI, S as tI, U as nI, V as _p, W as cv, X as rI, Y as gi, Z as iI, _ as Km, $ as Um, a0 as Pl, a1 as oI, a2 as lv, a3 as Vu, a4 as Gr, a5 as ts, a6 as oi, a7 as Vi, a8 as Vd, a9 as sI, aa as aI, ab as cI, ac as Gl, ad as Gm, ae as lI, af as Xf, ag as Zf, ah as ns, ai as dI, aj as uI, ak as Bd, al as pI, am as fI, an as hI, ao as mI, ap as gI, aq as yI, ar as bI, as as vI, at as dv, au as uv, av as ec, aw as wI, ax as Jm, ay as xI, az as Ym, aA as SI, aB as Xm, aC as II, aD as kI, aE as NI, aF as CI, aG as pv, aH as PI, aI as $I, aJ as AI, aK as fv, aL as MI, aM as Bu, aN as Zm, aO as OI, aP as EI, aQ as RI, aR as Qm, aS as _u, aT as TI, aU as DI, aV as hv, aW as jI, aX as tc, aY as zI, aZ as FI, a_ as _r, a$ as mv, b0 as Wr, b1 as gv, b2 as LI, b3 as yv, b4 as Jl, b5 as VI, b6 as eg, b7 as bv, b8 as Yl, b9 as _d, ba as Xr, bb as Qr, bc as BI, bd as tg, be as Qf, bf as vv, bg as _I, bh as $l, bi as nc, bj as WI, bk as qI, bl as wv, bm as HI, bn as KI, bo as UI, bp as GI, bq as ng, br as JI, bs as YI, bt as XI, bu as ZI } from "./runtime-
|
|
6
|
-
import { bv as Jz, bw as Yz, bx as Xz, by as Zz, bz as Qz, bA as eF, bB as tF, bC as nF, bD as rF, bE as iF, bF as oF, bG as sF, bH as aF, bI as cF, bJ as lF, bK as dF, bL as uF, bM as pF, bN as fF, bO as hF, bP as mF, bQ as gF, bR as yF, bS as bF, bT as vF, bU as wF, bV as xF, bW as SF, bX as IF, bY as kF, bZ as NF, b_ as CF, b$ as PF, c0 as $F, c1 as AF, c2 as MF, c3 as OF, c4 as EF, c5 as RF, c6 as TF, c7 as DF, c8 as jF, c9 as zF, ca as FF, cb as LF, cc as VF, cd as BF, ce as _F, cf as WF, cg as qF, ch as HF } from "./runtime-
|
|
5
|
+
import { c as aa, d as Ar, a as Ni, D as rt, r as Ul, b as Un, m as Lt, e as ov, f as no, g as Qa, I as jS, h as zS, i as _m, v as vo, j as Tn, T as Yf, k as FS, l as LS, u as kc, n as zt, o as VS, p as Mt, q as Pt, s as BS, t as _S, w as WS, x as qS, F as HS, y as KS, z as Bp, A as sv, B as av, C as Wm, E as tn, G as qm, H as US, J as Lu, K as GS, L as JS, R as Hm, M as YS, N as XS, O as ZS, P as QS, Q as eI, S as tI, U as nI, V as _p, W as cv, X as rI, Y as gi, Z as iI, _ as Km, $ as Um, a0 as Pl, a1 as oI, a2 as lv, a3 as Vu, a4 as Gr, a5 as ts, a6 as oi, a7 as Vi, a8 as Vd, a9 as sI, aa as aI, ab as cI, ac as Gl, ad as Gm, ae as lI, af as Xf, ag as Zf, ah as ns, ai as dI, aj as uI, ak as Bd, al as pI, am as fI, an as hI, ao as mI, ap as gI, aq as yI, ar as bI, as as vI, at as dv, au as uv, av as ec, aw as wI, ax as Jm, ay as xI, az as Ym, aA as SI, aB as Xm, aC as II, aD as kI, aE as NI, aF as CI, aG as pv, aH as PI, aI as $I, aJ as AI, aK as fv, aL as MI, aM as Bu, aN as Zm, aO as OI, aP as EI, aQ as RI, aR as Qm, aS as _u, aT as TI, aU as DI, aV as hv, aW as jI, aX as tc, aY as zI, aZ as FI, a_ as _r, a$ as mv, b0 as Wr, b1 as gv, b2 as LI, b3 as yv, b4 as Jl, b5 as VI, b6 as eg, b7 as bv, b8 as Yl, b9 as _d, ba as Xr, bb as Qr, bc as BI, bd as tg, be as Qf, bf as vv, bg as _I, bh as $l, bi as nc, bj as WI, bk as qI, bl as wv, bm as HI, bn as KI, bo as UI, bp as GI, bq as ng, br as JI, bs as YI, bt as XI, bu as ZI } from "./runtime-Bb9_M0iT.js";
|
|
6
|
+
import { bv as Jz, bw as Yz, bx as Xz, by as Zz, bz as Qz, bA as eF, bB as tF, bC as nF, bD as rF, bE as iF, bF as oF, bG as sF, bH as aF, bI as cF, bJ as lF, bK as dF, bL as uF, bM as pF, bN as fF, bO as hF, bP as mF, bQ as gF, bR as yF, bS as bF, bT as vF, bU as wF, bV as xF, bW as SF, bX as IF, bY as kF, bZ as NF, b_ as CF, b$ as PF, c0 as $F, c1 as AF, c2 as MF, c3 as OF, c4 as EF, c5 as RF, c6 as TF, c7 as DF, c8 as jF, c9 as zF, ca as FF, cb as LF, cc as VF, cd as BF, ce as _F, cf as WF, cg as qF, ch as HF } from "./runtime-Bb9_M0iT.js";
|
|
7
7
|
import { useState as te, createContext as xv, useEffect as pe, useContext as Wd, useSyncExternalStore as Ge, useCallback as Ht, useRef as he, useReducer as Sv, useMemo as Xe, memo as Iv, createElement as rc, useLayoutEffect as en, useId as ms, forwardRef as QI, useImperativeHandle as ek, Fragment as kv, Component as tk } from "react";
|
|
8
|
-
import { CameraLayer as nk } from "./CameraLayer-
|
|
8
|
+
import { CameraLayer as nk } from "./CameraLayer-DK2pbMx_.js";
|
|
9
9
|
import { createPortal as eh } from "react-dom";
|
|
10
10
|
import { resolveRoutePreviewArtifactStatus as rk, resolveStaticRoutePreviewSurface as ik } from "./routePreviewStatus-DTr-UJhV.js";
|
|
11
11
|
const rs = ["fontFamily", "fontWeight", "fontSize", "italic", "underline", "strikethrough", "textCase", "color", "link"], is = ["align", "lineHeight", "letterSpacing", "list", "indent"], ok = ["fixed", "auto-width", "auto-height"], sk = ["none", "upper", "lower", "title"], ak = ["none", "bullet", "numbered"], ck = ["start", "center", "end", "justify"], os = { align: "textAlign", lineHeight: "lineHeight", letterSpacing: "letterSpacing", list: "textList", indent: "textIndent" }, lk = [...rs, ...is.map((e) => os[e]), "textResize"], qd = (e) => e !== null && typeof e == "object" && !Array.isArray(e), Nv = (e, t) => typeof e == "string" && e.length > 0 && e.length <= t && e === e.trim() && !/[\0-\x1f\x7f]/.test(e), rg = (e) => Nv(e, 160) && !/[;{}]/.test(e) && !e.includes("</"), Wp = (e) => typeof e == "number" && Number.isFinite(e), dk = /^(?:https?:\/\/|mailto:|tel:|\/|#|\.\.?\/|\?)/i, uk = (e) => Nv(e, 2e3) && !/\s/.test(e) && dk.test(e), th = (e) => typeof e == "string" && ok.includes(e), nh = {
|
|
@@ -20010,10 +20010,14 @@ function q2(e, t) {
|
|
|
20010
20010
|
Gi(e.fontSize) && e.fontSize > 0 && (o.fontSize = e.fontSize), Gi(e.fontWeight) && e.fontWeight > 0 && (o.fontWeight = e.fontWeight), gd(e.color) && (o.color = e.color), e.textAlign && (o.textAlign = e.textAlign);
|
|
20011
20011
|
const i = e.domStyle ?? {};
|
|
20012
20012
|
typeof i.fontFamily == "string" && i.fontFamily.trim() && (o.fontFamily = i.fontFamily.trim());
|
|
20013
|
-
const s = typeof i.lineHeight == "string" ? Number.parseFloat(i.lineHeight) : NaN;
|
|
20014
|
-
Number.isFinite(s) && s > 0 &&
|
|
20013
|
+
const s = typeof i.lineHeight == "string" && /px$/.test(i.lineHeight) ? Number.parseFloat(i.lineHeight) : NaN;
|
|
20014
|
+
Number.isFinite(s) && s > 0 && (o.lineHeight = Math.round(s / n * 1e3) / 1e3);
|
|
20015
20015
|
const a = typeof i.letterSpacing == "string" ? Number.parseFloat(i.letterSpacing) : NaN;
|
|
20016
|
-
|
|
20016
|
+
Number.isFinite(a) && a !== 0 && (o.letterSpacing = a), (i.fontStyle === "italic" || i.fontStyle === "oblique") && (o.italic = !0);
|
|
20017
|
+
const c = typeof i.textDecorationLine == "string" ? i.textDecorationLine : "";
|
|
20018
|
+
/\bunderline\b/.test(c) && (o.underline = !0), /\bline-through\b/.test(c) && (o.strikethrough = !0);
|
|
20019
|
+
const d = { uppercase: "upper", lowercase: "lower", capitalize: "title" }[typeof i.textTransform == "string" ? i.textTransform : ""];
|
|
20020
|
+
return d && (o.textCase = d), Gi(e.opacity) && e.opacity >= 0 && e.opacity < 1 && (o.opacity = e.opacity), o;
|
|
20017
20021
|
}
|
|
20018
20022
|
function H2(e) {
|
|
20019
20023
|
const t = [], n = /* @__PURE__ */ new Map();
|