react-big-screen 0.0.20 → 0.0.22
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/es/{IInputNumber-Vk6zq2bP.mjs → IInputNumber-CEotcbKL.mjs} +2 -2
- package/es/{Line-nA3VtARp.mjs → Line-CgKiUu04.mjs} +4 -4
- package/es/{attributes-BZxcK9tt.mjs → attributes-BPJdjr2i.mjs} +12 -9
- package/es/{attributes-CbI6ZNLl.mjs → attributes-BcOvtwR5.mjs} +18 -15
- package/es/attributes-BfidbonK.mjs +43 -0
- package/es/{attributes-BWjMqQ_s.mjs → attributes-Btg07K2U.mjs} +37 -34
- package/es/attributes-BwADICpR.mjs +37 -0
- package/es/{attributes-C7YISj8O.mjs → attributes-CLKihLxA.mjs} +17 -14
- package/es/{attributes-jJg_yENs.mjs → attributes-CbEkHFeA.mjs} +11 -8
- package/es/attributes-Cqd_mqWc.mjs +41 -0
- package/es/attributes-CuMNtV8M.mjs +34 -0
- package/es/attributes-D48dVLeW.mjs +27 -0
- package/es/{attributes-OZgEPZfV.mjs → attributes-DygyEbMZ.mjs} +11 -8
- package/es/attributes-T101y64V.mjs +49 -0
- package/es/{index-BnaaZaeo.mjs → index--DlyGwmX.mjs} +14 -11
- package/es/index-5xqLm0cU.mjs +47 -0
- package/es/index-8ZXIms1b.mjs +48 -0
- package/es/index-B7TrIL_C.mjs +19 -0
- package/es/{index-CKqOSJ9y.mjs → index-B8oIQxa8.mjs} +14 -13
- package/es/{index-C8d60TqQ.mjs → index-BHUjUILf.mjs} +12 -9
- package/es/{index-CLnTLLjS.mjs → index-BHmzQnjb.mjs} +9 -9
- package/es/{index-CrN898XP.mjs → index-BQ7mzQ9J.mjs} +21 -20
- package/es/{index-7n0O_7or.mjs → index-BtEza1iX.mjs} +29 -26
- package/es/{index-Bwm3aMXZ.mjs → index-BuUTG4Rv.mjs} +63 -63
- package/es/index-BvW1_Hyv.mjs +51 -0
- package/es/index-C0Dt2jQ_.mjs +40 -0
- package/es/index-C6A7V93P.mjs +61 -0
- package/es/index-CHxtigvR.mjs +42 -0
- package/es/index-CW3G29nN.mjs +46 -0
- package/es/{index-BUic5qZC.mjs → index-D-o2kNzn.mjs} +54 -54
- package/es/{index-guYPVm3G.mjs → index-D5seKG8I.mjs} +2 -2
- package/es/index-DTMGhBFA.mjs +43 -0
- package/es/index-DZRl1odp.mjs +37 -0
- package/es/{index-B1ohG9Hu.mjs → index-DmMp7-l-.mjs} +12 -9
- package/es/{index-B75SSKFG.mjs → index-Dv8VfJDC.mjs} +32 -30
- package/es/{index-CaUBqf8D.mjs → index-DxbswiWm.mjs} +34 -32
- package/es/{index-DuXGzYdH.mjs → index-Qxmobfyd.mjs} +5 -5
- package/es/{index-BF07nOIu.mjs → index-X5o1pXL3.mjs} +17 -14
- package/es/{index-TjFlu-86.mjs → index-Z8NfClWR.mjs} +18 -15
- package/es/index-mzSvAxqW.mjs +142 -0
- package/es/index-onenk3XK.mjs +26 -0
- package/es/{index-Cq0uVP0H.mjs → index-yEFPa0R2.mjs} +3 -3
- package/es/index.mjs +7 -6
- package/es/{selectPage-BfNytQ95.mjs → selectPage-BTdc0EhU.mjs} +1 -1
- package/es/useCurrentPageId-DkPUSvWz.mjs +20 -0
- package/package.json +1 -1
- package/es/attributes-BDcSpbcs.mjs +0 -40
- package/es/attributes-Cg2w2wqR.mjs +0 -34
- package/es/attributes-Ck-M5Rw3.mjs +0 -46
- package/es/attributes-Dk4Khv-P.mjs +0 -38
- package/es/attributes-DuAsVU2g.mjs +0 -31
- package/es/attributes-Nwf_EnEX.mjs +0 -24
- package/es/index-B8Ei_KZZ.mjs +0 -16
- package/es/index-BemZB0VC.mjs +0 -48
- package/es/index-C7UdPRSB.mjs +0 -44
- package/es/index-CBBKPguI.mjs +0 -139
- package/es/index-COVC4gVe.mjs +0 -40
- package/es/index-CR3gnAfy.mjs +0 -58
- package/es/index-CXKN_KjL.mjs +0 -37
- package/es/index-Ce7eAD1W.mjs +0 -24
- package/es/index-DB3YcEiT.mjs +0 -39
- package/es/index-DcyXbsRZ.mjs +0 -43
- package/es/index-hRI5WRPs.mjs +0 -45
- package/es/index-nTep9Ubc.mjs +0 -34
- package/es/useCurrentPageId-C1KnE1O3.mjs +0 -17
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
2
|
var T = (e, n, t) => n in e ? R(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
|
|
3
3
|
var b = (e, n, t) => T(e, typeof n != "symbol" ? n + "" : n, t);
|
|
4
|
-
import { b as O, u as k, I as x, R as F } from "./index-
|
|
5
|
-
import "
|
|
4
|
+
import { b as O, u as k, I as x, R as F } from "./index-BuUTG4Rv.mjs";
|
|
5
|
+
import "localforage";
|
|
6
6
|
import N, { useEffect as y, useMemo as M, useRef as w, useState as _, useCallback as z } from "react";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "
|
|
11
|
-
import
|
|
12
|
-
import
|
|
8
|
+
import "react-dom/client";
|
|
9
|
+
import { message as G } from "antd";
|
|
10
|
+
import "driver.js";
|
|
11
|
+
import "driver.js/dist/driver.css";
|
|
12
|
+
import "lodash-es";
|
|
13
|
+
import { jsxs as U, jsx as S } from "react/jsx-runtime";
|
|
14
|
+
import "ahooks";
|
|
15
|
+
import Z from "umi-request";
|
|
13
16
|
import { u as j } from "./useListenRef-B01dENv0.mjs";
|
|
14
|
-
import { message as Z } from "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/antd@4.24.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/es/index.js";
|
|
15
17
|
import { u as Q } from "./useEffectOnce-l5sUTCBG.mjs";
|
|
16
|
-
import { u as V } from "./useCurrentPageId-
|
|
17
|
-
import I from "
|
|
18
|
-
import "
|
|
18
|
+
import { u as V } from "./useCurrentPageId-DkPUSvWz.mjs";
|
|
19
|
+
import I from "hotkeys-js";
|
|
20
|
+
import "dayjs";
|
|
19
21
|
function X(e) {
|
|
20
22
|
return e.button == 0;
|
|
21
23
|
}
|
|
22
|
-
function
|
|
24
|
+
function $e(e) {
|
|
23
25
|
return e.button == 2;
|
|
24
26
|
}
|
|
25
27
|
function W(e) {
|
|
@@ -28,7 +30,7 @@ function W(e) {
|
|
|
28
30
|
function B(e) {
|
|
29
31
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
30
32
|
}
|
|
31
|
-
function
|
|
33
|
+
function Oe(e) {
|
|
32
34
|
return typeof e == "object" && !Array.isArray(e) && !!e;
|
|
33
35
|
}
|
|
34
36
|
function q(e) {
|
|
@@ -55,13 +57,13 @@ function $(e, n) {
|
|
|
55
57
|
};
|
|
56
58
|
}, []);
|
|
57
59
|
}
|
|
58
|
-
function
|
|
60
|
+
function je() {
|
|
59
61
|
return O((e) => e.componentNodes);
|
|
60
62
|
}
|
|
61
63
|
function J(e) {
|
|
62
64
|
return O((n) => e ? e(n.config) : n.config);
|
|
63
65
|
}
|
|
64
|
-
function
|
|
66
|
+
function qe(e) {
|
|
65
67
|
const n = M(() => e, []), { engine: t } = k();
|
|
66
68
|
return y(() => (t.instance.add(n), () => {
|
|
67
69
|
t.instance.delete(n.id);
|
|
@@ -92,7 +94,7 @@ class K {
|
|
|
92
94
|
// 立刻请求一次
|
|
93
95
|
async request(n, t, s) {
|
|
94
96
|
const r = t || this.requestConfig;
|
|
95
|
-
return r != null && r.url ?
|
|
97
|
+
return r != null && r.url ? Z(`${(r == null ? void 0 : r.url) || ""}`, {
|
|
96
98
|
...s,
|
|
97
99
|
method: `${(r == null ? void 0 : r.method) || "get"}`,
|
|
98
100
|
params: n
|
|
@@ -109,7 +111,7 @@ class K {
|
|
|
109
111
|
};
|
|
110
112
|
}
|
|
111
113
|
}
|
|
112
|
-
function
|
|
114
|
+
function Ae(e) {
|
|
113
115
|
const { dataSourceType: n = "static" } = e, t = j(n === "static"), s = w(), [r, a] = _(), f = z(() => {
|
|
114
116
|
var u;
|
|
115
117
|
return s.current || (s.current = new K(e.request), (u = s.current) == null || u.onChangeDataSource((h) => a(h))), s.current;
|
|
@@ -188,7 +190,7 @@ function se(e, n) {
|
|
|
188
190
|
a && a.forEach((h) => {
|
|
189
191
|
const l = e.componentNode.get(h.id);
|
|
190
192
|
if (!l) {
|
|
191
|
-
|
|
193
|
+
G.error("[bigScreen]: target componentNode not exist.");
|
|
192
194
|
return;
|
|
193
195
|
}
|
|
194
196
|
h.opts.forEach((g) => {
|
|
@@ -210,7 +212,7 @@ function se(e, n) {
|
|
|
210
212
|
});
|
|
211
213
|
};
|
|
212
214
|
}
|
|
213
|
-
function
|
|
215
|
+
function Re(e) {
|
|
214
216
|
const { engine: n } = k();
|
|
215
217
|
return M(() => se(n, e), []);
|
|
216
218
|
}
|
|
@@ -226,11 +228,11 @@ function re(e, n) {
|
|
|
226
228
|
}, []);
|
|
227
229
|
};
|
|
228
230
|
}
|
|
229
|
-
function
|
|
231
|
+
function Te(e) {
|
|
230
232
|
const { engine: n } = k();
|
|
231
233
|
return M(() => re(n, e), []);
|
|
232
234
|
}
|
|
233
|
-
function
|
|
235
|
+
function Fe() {
|
|
234
236
|
const [e, n] = _([]), { engine: t } = k();
|
|
235
237
|
return Q(() => (n(t.component.getAllPackage()), t.component.onPackageChange((s) => {
|
|
236
238
|
n(s);
|
|
@@ -436,12 +438,12 @@ function ge(e) {
|
|
|
436
438
|
l.current.x = e.offsetX,
|
|
437
439
|
l.current.y = e.offsetY
|
|
438
440
|
);
|
|
439
|
-
}, [e.offsetX, e.offsetY]), /* @__PURE__ */
|
|
441
|
+
}, [e.offsetX, e.offsetY]), /* @__PURE__ */ U("div", { className: L.infiniteCanvas, ref: f, style: e == null ? void 0 : e.style, children: [
|
|
440
442
|
/* @__PURE__ */ S("div", { className: L.infiniteCanvas_inner, ref: d, children: e == null ? void 0 : e.children }),
|
|
441
443
|
/* @__PURE__ */ S("div", { className: L.infiniteCanvas_mask, ref: u })
|
|
442
444
|
] });
|
|
443
445
|
}
|
|
444
|
-
const
|
|
446
|
+
const Ne = N.forwardRef((e, n) => {
|
|
445
447
|
const { options: t } = ae() || {}, { engine: s } = k(), r = J(), a = /* @__PURE__ */ S(
|
|
446
448
|
"div",
|
|
447
449
|
{
|
|
@@ -483,18 +485,18 @@ const Te = N.forwardRef((e, n) => {
|
|
|
483
485
|
);
|
|
484
486
|
});
|
|
485
487
|
export {
|
|
486
|
-
|
|
488
|
+
Ne as P,
|
|
487
489
|
$ as a,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
490
|
+
je as b,
|
|
491
|
+
Fe as c,
|
|
492
|
+
Ae as d,
|
|
493
|
+
Re as e,
|
|
494
|
+
Te as f,
|
|
493
495
|
E as g,
|
|
494
|
-
|
|
496
|
+
qe as h,
|
|
495
497
|
X as i,
|
|
496
|
-
|
|
497
|
-
|
|
498
|
+
$e as j,
|
|
499
|
+
Oe as k,
|
|
498
500
|
ae as l,
|
|
499
501
|
he as s,
|
|
500
502
|
J as u
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as Q, jsx as b } from "
|
|
1
|
+
import { jsxs as Q, jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { useState as S } from "react";
|
|
3
|
-
import { Select as M } from "
|
|
4
|
-
import { useDebounceEffect as X, useUpdateEffect as V } from "
|
|
3
|
+
import { Select as M } from "antd";
|
|
4
|
+
import { useDebounceEffect as X, useUpdateEffect as V } from "ahooks";
|
|
5
5
|
import { u as Y } from "./useEffectOnce-l5sUTCBG.mjs";
|
|
6
|
-
import { i as Z } from "./index-
|
|
7
|
-
import "
|
|
6
|
+
import { i as Z } from "./index-BuUTG4Rv.mjs";
|
|
7
|
+
import "react-dom/client";
|
|
8
8
|
const q = (e, l) => {
|
|
9
9
|
var r, f, d;
|
|
10
10
|
return (d = (r = (l == null ? void 0 : l.children) || "") == null ? void 0 : r.toLowerCase) == null ? void 0 : d.call(r).includes((f = e == null ? void 0 : e.toLowerCase) == null ? void 0 : f.call(e));
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { jsx as d, jsxs as h, Fragment as
|
|
2
|
-
import { n as
|
|
3
|
-
import "
|
|
1
|
+
import { jsx as d, jsxs as h, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { n as u } from "./index-BuUTG4Rv.mjs";
|
|
3
|
+
import "localforage";
|
|
4
4
|
import { useMemo as v } from "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
6
|
+
import "react-dom/client";
|
|
7
|
+
import "antd";
|
|
8
|
+
import "driver.js";
|
|
9
|
+
import "driver.js/dist/driver.css";
|
|
10
|
+
import "lodash-es";
|
|
11
|
+
import "ahooks";
|
|
12
|
+
import { u as f, s as I } from "./selectPage-BTdc0EhU.mjs";
|
|
13
|
+
import { u as L } from "./useCurrentPageId-DkPUSvWz.mjs";
|
|
14
|
+
import S from "classnames";
|
|
15
|
+
import "hotkeys-js";
|
|
16
|
+
import "dayjs";
|
|
14
17
|
const z = "_navLine_mnnlz_59", C = "_navLine_inner_mnnlz_64", b = "_navItem_mnnlz_68", x = "_navItem_selected_mnnlz_89", K = "_navItem_last_mnnlz_92", o = {
|
|
15
18
|
navLine: z,
|
|
16
19
|
navLine_inner: C,
|
|
@@ -40,7 +43,7 @@ function _(t) {
|
|
|
40
43
|
l == null ? void 0 : l.value
|
|
41
44
|
);
|
|
42
45
|
}) });
|
|
43
|
-
return /* @__PURE__ */ h(
|
|
46
|
+
return /* @__PURE__ */ h(m, { children: [
|
|
44
47
|
/* @__PURE__ */ d("div", { className: o.navLine, children: a }),
|
|
45
48
|
!!(e != null && e.length) && /* @__PURE__ */ d(_, { list: e, selectedKeys: c.slice(1), onSelect: t == null ? void 0 : t.onSelect })
|
|
46
49
|
] });
|
|
@@ -74,7 +77,7 @@ function w(t, s = {}) {
|
|
|
74
77
|
c.push(a);
|
|
75
78
|
}), { tree: c, treeMap: s };
|
|
76
79
|
}
|
|
77
|
-
const
|
|
80
|
+
const U = u((t) => {
|
|
78
81
|
const s = f(), c = L(), { tree: n, treeMap: e } = v(() => w(s), [s]), a = v(
|
|
79
82
|
() => P(c, e),
|
|
80
83
|
[c, e]
|
|
@@ -91,5 +94,5 @@ const O = m((t) => {
|
|
|
91
94
|
return /* @__PURE__ */ d("div", { style: { width: t == null ? void 0 : t.width, height: t == null ? void 0 : t.height }, children: l });
|
|
92
95
|
});
|
|
93
96
|
export {
|
|
94
|
-
|
|
97
|
+
U as default
|
|
95
98
|
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { n as
|
|
3
|
-
import "
|
|
1
|
+
import { jsxs as g, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { n as a } from "./index-BuUTG4Rv.mjs";
|
|
3
|
+
import "localforage";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import "react-dom/client";
|
|
7
|
+
import "antd";
|
|
8
|
+
import "driver.js";
|
|
9
|
+
import "driver.js/dist/driver.css";
|
|
10
|
+
import "lodash-es";
|
|
11
|
+
import "ahooks";
|
|
12
|
+
import { DEFAULT_OPTIONS as m } from "./attributes-DygyEbMZ.mjs";
|
|
13
|
+
const i = a((l) => {
|
|
14
|
+
const { options: e, width: _, height: t } = l;
|
|
15
|
+
return /* @__PURE__ */ g(
|
|
13
16
|
"div",
|
|
14
17
|
{
|
|
15
18
|
style: {
|
|
16
19
|
width: _,
|
|
17
|
-
height:
|
|
20
|
+
height: t
|
|
18
21
|
},
|
|
19
22
|
children: [
|
|
20
|
-
(e == null ? void 0 : e.value_1) && /* @__PURE__ */
|
|
23
|
+
(e == null ? void 0 : e.value_1) && /* @__PURE__ */ r(
|
|
21
24
|
"div",
|
|
22
25
|
{
|
|
23
26
|
style: {
|
|
@@ -35,7 +38,7 @@ const k = t((r) => {
|
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
),
|
|
38
|
-
(e == null ? void 0 : e.value_2) && /* @__PURE__ */
|
|
41
|
+
(e == null ? void 0 : e.value_2) && /* @__PURE__ */ r(
|
|
39
42
|
"div",
|
|
40
43
|
{
|
|
41
44
|
style: {
|
|
@@ -56,7 +59,7 @@ const k = t((r) => {
|
|
|
56
59
|
]
|
|
57
60
|
}
|
|
58
61
|
);
|
|
59
|
-
},
|
|
62
|
+
}, m);
|
|
60
63
|
export {
|
|
61
|
-
|
|
64
|
+
i as default
|
|
62
65
|
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { jsx as s, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import g, { useState as w, useMemo as m, useEffect as y, useRef as l, Suspense as C } from "react";
|
|
3
|
+
import { u as R } from "./index-BuUTG4Rv.mjs";
|
|
4
|
+
import "localforage";
|
|
5
|
+
import "react-dom";
|
|
6
|
+
import "react-dom/client";
|
|
7
|
+
import "antd";
|
|
8
|
+
import "driver.js";
|
|
9
|
+
import "driver.js/dist/driver.css";
|
|
10
|
+
import "lodash-es";
|
|
11
|
+
import { d as S, e as v, f as x, h as N, u as H, l as q, c as B, b as P, P as _ } from "./index-DxbswiWm.mjs";
|
|
12
|
+
import "ahooks";
|
|
13
|
+
import $ from "classnames";
|
|
14
|
+
import { u as b } from "./useResizeDom-B6mM4jrh.mjs";
|
|
15
|
+
function k(e) {
|
|
16
|
+
const [n, t] = w(e == null ? void 0 : e.componentNode), c = (n == null ? void 0 : n.show) ?? !0, { engine: r } = R(), o = m(() => r.component.get(n.cId), [n == null ? void 0 : n.cId, e == null ? void 0 : e.packages]);
|
|
17
|
+
return y(() => r.componentNode.onChange(n.id, ({ payload: i }) => {
|
|
18
|
+
t({ ...i });
|
|
19
|
+
}), []), o && c ? /* @__PURE__ */ s(E, { componentNode: n, component: o }) : /* @__PURE__ */ s(f, {});
|
|
20
|
+
}
|
|
21
|
+
function E(e) {
|
|
22
|
+
const { component: n, componentNode: t } = e, c = l(), r = l(null), { dataSource: o, requestInstance: i } = S(t), u = v(t.id), a = x(t.id);
|
|
23
|
+
return N({
|
|
24
|
+
id: t.id,
|
|
25
|
+
// 经过实例
|
|
26
|
+
handleHover() {
|
|
27
|
+
},
|
|
28
|
+
// 离开实例
|
|
29
|
+
handleUnHover() {
|
|
30
|
+
},
|
|
31
|
+
// 选中实例样式
|
|
32
|
+
handleSelected() {
|
|
33
|
+
},
|
|
34
|
+
// 取消选中实例样式
|
|
35
|
+
handleUnSelected() {
|
|
36
|
+
},
|
|
37
|
+
// 获取容器dom
|
|
38
|
+
getContainerDom() {
|
|
39
|
+
return r.current;
|
|
40
|
+
},
|
|
41
|
+
// 获取对应的 componentNode
|
|
42
|
+
getComponentNode() {
|
|
43
|
+
return c.current;
|
|
44
|
+
},
|
|
45
|
+
// 获取实例的 component
|
|
46
|
+
getComponent() {
|
|
47
|
+
return n;
|
|
48
|
+
},
|
|
49
|
+
// 重新载入request配置
|
|
50
|
+
reloadRequest() {
|
|
51
|
+
i.reload();
|
|
52
|
+
},
|
|
53
|
+
// 立刻请求一次
|
|
54
|
+
request: (d, h) => i.request(d, h)
|
|
55
|
+
}), /* @__PURE__ */ s(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
ref: r,
|
|
59
|
+
style: {
|
|
60
|
+
position: "absolute",
|
|
61
|
+
left: t.x,
|
|
62
|
+
top: t.y,
|
|
63
|
+
width: t.width,
|
|
64
|
+
height: t.height,
|
|
65
|
+
zIndex: t.level
|
|
66
|
+
},
|
|
67
|
+
children: /* @__PURE__ */ s(C, { children: /* @__PURE__ */ s(
|
|
68
|
+
n.component,
|
|
69
|
+
{
|
|
70
|
+
handleTrigger: u,
|
|
71
|
+
useExpose: a,
|
|
72
|
+
dataSource: o,
|
|
73
|
+
componentNode: t,
|
|
74
|
+
options: t.options,
|
|
75
|
+
width: t.width,
|
|
76
|
+
height: t.height
|
|
77
|
+
}
|
|
78
|
+
) })
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
const I = "_fitScreenBody_1qzud_59", D = {
|
|
83
|
+
fitScreenBody: I
|
|
84
|
+
};
|
|
85
|
+
function z(e) {
|
|
86
|
+
const { dw: n = 1920, dh: t = 1080 } = e, c = l(null), r = l(null), o = m(() => n / t, [n, t]);
|
|
87
|
+
return b(c, () => {
|
|
88
|
+
if (!c.current || !r.current)
|
|
89
|
+
return;
|
|
90
|
+
const i = c.current.getBoundingClientRect();
|
|
91
|
+
if (i.width / i.height > o) {
|
|
92
|
+
const a = i.height / t, d = a * n, h = (i.width - d) / 2;
|
|
93
|
+
r.current.style.transform = `scale(${a}) translate3d(${h / a}px, 0, 0)`;
|
|
94
|
+
} else {
|
|
95
|
+
const a = i.width / n;
|
|
96
|
+
r.current.style.transform = `scale(${a})`;
|
|
97
|
+
}
|
|
98
|
+
r.current.style.width = `${n}px`, r.current.style.height = `${t}px`;
|
|
99
|
+
}), /* @__PURE__ */ s("div", { className: e == null ? void 0 : e.className, ref: c, style: e == null ? void 0 : e.style, children: /* @__PURE__ */ s(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: $(e == null ? void 0 : e.bodyClassName, D.fitScreenBody),
|
|
103
|
+
style: e == null ? void 0 : e.bodyStyle,
|
|
104
|
+
ref: r,
|
|
105
|
+
children: e == null ? void 0 : e.children
|
|
106
|
+
}
|
|
107
|
+
) });
|
|
108
|
+
}
|
|
109
|
+
const U = "_preview_x6h89_59", j = {
|
|
110
|
+
preview: U
|
|
111
|
+
};
|
|
112
|
+
function Z(e) {
|
|
113
|
+
const { engine: n, json: t } = e, c = H(), { options: r } = q() || {}, o = B(), i = P(), u = m(() => {
|
|
114
|
+
var a;
|
|
115
|
+
return o.length ? (a = i == null ? void 0 : i.map) == null ? void 0 : a.call(i, (d) => /* @__PURE__ */ s(
|
|
116
|
+
k,
|
|
117
|
+
{
|
|
118
|
+
componentNode: d,
|
|
119
|
+
packages: o
|
|
120
|
+
},
|
|
121
|
+
d == null ? void 0 : d.id
|
|
122
|
+
)) : [];
|
|
123
|
+
}, [i, o]);
|
|
124
|
+
return g.useEffect(() => {
|
|
125
|
+
n.loadJSON(t).then(() => {
|
|
126
|
+
var a;
|
|
127
|
+
(a = e == null ? void 0 : e.onJSONLoad) == null || a.call(e);
|
|
128
|
+
});
|
|
129
|
+
}, []), /* @__PURE__ */ s(
|
|
130
|
+
z,
|
|
131
|
+
{
|
|
132
|
+
className: j.preview,
|
|
133
|
+
dw: (c == null ? void 0 : c.width) || 1920,
|
|
134
|
+
dh: (c == null ? void 0 : c.height) || 1080,
|
|
135
|
+
style: { background: r == null ? void 0 : r.whiteBoardColor },
|
|
136
|
+
children: /* @__PURE__ */ s(_, { preview: !0, style: { width: "100%", height: "100%" }, children: u })
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
Z as default
|
|
142
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Image as i } from "antd";
|
|
3
|
+
import { n as p } from "./index-BuUTG4Rv.mjs";
|
|
4
|
+
import "localforage";
|
|
5
|
+
import "react";
|
|
6
|
+
import "react-dom";
|
|
7
|
+
import "react-dom/client";
|
|
8
|
+
import "driver.js";
|
|
9
|
+
import "driver.js/dist/driver.css";
|
|
10
|
+
import "lodash-es";
|
|
11
|
+
import "ahooks";
|
|
12
|
+
import { DEFAULT_OPTIONS as n } from "./attributes-BwADICpR.mjs";
|
|
13
|
+
const E = p((t) => {
|
|
14
|
+
const { options: r, width: e, height: m } = t;
|
|
15
|
+
return /* @__PURE__ */ o(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
src: r == null ? void 0 : r.src,
|
|
19
|
+
style: { width: e, height: m, pointerEvents: "none" },
|
|
20
|
+
preview: !!(r != null && r.enablePreview)
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}, n);
|
|
24
|
+
export {
|
|
25
|
+
E as default
|
|
26
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as s } from "
|
|
2
|
-
import { Empty as i } from "
|
|
3
|
-
import m from "
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Empty as i } from "antd";
|
|
3
|
+
import m from "classnames";
|
|
4
4
|
function l(y, n) {
|
|
5
5
|
return !// 左侧
|
|
6
6
|
(y.x2 < n.x1 || // 右侧
|
package/es/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import { q as
|
|
3
|
-
import "
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import { q as m, R as e, p as E, s as f } from "./index-BuUTG4Rv.mjs";
|
|
3
|
+
import "react-dom/client";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
|
+
import "antd";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
m as EXAMPLE,
|
|
8
9
|
e as RbsEngine,
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
E as defaultPackage,
|
|
11
|
+
f as startDriver
|
|
11
12
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { b as i, D as m } from "./index-BuUTG4Rv.mjs";
|
|
2
|
+
import "localforage";
|
|
3
|
+
import "react";
|
|
4
|
+
import "react-dom";
|
|
5
|
+
import "react-dom/client";
|
|
6
|
+
import "antd";
|
|
7
|
+
import "driver.js";
|
|
8
|
+
import "driver.js/dist/driver.css";
|
|
9
|
+
import "lodash-es";
|
|
10
|
+
import "react/jsx-runtime";
|
|
11
|
+
import "ahooks";
|
|
12
|
+
function a() {
|
|
13
|
+
return i((r) => {
|
|
14
|
+
var o;
|
|
15
|
+
return ((o = r == null ? void 0 : r.config) == null ? void 0 : o.currentPageId) || m.id;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
a as u
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { o as e } from "./index-Bwm3aMXZ.mjs";
|
|
2
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/localforage@1.10.0/node_modules/localforage/dist/localforage.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js";
|
|
6
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.js.mjs";
|
|
7
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.css";
|
|
8
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
9
|
-
const t = {
|
|
10
|
-
color: "#2EDCF7",
|
|
11
|
-
value: "一段文字",
|
|
12
|
-
fontSize: 20,
|
|
13
|
-
lineHeight: 32
|
|
14
|
-
}, c = e(
|
|
15
|
-
[
|
|
16
|
-
{ key: "value", label: "内容", component: "textarea" },
|
|
17
|
-
{ key: "fontSize", label: "字号", component: "inputNumber", options: { min: 8 } },
|
|
18
|
-
{
|
|
19
|
-
key: "lineHeight",
|
|
20
|
-
label: "行高",
|
|
21
|
-
labelTip: "单位px",
|
|
22
|
-
component: "inputNumber",
|
|
23
|
-
options: { min: 8 }
|
|
24
|
-
},
|
|
25
|
-
{ key: "fontWeight", label: "字重", component: "fontWeightSelect" },
|
|
26
|
-
{
|
|
27
|
-
key: "color",
|
|
28
|
-
label: "颜色",
|
|
29
|
-
component: "colorPicker",
|
|
30
|
-
options: {
|
|
31
|
-
reset: !0
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
t
|
|
36
|
-
);
|
|
37
|
-
export {
|
|
38
|
-
t as DEFAULT_OPTIONS,
|
|
39
|
-
c as default
|
|
40
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { o as t } from "./index-Bwm3aMXZ.mjs";
|
|
2
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/localforage@1.10.0/node_modules/localforage/dist/localforage.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js";
|
|
6
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.js.mjs";
|
|
7
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.css";
|
|
8
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
9
|
-
const o = {
|
|
10
|
-
src: "https://ts3.cn.mm.bing.net/th?id=OIP-C.3r1vguZyWFUJ80A2Nf2k3AHaEK&w=333&h=187&c=8&rs=1&qlt=90&o=6&dpr=2&pid=3.1&rm=2"
|
|
11
|
-
}, c = t(
|
|
12
|
-
[
|
|
13
|
-
{
|
|
14
|
-
key: "src",
|
|
15
|
-
label: "地址",
|
|
16
|
-
component: "textarea",
|
|
17
|
-
options: {
|
|
18
|
-
autoSize: {
|
|
19
|
-
minRows: 5
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
key: "enablePreview",
|
|
25
|
-
label: "启用预览",
|
|
26
|
-
component: "checkbox"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
o
|
|
30
|
-
);
|
|
31
|
-
export {
|
|
32
|
-
o as DEFAULT_OPTIONS,
|
|
33
|
-
c as default
|
|
34
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { o as e } from "./index-Bwm3aMXZ.mjs";
|
|
2
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/localforage@1.10.0/node_modules/localforage/dist/localforage.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import "react-dom";
|
|
5
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js";
|
|
6
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.js.mjs";
|
|
7
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/driver.js@1.3.6/node_modules/driver.js/dist/driver.css";
|
|
8
|
-
import "/Users/tangjiahui/tjh/react-big-screen/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js";
|
|
9
|
-
const t = {
|
|
10
|
-
color: "#F8E71C",
|
|
11
|
-
fontSize: 20,
|
|
12
|
-
lineHeight: 22
|
|
13
|
-
}, a = e(
|
|
14
|
-
[
|
|
15
|
-
{
|
|
16
|
-
key: "color",
|
|
17
|
-
label: "字色",
|
|
18
|
-
component: "colorPicker",
|
|
19
|
-
options: {
|
|
20
|
-
reset: !0,
|
|
21
|
-
resetColor: t.color
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
key: "fontSize",
|
|
26
|
-
label: "字号",
|
|
27
|
-
component: "inputNumber"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
key: "lineHeight",
|
|
31
|
-
label: "行高",
|
|
32
|
-
labelTip: "单位:px",
|
|
33
|
-
component: "inputNumber"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
key: "textAlign",
|
|
37
|
-
label: "布局",
|
|
38
|
-
component: "textAlignSelect"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
t
|
|
42
|
-
);
|
|
43
|
-
export {
|
|
44
|
-
t as DEFAULT_OPTIONS,
|
|
45
|
-
a as default
|
|
46
|
-
};
|