@sheetxl/react 0.8.0-beta.11 → 0.8.0-beta.12
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/browser/esm/{94dxo1A-z8lgiiGw.mjs → B4mT3G7GHwgDYFGP.mjs} +2 -2
- package/browser/esm/{B26QVfjer2oY2ewK.mjs → BDlpRkuBok0Uu4Hn.mjs} +1 -1
- package/browser/esm/{CRi6DQ3UXmPEv-w_.mjs → BR-AiOwuQlYh5-tr.mjs} +147 -146
- package/browser/esm/{ClAtIfYbsUPA073B.mjs → BapujiblfiXDlu67.mjs} +1 -1
- package/browser/esm/{D2u6THGErqw64KQI.mjs → CSFORKZ8zrVL_Y0w.mjs} +1 -1
- package/browser/esm/{Bl2BFCQ00fotauKB.mjs → CUekkfE6uwwsdQpc.mjs} +1 -1
- package/browser/esm/{DgL7Dy-Lqcr1TvW6.mjs → C_LUq-BnguetvGZz.mjs} +4851 -4818
- package/browser/esm/{BQYS2Yf-EAV_tBLr.mjs → Ck1LbcsdSfKNi6xq.mjs} +1 -1
- package/browser/esm/{1-LEUre9ZLG0OYYB.mjs → Cslk_qRdBSuJIi1O.mjs} +6 -6
- package/browser/esm/CtGhA0kS2MCfEsHN.mjs +262 -0
- package/browser/esm/{BegvsXeRs7e-9t8k.mjs → D22NJmTiky4NL8tM.mjs} +1 -1
- package/browser/esm/{B93LSmhnvkxNXTq-.mjs → D2GydDzPuvIjdpok.mjs} +1 -1
- package/browser/esm/{CzRIbc-Lk__VMLKM.mjs → DGG1auUKsjFbAazu.mjs} +3 -3
- package/browser/esm/{Bos4Rkp8UTF7QXUB.mjs → DN3lqq95KY0K6f1x.mjs} +1 -1
- package/browser/esm/{Dnh1kpz3v1JKtRD_.mjs → D_usN3pWuCJU2GN-.mjs} +2 -2
- package/browser/esm/{cQ6xdPFkEcuDlNTN.mjs → DhYQRc8L2kALmFNz.mjs} +1 -1
- package/browser/esm/{DS66lAIM-9M-YoZQ.mjs → DxEczXCHTerDemDP.mjs} +112 -104
- package/browser/esm/{C1pc9F4Rt2C5FKUo.mjs → LBQDhVhz7S7i6a8i.mjs} +1 -1
- package/browser/esm/{CPnnESfZz2jjJd82.mjs → ZoS0cpNEBcv6p-Z1.mjs} +1 -1
- package/browser/esm/{DMdsMPT0fWBbTkNn.mjs → _6Sb6ElRcZftxMNh.mjs} +1 -1
- package/browser/esm/chart.mjs +28 -27
- package/browser/esm/control.mjs +2 -2
- package/browser/esm/group.mjs +3 -3
- package/browser/esm/index.mjs +5750 -5089
- package/browser/esm/note.mjs +4 -4
- package/browser/esm/picture.mjs +41 -41
- package/browser/esm/shape.mjs +2 -2
- package/browser/esm/slicer.mjs +4 -4
- package/node/esm/{BaRfst1euuhquupX.mjs → Apcuz4_QtBHt7G47.mjs} +1 -1
- package/node/esm/{b-XRVRI1fYQQMkTC.mjs → Bi2Jwc0zpweaNzKc.mjs} +525 -492
- package/node/esm/{D_pCpfdQowV_4Aje.mjs → C0KLMCRb3sbd5Q20.mjs} +5 -5
- package/node/esm/{sigD1UFqvPlWUw_9.mjs → CH1DVfFhjdd_3pw1.mjs} +2 -2
- package/node/esm/{Be9c1GwQkPo8Piuh.mjs → CNOLkUDURBElaaIf.mjs} +1 -1
- package/node/esm/{BiaDWnN3tT7neoRL.mjs → CalVk3o4-kX79s3v.mjs} +1 -1
- package/node/esm/{DgGEHydEjD7nfsDB.mjs → Cp1DuCae46eQKzWy.mjs} +1 -1
- package/node/esm/{BlxXufqBBg1PtsXd.mjs → CzN6c6KyxVmNvayz.mjs} +1 -1
- package/node/esm/{6zApGj9DozhFy-bx.mjs → DKqdv5JubgVaq-g9.mjs} +1 -1
- package/node/esm/{umljAT66yb3_rURh.mjs → DWkPWuf5ZrLRMixG.mjs} +118 -110
- package/node/esm/{JiQGhLkoL8CJpVvA.mjs → DXiNwr6ZnXBe7TlG.mjs} +1 -1
- package/node/esm/{DTMTIrYIK1eZswsM.mjs → DayGI0Bt57FDNbVF.mjs} +1 -1
- package/node/esm/{C_SNx7TlFEcwbYjx.mjs → DyetXBW7vFLJWB22.mjs} +1 -1
- package/node/esm/{Dj5FM7_-YWhCtCCt.mjs → MWges5ywL3aEdChp.mjs} +1 -1
- package/node/esm/{BMVK5plvmBOAIlxP.mjs → T5lfCrudsUnOTxEn.mjs} +1 -1
- package/node/esm/YB_qExw23Ci4nMYy.mjs +263 -0
- package/node/esm/{DxQZmb-j4NLUO9Af.mjs → bRD1KCpSpAYTEs50.mjs} +1 -1
- package/node/esm/chart.mjs +26 -25
- package/node/esm/control.mjs +2 -2
- package/node/esm/group.mjs +3 -3
- package/node/esm/{gpD-9LDW92phhoma.mjs → iL9jKJcnED6oi0B4.mjs} +1 -1
- package/node/esm/index.mjs +7658 -6996
- package/node/esm/note.mjs +4 -4
- package/node/esm/picture.mjs +41 -41
- package/node/esm/shape.mjs +50 -49
- package/node/esm/slicer.mjs +4 -4
- package/package.json +7 -7
- package/resources/locales/de/sheet.cmd.json +21 -0
- package/resources/locales/de/workbook.cmd.json +6 -0
- package/resources/locales/en/sheet.cmd.json +21 -0
- package/resources/locales/en/ui.msg.json +2 -0
- package/resources/locales/en/workbook.cmd.json +6 -0
- package/types/src/border/useBorders.d.ts +2 -2
- package/types/src/cell/CellCheckboxRenderer.d.ts +20 -0
- package/types/src/cell/CellContent.d.ts +68 -0
- package/types/src/cell/CellControlContext.d.ts +37 -0
- package/types/src/cell/{FormulaCellRenderer.d.ts → CellFormulaRenderer.d.ts} +5 -5
- package/types/src/cell/CellImageRenderer.d.ts +11 -0
- package/types/src/cell/CellRenderers.d.ts +190 -0
- package/types/src/cell/{SheetCellRenderer.d.ts → CellTextRenderer.d.ts} +9 -6
- package/types/src/cell/ColumnButton.d.ts +3 -3
- package/types/src/cell/OutlineButton.d.ts +4 -4
- package/types/src/cell/SheetHeaderRenderer.d.ts +1 -1
- package/types/src/cell/index.d.ts +8 -2
- package/types/src/cell/useFormulaViewAnchor.d.ts +1 -1
- package/types/src/cell/useInsertableCellControls.d.ts +25 -0
- package/types/src/chart/ChartEditor.d.ts +2 -0
- package/types/src/chart/ChartElement.d.ts +14 -3
- package/types/src/chart/paint/_mode.d.ts +6 -0
- package/types/src/chart/paint/echarts.d.ts +5 -2
- package/types/src/chart/paint/kinds/ChartPaintKind.d.ts +8 -0
- package/types/src/chart/paint/toEChartsOption.d.ts +11 -0
- package/types/src/editableLabel/EditableLabel.d.ts +3 -1
- package/types/src/editor/SheetReferenceHeaderLayer.d.ts +1 -1
- package/types/src/editor/useFormulaHints.d.ts +1 -1
- package/types/src/layer/CellErrorLayer.d.ts +3 -2
- package/types/src/layer/CellIndicatorLayer.d.ts +31 -0
- package/types/src/layer/HeaderSelectionLayer.d.ts +4 -4
- package/types/src/layer/HyperlinkLayer.d.ts +8 -5
- package/types/src/layer/ProtectionLayer.d.ts +1 -2
- package/types/src/layer/SheetCellLayer.d.ts +11 -4
- package/types/src/layer/SheetMovableLayer.d.ts +2 -1
- package/types/src/layer/SheetOutlineLayer.d.ts +1 -1
- package/types/src/layer/TableLayer.d.ts +1 -1
- package/types/src/layer/TableToolbar.d.ts +1 -1
- package/types/src/layer/ValidationPromptLayer.d.ts +16 -4
- package/types/src/layer/index.d.ts +1 -0
- package/types/src/listener/useRangeListener.d.ts +13 -7
- package/types/src/movable/DefaultMovable.d.ts +1 -1
- package/types/src/movable/MovableControl.d.ts +3 -1
- package/types/src/movable/MovableFrame.d.ts +2 -1
- package/types/src/movable/MovableLayer.d.ts +6 -3
- package/types/src/sheet/ISheetHeaderElement.d.ts +2 -2
- package/types/src/sheet/IWorksheetElement.d.ts +21 -22
- package/types/src/sheet/SheetCommandProvider.d.ts +3 -0
- package/types/src/sheet/SheetOutlineElement.d.ts +2 -2
- package/types/src/sheet/SheetPanels.d.ts +2 -2
- package/types/src/tabStrip/Sortable.d.ts +5 -5
- package/types/src/tabStrip/TabStrip.d.ts +6 -6
- package/types/src/tabStrip/TabStripItem.d.ts +15 -13
- package/types/src/taskPane/CellControlPane.d.ts +17 -0
- package/types/src/taskPane/index.d.ts +1 -0
- package/types/src/taskPane/useTaskPane.d.ts +6 -3
- package/types/src/workbook/DefaultRenderers.d.ts +4 -4
- package/types/src/workbook/IWorkbookElement.d.ts +52 -20
- package/types/src/workbook/WorkbookStrip.d.ts +5 -5
- package/browser/esm/ugfE7YeZALQURDKF.mjs +0 -241
- package/node/esm/DJPgbB1X22YmhbaR.mjs +0 -242
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { n as e } from "./
|
|
7
|
+
import { n as e } from "./CUekkfE6uwwsdQpc.mjs";
|
|
8
8
|
import { ChartEditor as t } from "./chart.mjs";
|
|
9
9
|
import { jsx as n } from "react/jsx-runtime";
|
|
10
10
|
import { messageKey as r, t as i } from "@sheetxl/utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.8.0-beta.12
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { t as e } from "./
|
|
8
|
-
import { n as t } from "./
|
|
9
|
-
import { t as n } from "./
|
|
10
|
-
import { t as r } from "./
|
|
7
|
+
import { t as e } from "./LBQDhVhz7S7i6a8i.mjs";
|
|
8
|
+
import { n as t } from "./Ck1LbcsdSfKNi6xq.mjs";
|
|
9
|
+
import { t as n } from "./CSFORKZ8zrVL_Y0w.mjs";
|
|
10
|
+
import { t as r } from "./ZoS0cpNEBcv6p-Z1.mjs";
|
|
11
11
|
import { Color as i, IFill as a, IGeometry as o, IStroke as s, PaintUtils as c, ShapeStyleUtils as l } from "@sheetxl/sdk";
|
|
12
12
|
import { forwardRef as u, memo as d, useCallback as f, useEffect as p, useId as m, useMemo as h, useReducer as g, useRef as _, useState as v } from "react";
|
|
13
13
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
14
14
|
import { BufferUtils as S, messageKey as ee } from "@sheetxl/utils";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { createPortal as
|
|
18
|
-
var
|
|
15
|
+
import { useSurfaceState as te } from "@sheetxl/grid-react";
|
|
16
|
+
import { ReactUtils as ne, useImperativeElement as C } from "@sheetxl/utils-react";
|
|
17
|
+
import { createPortal as w } from "react-dom";
|
|
18
|
+
var re = 96 / 72, ie = (e, t) => {
|
|
19
19
|
if (typeof e != "string" || !e) return null;
|
|
20
20
|
try {
|
|
21
21
|
return (t ? t.parseColor(e) : new i(e))?.toCSS("adaptive") ?? null;
|
|
22
22
|
} catch {
|
|
23
23
|
return null;
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, ae = (e) => {
|
|
26
26
|
if (!e) return null;
|
|
27
27
|
switch (e.type) {
|
|
28
28
|
case a.Type.Solid: return e.color ?? null;
|
|
@@ -34,7 +34,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
34
34
|
case a.Type.Image:
|
|
35
35
|
default: return null;
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, T = (e) => Math.max(0, Math.min(1, e ?? 0)), oe = (e) => {
|
|
38
38
|
let t = e.stops ?? [];
|
|
39
39
|
if (t.length < 2) return null;
|
|
40
40
|
let n = t.length - 1, r = [];
|
|
@@ -43,7 +43,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
43
43
|
if (!a) return null;
|
|
44
44
|
let o = typeof i == "object" && typeof i.offset == "number" ? i.offset : e / n;
|
|
45
45
|
r.push({
|
|
46
|
-
offset:
|
|
46
|
+
offset: T(o),
|
|
47
47
|
color: a
|
|
48
48
|
});
|
|
49
49
|
}
|
|
@@ -53,7 +53,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
53
53
|
scaled: e.scaled ?? !0,
|
|
54
54
|
stops: r
|
|
55
55
|
};
|
|
56
|
-
let i = e.focus, o =
|
|
56
|
+
let i = e.focus, o = T(i?.left), s = T(i?.top), c = T(i?.right), l = T(i?.bottom);
|
|
57
57
|
if (o > c || s > l) return null;
|
|
58
58
|
let u = (o + c) / 2, d = (s + l) / 2, f = Math.max(u, 1 - u), p = Math.max(d, 1 - d);
|
|
59
59
|
return {
|
|
@@ -63,21 +63,21 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
63
63
|
r: Math.hypot(f, p),
|
|
64
64
|
stops: r
|
|
65
65
|
};
|
|
66
|
-
},
|
|
66
|
+
}, se = l.inheritedGroupFill, ce = /[MLQCAZ]|[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?/g, le = {
|
|
67
67
|
M: 1,
|
|
68
68
|
L: 1,
|
|
69
69
|
Q: 2,
|
|
70
70
|
C: 3,
|
|
71
71
|
A: 1,
|
|
72
72
|
Z: 0
|
|
73
|
-
},
|
|
74
|
-
let t = e.match(
|
|
73
|
+
}, ue = (e) => String(Math.round(1e5 * e) / 1e5), de = (e) => {
|
|
74
|
+
let t = e.match(ce) ?? [], n = [], r = [], i = [], a = {
|
|
75
75
|
x: 0,
|
|
76
76
|
y: 0
|
|
77
77
|
}, o = null, s = 0, c = null;
|
|
78
78
|
for (; s < t.length;) {
|
|
79
79
|
let e = t[s];
|
|
80
|
-
if (
|
|
80
|
+
if (le[e] !== void 0) c = e, s++;
|
|
81
81
|
else if (c === "M") c = "L";
|
|
82
82
|
else if (c === null || c === "Z") break;
|
|
83
83
|
if (c === "Z") {
|
|
@@ -93,7 +93,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
93
93
|
let l = c === "A" ? t.slice(s, s + 5) : void 0;
|
|
94
94
|
l && (s += 5);
|
|
95
95
|
let u = [];
|
|
96
|
-
for (let e = 0; e <
|
|
96
|
+
for (let e = 0; e < le[c]; e++) u.push({
|
|
97
97
|
x: Number(t[s++]),
|
|
98
98
|
y: Number(t[s++])
|
|
99
99
|
});
|
|
@@ -113,30 +113,30 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
113
113
|
straight: r,
|
|
114
114
|
ends: i
|
|
115
115
|
};
|
|
116
|
-
},
|
|
116
|
+
}, E = (e) => {
|
|
117
117
|
let t = [];
|
|
118
118
|
for (let n of e) {
|
|
119
|
-
let e = n.pts.map((e) => `${
|
|
119
|
+
let e = n.pts.map((e) => `${ue(e.x)} ${ue(e.y)}`).join(" ");
|
|
120
120
|
t.push(n.c === "Z" ? "Z" : `${n.c}${n.arc ? `${n.arc.join(" ")} ` : ""}${e}`);
|
|
121
121
|
}
|
|
122
122
|
return t.join(" ");
|
|
123
|
-
},
|
|
124
|
-
let a = r ? (i - e) * t.zoom : e * t.zoom, o =
|
|
123
|
+
}, D = 1e-6, O = (e, t, n, r, i) => {
|
|
124
|
+
let a = r ? (i - e) * t.zoom : e * t.zoom, o = ne.snapLineCenter(a, n, t.dpr);
|
|
125
125
|
return r ? i - o / t.zoom : o / t.zoom;
|
|
126
|
-
},
|
|
127
|
-
let r =
|
|
126
|
+
}, fe = (e, t, n) => {
|
|
127
|
+
let r = de(e), i = r.ends.map((e) => ({
|
|
128
128
|
x: e.x,
|
|
129
129
|
y: e.y
|
|
130
130
|
})), a = n * t.zoom, o = [];
|
|
131
131
|
for (let e of r.straight) {
|
|
132
|
-
let t = Math.abs(e.to.y - e.from.y) <
|
|
133
|
-
t !== Math.abs(e.to.x - e.from.x) <
|
|
132
|
+
let t = Math.abs(e.to.y - e.from.y) < D;
|
|
133
|
+
t !== Math.abs(e.to.x - e.from.x) < D && o.push({
|
|
134
134
|
seg: e,
|
|
135
135
|
level: t,
|
|
136
136
|
at: t ? e.from.y : e.from.x
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
for (let { seg: e, level: n, at: r } of o) n ? e.from.y = e.to.y =
|
|
139
|
+
for (let { seg: e, level: n, at: r } of o) n ? e.from.y = e.to.y = O(r, t, a, t.flipV, t.height) : e.from.x = e.to.x = O(r, t, a, t.flipH, t.width);
|
|
140
140
|
let s = [];
|
|
141
141
|
return r.ends.forEach((e, t) => {
|
|
142
142
|
let n = {
|
|
@@ -148,12 +148,12 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
148
148
|
by: n
|
|
149
149
|
});
|
|
150
150
|
}), {
|
|
151
|
-
d:
|
|
151
|
+
d: E(r.cmds),
|
|
152
152
|
ends: s
|
|
153
153
|
};
|
|
154
|
-
},
|
|
154
|
+
}, pe = (e, t) => {
|
|
155
155
|
if (t.length === 0) return e;
|
|
156
|
-
let n =
|
|
156
|
+
let n = de(e), r = [], i = null, a = /* @__PURE__ */ new Set(), o = () => {
|
|
157
157
|
if (!i) return;
|
|
158
158
|
let e = null, n = 1 / 0;
|
|
159
159
|
for (let r of t) {
|
|
@@ -167,20 +167,20 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
167
167
|
e.c === "M" && (o(), i = e.pts[0]);
|
|
168
168
|
for (let t of e.pts) r.push(t);
|
|
169
169
|
}
|
|
170
|
-
return o(),
|
|
171
|
-
},
|
|
170
|
+
return o(), E(n.cmds);
|
|
171
|
+
}, k = /* @__PURE__ */ new WeakMap(), me = { filter: "var(--sxl-image-filter)" }, A = (e) => {
|
|
172
172
|
let [t, n] = v(null);
|
|
173
173
|
return p(() => {
|
|
174
174
|
if (!e) return;
|
|
175
175
|
let t = !0;
|
|
176
176
|
return ((e) => {
|
|
177
|
-
let t =
|
|
177
|
+
let t = k.get(e);
|
|
178
178
|
return t || (t = (async () => {
|
|
179
179
|
let t = await e.getExternalURI();
|
|
180
180
|
if (t) return t;
|
|
181
181
|
let [n, r] = await Promise.all([e.toBuffer(), e.getType()]);
|
|
182
182
|
return `data:${r?.mime ?? "image/png"};base64,${S.arrayBufferToBase64(n)}`;
|
|
183
|
-
})(),
|
|
183
|
+
})(), k.set(e, t)), t;
|
|
184
184
|
})(e).then((r) => {
|
|
185
185
|
t && n({
|
|
186
186
|
resource: e,
|
|
@@ -223,10 +223,10 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
223
223
|
children: i
|
|
224
224
|
}, e);
|
|
225
225
|
}, M = d(({ paths: e, style: t, width: n, height: r, zoom: i, grid: a, hit: s }) => {
|
|
226
|
-
let c = m().replace(/[^A-Za-z0-9_-]/g, ""), l =
|
|
226
|
+
let c = m().replace(/[^A-Za-z0-9_-]/g, ""), l = A(t.image?.resource ?? null), u = ((e, t, n = 1) => {
|
|
227
227
|
let r = (t > 0 ? t : 1) * (n > 0 ? n : 1);
|
|
228
228
|
return Math.max(1, Math.round(Math.max(0, e || 0) * r)) / r;
|
|
229
|
-
})(t.strokeWidth, i, a?.dpr ??
|
|
229
|
+
})(t.strokeWidth, i, a?.dpr ?? ne.getDevicePixelRatio()), d = n > 0 && r > 0, f = d ? t.gradient ?? null : null, p = d ? t.strokeGradient ?? null : null, g = t.image ? l ? `url(#${c}-image)` : null : f ? `url(#${c}-fill)` : t.fill, _ = p ? `url(#${c}-stroke)` : t.stroke, v = t.stroke !== null && u > 0, S = v ? ((e, t, n) => {
|
|
230
230
|
if (!(e && t > 0)) return;
|
|
231
231
|
let r = n !== "butt", i = e.map((e, n) => {
|
|
232
232
|
let i = e * t;
|
|
@@ -241,7 +241,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
241
241
|
if (s.layer !== o.PathLayer.Stroke) continue;
|
|
242
242
|
let e = i.get(s.d);
|
|
243
243
|
if (e === void 0) {
|
|
244
|
-
let r =
|
|
244
|
+
let r = fe(s.d, t, n);
|
|
245
245
|
e = r.d, i.set(s.d, e), a.push(...r.ends);
|
|
246
246
|
}
|
|
247
247
|
r.set(s.index, e);
|
|
@@ -249,20 +249,20 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
249
249
|
for (let t of e) if (t.layer === o.PathLayer.Fill) {
|
|
250
250
|
let e = i.get(t.d);
|
|
251
251
|
e !== void 0 && r.set(t.index, e);
|
|
252
|
-
} else t.layer === o.PathLayer.Marker && r.set(t.index,
|
|
252
|
+
} else t.layer === o.PathLayer.Marker && r.set(t.index, pe(t.d, a));
|
|
253
253
|
return r;
|
|
254
254
|
})(e, v ? a : null, u), [
|
|
255
255
|
e,
|
|
256
256
|
v,
|
|
257
257
|
a,
|
|
258
258
|
u
|
|
259
|
-
]),
|
|
259
|
+
]), te = /* @__PURE__ */ new Set(), C = [];
|
|
260
260
|
for (let n of e) {
|
|
261
261
|
let e = `p${n.index}`, r = ee.get(n.index) ?? n.d;
|
|
262
262
|
switch (n.layer) {
|
|
263
263
|
case o.PathLayer.Fill:
|
|
264
264
|
if (g === null) break;
|
|
265
|
-
n.fill !== "norm" &&
|
|
265
|
+
n.fill !== "norm" && te.add(n.fill), C.push(b("path", {
|
|
266
266
|
d: r,
|
|
267
267
|
fill: g,
|
|
268
268
|
filter: n.fill === "norm" ? void 0 : `url(#${c}-${n.fill})`,
|
|
@@ -273,7 +273,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
273
273
|
case o.PathLayer.Stroke: {
|
|
274
274
|
if (!v) break;
|
|
275
275
|
let n = 8 / (i > 0 ? i : 1);
|
|
276
|
-
s !== "none" && n > u &&
|
|
276
|
+
s !== "none" && n > u && C.push(b("path", {
|
|
277
277
|
className: "shape-hit",
|
|
278
278
|
d: r,
|
|
279
279
|
fill: "none",
|
|
@@ -282,7 +282,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
282
282
|
strokeLinejoin: "round",
|
|
283
283
|
strokeLinecap: "round",
|
|
284
284
|
pointerEvents: "stroke"
|
|
285
|
-
}, `${e}-hit`)),
|
|
285
|
+
}, `${e}-hit`)), C.push(b("path", {
|
|
286
286
|
d: r,
|
|
287
287
|
fill: "none",
|
|
288
288
|
stroke: _,
|
|
@@ -295,7 +295,7 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
295
295
|
}, e));
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
|
-
case o.PathLayer.Marker: v &&
|
|
298
|
+
case o.PathLayer.Marker: v && C.push(b("path", {
|
|
299
299
|
d: r,
|
|
300
300
|
fill: _,
|
|
301
301
|
stroke: "none",
|
|
@@ -303,10 +303,10 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
303
303
|
}, e));
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
let
|
|
307
|
-
for (let e of
|
|
306
|
+
let w = [];
|
|
307
|
+
for (let e of te) {
|
|
308
308
|
let [t, n] = o.FillTransfer[e];
|
|
309
|
-
|
|
309
|
+
w.push(b("filter", {
|
|
310
310
|
id: `${c}-${e}`,
|
|
311
311
|
colorInterpolationFilters: "sRGB",
|
|
312
312
|
children: x("feComponentTransfer", { children: [
|
|
@@ -328,9 +328,9 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
328
328
|
] })
|
|
329
329
|
}, e));
|
|
330
330
|
}
|
|
331
|
-
if (f && !t.image &&
|
|
331
|
+
if (f && !t.image && w.push(j(`${c}-fill`, f, n, r)), p && v && w.push(j(`${c}-stroke`, p, n, r)), t.image && l) {
|
|
332
332
|
let e = t.image.fill.stretch ?? {}, i = n * (e.left ?? 0) / 100, a = r * (e.top ?? 0) / 100, o = Math.max(0, n - i - n * (e.right ?? 0) / 100), s = Math.max(0, r - a - r * (e.bottom ?? 0) / 100);
|
|
333
|
-
|
|
333
|
+
w.push(b("pattern", {
|
|
334
334
|
id: `${c}-image`,
|
|
335
335
|
patternUnits: "userSpaceOnUse",
|
|
336
336
|
x: 0,
|
|
@@ -343,14 +343,15 @@ var ne = 96 / 72, re = (e, t) => {
|
|
|
343
343
|
y: a,
|
|
344
344
|
width: o,
|
|
345
345
|
height: s,
|
|
346
|
-
preserveAspectRatio: "none"
|
|
346
|
+
preserveAspectRatio: "none",
|
|
347
|
+
style: me
|
|
347
348
|
})
|
|
348
349
|
}, "image"));
|
|
349
350
|
}
|
|
350
|
-
return x(y, { children: [
|
|
351
|
+
return x(y, { children: [w.length > 0 ? b("defs", { children: w }) : null, C] });
|
|
351
352
|
});
|
|
352
353
|
M.displayName = "PathRun";
|
|
353
|
-
var
|
|
354
|
+
var he = d(({ geometry: e, style: t, zoom: n, grid: r = null, hit: i }) => {
|
|
354
355
|
let a = h(() => {
|
|
355
356
|
let t = [];
|
|
356
357
|
return e.forEachPath((e) => t.push(e)), t;
|
|
@@ -365,8 +366,8 @@ var me = d(({ geometry: e, style: t, zoom: n, grid: r = null, hit: i }) => {
|
|
|
365
366
|
hit: i
|
|
366
367
|
});
|
|
367
368
|
});
|
|
368
|
-
|
|
369
|
-
var
|
|
369
|
+
he.displayName = "ShapePaths";
|
|
370
|
+
var ge = d(({ handles: e, width: t, height: n, zoom: r, onDrag: i }) => {
|
|
370
371
|
let a = _(null), o = _(null), [s, c] = v(!1), l = f((e) => {
|
|
371
372
|
let t = a.current, n = t?.getScreenCTM();
|
|
372
373
|
if (!t || !n) return null;
|
|
@@ -445,49 +446,49 @@ var he = d(({ handles: e, width: t, height: n, zoom: r, onDrag: i }) => {
|
|
|
445
446
|
}, e.index))
|
|
446
447
|
});
|
|
447
448
|
});
|
|
448
|
-
|
|
449
|
-
var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e.getHeight() === n ? e : N(t, n) ? e.resize(t, n) : null,
|
|
449
|
+
ge.displayName = "ShapeHandles";
|
|
450
|
+
var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e.getHeight() === n ? e : N(t, n) ? e.resize(t, n) : null, _e = (e) => {
|
|
450
451
|
let t = [];
|
|
451
452
|
return e.forEachConnection((e) => t.push(e)), t;
|
|
452
453
|
}, F = d(u((i, o) => {
|
|
453
|
-
let { children: u, disabled: d, style: m, shape: y, movable: S, zoom:
|
|
454
|
-
e(y, { onAnyChange:
|
|
455
|
-
onBoundsChange:
|
|
456
|
-
onSelectionChange:
|
|
454
|
+
let { children: u, disabled: d, style: m, shape: y, movable: S, zoom: T = 1, isDragging: ce, onHide: le, onShow: ue, onDragZone: de, adornmentHost: E, flip: D, gesture: O, debugGeometry: fe = !1, ...pe } = i, k = t()?.getStyles() ?? null, [me, A] = g((e) => e + 1, 0);
|
|
455
|
+
e(y, { onAnyChange: A }), e(S ?? null, {
|
|
456
|
+
onBoundsChange: A,
|
|
457
|
+
onSelectionChange: A
|
|
457
458
|
});
|
|
458
|
-
let
|
|
459
|
-
let [t] =
|
|
459
|
+
let j = y.toJSON(), { width: M, height: F, rotation: ve, content: I } = ((e) => {
|
|
460
|
+
let [t] = te("movable-drag", null), n = e ? t?.[e.getId()] : void 0, r = n?.bounds ?? e?.getBounds();
|
|
460
461
|
return {
|
|
461
462
|
width: r?.width ?? 0,
|
|
462
463
|
height: r?.height ?? 0,
|
|
463
464
|
rotation: n?.rotation ?? (e?.getRotation() || 0),
|
|
464
465
|
content: n?.content ?? null
|
|
465
466
|
};
|
|
466
|
-
})(S),
|
|
467
|
+
})(S), L = y.getShapeType(), ye = y.getAdjustments(), R = N(M, F), [z, B] = v(null), V = _(0);
|
|
467
468
|
p(() => {
|
|
468
|
-
if (!
|
|
469
|
-
let e = ++
|
|
470
|
-
y.getGeometry(
|
|
471
|
-
|
|
469
|
+
if (!R) return void B(null);
|
|
470
|
+
let e = ++V.current, t = y.getShapeType();
|
|
471
|
+
y.getGeometry(M, F).then((n) => {
|
|
472
|
+
V.current === e && B(n ? {
|
|
472
473
|
shapeType: t,
|
|
473
474
|
geometry: n
|
|
474
475
|
} : null);
|
|
475
476
|
}, () => {
|
|
476
|
-
|
|
477
|
+
V.current === e && B(null);
|
|
477
478
|
});
|
|
478
479
|
}, [
|
|
479
480
|
y,
|
|
481
|
+
M,
|
|
480
482
|
F,
|
|
481
|
-
|
|
482
|
-
pe
|
|
483
|
+
me
|
|
483
484
|
]);
|
|
484
|
-
let
|
|
485
|
+
let H = I?.shapeType !== void 0 && I.shapeType !== L ? I.shapeType : null, [U, be] = v(null);
|
|
485
486
|
p(() => {
|
|
486
|
-
if (!
|
|
487
|
+
if (!H || !R || U?.shapeType === H) return;
|
|
487
488
|
let e = !0;
|
|
488
|
-
return y.getGeometry(
|
|
489
|
-
e && t &&
|
|
490
|
-
shapeType:
|
|
489
|
+
return y.getGeometry(M, F, { shapeType: H }).then((t) => {
|
|
490
|
+
e && t && be({
|
|
491
|
+
shapeType: H,
|
|
491
492
|
geometry: t
|
|
492
493
|
});
|
|
493
494
|
}, () => {}), () => {
|
|
@@ -495,35 +496,35 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
495
496
|
};
|
|
496
497
|
}, [
|
|
497
498
|
y,
|
|
498
|
-
|
|
499
|
-
|
|
499
|
+
H,
|
|
500
|
+
R
|
|
500
501
|
]);
|
|
501
|
-
let
|
|
502
|
-
let e =
|
|
503
|
-
return e ? P(e.geometry,
|
|
502
|
+
let W = h(() => {
|
|
503
|
+
let e = z?.shapeType === L ? z : U?.shapeType === L ? U : null;
|
|
504
|
+
return e ? P(e.geometry, M, F)?.withAdjustments(ye) ?? null : P(z?.geometry ?? null, M, F);
|
|
504
505
|
}, [
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
]),
|
|
506
|
+
z,
|
|
507
|
+
U,
|
|
508
|
+
L,
|
|
509
|
+
ye,
|
|
510
|
+
M,
|
|
511
|
+
F
|
|
512
|
+
]), xe = f((e) => y.getResource(e), [y]);
|
|
512
513
|
p(() => {
|
|
513
514
|
let e = [];
|
|
514
|
-
for (let t = S?.getParent() ?? null; t; t = t.getParent()) e.push(t.getContent().addListeners({ onAnyChange:
|
|
515
|
+
for (let t = S?.getParent() ?? null; t; t = t.getParent()) e.push(t.getContent().addListeners({ onAnyChange: A }));
|
|
515
516
|
return () => {
|
|
516
517
|
for (let t of e) t();
|
|
517
518
|
};
|
|
518
519
|
}, [S]);
|
|
519
|
-
let
|
|
520
|
+
let Se = se(S), G = h(() => ((e, t, n, r) => {
|
|
520
521
|
let i = null;
|
|
521
522
|
try {
|
|
522
523
|
i = t?.getTheme()?.toJSON() ?? null;
|
|
523
524
|
} catch {
|
|
524
525
|
i = null;
|
|
525
526
|
}
|
|
526
|
-
let o = l.resolve(e, i, r), { stroke: u } = o, d = (e) =>
|
|
527
|
+
let o = l.resolve(e, i, r), { stroke: u } = o, d = (e) => ie(e, t), f = c.toConcreteFill(o.fill, d), p = c.toConcreteFill(u?.fill, d), m = ae(p), h = p?.type === a.Type.Gradient ? oe(p) ?? void 0 : void 0, g = ae(f), _ = f?.type === a.Type.Gradient ? oe(f) ?? void 0 : void 0, v;
|
|
527
528
|
if (f?.type === a.Type.Image) {
|
|
528
529
|
let e = f.resId === void 0 ? null : n?.(f.resId) ?? null;
|
|
529
530
|
e && (v = {
|
|
@@ -537,87 +538,87 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
537
538
|
image: v,
|
|
538
539
|
stroke: m,
|
|
539
540
|
strokeGradient: h,
|
|
540
|
-
strokeWidth: m ? Math.max(0, o.strokeWidth) *
|
|
541
|
+
strokeWidth: m ? Math.max(0, o.strokeWidth) * re : 0,
|
|
541
542
|
lineJoin: u?.lineJoin ?? "miter",
|
|
542
543
|
lineCap: u?.lineCap ?? "butt",
|
|
543
544
|
miterLimit: typeof u?.miterLimit == "number" ? u.miterLimit : 18.5,
|
|
544
545
|
dash: s.toDashLengths(u?.dash),
|
|
545
|
-
textColor:
|
|
546
|
+
textColor: ie(o.fontColor, t)
|
|
546
547
|
};
|
|
547
|
-
})(
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
]), [Ce, we] = v(null), Te =
|
|
553
|
-
if (
|
|
554
|
-
let e =
|
|
548
|
+
})(j, k, xe, Se), [
|
|
549
|
+
j,
|
|
550
|
+
k,
|
|
551
|
+
xe,
|
|
552
|
+
Se
|
|
553
|
+
]), [Ce, we] = v(null), Te = I?.adjustments === void 0 ? Ce ?? void 0 : I.adjustments, K = h(() => {
|
|
554
|
+
if (H && U?.shapeType !== H) return W;
|
|
555
|
+
let e = H ? P(U.geometry, M, F) : W;
|
|
555
556
|
return e && Te !== void 0 ? e.withAdjustments(Te) : e;
|
|
556
557
|
}, [
|
|
557
|
-
G,
|
|
558
|
-
U,
|
|
559
558
|
W,
|
|
559
|
+
H,
|
|
560
|
+
U,
|
|
561
|
+
M,
|
|
560
562
|
F,
|
|
561
|
-
I,
|
|
562
563
|
Te
|
|
563
564
|
]), q = _(null), [Ee, De] = v(!1), Oe = f((e, t, n, r) => {
|
|
564
|
-
if (r === "cancel") return q.current && (q.current = null, De(!1),
|
|
565
|
-
if (!K || !
|
|
565
|
+
if (r === "cancel") return q.current && (q.current = null, De(!1), O?.cancel()), void we(null);
|
|
566
|
+
if (!K || !W) return;
|
|
566
567
|
let i = K.adjustmentsFromHandle(e, t, n);
|
|
567
568
|
if (r === "move") {
|
|
568
|
-
if (
|
|
569
|
+
if (O && !d) {
|
|
569
570
|
if (!q.current) {
|
|
570
571
|
let e = { adjustments: i };
|
|
571
|
-
if (!
|
|
572
|
+
if (!O.start(ee("op.setShapeAdjustments"), (t) => {
|
|
572
573
|
t.getContent().setAdjustments(e.adjustments);
|
|
573
574
|
})) return;
|
|
574
575
|
q.current = e, De(!0);
|
|
575
576
|
}
|
|
576
|
-
q.current.adjustments = i,
|
|
577
|
+
q.current.adjustments = i, O.preview({ content: { adjustments: i } });
|
|
577
578
|
return;
|
|
578
579
|
}
|
|
579
580
|
we(i);
|
|
580
581
|
return;
|
|
581
582
|
}
|
|
582
583
|
let a = q.current;
|
|
583
|
-
if (a) return q.current = null, De(!1), a.adjustments = i, void
|
|
584
|
+
if (a) return q.current = null, De(!1), a.adjustments = i, void O?.finish();
|
|
584
585
|
we(null), d || y.setAdjustments(i);
|
|
585
586
|
}, [
|
|
586
587
|
K,
|
|
587
|
-
|
|
588
|
+
W,
|
|
588
589
|
y,
|
|
589
590
|
d,
|
|
590
|
-
|
|
591
|
+
O
|
|
591
592
|
]), ke = h(() => {
|
|
592
593
|
let e = [];
|
|
593
594
|
return K?.forEachHandle((t) => e.push(t)), e;
|
|
594
|
-
}, [K]), Ae = C(o, () => ({ isShapeEditor: () => !0 }), []), je =
|
|
595
|
-
dpr:
|
|
596
|
-
zoom:
|
|
597
|
-
width:
|
|
598
|
-
height:
|
|
595
|
+
}, [K]), Ae = C(o, () => ({ isShapeEditor: () => !0 }), []), je = D ?? S?.getFlip(), J = je?.horizontal ?? !1, Y = je?.vertical ?? !1, Me = ve % 360 != 0, Ne = h(() => !Me && N(M, F) ? {
|
|
596
|
+
dpr: ne.getDevicePixelRatio(),
|
|
597
|
+
zoom: T,
|
|
598
|
+
width: M,
|
|
599
|
+
height: F,
|
|
599
600
|
flipH: J,
|
|
600
601
|
flipV: Y
|
|
601
602
|
} : null, [
|
|
602
603
|
Me,
|
|
603
|
-
|
|
604
|
+
T,
|
|
605
|
+
M,
|
|
604
606
|
F,
|
|
605
|
-
I,
|
|
606
607
|
J,
|
|
607
608
|
Y
|
|
608
609
|
]);
|
|
609
|
-
if (y.isDeleted() || !
|
|
610
|
-
let X = m?.pointerEvents === "none", Pe = X ? "none" : "visiblePainted", Fe = !X && !d && (!
|
|
610
|
+
if (y.isDeleted() || !j) return null;
|
|
611
|
+
let X = m?.pointerEvents === "none", Pe = X ? "none" : "visiblePainted", Fe = !X && !d && (!ce || Ee) && !!S?.isSelected(), Ie = {
|
|
611
612
|
transform: J || Y ? `scale(${J ? -1 : 1}, ${Y ? -1 : 1})` : void 0,
|
|
612
613
|
transformOrigin: "center"
|
|
613
614
|
}, Z = null;
|
|
614
|
-
Fe && ke.length > 0 && (Z = b(
|
|
615
|
+
Fe && ke.length > 0 && (Z = b(ge, {
|
|
615
616
|
handles: ke,
|
|
616
|
-
width:
|
|
617
|
-
height:
|
|
618
|
-
zoom:
|
|
617
|
+
width: M,
|
|
618
|
+
height: F,
|
|
619
|
+
zoom: T,
|
|
619
620
|
onDrag: Oe
|
|
620
|
-
}),
|
|
621
|
+
}), E && (Z = w(b("div", {
|
|
621
622
|
className: "shape-adornment",
|
|
622
623
|
style: {
|
|
623
624
|
position: "absolute",
|
|
@@ -629,11 +630,11 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
629
630
|
pointerEvents: "none"
|
|
630
631
|
},
|
|
631
632
|
children: Z
|
|
632
|
-
}),
|
|
633
|
-
let Le = J === Y ? void 0 : "scaleX(-1)", Q = K?.getTextRect(), $ =
|
|
633
|
+
}), E)));
|
|
634
|
+
let Le = J === Y ? void 0 : "scaleX(-1)", Q = K?.getTextRect(), $ = j.text, Re = !!$ && $.paragraphs.some((e) => e.runs.some((e) => e.text !== ""));
|
|
634
635
|
return x("div", {
|
|
635
636
|
className: "shape-editor",
|
|
636
|
-
...
|
|
637
|
+
...pe,
|
|
637
638
|
ref: Ae,
|
|
638
639
|
style: {
|
|
639
640
|
width: "100%",
|
|
@@ -646,11 +647,11 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
646
647
|
pointerEvents: "none"
|
|
647
648
|
},
|
|
648
649
|
children: [
|
|
649
|
-
N(
|
|
650
|
+
N(M, F) ? x("svg", {
|
|
650
651
|
className: "shape-geometry",
|
|
651
|
-
viewBox: `0 0 ${
|
|
652
|
-
width:
|
|
653
|
-
height:
|
|
652
|
+
viewBox: `0 0 ${M > 0 ? M : 1 / T} ${F > 0 ? F : 1 / T}`,
|
|
653
|
+
width: M > 0 ? "100%" : "1px",
|
|
654
|
+
height: F > 0 ? "100%" : "1px",
|
|
654
655
|
preserveAspectRatio: "none",
|
|
655
656
|
overflow: "visible",
|
|
656
657
|
style: {
|
|
@@ -661,13 +662,13 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
661
662
|
pointerEvents: "none",
|
|
662
663
|
filter: Fe ? "drop-shadow(1px 1px 2px rgba(0,0,0,.15))" : void 0
|
|
663
664
|
},
|
|
664
|
-
children: [K ? b(
|
|
665
|
+
children: [K ? b(he, {
|
|
665
666
|
geometry: K,
|
|
666
|
-
style:
|
|
667
|
-
zoom:
|
|
667
|
+
style: G,
|
|
668
|
+
zoom: T,
|
|
668
669
|
grid: Ne,
|
|
669
670
|
hit: Pe
|
|
670
|
-
}) : null,
|
|
671
|
+
}) : null, fe && K && Q ? x("g", {
|
|
671
672
|
pointerEvents: "none",
|
|
672
673
|
children: [b("rect", {
|
|
673
674
|
x: Q.l,
|
|
@@ -676,13 +677,13 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
676
677
|
height: Math.max(0, Q.b - Q.t),
|
|
677
678
|
fill: "none",
|
|
678
679
|
stroke: "#c00",
|
|
679
|
-
strokeWidth: 1 /
|
|
680
|
-
strokeDasharray: `${4 /
|
|
681
|
-
}),
|
|
682
|
-
x: e.x - 3 /
|
|
683
|
-
y: e.y - 3 /
|
|
684
|
-
width: 6 /
|
|
685
|
-
height: 6 /
|
|
680
|
+
strokeWidth: 1 / T,
|
|
681
|
+
strokeDasharray: `${4 / T} ${2 / T}`
|
|
682
|
+
}), _e(K).map((e) => b("rect", {
|
|
683
|
+
x: e.x - 3 / T,
|
|
684
|
+
y: e.y - 3 / T,
|
|
685
|
+
width: 6 / T,
|
|
686
|
+
height: 6 / T,
|
|
686
687
|
fill: "#0a0"
|
|
687
688
|
}, e.index))]
|
|
688
689
|
}) : null]
|
|
@@ -695,11 +696,11 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
695
696
|
top: Q.t,
|
|
696
697
|
width: Math.max(0, Q.r - Q.l),
|
|
697
698
|
height: Math.max(0, Q.b - Q.t),
|
|
698
|
-
zoom:
|
|
699
|
+
zoom: T,
|
|
699
700
|
transform: Le,
|
|
700
701
|
transformOrigin: "center",
|
|
701
702
|
pointerEvents: X ? "none" : "auto",
|
|
702
|
-
color:
|
|
703
|
+
color: G.textColor ?? void 0
|
|
703
704
|
},
|
|
704
705
|
children: b(n, {
|
|
705
706
|
movable: S,
|
|
@@ -716,8 +717,8 @@ var N = (e, t) => e > 0 || t > 0, P = (e, t, n) => !e || e.getWidth() === t && e
|
|
|
716
717
|
},
|
|
717
718
|
children: b(r, {
|
|
718
719
|
text: $,
|
|
719
|
-
styles:
|
|
720
|
-
color:
|
|
720
|
+
styles: k,
|
|
721
|
+
color: G.textColor
|
|
721
722
|
})
|
|
722
723
|
})
|
|
723
724
|
}) : null,
|