frame.identify 0.5.3 → 0.5.4
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalImageCropped.d.ts","sourceRoot":"","sources":["../src/ModalImageCropped.tsx"],"names":[],"mappings":"AAUA,OAAO,EAqBL,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAI1B;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,CACZ,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,KAAK,EAAE,EACtB,MAAM,EAAE,KAAK,EAAE,EACf,SAAS,CAAC,EAAE,KAAK,KACd,MAAM,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+
|
|
1
|
+
{"version":3,"file":"ModalImageCropped.d.ts","sourceRoot":"","sources":["../src/ModalImageCropped.tsx"],"names":[],"mappings":"AAUA,OAAO,EAqBL,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAG3C,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;AAI1B;;;;;;;;;GASG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,KAAK,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC5C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,CACZ,aAAa,EAAE,MAAM,EACrB,aAAa,EAAE,KAAK,EAAE,EACtB,MAAM,EAAE,KAAK,EAAE,EACf,SAAS,CAAC,EAAE,KAAK,KACd,MAAM,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BAwuCA"}
|
package/dist/frame.identify.js
CHANGED
|
@@ -838,7 +838,7 @@ function Re(e) {
|
|
|
838
838
|
let t = [], n = [];
|
|
839
839
|
return Array.from(e.querySelectorAll(Pe)).forEach((e, r) => {
|
|
840
840
|
let i = Fe(e);
|
|
841
|
-
i
|
|
841
|
+
i !== -1 && Le(e) && (i === 0 ? t.push(e) : n.push({
|
|
842
842
|
documentOrder: r,
|
|
843
843
|
tabIndex: i,
|
|
844
844
|
node: e
|
|
@@ -851,7 +851,7 @@ function ze() {
|
|
|
851
851
|
function Be(t) {
|
|
852
852
|
let { children: n, disableAutoFocus: r = !1, disableEnforceFocus: i = !1, disableRestoreFocus: a = !1, getTabbable: o = Re, isEnabled: s = ze, open: u } = t, d = e.useRef(!1), f = e.useRef(null), p = e.useRef(null), m = e.useRef(null), h = e.useRef(null), g = e.useRef(!1), _ = e.useRef(null), v = we(Te(n), _), y = e.useRef(null);
|
|
853
853
|
e.useEffect(() => {
|
|
854
|
-
|
|
854
|
+
u && _.current && (g.current = !r);
|
|
855
855
|
}, [r, u]), e.useEffect(() => {
|
|
856
856
|
if (d.current = !1, !u || !_.current) return;
|
|
857
857
|
let e = je(I(_.current)), t = Ne(_.current) ?? _.current;
|
|
@@ -1188,7 +1188,7 @@ function ut(e, t) {
|
|
|
1188
1188
|
if (!e.containerQueries || !dt(t)) return t;
|
|
1189
1189
|
let n = [];
|
|
1190
1190
|
for (let e in t) e.startsWith("@container") && n.push(e);
|
|
1191
|
-
n.sort((e, t) => (e.match(lt)?.[1] || 0) -
|
|
1191
|
+
n.sort((e, t) => +(e.match(lt)?.[1] || 0) - (t.match(lt)?.[1] || 0));
|
|
1192
1192
|
let r = t;
|
|
1193
1193
|
for (let e = 0; e < n.length; e += 1) {
|
|
1194
1194
|
let t = n[e], i = r[t];
|
|
@@ -4143,7 +4143,7 @@ function Do(t) {
|
|
|
4143
4143
|
C
|
|
4144
4144
|
]);
|
|
4145
4145
|
let D = (e) => (t) => {
|
|
4146
|
-
e.onKeyDown?.(t),
|
|
4146
|
+
e.onKeyDown?.(t), t.key === "Escape" && t.which !== 229 && w() && (t.stopPropagation(), c && c(t, "escapeKeyDown"));
|
|
4147
4147
|
}, O = (e) => (t) => {
|
|
4148
4148
|
e.onClick?.(t), t.target === t.currentTarget && c && c(t, "backdropClick");
|
|
4149
4149
|
};
|
|
@@ -4695,7 +4695,7 @@ function ds(e) {
|
|
|
4695
4695
|
}
|
|
4696
4696
|
function N(e) {
|
|
4697
4697
|
let t = i.current;
|
|
4698
|
-
|
|
4698
|
+
t && s.current && O.value === "Values defined" && (v(null), p.current = j(t, e));
|
|
4699
4699
|
}
|
|
4700
4700
|
function P(e) {
|
|
4701
4701
|
let t = i.current;
|
|
@@ -4959,7 +4959,7 @@ function Ss(t) {
|
|
|
4959
4959
|
};
|
|
4960
4960
|
}
|
|
4961
4961
|
//#endregion
|
|
4962
|
-
//#region \0@oxc-project+runtime@0.
|
|
4962
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
|
|
4963
4963
|
function Cs(e) {
|
|
4964
4964
|
"@babel/helpers - typeof";
|
|
4965
4965
|
return Cs = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -4969,7 +4969,7 @@ function Cs(e) {
|
|
|
4969
4969
|
}, Cs(e);
|
|
4970
4970
|
}
|
|
4971
4971
|
//#endregion
|
|
4972
|
-
//#region \0@oxc-project+runtime@0.
|
|
4972
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
|
|
4973
4973
|
function ws(e, t) {
|
|
4974
4974
|
if (Cs(e) != "object" || !e) return e;
|
|
4975
4975
|
var n = e[Symbol.toPrimitive];
|
|
@@ -4981,13 +4981,13 @@ function ws(e, t) {
|
|
|
4981
4981
|
return (t === "string" ? String : Number)(e);
|
|
4982
4982
|
}
|
|
4983
4983
|
//#endregion
|
|
4984
|
-
//#region \0@oxc-project+runtime@0.
|
|
4984
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
|
|
4985
4985
|
function Ts(e) {
|
|
4986
4986
|
var t = ws(e, "string");
|
|
4987
4987
|
return Cs(t) == "symbol" ? t : t + "";
|
|
4988
4988
|
}
|
|
4989
4989
|
//#endregion
|
|
4990
|
-
//#region \0@oxc-project+runtime@0.
|
|
4990
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
|
|
4991
4991
|
function Es(e, t, n) {
|
|
4992
4992
|
return (t = Ts(t)) in e ? Object.defineProperty(e, t, {
|
|
4993
4993
|
value: n,
|
|
@@ -6633,12 +6633,18 @@ function Kc(e) {
|
|
|
6633
6633
|
fe
|
|
6634
6634
|
]);
|
|
6635
6635
|
function ge(t, n, r = !1) {
|
|
6636
|
-
let i =
|
|
6636
|
+
let i = he(t, n, p, r), a = ue(i.polygon);
|
|
6637
6637
|
if (e.testMode) {
|
|
6638
|
-
let e = ce(
|
|
6638
|
+
let e = ce(a);
|
|
6639
6639
|
console.log("rt1:"), console.log(e);
|
|
6640
6640
|
}
|
|
6641
|
-
return
|
|
6641
|
+
return {
|
|
6642
|
+
points: a,
|
|
6643
|
+
center: {
|
|
6644
|
+
x: i.box.minX + (i.box.maxX - i.box.minX) / 2,
|
|
6645
|
+
y: i.box.minY + (i.box.maxY - i.box.minY) / 2
|
|
6646
|
+
}
|
|
6647
|
+
};
|
|
6642
6648
|
}
|
|
6643
6649
|
let _e = i(() => p.length < 2 ? {
|
|
6644
6650
|
polygon: [],
|
|
@@ -6843,11 +6849,14 @@ function Kc(e) {
|
|
|
6843
6849
|
function Te() {
|
|
6844
6850
|
if (!Ie) throw Error("SL is undefined");
|
|
6845
6851
|
if (!Le) throw Error("SH is undefined");
|
|
6846
|
-
let t = ge(Ie, Le, !0);
|
|
6852
|
+
let { points: t, center: n } = ge(Ie, Le, !0);
|
|
6847
6853
|
if (R.value === "Points defined") e.actor.send({ type: ns });
|
|
6848
6854
|
else if (R.value === "Shape defined") e.actor.send({ type: Uo });
|
|
6849
6855
|
else if (R.value === "Trademark defined") e.actor.send({ type: Uo });
|
|
6850
|
-
else if (R.value === "Finished") e.onCloseModal(x, p, t, O
|
|
6856
|
+
else if (R.value === "Finished") e.onCloseModal(x, p, t, O ? {
|
|
6857
|
+
x: O.x - n.x,
|
|
6858
|
+
y: O.y - n.y
|
|
6859
|
+
} : void 0)(), e.actor.send({ type: Wo });
|
|
6851
6860
|
else throw Error(`Unexpected state: ${R.value}`);
|
|
6852
6861
|
}
|
|
6853
6862
|
function Ee() {
|