@chamn/render 0.0.8 → 0.0.10
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/.eslintrc.js +1 -0
- package/CHANGELOG.md +10 -0
- package/{build.config.js → build.config.ts} +11 -2
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +172 -141
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/util/assetsLoader.d.ts +1 -1
- package/dist/util/index.d.ts +3 -0
- package/package.json +9 -7
- package/src/index.ts +1 -0
- package/src/util/assetsLoader.ts +6 -5
- package/src/util/index.ts +35 -0
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Xo = Object.defineProperty;
|
|
2
2
|
var Ko = (t, e, r) => e in t ? Xo(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var g = (t, e, r) => (Ko(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
-
import
|
|
4
|
+
import S, { Component as Zo, createElement as ta, useEffect as ea, useRef as An, useMemo as ra } from "react";
|
|
5
5
|
import * as na from "react-dom";
|
|
6
6
|
const oa = (t) => () => {
|
|
7
7
|
console.warn(`${t} need to be implement getComponent`);
|
|
@@ -63,9 +63,9 @@ function Ke(t, e) {
|
|
|
63
63
|
o[r] = e(t[r], r, t);
|
|
64
64
|
return o;
|
|
65
65
|
}
|
|
66
|
-
var
|
|
67
|
-
const M =
|
|
68
|
-
var
|
|
66
|
+
var wa = Array.isArray;
|
|
67
|
+
const M = wa;
|
|
68
|
+
var Sa = 1 / 0, Rr = k ? k.prototype : void 0, Dr = Rr ? Rr.toString : void 0;
|
|
69
69
|
function Rn(t) {
|
|
70
70
|
if (typeof t == "string")
|
|
71
71
|
return t;
|
|
@@ -74,7 +74,7 @@ function Rn(t) {
|
|
|
74
74
|
if (Xe(t))
|
|
75
75
|
return Dr ? Dr.call(t) : "";
|
|
76
76
|
var e = t + "";
|
|
77
|
-
return e == "0" && 1 / t == -
|
|
77
|
+
return e == "0" && 1 / t == -Sa ? "-0" : e;
|
|
78
78
|
}
|
|
79
79
|
function W(t) {
|
|
80
80
|
var e = typeof t;
|
|
@@ -320,8 +320,8 @@ const Gt = bs;
|
|
|
320
320
|
function _s() {
|
|
321
321
|
return !1;
|
|
322
322
|
}
|
|
323
|
-
var Un = typeof exports == "object" && exports && !exports.nodeType && exports, Ur = Un && typeof module == "object" && module && !module.nodeType && module, js = Ur && Ur.exports === Un, kr = js ? X.Buffer : void 0,
|
|
324
|
-
const Ht =
|
|
323
|
+
var Un = typeof exports == "object" && exports && !exports.nodeType && exports, Ur = Un && typeof module == "object" && module && !module.nodeType && module, js = Ur && Ur.exports === Un, kr = js ? X.Buffer : void 0, ws = kr ? kr.isBuffer : void 0, Ss = ws || _s;
|
|
324
|
+
const Ht = Ss;
|
|
325
325
|
var Os = "[object Arguments]", Cs = "[object Array]", Es = "[object Boolean]", xs = "[object Date]", Ns = "[object Error]", $s = "[object Function]", Ts = "[object Map]", As = "[object Number]", Ms = "[object Object]", Ps = "[object RegExp]", Rs = "[object Set]", Ds = "[object String]", Is = "[object WeakMap]", Ls = "[object ArrayBuffer]", Fs = "[object DataView]", Bs = "[object Float32Array]", Us = "[object Float64Array]", ks = "[object Int8Array]", zs = "[object Int16Array]", Gs = "[object Int32Array]", Hs = "[object Uint8Array]", Vs = "[object Uint8ClampedArray]", Ws = "[object Uint16Array]", Js = "[object Uint32Array]", x = {};
|
|
326
326
|
x[Bs] = x[Us] = x[ks] = x[zs] = x[Gs] = x[Hs] = x[Vs] = x[Ws] = x[Js] = !0;
|
|
327
327
|
x[Os] = x[Cs] = x[Ls] = x[Es] = x[Fs] = x[xs] = x[Ns] = x[$s] = x[Ts] = x[As] = x[Ms] = x[Ps] = x[Rs] = x[Ds] = x[Is] = !1;
|
|
@@ -423,7 +423,7 @@ function _i(t) {
|
|
|
423
423
|
return Vt ? e[t] !== void 0 : bi.call(e, t);
|
|
424
424
|
}
|
|
425
425
|
var ji = "__lodash_hash_undefined__";
|
|
426
|
-
function
|
|
426
|
+
function wi(t, e) {
|
|
427
427
|
var r = this.__data__;
|
|
428
428
|
return this.size += this.has(t) ? 0 : 1, r[t] = Vt && e === void 0 ? ji : e, this;
|
|
429
429
|
}
|
|
@@ -438,8 +438,8 @@ lt.prototype.clear = pi;
|
|
|
438
438
|
lt.prototype.delete = di;
|
|
439
439
|
lt.prototype.get = yi;
|
|
440
440
|
lt.prototype.has = _i;
|
|
441
|
-
lt.prototype.set =
|
|
442
|
-
function
|
|
441
|
+
lt.prototype.set = wi;
|
|
442
|
+
function Si() {
|
|
443
443
|
this.__data__ = [], this.size = 0;
|
|
444
444
|
}
|
|
445
445
|
function ve(t, e) {
|
|
@@ -474,7 +474,7 @@ function et(t) {
|
|
|
474
474
|
this.set(n[0], n[1]);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
et.prototype.clear =
|
|
477
|
+
et.prototype.clear = Si;
|
|
478
478
|
et.prototype.delete = Ei;
|
|
479
479
|
et.prototype.get = xi;
|
|
480
480
|
et.prototype.has = Ni;
|
|
@@ -706,12 +706,12 @@ var _c = vt(X, "Promise");
|
|
|
706
706
|
const Le = _c;
|
|
707
707
|
var jc = vt(X, "Set");
|
|
708
708
|
const bt = jc;
|
|
709
|
-
var qr = "[object Map]",
|
|
709
|
+
var qr = "[object Map]", wc = "[object Object]", Qr = "[object Promise]", Yr = "[object Set]", Xr = "[object WeakMap]", Kr = "[object DataView]", Sc = ht(Ie), Oc = ht(Wt), Cc = ht(Le), Ec = ht(bt), xc = ht(Re), ut = dt;
|
|
710
710
|
(Ie && ut(new Ie(new ArrayBuffer(1))) != Kr || Wt && ut(new Wt()) != qr || Le && ut(Le.resolve()) != Qr || bt && ut(new bt()) != Yr || Re && ut(new Re()) != Xr) && (ut = function(t) {
|
|
711
|
-
var e = dt(t), r = e ==
|
|
711
|
+
var e = dt(t), r = e == wc ? t.constructor : void 0, n = r ? ht(r) : "";
|
|
712
712
|
if (n)
|
|
713
713
|
switch (n) {
|
|
714
|
-
case
|
|
714
|
+
case Sc:
|
|
715
715
|
return Kr;
|
|
716
716
|
case Oc:
|
|
717
717
|
return qr;
|
|
@@ -802,8 +802,8 @@ function iu(t) {
|
|
|
802
802
|
}
|
|
803
803
|
var rn = _t && _t.isSet, cu = rn ? ar(rn) : iu;
|
|
804
804
|
const uu = cu;
|
|
805
|
-
var lu = 1, fu = 2, pu = 4, Zn = "[object Arguments]", du = "[object Array]", hu = "[object Boolean]", vu = "[object Date]", mu = "[object Error]", to = "[object Function]", yu = "[object GeneratorFunction]", gu = "[object Map]", bu = "[object Number]", eo = "[object Object]", _u = "[object RegExp]", ju = "[object Set]",
|
|
806
|
-
E[Zn] = E[du] = E[Cu] = E[Eu] = E[hu] = E[vu] = E[xu] = E[Nu] = E[$u] = E[Tu] = E[Au] = E[gu] = E[bu] = E[eo] = E[_u] = E[ju] = E[
|
|
805
|
+
var lu = 1, fu = 2, pu = 4, Zn = "[object Arguments]", du = "[object Array]", hu = "[object Boolean]", vu = "[object Date]", mu = "[object Error]", to = "[object Function]", yu = "[object GeneratorFunction]", gu = "[object Map]", bu = "[object Number]", eo = "[object Object]", _u = "[object RegExp]", ju = "[object Set]", wu = "[object String]", Su = "[object Symbol]", Ou = "[object WeakMap]", Cu = "[object ArrayBuffer]", Eu = "[object DataView]", xu = "[object Float32Array]", Nu = "[object Float64Array]", $u = "[object Int8Array]", Tu = "[object Int16Array]", Au = "[object Int32Array]", Mu = "[object Uint8Array]", Pu = "[object Uint8ClampedArray]", Ru = "[object Uint16Array]", Du = "[object Uint32Array]", E = {};
|
|
806
|
+
E[Zn] = E[du] = E[Cu] = E[Eu] = E[hu] = E[vu] = E[xu] = E[Nu] = E[$u] = E[Tu] = E[Au] = E[gu] = E[bu] = E[eo] = E[_u] = E[ju] = E[wu] = E[Su] = E[Mu] = E[Pu] = E[Ru] = E[Du] = !0;
|
|
807
807
|
E[mu] = E[to] = E[Ou] = !1;
|
|
808
808
|
function Ut(t, e, r, n, o, a) {
|
|
809
809
|
var i, s = e & lu, c = e & fu, u = e & pu;
|
|
@@ -834,12 +834,12 @@ function Ut(t, e, r, n, o, a) {
|
|
|
834
834
|
return d;
|
|
835
835
|
a.set(t, i), uu(t) ? t.forEach(function(b) {
|
|
836
836
|
i.add(Ut(b, e, r, b, t, a));
|
|
837
|
-
}) : au(t) && t.forEach(function(b,
|
|
838
|
-
i.set(
|
|
837
|
+
}) : au(t) && t.forEach(function(b, w) {
|
|
838
|
+
i.set(w, Ut(b, e, r, w, t, a));
|
|
839
839
|
});
|
|
840
840
|
var h = u ? c ? dr : De : c ? Kt : he, y = l ? void 0 : h(t);
|
|
841
|
-
return es(y || t, function(b,
|
|
842
|
-
y && (
|
|
841
|
+
return es(y || t, function(b, w) {
|
|
842
|
+
y && (w = b, b = t[w]), rr(i, w, Ut(b, e, r, w, t, a));
|
|
843
843
|
}), i;
|
|
844
844
|
}
|
|
845
845
|
var Iu = 1, Lu = 4;
|
|
@@ -889,8 +889,8 @@ function oo(t, e, r, n, o, a) {
|
|
|
889
889
|
break;
|
|
890
890
|
}
|
|
891
891
|
if (d) {
|
|
892
|
-
if (!ku(e, function(
|
|
893
|
-
if (!no(d, C) && (h ===
|
|
892
|
+
if (!ku(e, function(w, C) {
|
|
893
|
+
if (!no(d, C) && (h === w || o(h, w, r, n, a)))
|
|
894
894
|
return d.push(C);
|
|
895
895
|
})) {
|
|
896
896
|
f = !1;
|
|
@@ -968,10 +968,10 @@ function cl(t, e, r, n, o, a) {
|
|
|
968
968
|
a.set(t, e), a.set(e, t);
|
|
969
969
|
for (var b = i; ++p < c; ) {
|
|
970
970
|
f = s[p];
|
|
971
|
-
var
|
|
971
|
+
var w = t[f], C = e[f];
|
|
972
972
|
if (n)
|
|
973
|
-
var P = i ? n(C,
|
|
974
|
-
if (!(P === void 0 ?
|
|
973
|
+
var P = i ? n(C, w, f, e, t, a) : n(w, C, f, t, e, a);
|
|
974
|
+
if (!(P === void 0 ? w === C || o(w, C, r, n, a) : P)) {
|
|
975
975
|
y = !1;
|
|
976
976
|
break;
|
|
977
977
|
}
|
|
@@ -1071,13 +1071,13 @@ function bl(t, e) {
|
|
|
1071
1071
|
return t != null && gl(t, e, yl);
|
|
1072
1072
|
}
|
|
1073
1073
|
var _l = 1, jl = 2;
|
|
1074
|
-
function
|
|
1074
|
+
function wl(t, e) {
|
|
1075
1075
|
return ir(t) && ao(e) ? so($t(t), e) : function(r) {
|
|
1076
1076
|
var n = Hn(r, t);
|
|
1077
1077
|
return n === void 0 && n === e ? bl(r, t) : mr(e, n, _l | jl);
|
|
1078
1078
|
};
|
|
1079
1079
|
}
|
|
1080
|
-
function
|
|
1080
|
+
function Sl(t) {
|
|
1081
1081
|
return function(e) {
|
|
1082
1082
|
return e == null ? void 0 : e[t];
|
|
1083
1083
|
};
|
|
@@ -1088,10 +1088,10 @@ function Ol(t) {
|
|
|
1088
1088
|
};
|
|
1089
1089
|
}
|
|
1090
1090
|
function Cl(t) {
|
|
1091
|
-
return ir(t) ?
|
|
1091
|
+
return ir(t) ? Sl($t(t)) : Ol(t);
|
|
1092
1092
|
}
|
|
1093
1093
|
function yr(t) {
|
|
1094
|
-
return typeof t == "function" ? t : t == null ? Ze : typeof t == "object" ? M(t) ?
|
|
1094
|
+
return typeof t == "function" ? t : t == null ? Ze : typeof t == "object" ? M(t) ? wl(t[0], t[1]) : ml(t) : Cl(t);
|
|
1095
1095
|
}
|
|
1096
1096
|
function El(t) {
|
|
1097
1097
|
return function(e, r, n) {
|
|
@@ -1662,7 +1662,7 @@ const _r = O({
|
|
|
1662
1662
|
"CNativeTag"
|
|
1663
1663
|
];
|
|
1664
1664
|
var U = /* @__PURE__ */ ((t) => (t.SLOT = "SLOT", t.FUNCTION = "FUNCTION", t.EXPRESSION = "EXPRESSION", t))(U || {}), jr = /* @__PURE__ */ ((t) => (t.DESIGN = "design", t.SAVE = "save", t))(jr || {}), ze = /* @__PURE__ */ ((t) => (t.FUNC = "FUNC", t.COMP = "COMP", t))(ze || {});
|
|
1665
|
-
const lf = () => it("normalObj", (t) => !F(t) || [U.SLOT, U.EXPRESSION, U.FUNCTION].includes(t == null ? void 0 : t.type) ? !1 : (Tt(t, kt(v(),
|
|
1665
|
+
const lf = () => it("normalObj", (t) => !F(t) || [U.SLOT, U.EXPRESSION, U.FUNCTION].includes(t == null ? void 0 : t.type) ? !1 : (Tt(t, kt(v(), wr)), !0)), wr = I([
|
|
1666
1666
|
v(),
|
|
1667
1667
|
mo(),
|
|
1668
1668
|
tt(),
|
|
@@ -1672,7 +1672,7 @@ const lf = () => it("normalObj", (t) => !F(t) || [U.SLOT, U.EXPRESSION, U.FUNCTI
|
|
|
1672
1672
|
// if renderType is Func, params will be useful
|
|
1673
1673
|
params: m(A(v())),
|
|
1674
1674
|
// here can't use PropsDataStructDescribe, it will caused "Maximum call stack size exceeded" error
|
|
1675
|
-
value: jt(() => I([
|
|
1675
|
+
value: jt(() => I([wt, A(wt)]))
|
|
1676
1676
|
}),
|
|
1677
1677
|
O({
|
|
1678
1678
|
type: L(U.EXPRESSION),
|
|
@@ -1684,19 +1684,19 @@ const lf = () => it("normalObj", (t) => !F(t) || [U.SLOT, U.EXPRESSION, U.FUNCTI
|
|
|
1684
1684
|
}),
|
|
1685
1685
|
lf(),
|
|
1686
1686
|
A(
|
|
1687
|
-
jt(() =>
|
|
1687
|
+
jt(() => wr)
|
|
1688
1688
|
)
|
|
1689
1689
|
]), un = O({
|
|
1690
1690
|
type: L(U.EXPRESSION),
|
|
1691
1691
|
value: v()
|
|
1692
|
-
}),
|
|
1692
|
+
}), wt = O({
|
|
1693
1693
|
id: m(v()),
|
|
1694
1694
|
title: m(v()),
|
|
1695
1695
|
componentName: v(),
|
|
1696
|
-
props: m(kt(v(),
|
|
1696
|
+
props: m(kt(v(), wr)),
|
|
1697
1697
|
stateName: m(v()),
|
|
1698
1698
|
state: m(kt(v(), D())),
|
|
1699
|
-
children: jt(() => m(A(I([v(),
|
|
1699
|
+
children: jt(() => m(A(I([v(), wt])))),
|
|
1700
1700
|
configure: m(D()),
|
|
1701
1701
|
css: m(D()),
|
|
1702
1702
|
style: m(D()),
|
|
@@ -1819,7 +1819,7 @@ const mf = O({
|
|
|
1819
1819
|
groupName: m(v()),
|
|
1820
1820
|
// 分类
|
|
1821
1821
|
category: m(v()),
|
|
1822
|
-
schema: br(ho(
|
|
1822
|
+
schema: br(ho(wt, ["id"]), O({ componentName: m(v()) }))
|
|
1823
1823
|
}), yf = O({
|
|
1824
1824
|
componentName: v(),
|
|
1825
1825
|
title: v(),
|
|
@@ -1899,7 +1899,7 @@ const mf = O({
|
|
|
1899
1899
|
data struct format is invalidate`
|
|
1900
1900
|
);
|
|
1901
1901
|
return o;
|
|
1902
|
-
},
|
|
1902
|
+
}, Sr = (t) => {
|
|
1903
1903
|
const { data: e, message: r, throwError: n, dataStruct: o } = t;
|
|
1904
1904
|
return gf(({ data: a }) => {
|
|
1905
1905
|
try {
|
|
@@ -1922,7 +1922,7 @@ const bf = O({
|
|
|
1922
1922
|
type: L(U.FUNCTION),
|
|
1923
1923
|
value: v()
|
|
1924
1924
|
}), _f = br(
|
|
1925
|
-
ho(
|
|
1925
|
+
ho(wt, ["componentName"]),
|
|
1926
1926
|
O({
|
|
1927
1927
|
componentName: L(
|
|
1928
1928
|
"RootContainer"
|
|
@@ -1946,7 +1946,7 @@ function jf(t) {
|
|
|
1946
1946
|
});
|
|
1947
1947
|
} };
|
|
1948
1948
|
}
|
|
1949
|
-
const Zt = jf(),
|
|
1949
|
+
const Zt = jf(), wf = (t, e) => {
|
|
1950
1950
|
const r = {
|
|
1951
1951
|
...t,
|
|
1952
1952
|
value: []
|
|
@@ -1964,11 +1964,11 @@ const Zt = jf(), Sf = (t, e) => {
|
|
|
1964
1964
|
})
|
|
1965
1965
|
)), r;
|
|
1966
1966
|
};
|
|
1967
|
-
class
|
|
1967
|
+
class St {
|
|
1968
1968
|
constructor(e, r) {
|
|
1969
1969
|
_(this, "nodeType", "SLOT"), _(this, "rawData"), _(this, "parent"), _(this, "emitter", Zt), _(this, "data"), _(this, "id"), _(this, "materialsMode"), this.parent = (r == null ? void 0 : r.parent) || null, this.rawData = e;
|
|
1970
1970
|
const n = (r == null ? void 0 : r.materials) || new ft([]);
|
|
1971
|
-
this.materialsMode = n, this.id = Z(), this.data =
|
|
1971
|
+
this.materialsMode = n, this.id = Z(), this.data = wf(e, this);
|
|
1972
1972
|
}
|
|
1973
1973
|
get value() {
|
|
1974
1974
|
return this.data;
|
|
@@ -1996,7 +1996,7 @@ const go = (t) => {
|
|
|
1996
1996
|
}), e;
|
|
1997
1997
|
}, He = (t, e, r) => {
|
|
1998
1998
|
if (t.type)
|
|
1999
|
-
return t.type === U.SLOT ? new
|
|
1999
|
+
return t.type === U.SLOT ? new St(t, { parent: e, materials: r }) : t;
|
|
2000
2000
|
if (F(t)) {
|
|
2001
2001
|
const n = {};
|
|
2002
2002
|
return Object.keys(t).forEach((o) => {
|
|
@@ -2028,7 +2028,7 @@ class st {
|
|
|
2028
2028
|
value: this.data,
|
|
2029
2029
|
preValue: r,
|
|
2030
2030
|
node: this
|
|
2031
|
-
}), this.parent && !(this.parent instanceof
|
|
2031
|
+
}), this.parent && !(this.parent instanceof St) && this.emitter.emit("onNodeChange", {
|
|
2032
2032
|
value: this.parent.value,
|
|
2033
2033
|
preValue: this.parent.value,
|
|
2034
2034
|
node: this.parent
|
|
@@ -2044,7 +2044,7 @@ class st {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
export(e) {
|
|
2046
2046
|
const r = this.data, n = (o) => {
|
|
2047
|
-
if (o instanceof st || o instanceof
|
|
2047
|
+
if (o instanceof st || o instanceof St || o instanceof T)
|
|
2048
2048
|
return o.export(e);
|
|
2049
2049
|
if (M(o))
|
|
2050
2050
|
return o.map((a) => n(a));
|
|
@@ -2059,12 +2059,12 @@ class st {
|
|
|
2059
2059
|
return n(r);
|
|
2060
2060
|
}
|
|
2061
2061
|
}
|
|
2062
|
-
const
|
|
2062
|
+
const Sf = (t) => {
|
|
2063
2063
|
if (typeof t == "string")
|
|
2064
2064
|
return !0;
|
|
2065
|
-
|
|
2065
|
+
Sr({
|
|
2066
2066
|
data: t,
|
|
2067
|
-
dataStruct:
|
|
2067
|
+
dataStruct: wt,
|
|
2068
2068
|
throwError: !0
|
|
2069
2069
|
});
|
|
2070
2070
|
}, ln = (t, e, r = new ft([])) => {
|
|
@@ -2111,7 +2111,7 @@ const wf = (t) => {
|
|
|
2111
2111
|
};
|
|
2112
2112
|
class T {
|
|
2113
2113
|
constructor(e, r) {
|
|
2114
|
-
_(this, "nodeType", "NODE"), _(this, "rawData"), _(this, "data"), _(this, "emitter", Zt), _(this, "parent"), _(this, "materialsModel"), _(this, "listenerHandle"), _(this, "onChangeCbQueue"), this.rawData = JSON.parse(JSON.stringify(e)),
|
|
2114
|
+
_(this, "nodeType", "NODE"), _(this, "rawData"), _(this, "data"), _(this, "emitter", Zt), _(this, "parent"), _(this, "materialsModel"), _(this, "listenerHandle"), _(this, "onChangeCbQueue"), this.rawData = JSON.parse(JSON.stringify(e)), Sf(e);
|
|
2115
2115
|
const n = (r == null ? void 0 : r.materials) || new ft([]);
|
|
2116
2116
|
this.parent = (r == null ? void 0 : r.parent) || null, this.materialsModel = n, this.data = ln(e, this, n), this.listenerHandle = [], this.onChangeCbQueue = [], this.registerListener();
|
|
2117
2117
|
}
|
|
@@ -2315,7 +2315,7 @@ function Cr(t, e) {
|
|
|
2315
2315
|
r.push(s);
|
|
2316
2316
|
return;
|
|
2317
2317
|
}
|
|
2318
|
-
if (s instanceof
|
|
2318
|
+
if (s instanceof St && a(s.value.value), s instanceof st) {
|
|
2319
2319
|
a(s.value);
|
|
2320
2320
|
return;
|
|
2321
2321
|
}
|
|
@@ -2383,7 +2383,7 @@ const $f = (t) => {
|
|
|
2383
2383
|
return t.map((e) => new Nf(e));
|
|
2384
2384
|
}, Tf = (t) => {
|
|
2385
2385
|
t == null || t.forEach((e) => {
|
|
2386
|
-
|
|
2386
|
+
Sr({
|
|
2387
2387
|
data: e,
|
|
2388
2388
|
dataStruct: yf,
|
|
2389
2389
|
throwError: !0
|
|
@@ -2470,7 +2470,7 @@ const Af = O({
|
|
|
2470
2470
|
thirdLibs: m(cf),
|
|
2471
2471
|
componentsTree: _f,
|
|
2472
2472
|
assets: m(A(D()))
|
|
2473
|
-
}), bo = (t) => (
|
|
2473
|
+
}), bo = (t) => (Sr({
|
|
2474
2474
|
data: t,
|
|
2475
2475
|
dataStruct: Af,
|
|
2476
2476
|
throwError: !0
|
|
@@ -2517,7 +2517,7 @@ class ue {
|
|
|
2517
2517
|
return console.warn("Not found parent node"), !1;
|
|
2518
2518
|
if (a instanceof st)
|
|
2519
2519
|
return console.warn("CProp can not add node"), !1;
|
|
2520
|
-
if (a instanceof
|
|
2520
|
+
if (a instanceof St) {
|
|
2521
2521
|
const s = a.value.value, c = s.findIndex((u) => u === r) ?? -1;
|
|
2522
2522
|
return c >= 0 ? (n === "BEFORE" ? s.splice(c, 0, e) : s.splice(c + 1, 0, e), e.parent = a, (o = a.parent) == null || o.updateValue(), !0) : !1;
|
|
2523
2523
|
}
|
|
@@ -2578,7 +2578,7 @@ class ue {
|
|
|
2578
2578
|
const n = e.parent;
|
|
2579
2579
|
if (!n)
|
|
2580
2580
|
throw new Error("parent node is null or undefined, pls check it");
|
|
2581
|
-
if (n instanceof
|
|
2581
|
+
if (n instanceof St) {
|
|
2582
2582
|
const o = n.value.value, a = o.findIndex((s) => s === e), i = o[a];
|
|
2583
2583
|
return o.splice(a, 1), (r = n.parent) == null || r.updateValue(), i;
|
|
2584
2584
|
}
|
|
@@ -2665,11 +2665,11 @@ function Wf(t, e) {
|
|
|
2665
2665
|
var Jf = Array.isArray;
|
|
2666
2666
|
const Ct = Jf;
|
|
2667
2667
|
var qf = 1 / 0, dn = Ot ? Ot.prototype : void 0, hn = dn ? dn.toString : void 0;
|
|
2668
|
-
function
|
|
2668
|
+
function wo(t) {
|
|
2669
2669
|
if (typeof t == "string")
|
|
2670
2670
|
return t;
|
|
2671
2671
|
if (Ct(t))
|
|
2672
|
-
return Wf(t,
|
|
2672
|
+
return Wf(t, wo) + "";
|
|
2673
2673
|
if (Vf(t))
|
|
2674
2674
|
return hn ? hn.call(t) : "";
|
|
2675
2675
|
var e = t + "";
|
|
@@ -2679,7 +2679,7 @@ function mt(t) {
|
|
|
2679
2679
|
var e = typeof t;
|
|
2680
2680
|
return t != null && (e == "object" || e == "function");
|
|
2681
2681
|
}
|
|
2682
|
-
function
|
|
2682
|
+
function So(t) {
|
|
2683
2683
|
return t;
|
|
2684
2684
|
}
|
|
2685
2685
|
var Qf = "[object AsyncFunction]", Yf = "[object Function]", Xf = "[object GeneratorFunction]", Kf = "[object Proxy]";
|
|
@@ -2779,23 +2779,23 @@ function jp(t) {
|
|
|
2779
2779
|
return t;
|
|
2780
2780
|
};
|
|
2781
2781
|
}
|
|
2782
|
-
var
|
|
2782
|
+
var wp = function() {
|
|
2783
2783
|
try {
|
|
2784
2784
|
var t = xr(Object, "defineProperty");
|
|
2785
2785
|
return t({}, "", {}), t;
|
|
2786
2786
|
} catch {
|
|
2787
2787
|
}
|
|
2788
2788
|
}();
|
|
2789
|
-
const le =
|
|
2790
|
-
var
|
|
2789
|
+
const le = wp;
|
|
2790
|
+
var Sp = le ? function(t, e) {
|
|
2791
2791
|
return le(t, "toString", {
|
|
2792
2792
|
configurable: !0,
|
|
2793
2793
|
enumerable: !1,
|
|
2794
2794
|
value: jp(e),
|
|
2795
2795
|
writable: !0
|
|
2796
2796
|
});
|
|
2797
|
-
} :
|
|
2798
|
-
const Op =
|
|
2797
|
+
} : So;
|
|
2798
|
+
const Op = Sp;
|
|
2799
2799
|
var Cp = _p(Op);
|
|
2800
2800
|
const Ep = Cp;
|
|
2801
2801
|
var xp = 9007199254740991, Np = /^(?:0|[1-9]\d*)$/;
|
|
@@ -2840,7 +2840,7 @@ function Pp(t, e, r) {
|
|
|
2840
2840
|
};
|
|
2841
2841
|
}
|
|
2842
2842
|
function Rp(t, e) {
|
|
2843
|
-
return Ep(Pp(t, e,
|
|
2843
|
+
return Ep(Pp(t, e, So), t + "");
|
|
2844
2844
|
}
|
|
2845
2845
|
var Dp = 9007199254740991;
|
|
2846
2846
|
function Co(t) {
|
|
@@ -2909,9 +2909,9 @@ var To = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
|
2909
2909
|
}
|
|
2910
2910
|
}();
|
|
2911
2911
|
const jn = jd;
|
|
2912
|
-
var
|
|
2913
|
-
const Ao =
|
|
2914
|
-
var
|
|
2912
|
+
var wn = jn && jn.isTypedArray, wd = wn ? bd(wn) : gd;
|
|
2913
|
+
const Ao = wd;
|
|
2914
|
+
var Sd = Object.prototype, Od = Sd.hasOwnProperty;
|
|
2915
2915
|
function Cd(t, e) {
|
|
2916
2916
|
var r = Ct(t), n = !r && We(t), o = !r && !n && $o(t), a = !r && !n && !o && Ao(t), i = r || n || o || a, s = i ? Bp(t.length, String) : [], c = s.length;
|
|
2917
2917
|
for (var u in t)
|
|
@@ -3070,7 +3070,7 @@ Rt.prototype.get = th;
|
|
|
3070
3070
|
Rt.prototype.has = eh;
|
|
3071
3071
|
Rt.prototype.set = rh;
|
|
3072
3072
|
function Ro(t) {
|
|
3073
|
-
return t == null ? "" :
|
|
3073
|
+
return t == null ? "" : wo(t);
|
|
3074
3074
|
}
|
|
3075
3075
|
var nh = Ed(Object.getPrototypeOf, Object);
|
|
3076
3076
|
const Do = nh;
|
|
@@ -3102,7 +3102,7 @@ function Lo(t) {
|
|
|
3102
3102
|
function bh(t) {
|
|
3103
3103
|
return t.split("");
|
|
3104
3104
|
}
|
|
3105
|
-
var Fo = "\\ud800-\\udfff", _h = "\\u0300-\\u036f", jh = "\\ufe20-\\ufe2f",
|
|
3105
|
+
var Fo = "\\ud800-\\udfff", _h = "\\u0300-\\u036f", jh = "\\ufe20-\\ufe2f", wh = "\\u20d0-\\u20ff", Sh = _h + jh + wh, Oh = "\\ufe0e\\ufe0f", Ch = "[" + Fo + "]", Je = "[" + Sh + "]", qe = "\\ud83c[\\udffb-\\udfff]", Eh = "(?:" + Je + "|" + qe + ")", Bo = "[^" + Fo + "]", Uo = "(?:\\ud83c[\\udde6-\\uddff]){2}", ko = "[\\ud800-\\udbff][\\udc00-\\udfff]", xh = "\\u200d", zo = Eh + "?", Go = "[" + Oh + "]?", Nh = "(?:" + xh + "(?:" + [Bo, Uo, ko].join("|") + ")" + Go + zo + ")*", $h = Go + zo + Nh, Th = "(?:" + [Bo + Je + "?", Je, Uo, ko, Ch].join("|") + ")", Ah = RegExp(qe + "(?=" + qe + ")|" + Th + $h, "g");
|
|
3106
3106
|
function Mh(t) {
|
|
3107
3107
|
return t.match(Ah) || [];
|
|
3108
3108
|
}
|
|
@@ -3154,7 +3154,7 @@ Dt.prototype.delete = Bh;
|
|
|
3154
3154
|
Dt.prototype.get = Uh;
|
|
3155
3155
|
Dt.prototype.has = kh;
|
|
3156
3156
|
Dt.prototype.set = Gh;
|
|
3157
|
-
var Ho = typeof exports == "object" && exports && !exports.nodeType && exports,
|
|
3157
|
+
var Ho = typeof exports == "object" && exports && !exports.nodeType && exports, Sn = Ho && typeof module == "object" && module && !module.nodeType && module, Hh = Sn && Sn.exports === Ho, On = Hh ? Mt.Buffer : void 0, Cn = On ? On.allocUnsafe : void 0;
|
|
3158
3158
|
function Vh(t, e) {
|
|
3159
3159
|
if (e)
|
|
3160
3160
|
return t.slice();
|
|
@@ -3225,7 +3225,9 @@ function Vo(t, e, r, n, o) {
|
|
|
3225
3225
|
var rv = Lp(function(t, e, r) {
|
|
3226
3226
|
Vo(t, e, r);
|
|
3227
3227
|
});
|
|
3228
|
-
const nv = rv
|
|
3228
|
+
const nv = rv, Rv = function(t) {
|
|
3229
|
+
return !(!t || typeof t != "function" || !t.prototype);
|
|
3230
|
+
};
|
|
3229
3231
|
function ov(t) {
|
|
3230
3232
|
const e = t.prototype;
|
|
3231
3233
|
return !!(e && e.isReactComponent);
|
|
@@ -3291,6 +3293,24 @@ const gt = (t, e) => {
|
|
|
3291
3293
|
return Object.keys(t).forEach((r) => {
|
|
3292
3294
|
e += `${r}:${t[r]};`;
|
|
3293
3295
|
}), e;
|
|
3296
|
+
}, Dv = (t, e) => {
|
|
3297
|
+
const r = {};
|
|
3298
|
+
return t.forEach((n) => {
|
|
3299
|
+
if (n.globalName) {
|
|
3300
|
+
const o = e[n.globalName];
|
|
3301
|
+
o && (r[n.globalName] = o);
|
|
3302
|
+
}
|
|
3303
|
+
}), r;
|
|
3304
|
+
}, Iv = (t, e = 1) => {
|
|
3305
|
+
let r = 0, n = t, o = {}, a = {};
|
|
3306
|
+
for (; r < e; )
|
|
3307
|
+
Object.keys(n).forEach((i) => {
|
|
3308
|
+
o = {
|
|
3309
|
+
...o,
|
|
3310
|
+
...n[i]
|
|
3311
|
+
};
|
|
3312
|
+
}), a = o, n = o, o = {}, r += 1;
|
|
3313
|
+
return a;
|
|
3294
3314
|
}, ae = "DYNAMIC", cv = ["$$context", "$$nodeModel"], Tn = (t) => {
|
|
3295
3315
|
let e;
|
|
3296
3316
|
const r = /* @__PURE__ */ new Set(), n = (c, u) => {
|
|
@@ -3412,8 +3432,8 @@ class pv {
|
|
|
3412
3432
|
};
|
|
3413
3433
|
const f = this.getComponent(l), d = this.convertModelToComponent(f, l), h = s.params || [];
|
|
3414
3434
|
return {
|
|
3415
|
-
component: (...
|
|
3416
|
-
const C = xn(
|
|
3435
|
+
component: (...w) => {
|
|
3436
|
+
const C = xn(w, h), P = this.getContext(
|
|
3417
3437
|
{
|
|
3418
3438
|
params: C
|
|
3419
3439
|
},
|
|
@@ -3429,7 +3449,7 @@ class pv {
|
|
|
3429
3449
|
};
|
|
3430
3450
|
if (Array.isArray(c)) {
|
|
3431
3451
|
const l = c == null ? void 0 : c.map((p) => u(p));
|
|
3432
|
-
return (...p) => l.map((f) => ov(f.component) ?
|
|
3452
|
+
return (...p) => l.map((f) => ov(f.component) ? S.createElement(f.component, {
|
|
3433
3453
|
$$context: r,
|
|
3434
3454
|
key: f.key
|
|
3435
3455
|
}) : f.component(...p));
|
|
@@ -3472,7 +3492,7 @@ class pv {
|
|
|
3472
3492
|
}
|
|
3473
3493
|
convertModelToComponent(e, r) {
|
|
3474
3494
|
const n = this;
|
|
3475
|
-
class o extends
|
|
3495
|
+
class o extends S.Component {
|
|
3476
3496
|
constructor(s) {
|
|
3477
3497
|
super(s);
|
|
3478
3498
|
g(this, "_CONDITION", !0);
|
|
@@ -3527,7 +3547,7 @@ class pv {
|
|
|
3527
3547
|
g(this, "rebuildNode", () => {
|
|
3528
3548
|
this.storeListenDisposeLint.forEach((s) => s()), this.removeMediaCSS(), this.connectStore(), this.addMediaCSS(), this.forceUpdate();
|
|
3529
3549
|
});
|
|
3530
|
-
this.targetComponentRef =
|
|
3550
|
+
this.targetComponentRef = S.createRef(), this.state = r.value.state || {};
|
|
3531
3551
|
const c = r.value.stateName || r.id, u = n.storeManager.getStore(c);
|
|
3532
3552
|
u ? (this.storeState = u, u.setState({
|
|
3533
3553
|
...r.value.state || {}
|
|
@@ -3596,12 +3616,12 @@ class pv {
|
|
|
3596
3616
|
}
|
|
3597
3617
|
return d = j.map((...J) => {
|
|
3598
3618
|
var Tr;
|
|
3599
|
-
const q = J[1], at = [f.forName || "item", f.forIndex || "index"],
|
|
3600
|
-
let
|
|
3601
|
-
f.name && (
|
|
3619
|
+
const q = J[1], at = [f.forName || "item", f.forIndex || "index"], we = xn(J, at);
|
|
3620
|
+
let Se = "loopData";
|
|
3621
|
+
f.name && (Se = `${Se}${f.name}`);
|
|
3602
3622
|
const It = n.getContext(
|
|
3603
3623
|
{
|
|
3604
|
-
[
|
|
3624
|
+
[Se]: we,
|
|
3605
3625
|
staticState: this.staticState
|
|
3606
3626
|
},
|
|
3607
3627
|
p
|
|
@@ -3650,20 +3670,20 @@ class pv {
|
|
|
3650
3670
|
else {
|
|
3651
3671
|
const j = [];
|
|
3652
3672
|
r.value.children.forEach((q, at) => {
|
|
3653
|
-
const
|
|
3673
|
+
const we = n.buildComponent(q, {
|
|
3654
3674
|
$$context: p,
|
|
3655
3675
|
idx: at
|
|
3656
3676
|
});
|
|
3657
|
-
j.push(
|
|
3677
|
+
j.push(we);
|
|
3658
3678
|
}), b = j;
|
|
3659
3679
|
}
|
|
3660
3680
|
h.ref = this.targetComponentRef;
|
|
3661
|
-
const
|
|
3681
|
+
const w = ((yt = r.value.classNames) == null ? void 0 : yt.map((j) => {
|
|
3662
3682
|
var at;
|
|
3663
3683
|
const J = j.name;
|
|
3664
3684
|
return (ct(j.status) ? gt(((at = j.status) == null ? void 0 : at.value) || "", p) : !1) ? J : "";
|
|
3665
3685
|
})) || [];
|
|
3666
|
-
let C = `${h.className ?? ""} ${
|
|
3686
|
+
let C = `${h.className ?? ""} ${w.join(" ")}`.trim();
|
|
3667
3687
|
r.value.css && (C = `${r.value.css.class} ${C}`.trim()), h.className = C;
|
|
3668
3688
|
const P = n.transformProps(r.value.style, {
|
|
3669
3689
|
$$context: p
|
|
@@ -3677,7 +3697,7 @@ class pv {
|
|
|
3677
3697
|
};
|
|
3678
3698
|
n.processNodeConfigHook && (R = n.processNodeConfigHook(R, r));
|
|
3679
3699
|
const z = n.render(e, R.props, ...b);
|
|
3680
|
-
return this._CONDITION = R.condition, R.condition ? z :
|
|
3700
|
+
return this._CONDITION = R.condition, R.condition ? z : S.createElement(
|
|
3681
3701
|
"div",
|
|
3682
3702
|
{
|
|
3683
3703
|
style: {
|
|
@@ -3719,13 +3739,13 @@ class pv {
|
|
|
3719
3739
|
render(e, r = {}, ...n) {
|
|
3720
3740
|
return typeof e == "string" || typeof e == "number" ? String(e) : (cv.forEach((a) => {
|
|
3721
3741
|
a in r && e.__CP_TYPE__ !== ae && delete r[a];
|
|
3722
|
-
}),
|
|
3742
|
+
}), S.createElement(e, r, ...n));
|
|
3723
3743
|
}
|
|
3724
3744
|
clear() {
|
|
3725
3745
|
this.runtimeComponentCache.clear(), this.storeManager.destroy();
|
|
3726
3746
|
}
|
|
3727
3747
|
}
|
|
3728
|
-
const
|
|
3748
|
+
const Lv = sa(new pv()), dv = [
|
|
3729
3749
|
"a",
|
|
3730
3750
|
"abbr",
|
|
3731
3751
|
"acronym",
|
|
@@ -3886,7 +3906,7 @@ const Rv = sa(new pv()), dv = [
|
|
|
3886
3906
|
...o
|
|
3887
3907
|
}) => {
|
|
3888
3908
|
let a = r;
|
|
3889
|
-
return Array.isArray(r) || (a = [r]),
|
|
3909
|
+
return Array.isArray(r) || (a = [r]), S.createElement(e, {
|
|
3890
3910
|
...o,
|
|
3891
3911
|
...ot(n)
|
|
3892
3912
|
}, ...a);
|
|
@@ -3908,7 +3928,7 @@ const Rv = sa(new pv()), dv = [
|
|
|
3908
3928
|
...i,
|
|
3909
3929
|
...o.style || {}
|
|
3910
3930
|
};
|
|
3911
|
-
return
|
|
3931
|
+
return S.createElement("div", {
|
|
3912
3932
|
...o,
|
|
3913
3933
|
...s,
|
|
3914
3934
|
style: c
|
|
@@ -3919,7 +3939,7 @@ const Rv = sa(new pv()), dv = [
|
|
|
3919
3939
|
...r
|
|
3920
3940
|
}) => {
|
|
3921
3941
|
let n = t;
|
|
3922
|
-
return Array.isArray(t) || (n = [t]),
|
|
3942
|
+
return Array.isArray(t) || (n = [t]), S.createElement("canvas", {
|
|
3923
3943
|
...r,
|
|
3924
3944
|
...ot(e)
|
|
3925
3945
|
}, ...n);
|
|
@@ -3929,7 +3949,7 @@ const Rv = sa(new pv()), dv = [
|
|
|
3929
3949
|
...r
|
|
3930
3950
|
}) => {
|
|
3931
3951
|
let n = t;
|
|
3932
|
-
return Array.isArray(t) || (n = [t]),
|
|
3952
|
+
return Array.isArray(t) || (n = [t]), S.createElement("img", {
|
|
3933
3953
|
...r,
|
|
3934
3954
|
...ot(e)
|
|
3935
3955
|
}, ...n);
|
|
@@ -3939,7 +3959,7 @@ const Rv = sa(new pv()), dv = [
|
|
|
3939
3959
|
...r
|
|
3940
3960
|
}) => {
|
|
3941
3961
|
let n = t;
|
|
3942
|
-
return Array.isArray(t) || (n = [t]),
|
|
3962
|
+
return Array.isArray(t) || (n = [t]), S.createElement("video", {
|
|
3943
3963
|
...r,
|
|
3944
3964
|
...ot(e)
|
|
3945
3965
|
}, ...n);
|
|
@@ -3949,7 +3969,7 @@ const Rv = sa(new pv()), dv = [
|
|
|
3949
3969
|
...r
|
|
3950
3970
|
}) => {
|
|
3951
3971
|
let n = t;
|
|
3952
|
-
return Array.isArray(t) || (n = [t]),
|
|
3972
|
+
return Array.isArray(t) || (n = [t]), S.createElement("video", {
|
|
3953
3973
|
...r,
|
|
3954
3974
|
...ot(e)
|
|
3955
3975
|
}, ...n);
|
|
@@ -3958,10 +3978,10 @@ const Rv = sa(new pv()), dv = [
|
|
|
3958
3978
|
$$attributes: e = [],
|
|
3959
3979
|
content: r,
|
|
3960
3980
|
...n
|
|
3961
|
-
}) =>
|
|
3981
|
+
}) => S.createElement("span", {
|
|
3962
3982
|
...n,
|
|
3963
3983
|
...ot(e)
|
|
3964
|
-
}, r),
|
|
3984
|
+
}, r), wv = ({
|
|
3965
3985
|
children: t,
|
|
3966
3986
|
$$attributes: e = [],
|
|
3967
3987
|
afterMount: r,
|
|
@@ -3971,18 +3991,18 @@ const Rv = sa(new pv()), dv = [
|
|
|
3971
3991
|
let a = t;
|
|
3972
3992
|
return Array.isArray(t) || (a = [t]), ea(() => (r == null || r(o), () => {
|
|
3973
3993
|
n == null || n(o);
|
|
3974
|
-
}), []),
|
|
3994
|
+
}), []), S.createElement("div", {
|
|
3975
3995
|
...o,
|
|
3976
3996
|
...ot(e)
|
|
3977
3997
|
}, ...a);
|
|
3978
|
-
},
|
|
3998
|
+
}, Sv = ({
|
|
3979
3999
|
children: t,
|
|
3980
4000
|
$$attributes: e = [],
|
|
3981
4001
|
htmlTag: r = "div",
|
|
3982
4002
|
...n
|
|
3983
4003
|
}) => {
|
|
3984
4004
|
let o = t;
|
|
3985
|
-
return Array.isArray(t) || (o = [t]),
|
|
4005
|
+
return Array.isArray(t) || (o = [t]), S.createElement(r, {
|
|
3986
4006
|
...n,
|
|
3987
4007
|
...ot(e)
|
|
3988
4008
|
}, ...o);
|
|
@@ -3991,14 +4011,14 @@ const Rv = sa(new pv()), dv = [
|
|
|
3991
4011
|
children: t
|
|
3992
4012
|
}) => t,
|
|
3993
4013
|
...vv,
|
|
3994
|
-
CContainer:
|
|
4014
|
+
CContainer: wv,
|
|
3995
4015
|
CVideo: bv,
|
|
3996
4016
|
CAudio: _v,
|
|
3997
4017
|
CBlock: mv,
|
|
3998
4018
|
CImage: gv,
|
|
3999
4019
|
CText: jv,
|
|
4000
4020
|
CCanvas: yv,
|
|
4001
|
-
CNativeTag:
|
|
4021
|
+
CNativeTag: Sv
|
|
4002
4022
|
};
|
|
4003
4023
|
class Cv {
|
|
4004
4024
|
constructor() {
|
|
@@ -4017,7 +4037,7 @@ class Cv {
|
|
|
4017
4037
|
this.refMap.clear();
|
|
4018
4038
|
}
|
|
4019
4039
|
}
|
|
4020
|
-
class Ev extends
|
|
4040
|
+
class Ev extends S.Component {
|
|
4021
4041
|
constructor(r) {
|
|
4022
4042
|
super(r);
|
|
4023
4043
|
g(this, "refManager");
|
|
@@ -4078,7 +4098,7 @@ class Ev extends w.Component {
|
|
|
4078
4098
|
});
|
|
4079
4099
|
}
|
|
4080
4100
|
}
|
|
4081
|
-
const
|
|
4101
|
+
const Fv = () => {
|
|
4082
4102
|
const t = An(null);
|
|
4083
4103
|
return {
|
|
4084
4104
|
ref: t,
|
|
@@ -4087,7 +4107,7 @@ const Dv = () => {
|
|
|
4087
4107
|
}
|
|
4088
4108
|
};
|
|
4089
4109
|
};
|
|
4090
|
-
class xv extends
|
|
4110
|
+
class xv extends S.Component {
|
|
4091
4111
|
constructor(r) {
|
|
4092
4112
|
super(r);
|
|
4093
4113
|
g(this, "onDoubleClick", () => {
|
|
@@ -4109,7 +4129,7 @@ class xv extends w.Component {
|
|
|
4109
4129
|
if (this.state.hasError) {
|
|
4110
4130
|
const { onDoubleClick: r } = this, n = this.props.node.value;
|
|
4111
4131
|
console.error(this.props.node, this.props.children);
|
|
4112
|
-
const o =
|
|
4132
|
+
const o = S.createElement(
|
|
4113
4133
|
"div",
|
|
4114
4134
|
{
|
|
4115
4135
|
style: {
|
|
@@ -4126,8 +4146,8 @@ class xv extends w.Component {
|
|
|
4126
4146
|
n.title,
|
|
4127
4147
|
" component name:",
|
|
4128
4148
|
n.title || n.componentName,
|
|
4129
|
-
|
|
4130
|
-
|
|
4149
|
+
S.createElement("p", null, "msg: ", String(this.state.error)),
|
|
4150
|
+
S.createElement(
|
|
4131
4151
|
"button",
|
|
4132
4152
|
{
|
|
4133
4153
|
onDoubleClick: r,
|
|
@@ -4143,13 +4163,13 @@ class xv extends w.Component {
|
|
|
4143
4163
|
},
|
|
4144
4164
|
"double click to refresh"
|
|
4145
4165
|
),
|
|
4146
|
-
|
|
4166
|
+
S.createElement("div", {
|
|
4147
4167
|
style: {
|
|
4148
4168
|
display: "none"
|
|
4149
4169
|
}
|
|
4150
4170
|
})
|
|
4151
4171
|
);
|
|
4152
|
-
return
|
|
4172
|
+
return S.createElement(this.props.targetComponent, { onlyRenderChild: !0 }, o);
|
|
4153
4173
|
}
|
|
4154
4174
|
return this.props.children;
|
|
4155
4175
|
}
|
|
@@ -4188,7 +4208,7 @@ const $v = (t) => {
|
|
|
4188
4208
|
style: {}
|
|
4189
4209
|
};
|
|
4190
4210
|
}, [t.node]), { placeholder: n, height: o, width: a, style: i } = r;
|
|
4191
|
-
return
|
|
4211
|
+
return S.createElement(
|
|
4192
4212
|
"div",
|
|
4193
4213
|
{
|
|
4194
4214
|
style: {
|
|
@@ -4211,7 +4231,7 @@ const $v = (t) => {
|
|
|
4211
4231
|
n
|
|
4212
4232
|
);
|
|
4213
4233
|
};
|
|
4214
|
-
class
|
|
4234
|
+
class Bv extends S.Component {
|
|
4215
4235
|
constructor(r) {
|
|
4216
4236
|
super(r);
|
|
4217
4237
|
g(this, "instanceManager", new Nv());
|
|
@@ -4219,7 +4239,7 @@ class Iv extends w.Component {
|
|
|
4219
4239
|
g(this, "dropPlaceholder", $v);
|
|
4220
4240
|
g(this, "onGetComponent", (r, n) => {
|
|
4221
4241
|
const o = this;
|
|
4222
|
-
class a extends
|
|
4242
|
+
class a extends S.Component {
|
|
4223
4243
|
constructor() {
|
|
4224
4244
|
super(...arguments);
|
|
4225
4245
|
g(this, "_DESIGN_BOX", !0);
|
|
@@ -4239,27 +4259,27 @@ class Iv extends w.Component {
|
|
|
4239
4259
|
const { children: c = [], onlyRenderChild: u, ...l } = this.props;
|
|
4240
4260
|
let p = c;
|
|
4241
4261
|
return Ct(c) || (p = [c]), !!!p.filter(Boolean).length && ((d = n.material) != null && d.value.isContainer || n.value.componentName === At.ROOT_CONTAINER) && p.push(
|
|
4242
|
-
|
|
4262
|
+
S.createElement(o.dropPlaceholder, {
|
|
4243
4263
|
node: n
|
|
4244
4264
|
})
|
|
4245
|
-
), u ? p :
|
|
4265
|
+
), u ? p : S.createElement(r, l, ...p);
|
|
4246
4266
|
}
|
|
4247
4267
|
}
|
|
4248
|
-
return
|
|
4249
|
-
return
|
|
4268
|
+
return S.forwardRef(function(s, c) {
|
|
4269
|
+
return S.createElement(
|
|
4250
4270
|
xv,
|
|
4251
4271
|
{
|
|
4252
4272
|
node: n,
|
|
4253
4273
|
targetComponent: a
|
|
4254
4274
|
},
|
|
4255
|
-
|
|
4275
|
+
S.createElement(a, {
|
|
4256
4276
|
ref: c,
|
|
4257
4277
|
...s
|
|
4258
4278
|
})
|
|
4259
4279
|
);
|
|
4260
4280
|
});
|
|
4261
4281
|
});
|
|
4262
|
-
this.renderRef =
|
|
4282
|
+
this.renderRef = S.createRef(), r.dropPlaceholder && (this.dropPlaceholder = r.dropPlaceholder);
|
|
4263
4283
|
}
|
|
4264
4284
|
componentDidMount() {
|
|
4265
4285
|
var r, n;
|
|
@@ -4303,7 +4323,7 @@ class Iv extends w.Component {
|
|
|
4303
4323
|
}
|
|
4304
4324
|
render() {
|
|
4305
4325
|
const { props: r, onGetComponent: n } = this, { render: o, ...a } = r;
|
|
4306
|
-
return o && (o.ref.current = this),
|
|
4326
|
+
return o && (o.ref.current = this), S.createElement(Ev, {
|
|
4307
4327
|
onGetComponent: n,
|
|
4308
4328
|
...a,
|
|
4309
4329
|
// 拦截特殊属性配置, 配合开发模式使用
|
|
@@ -4347,7 +4367,7 @@ const Wo = (t) => {
|
|
|
4347
4367
|
}, Jo = (t) => {
|
|
4348
4368
|
var e;
|
|
4349
4369
|
return t ? (e = t == null ? void 0 : t.stateNode) != null && e._DESIGN_BOX ? t : Jo(t.return) : null;
|
|
4350
|
-
},
|
|
4370
|
+
}, Uv = () => {
|
|
4351
4371
|
const t = An(null);
|
|
4352
4372
|
return {
|
|
4353
4373
|
ref: t,
|
|
@@ -4388,15 +4408,15 @@ var Tv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4388
4408
|
}, n = {}, o = {}, a = {};
|
|
4389
4409
|
function i(f, d) {
|
|
4390
4410
|
f = f.push ? f : [f];
|
|
4391
|
-
var h = [], y = f.length, b = y,
|
|
4392
|
-
for (
|
|
4411
|
+
var h = [], y = f.length, b = y, w, C, P, $;
|
|
4412
|
+
for (w = function(R, z) {
|
|
4393
4413
|
z.length && h.push(R), b--, b || d(h);
|
|
4394
4414
|
}; y--; ) {
|
|
4395
4415
|
if (C = f[y], P = o[C], P) {
|
|
4396
|
-
|
|
4416
|
+
w(C, P);
|
|
4397
4417
|
continue;
|
|
4398
4418
|
}
|
|
4399
|
-
$ = a[C] = a[C] || [], $.push(
|
|
4419
|
+
$ = a[C] = a[C] || [], $.push(w);
|
|
4400
4420
|
}
|
|
4401
4421
|
}
|
|
4402
4422
|
function s(f, d) {
|
|
@@ -4411,12 +4431,12 @@ var Tv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4411
4431
|
f.call && (f = { success: f }), d.length ? (f.error || r)(d) : (f.success || r)(f);
|
|
4412
4432
|
}
|
|
4413
4433
|
function u(f, d, h, y) {
|
|
4414
|
-
var b = document,
|
|
4434
|
+
var b = document, w = h.async, C = (h.numRetries || 0) + 1, P = h.before || r, $ = f.replace(/[\?|#].*$/, ""), R = f.replace(/^(css|img|module|nomodule)!/, ""), z, yt, j;
|
|
4415
4435
|
if (y = y || 0, /(^css!|\.css$)/.test($))
|
|
4416
4436
|
j = b.createElement("link"), j.rel = "stylesheet", j.href = R, z = "hideFocus" in j, z && j.relList && (z = 0, j.rel = "preload", j.as = "style");
|
|
4417
4437
|
else if (/(^img!|\.(png|gif|jpg|svg|webp)$)/.test($))
|
|
4418
4438
|
j = b.createElement("img"), j.src = R;
|
|
4419
|
-
else if (j = b.createElement("script"), j.src = R, j.async =
|
|
4439
|
+
else if (j = b.createElement("script"), j.src = R, j.async = w === void 0 ? !0 : w, yt = "noModule" in j, /^module!/.test($)) {
|
|
4420
4440
|
if (!yt)
|
|
4421
4441
|
return d(f, "l");
|
|
4422
4442
|
j.type = "module";
|
|
@@ -4440,14 +4460,14 @@ var Tv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4440
4460
|
}
|
|
4441
4461
|
function l(f, d, h) {
|
|
4442
4462
|
f = f.push ? f : [f];
|
|
4443
|
-
var y = f.length, b = y,
|
|
4463
|
+
var y = f.length, b = y, w = [], C, P;
|
|
4444
4464
|
for (C = function($, R, z) {
|
|
4445
|
-
if (R == "e" &&
|
|
4465
|
+
if (R == "e" && w.push($), R == "b")
|
|
4446
4466
|
if (z)
|
|
4447
|
-
|
|
4467
|
+
w.push($);
|
|
4448
4468
|
else
|
|
4449
4469
|
return;
|
|
4450
|
-
y--, y || d(
|
|
4470
|
+
y--, y || d(w);
|
|
4451
4471
|
}, P = 0; P < b; P++)
|
|
4452
4472
|
u(f[P], C, h);
|
|
4453
4473
|
}
|
|
@@ -4458,14 +4478,14 @@ var Tv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4458
4478
|
throw "LoadJS";
|
|
4459
4479
|
n[y] = !0;
|
|
4460
4480
|
}
|
|
4461
|
-
function
|
|
4481
|
+
function w(C, P) {
|
|
4462
4482
|
l(f, function($) {
|
|
4463
4483
|
c(b, $), C && c({ success: C, error: P }, $), s(y, $);
|
|
4464
4484
|
}, b);
|
|
4465
4485
|
}
|
|
4466
4486
|
if (b.returnPromise)
|
|
4467
|
-
return new Promise(
|
|
4468
|
-
|
|
4487
|
+
return new Promise(w);
|
|
4488
|
+
w();
|
|
4469
4489
|
}
|
|
4470
4490
|
return p.ready = function(d, h) {
|
|
4471
4491
|
return i(d, function(y) {
|
|
@@ -4480,7 +4500,7 @@ var Tv = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
4480
4500
|
}, p;
|
|
4481
4501
|
});
|
|
4482
4502
|
})(Av);
|
|
4483
|
-
class
|
|
4503
|
+
class kv {
|
|
4484
4504
|
constructor(e, r) {
|
|
4485
4505
|
g(this, "assets");
|
|
4486
4506
|
g(this, "loadStatus");
|
|
@@ -4504,16 +4524,16 @@ class Fv {
|
|
|
4504
4524
|
this._onSuccessList.forEach((n) => n());
|
|
4505
4525
|
return;
|
|
4506
4526
|
}
|
|
4507
|
-
return
|
|
4527
|
+
return new Promise((n, o) => {
|
|
4508
4528
|
fe.ready(r, {
|
|
4509
4529
|
success: () => {
|
|
4510
|
-
this._onSuccessList.forEach((
|
|
4530
|
+
this._onSuccessList.forEach((a) => a()), n("");
|
|
4511
4531
|
},
|
|
4512
|
-
error: (
|
|
4513
|
-
this._onErrorList.forEach((
|
|
4532
|
+
error: (a) => {
|
|
4533
|
+
this._onErrorList.forEach((i) => i(a)), o(a);
|
|
4514
4534
|
}
|
|
4515
4535
|
});
|
|
4516
|
-
}
|
|
4536
|
+
});
|
|
4517
4537
|
}
|
|
4518
4538
|
onSuccess(e) {
|
|
4519
4539
|
return this._onSuccessList.push(e), this;
|
|
@@ -4523,15 +4543,26 @@ class Fv {
|
|
|
4523
4543
|
}
|
|
4524
4544
|
}
|
|
4525
4545
|
export {
|
|
4526
|
-
|
|
4546
|
+
kv as AssetLoader,
|
|
4527
4547
|
Nv as ComponentInstanceManager,
|
|
4528
4548
|
$v as DefaultDropPlaceholder,
|
|
4529
4549
|
pv as DefineReactAdapter,
|
|
4530
|
-
|
|
4531
|
-
|
|
4550
|
+
Bv as DesignRender,
|
|
4551
|
+
Lv as ReactAdapter,
|
|
4532
4552
|
Ev as Render,
|
|
4553
|
+
av as canAcceptsRef,
|
|
4554
|
+
Dv as collectVariable,
|
|
4555
|
+
sv as compWrapper,
|
|
4556
|
+
iv as convertCodeStringToFunction,
|
|
4557
|
+
Iv as flatObject,
|
|
4558
|
+
Nn as formatSourceStylePropertyName,
|
|
4533
4559
|
sa as getAdapter,
|
|
4534
|
-
|
|
4535
|
-
|
|
4560
|
+
$n as getCSSTextValue,
|
|
4561
|
+
xn as getObjFromArrayMap,
|
|
4562
|
+
Rv as isClass,
|
|
4563
|
+
gt as runExpression,
|
|
4564
|
+
ov as shouldConstruct,
|
|
4565
|
+
Uv as useDesignRender,
|
|
4566
|
+
Fv as useRender
|
|
4536
4567
|
};
|
|
4537
4568
|
//# sourceMappingURL=index.es.js.map
|