@meursyphus/flitter 2.0.1 → 2.0.3
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/README.md +48 -48
- package/index.cjs +629 -459
- package/index.d.cts +71 -37
- package/index.d.ts +71 -37
- package/index.global.js +805 -692
- package/index.js +628 -458
- package/package.json +11 -8
package/index.global.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
(() => {
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
4
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
5
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __typeError = (msg) => {
|
|
9
|
+
throw TypeError(msg);
|
|
10
|
+
};
|
|
12
11
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
12
|
var __spreadValues = (a, b) => {
|
|
14
13
|
for (var prop in b || (b = {}))
|
|
@@ -34,212 +33,16 @@
|
|
|
34
33
|
}
|
|
35
34
|
return target;
|
|
36
35
|
};
|
|
37
|
-
var __commonJS = (cb2, mod) => function __require() {
|
|
38
|
-
return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
39
|
-
};
|
|
40
36
|
var __export = (target, all) => {
|
|
41
37
|
for (var name in all)
|
|
42
38
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
43
39
|
};
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return to;
|
|
51
|
-
};
|
|
52
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
53
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
54
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
55
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
56
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
57
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
58
|
-
mod
|
|
59
|
-
));
|
|
60
|
-
var __publicField = (obj, key, value) => {
|
|
61
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
62
|
-
return value;
|
|
63
|
-
};
|
|
64
|
-
var __accessCheck = (obj, member, msg) => {
|
|
65
|
-
if (!member.has(obj))
|
|
66
|
-
throw TypeError("Cannot " + msg);
|
|
67
|
-
};
|
|
68
|
-
var __privateGet = (obj, member, getter) => {
|
|
69
|
-
__accessCheck(obj, member, "read from private field");
|
|
70
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
71
|
-
};
|
|
72
|
-
var __privateAdd = (obj, member, value) => {
|
|
73
|
-
if (member.has(obj))
|
|
74
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
75
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
76
|
-
};
|
|
77
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
78
|
-
__accessCheck(obj, member, "write to private field");
|
|
79
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
80
|
-
return value;
|
|
81
|
-
};
|
|
82
|
-
var __privateMethod = (obj, member, method) => {
|
|
83
|
-
__accessCheck(obj, member, "access private method");
|
|
84
|
-
return method;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
// ../../node_modules/color-name/index.js
|
|
88
|
-
var require_color_name = __commonJS({
|
|
89
|
-
"../../node_modules/color-name/index.js"(exports, module) {
|
|
90
|
-
"use strict";
|
|
91
|
-
module.exports = {
|
|
92
|
-
"aliceblue": [240, 248, 255],
|
|
93
|
-
"antiquewhite": [250, 235, 215],
|
|
94
|
-
"aqua": [0, 255, 255],
|
|
95
|
-
"aquamarine": [127, 255, 212],
|
|
96
|
-
"azure": [240, 255, 255],
|
|
97
|
-
"beige": [245, 245, 220],
|
|
98
|
-
"bisque": [255, 228, 196],
|
|
99
|
-
"black": [0, 0, 0],
|
|
100
|
-
"blanchedalmond": [255, 235, 205],
|
|
101
|
-
"blue": [0, 0, 255],
|
|
102
|
-
"blueviolet": [138, 43, 226],
|
|
103
|
-
"brown": [165, 42, 42],
|
|
104
|
-
"burlywood": [222, 184, 135],
|
|
105
|
-
"cadetblue": [95, 158, 160],
|
|
106
|
-
"chartreuse": [127, 255, 0],
|
|
107
|
-
"chocolate": [210, 105, 30],
|
|
108
|
-
"coral": [255, 127, 80],
|
|
109
|
-
"cornflowerblue": [100, 149, 237],
|
|
110
|
-
"cornsilk": [255, 248, 220],
|
|
111
|
-
"crimson": [220, 20, 60],
|
|
112
|
-
"cyan": [0, 255, 255],
|
|
113
|
-
"darkblue": [0, 0, 139],
|
|
114
|
-
"darkcyan": [0, 139, 139],
|
|
115
|
-
"darkgoldenrod": [184, 134, 11],
|
|
116
|
-
"darkgray": [169, 169, 169],
|
|
117
|
-
"darkgreen": [0, 100, 0],
|
|
118
|
-
"darkgrey": [169, 169, 169],
|
|
119
|
-
"darkkhaki": [189, 183, 107],
|
|
120
|
-
"darkmagenta": [139, 0, 139],
|
|
121
|
-
"darkolivegreen": [85, 107, 47],
|
|
122
|
-
"darkorange": [255, 140, 0],
|
|
123
|
-
"darkorchid": [153, 50, 204],
|
|
124
|
-
"darkred": [139, 0, 0],
|
|
125
|
-
"darksalmon": [233, 150, 122],
|
|
126
|
-
"darkseagreen": [143, 188, 143],
|
|
127
|
-
"darkslateblue": [72, 61, 139],
|
|
128
|
-
"darkslategray": [47, 79, 79],
|
|
129
|
-
"darkslategrey": [47, 79, 79],
|
|
130
|
-
"darkturquoise": [0, 206, 209],
|
|
131
|
-
"darkviolet": [148, 0, 211],
|
|
132
|
-
"deeppink": [255, 20, 147],
|
|
133
|
-
"deepskyblue": [0, 191, 255],
|
|
134
|
-
"dimgray": [105, 105, 105],
|
|
135
|
-
"dimgrey": [105, 105, 105],
|
|
136
|
-
"dodgerblue": [30, 144, 255],
|
|
137
|
-
"firebrick": [178, 34, 34],
|
|
138
|
-
"floralwhite": [255, 250, 240],
|
|
139
|
-
"forestgreen": [34, 139, 34],
|
|
140
|
-
"fuchsia": [255, 0, 255],
|
|
141
|
-
"gainsboro": [220, 220, 220],
|
|
142
|
-
"ghostwhite": [248, 248, 255],
|
|
143
|
-
"gold": [255, 215, 0],
|
|
144
|
-
"goldenrod": [218, 165, 32],
|
|
145
|
-
"gray": [128, 128, 128],
|
|
146
|
-
"green": [0, 128, 0],
|
|
147
|
-
"greenyellow": [173, 255, 47],
|
|
148
|
-
"grey": [128, 128, 128],
|
|
149
|
-
"honeydew": [240, 255, 240],
|
|
150
|
-
"hotpink": [255, 105, 180],
|
|
151
|
-
"indianred": [205, 92, 92],
|
|
152
|
-
"indigo": [75, 0, 130],
|
|
153
|
-
"ivory": [255, 255, 240],
|
|
154
|
-
"khaki": [240, 230, 140],
|
|
155
|
-
"lavender": [230, 230, 250],
|
|
156
|
-
"lavenderblush": [255, 240, 245],
|
|
157
|
-
"lawngreen": [124, 252, 0],
|
|
158
|
-
"lemonchiffon": [255, 250, 205],
|
|
159
|
-
"lightblue": [173, 216, 230],
|
|
160
|
-
"lightcoral": [240, 128, 128],
|
|
161
|
-
"lightcyan": [224, 255, 255],
|
|
162
|
-
"lightgoldenrodyellow": [250, 250, 210],
|
|
163
|
-
"lightgray": [211, 211, 211],
|
|
164
|
-
"lightgreen": [144, 238, 144],
|
|
165
|
-
"lightgrey": [211, 211, 211],
|
|
166
|
-
"lightpink": [255, 182, 193],
|
|
167
|
-
"lightsalmon": [255, 160, 122],
|
|
168
|
-
"lightseagreen": [32, 178, 170],
|
|
169
|
-
"lightskyblue": [135, 206, 250],
|
|
170
|
-
"lightslategray": [119, 136, 153],
|
|
171
|
-
"lightslategrey": [119, 136, 153],
|
|
172
|
-
"lightsteelblue": [176, 196, 222],
|
|
173
|
-
"lightyellow": [255, 255, 224],
|
|
174
|
-
"lime": [0, 255, 0],
|
|
175
|
-
"limegreen": [50, 205, 50],
|
|
176
|
-
"linen": [250, 240, 230],
|
|
177
|
-
"magenta": [255, 0, 255],
|
|
178
|
-
"maroon": [128, 0, 0],
|
|
179
|
-
"mediumaquamarine": [102, 205, 170],
|
|
180
|
-
"mediumblue": [0, 0, 205],
|
|
181
|
-
"mediumorchid": [186, 85, 211],
|
|
182
|
-
"mediumpurple": [147, 112, 219],
|
|
183
|
-
"mediumseagreen": [60, 179, 113],
|
|
184
|
-
"mediumslateblue": [123, 104, 238],
|
|
185
|
-
"mediumspringgreen": [0, 250, 154],
|
|
186
|
-
"mediumturquoise": [72, 209, 204],
|
|
187
|
-
"mediumvioletred": [199, 21, 133],
|
|
188
|
-
"midnightblue": [25, 25, 112],
|
|
189
|
-
"mintcream": [245, 255, 250],
|
|
190
|
-
"mistyrose": [255, 228, 225],
|
|
191
|
-
"moccasin": [255, 228, 181],
|
|
192
|
-
"navajowhite": [255, 222, 173],
|
|
193
|
-
"navy": [0, 0, 128],
|
|
194
|
-
"oldlace": [253, 245, 230],
|
|
195
|
-
"olive": [128, 128, 0],
|
|
196
|
-
"olivedrab": [107, 142, 35],
|
|
197
|
-
"orange": [255, 165, 0],
|
|
198
|
-
"orangered": [255, 69, 0],
|
|
199
|
-
"orchid": [218, 112, 214],
|
|
200
|
-
"palegoldenrod": [238, 232, 170],
|
|
201
|
-
"palegreen": [152, 251, 152],
|
|
202
|
-
"paleturquoise": [175, 238, 238],
|
|
203
|
-
"palevioletred": [219, 112, 147],
|
|
204
|
-
"papayawhip": [255, 239, 213],
|
|
205
|
-
"peachpuff": [255, 218, 185],
|
|
206
|
-
"peru": [205, 133, 63],
|
|
207
|
-
"pink": [255, 192, 203],
|
|
208
|
-
"plum": [221, 160, 221],
|
|
209
|
-
"powderblue": [176, 224, 230],
|
|
210
|
-
"purple": [128, 0, 128],
|
|
211
|
-
"rebeccapurple": [102, 51, 153],
|
|
212
|
-
"red": [255, 0, 0],
|
|
213
|
-
"rosybrown": [188, 143, 143],
|
|
214
|
-
"royalblue": [65, 105, 225],
|
|
215
|
-
"saddlebrown": [139, 69, 19],
|
|
216
|
-
"salmon": [250, 128, 114],
|
|
217
|
-
"sandybrown": [244, 164, 96],
|
|
218
|
-
"seagreen": [46, 139, 87],
|
|
219
|
-
"seashell": [255, 245, 238],
|
|
220
|
-
"sienna": [160, 82, 45],
|
|
221
|
-
"silver": [192, 192, 192],
|
|
222
|
-
"skyblue": [135, 206, 235],
|
|
223
|
-
"slateblue": [106, 90, 205],
|
|
224
|
-
"slategray": [112, 128, 144],
|
|
225
|
-
"slategrey": [112, 128, 144],
|
|
226
|
-
"snow": [255, 250, 250],
|
|
227
|
-
"springgreen": [0, 255, 127],
|
|
228
|
-
"steelblue": [70, 130, 180],
|
|
229
|
-
"tan": [210, 180, 140],
|
|
230
|
-
"teal": [0, 128, 128],
|
|
231
|
-
"thistle": [216, 191, 216],
|
|
232
|
-
"tomato": [255, 99, 71],
|
|
233
|
-
"turquoise": [64, 224, 208],
|
|
234
|
-
"violet": [238, 130, 238],
|
|
235
|
-
"wheat": [245, 222, 179],
|
|
236
|
-
"white": [255, 255, 255],
|
|
237
|
-
"whitesmoke": [245, 245, 245],
|
|
238
|
-
"yellow": [255, 255, 0],
|
|
239
|
-
"yellowgreen": [154, 205, 50]
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
});
|
|
40
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
41
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
42
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
43
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
44
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
45
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
243
46
|
|
|
244
47
|
// src/framework/renderer/canvas/layer.ts
|
|
245
48
|
var Layer = class {
|
|
@@ -256,7 +59,7 @@
|
|
|
256
59
|
var PictureLayer = class extends Layer {
|
|
257
60
|
constructor(paintBounds) {
|
|
258
61
|
super();
|
|
259
|
-
__privateAdd(this, _paintBounds
|
|
62
|
+
__privateAdd(this, _paintBounds);
|
|
260
63
|
__publicField(this, "picture");
|
|
261
64
|
__privateSet(this, _paintBounds, paintBounds);
|
|
262
65
|
}
|
|
@@ -325,7 +128,7 @@
|
|
|
325
128
|
var _source;
|
|
326
129
|
var Picture = class {
|
|
327
130
|
constructor(source) {
|
|
328
|
-
__privateAdd(this, _source
|
|
131
|
+
__privateAdd(this, _source);
|
|
329
132
|
__privateSet(this, _source, source);
|
|
330
133
|
}
|
|
331
134
|
toImage() {
|
|
@@ -346,7 +149,7 @@
|
|
|
346
149
|
* @implements: This recorder is currently under implementation and does not actually record but directly reflects on the canvas context. Temporarily, it requires the paintSize immediately. The recorder is intended to manage the drawing order for implementing z-index. Once implemented, it will function as a recorder by not directly drawing on the canvas context but recording the operations.
|
|
347
150
|
*/
|
|
348
151
|
constructor(paintBounds) {
|
|
349
|
-
__privateAdd(this, _source2
|
|
152
|
+
__privateAdd(this, _source2);
|
|
350
153
|
__privateSet(this, _source2, document.createElement("canvas"));
|
|
351
154
|
const dpr = window.devicePixelRatio;
|
|
352
155
|
__privateGet(this, _source2).width = paintBounds.width * dpr;
|
|
@@ -389,8 +192,7 @@
|
|
|
389
192
|
const dirtyElements = this.dirtyElements;
|
|
390
193
|
this.dirtyElements = [];
|
|
391
194
|
dirtyElements.sort((a, b) => a.depth - b.depth).forEach((elememt) => {
|
|
392
|
-
if (!elememt.dirty)
|
|
393
|
-
return;
|
|
195
|
+
if (!elememt.dirty) return;
|
|
394
196
|
elememt.rebuild();
|
|
395
197
|
});
|
|
396
198
|
}
|
|
@@ -582,8 +384,7 @@
|
|
|
582
384
|
return new _Alignment({ x: this.x * value, y: this.y * value });
|
|
583
385
|
}
|
|
584
386
|
equals(other) {
|
|
585
|
-
if (other === this)
|
|
586
|
-
return true;
|
|
387
|
+
if (other === this) return true;
|
|
587
388
|
return this.x === other.x && this.y === other.y;
|
|
588
389
|
}
|
|
589
390
|
/**
|
|
@@ -789,8 +590,7 @@
|
|
|
789
590
|
return Math.min(max, Math.max(min, value));
|
|
790
591
|
}
|
|
791
592
|
static arrayEqual(a, b) {
|
|
792
|
-
if (a.length !== b.length)
|
|
793
|
-
return false;
|
|
593
|
+
if (a.length !== b.length) return false;
|
|
794
594
|
return a.every((value, i) => value === b[i]);
|
|
795
595
|
}
|
|
796
596
|
static lerp(a, b, t) {
|
|
@@ -816,8 +616,7 @@
|
|
|
816
616
|
this.height = height;
|
|
817
617
|
}
|
|
818
618
|
equal(other) {
|
|
819
|
-
if (this === other)
|
|
820
|
-
return true;
|
|
619
|
+
if (this === other) return true;
|
|
821
620
|
return this.width === other.width && this.height === other.height;
|
|
822
621
|
}
|
|
823
622
|
static maximum() {
|
|
@@ -1061,8 +860,7 @@
|
|
|
1061
860
|
return this.equals(other);
|
|
1062
861
|
}
|
|
1063
862
|
equals(other) {
|
|
1064
|
-
if (this === other)
|
|
1065
|
-
return true;
|
|
863
|
+
if (this === other) return true;
|
|
1066
864
|
return this.maxWidth === other.maxWidth && this.minWidth === other.minWidth && this.maxHeight === other.maxHeight && this.minHeight === other.minHeight;
|
|
1067
865
|
}
|
|
1068
866
|
clampDouble(value, min, max) {
|
|
@@ -1101,8 +899,7 @@
|
|
|
1101
899
|
});
|
|
1102
900
|
}
|
|
1103
901
|
equals(other) {
|
|
1104
|
-
if (this === other)
|
|
1105
|
-
return;
|
|
902
|
+
if (this === other) return;
|
|
1106
903
|
return this.top === other.top && this.bottom === other.bottom && this.left === other.left && this.right === other.right;
|
|
1107
904
|
}
|
|
1108
905
|
/**
|
|
@@ -1224,8 +1021,7 @@
|
|
|
1224
1021
|
return result;
|
|
1225
1022
|
}
|
|
1226
1023
|
equals(other) {
|
|
1227
|
-
if (this === other)
|
|
1228
|
-
return true;
|
|
1024
|
+
if (this === other) return true;
|
|
1229
1025
|
return this.topLeft.equals(other.topLeft) && this.topRight.equals(other.topRight) && this.bottomLeft.equals(other.bottomLeft) && this.bottomRight.equals(other.bottomRight);
|
|
1230
1026
|
}
|
|
1231
1027
|
/**
|
|
@@ -1357,8 +1153,7 @@
|
|
|
1357
1153
|
})).close();
|
|
1358
1154
|
}
|
|
1359
1155
|
addPolygons(points) {
|
|
1360
|
-
if (points.length < 3)
|
|
1361
|
-
throw Error("polygons need at least 3 points");
|
|
1156
|
+
if (points.length < 3) throw Error("polygons need at least 3 points");
|
|
1362
1157
|
this.moveTo(points[0]);
|
|
1363
1158
|
points.slice(1).forEach((point) => this.lineTo(point));
|
|
1364
1159
|
return this.close();
|
|
@@ -1428,8 +1223,7 @@
|
|
|
1428
1223
|
return new _Radius(this.x * value, this.y * value);
|
|
1429
1224
|
}
|
|
1430
1225
|
equals(other) {
|
|
1431
|
-
if (this === other)
|
|
1432
|
-
return true;
|
|
1226
|
+
if (this === other) return true;
|
|
1433
1227
|
return this.x === other.x && this.y === other.y;
|
|
1434
1228
|
}
|
|
1435
1229
|
/**
|
|
@@ -9724,8 +9518,7 @@
|
|
|
9724
9518
|
return cloned;
|
|
9725
9519
|
}
|
|
9726
9520
|
equals(other) {
|
|
9727
|
-
if (this === other)
|
|
9728
|
-
return true;
|
|
9521
|
+
if (this === other) return true;
|
|
9729
9522
|
return this.storage.every((value, i) => {
|
|
9730
9523
|
return other._m4storage[i] === value;
|
|
9731
9524
|
});
|
|
@@ -11319,8 +11112,159 @@
|
|
|
11319
11112
|
})(BorderStyle || {});
|
|
11320
11113
|
var border_style_default = BorderStyle;
|
|
11321
11114
|
|
|
11115
|
+
// ../../node_modules/color-name/index.js
|
|
11116
|
+
var color_name_default = {
|
|
11117
|
+
aliceblue: [240, 248, 255],
|
|
11118
|
+
antiquewhite: [250, 235, 215],
|
|
11119
|
+
aqua: [0, 255, 255],
|
|
11120
|
+
aquamarine: [127, 255, 212],
|
|
11121
|
+
azure: [240, 255, 255],
|
|
11122
|
+
beige: [245, 245, 220],
|
|
11123
|
+
bisque: [255, 228, 196],
|
|
11124
|
+
black: [0, 0, 0],
|
|
11125
|
+
blanchedalmond: [255, 235, 205],
|
|
11126
|
+
blue: [0, 0, 255],
|
|
11127
|
+
blueviolet: [138, 43, 226],
|
|
11128
|
+
brown: [165, 42, 42],
|
|
11129
|
+
burlywood: [222, 184, 135],
|
|
11130
|
+
cadetblue: [95, 158, 160],
|
|
11131
|
+
chartreuse: [127, 255, 0],
|
|
11132
|
+
chocolate: [210, 105, 30],
|
|
11133
|
+
coral: [255, 127, 80],
|
|
11134
|
+
cornflowerblue: [100, 149, 237],
|
|
11135
|
+
cornsilk: [255, 248, 220],
|
|
11136
|
+
crimson: [220, 20, 60],
|
|
11137
|
+
cyan: [0, 255, 255],
|
|
11138
|
+
darkblue: [0, 0, 139],
|
|
11139
|
+
darkcyan: [0, 139, 139],
|
|
11140
|
+
darkgoldenrod: [184, 134, 11],
|
|
11141
|
+
darkgray: [169, 169, 169],
|
|
11142
|
+
darkgreen: [0, 100, 0],
|
|
11143
|
+
darkgrey: [169, 169, 169],
|
|
11144
|
+
darkkhaki: [189, 183, 107],
|
|
11145
|
+
darkmagenta: [139, 0, 139],
|
|
11146
|
+
darkolivegreen: [85, 107, 47],
|
|
11147
|
+
darkorange: [255, 140, 0],
|
|
11148
|
+
darkorchid: [153, 50, 204],
|
|
11149
|
+
darkred: [139, 0, 0],
|
|
11150
|
+
darksalmon: [233, 150, 122],
|
|
11151
|
+
darkseagreen: [143, 188, 143],
|
|
11152
|
+
darkslateblue: [72, 61, 139],
|
|
11153
|
+
darkslategray: [47, 79, 79],
|
|
11154
|
+
darkslategrey: [47, 79, 79],
|
|
11155
|
+
darkturquoise: [0, 206, 209],
|
|
11156
|
+
darkviolet: [148, 0, 211],
|
|
11157
|
+
deeppink: [255, 20, 147],
|
|
11158
|
+
deepskyblue: [0, 191, 255],
|
|
11159
|
+
dimgray: [105, 105, 105],
|
|
11160
|
+
dimgrey: [105, 105, 105],
|
|
11161
|
+
dodgerblue: [30, 144, 255],
|
|
11162
|
+
firebrick: [178, 34, 34],
|
|
11163
|
+
floralwhite: [255, 250, 240],
|
|
11164
|
+
forestgreen: [34, 139, 34],
|
|
11165
|
+
fuchsia: [255, 0, 255],
|
|
11166
|
+
gainsboro: [220, 220, 220],
|
|
11167
|
+
ghostwhite: [248, 248, 255],
|
|
11168
|
+
gold: [255, 215, 0],
|
|
11169
|
+
goldenrod: [218, 165, 32],
|
|
11170
|
+
gray: [128, 128, 128],
|
|
11171
|
+
green: [0, 128, 0],
|
|
11172
|
+
greenyellow: [173, 255, 47],
|
|
11173
|
+
grey: [128, 128, 128],
|
|
11174
|
+
honeydew: [240, 255, 240],
|
|
11175
|
+
hotpink: [255, 105, 180],
|
|
11176
|
+
indianred: [205, 92, 92],
|
|
11177
|
+
indigo: [75, 0, 130],
|
|
11178
|
+
ivory: [255, 255, 240],
|
|
11179
|
+
khaki: [240, 230, 140],
|
|
11180
|
+
lavender: [230, 230, 250],
|
|
11181
|
+
lavenderblush: [255, 240, 245],
|
|
11182
|
+
lawngreen: [124, 252, 0],
|
|
11183
|
+
lemonchiffon: [255, 250, 205],
|
|
11184
|
+
lightblue: [173, 216, 230],
|
|
11185
|
+
lightcoral: [240, 128, 128],
|
|
11186
|
+
lightcyan: [224, 255, 255],
|
|
11187
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
11188
|
+
lightgray: [211, 211, 211],
|
|
11189
|
+
lightgreen: [144, 238, 144],
|
|
11190
|
+
lightgrey: [211, 211, 211],
|
|
11191
|
+
lightpink: [255, 182, 193],
|
|
11192
|
+
lightsalmon: [255, 160, 122],
|
|
11193
|
+
lightseagreen: [32, 178, 170],
|
|
11194
|
+
lightskyblue: [135, 206, 250],
|
|
11195
|
+
lightslategray: [119, 136, 153],
|
|
11196
|
+
lightslategrey: [119, 136, 153],
|
|
11197
|
+
lightsteelblue: [176, 196, 222],
|
|
11198
|
+
lightyellow: [255, 255, 224],
|
|
11199
|
+
lime: [0, 255, 0],
|
|
11200
|
+
limegreen: [50, 205, 50],
|
|
11201
|
+
linen: [250, 240, 230],
|
|
11202
|
+
magenta: [255, 0, 255],
|
|
11203
|
+
maroon: [128, 0, 0],
|
|
11204
|
+
mediumaquamarine: [102, 205, 170],
|
|
11205
|
+
mediumblue: [0, 0, 205],
|
|
11206
|
+
mediumorchid: [186, 85, 211],
|
|
11207
|
+
mediumpurple: [147, 112, 219],
|
|
11208
|
+
mediumseagreen: [60, 179, 113],
|
|
11209
|
+
mediumslateblue: [123, 104, 238],
|
|
11210
|
+
mediumspringgreen: [0, 250, 154],
|
|
11211
|
+
mediumturquoise: [72, 209, 204],
|
|
11212
|
+
mediumvioletred: [199, 21, 133],
|
|
11213
|
+
midnightblue: [25, 25, 112],
|
|
11214
|
+
mintcream: [245, 255, 250],
|
|
11215
|
+
mistyrose: [255, 228, 225],
|
|
11216
|
+
moccasin: [255, 228, 181],
|
|
11217
|
+
navajowhite: [255, 222, 173],
|
|
11218
|
+
navy: [0, 0, 128],
|
|
11219
|
+
oldlace: [253, 245, 230],
|
|
11220
|
+
olive: [128, 128, 0],
|
|
11221
|
+
olivedrab: [107, 142, 35],
|
|
11222
|
+
orange: [255, 165, 0],
|
|
11223
|
+
orangered: [255, 69, 0],
|
|
11224
|
+
orchid: [218, 112, 214],
|
|
11225
|
+
palegoldenrod: [238, 232, 170],
|
|
11226
|
+
palegreen: [152, 251, 152],
|
|
11227
|
+
paleturquoise: [175, 238, 238],
|
|
11228
|
+
palevioletred: [219, 112, 147],
|
|
11229
|
+
papayawhip: [255, 239, 213],
|
|
11230
|
+
peachpuff: [255, 218, 185],
|
|
11231
|
+
peru: [205, 133, 63],
|
|
11232
|
+
pink: [255, 192, 203],
|
|
11233
|
+
plum: [221, 160, 221],
|
|
11234
|
+
powderblue: [176, 224, 230],
|
|
11235
|
+
purple: [128, 0, 128],
|
|
11236
|
+
rebeccapurple: [102, 51, 153],
|
|
11237
|
+
red: [255, 0, 0],
|
|
11238
|
+
rosybrown: [188, 143, 143],
|
|
11239
|
+
royalblue: [65, 105, 225],
|
|
11240
|
+
saddlebrown: [139, 69, 19],
|
|
11241
|
+
salmon: [250, 128, 114],
|
|
11242
|
+
sandybrown: [244, 164, 96],
|
|
11243
|
+
seagreen: [46, 139, 87],
|
|
11244
|
+
seashell: [255, 245, 238],
|
|
11245
|
+
sienna: [160, 82, 45],
|
|
11246
|
+
silver: [192, 192, 192],
|
|
11247
|
+
skyblue: [135, 206, 235],
|
|
11248
|
+
slateblue: [106, 90, 205],
|
|
11249
|
+
slategray: [112, 128, 144],
|
|
11250
|
+
slategrey: [112, 128, 144],
|
|
11251
|
+
snow: [255, 250, 250],
|
|
11252
|
+
springgreen: [0, 255, 127],
|
|
11253
|
+
steelblue: [70, 130, 180],
|
|
11254
|
+
tan: [210, 180, 140],
|
|
11255
|
+
teal: [0, 128, 128],
|
|
11256
|
+
thistle: [216, 191, 216],
|
|
11257
|
+
tomato: [255, 99, 71],
|
|
11258
|
+
turquoise: [64, 224, 208],
|
|
11259
|
+
violet: [238, 130, 238],
|
|
11260
|
+
wheat: [245, 222, 179],
|
|
11261
|
+
white: [255, 255, 255],
|
|
11262
|
+
whitesmoke: [245, 245, 245],
|
|
11263
|
+
yellow: [255, 255, 0],
|
|
11264
|
+
yellowgreen: [154, 205, 50]
|
|
11265
|
+
};
|
|
11266
|
+
|
|
11322
11267
|
// ../../node_modules/color-parse/index.js
|
|
11323
|
-
var import_color_name = __toESM(require_color_name(), 1);
|
|
11324
11268
|
var color_parse_default = parse;
|
|
11325
11269
|
var baseHues = {
|
|
11326
11270
|
red: 0,
|
|
@@ -11336,11 +11280,10 @@
|
|
|
11336
11280
|
if (typeof cstr === "number") {
|
|
11337
11281
|
return { space: "rgb", values: [cstr >>> 16, (cstr & 65280) >>> 8, cstr & 255], alpha: 1 };
|
|
11338
11282
|
}
|
|
11339
|
-
if (typeof cstr === "number")
|
|
11340
|
-
return { space: "rgb", values: [cstr >>> 16, (cstr & 65280) >>> 8, cstr & 255], alpha: 1 };
|
|
11283
|
+
if (typeof cstr === "number") return { space: "rgb", values: [cstr >>> 16, (cstr & 65280) >>> 8, cstr & 255], alpha: 1 };
|
|
11341
11284
|
cstr = String(cstr).toLowerCase();
|
|
11342
|
-
if (
|
|
11343
|
-
parts =
|
|
11285
|
+
if (color_name_default[cstr]) {
|
|
11286
|
+
parts = color_name_default[cstr].slice();
|
|
11344
11287
|
space = "rgb";
|
|
11345
11288
|
} else if (cstr === "transparent") {
|
|
11346
11289
|
alpha2 = 0;
|
|
@@ -11370,57 +11313,38 @@
|
|
|
11370
11313
|
alpha2 = parseInt(base[6] + base[7], 16) / 255;
|
|
11371
11314
|
}
|
|
11372
11315
|
}
|
|
11373
|
-
if (!parts[0])
|
|
11374
|
-
|
|
11375
|
-
if (!parts[
|
|
11376
|
-
parts[1] = 0;
|
|
11377
|
-
if (!parts[2])
|
|
11378
|
-
parts[2] = 0;
|
|
11316
|
+
if (!parts[0]) parts[0] = 0;
|
|
11317
|
+
if (!parts[1]) parts[1] = 0;
|
|
11318
|
+
if (!parts[2]) parts[2] = 0;
|
|
11379
11319
|
space = "rgb";
|
|
11380
11320
|
} else if (m = /^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(cstr)) {
|
|
11381
11321
|
var name = m[1];
|
|
11382
11322
|
space = name.replace(/a$/, "");
|
|
11383
11323
|
var dims = space === "cmyk" ? 4 : space === "gray" ? 1 : 3;
|
|
11384
11324
|
parts = m[2].trim().split(/\s*[,\/]\s*|\s+/);
|
|
11385
|
-
if (space === "color")
|
|
11386
|
-
space = parts.shift();
|
|
11325
|
+
if (space === "color") space = parts.shift();
|
|
11387
11326
|
parts = parts.map(function(x, i) {
|
|
11388
11327
|
if (x[x.length - 1] === "%") {
|
|
11389
11328
|
x = parseFloat(x) / 100;
|
|
11390
|
-
if (i === 3)
|
|
11391
|
-
|
|
11392
|
-
if (space === "
|
|
11393
|
-
|
|
11394
|
-
if (space
|
|
11395
|
-
|
|
11396
|
-
if (space[0] === "
|
|
11397
|
-
|
|
11398
|
-
if (space === "
|
|
11399
|
-
return x * 125;
|
|
11400
|
-
if (space === "lch")
|
|
11401
|
-
return i < 2 ? x * 150 : x * 360;
|
|
11402
|
-
if (space[0] === "o" && !i)
|
|
11403
|
-
return x;
|
|
11404
|
-
if (space === "oklab")
|
|
11405
|
-
return x * 0.4;
|
|
11406
|
-
if (space === "oklch")
|
|
11407
|
-
return i < 2 ? x * 0.4 : x * 360;
|
|
11329
|
+
if (i === 3) return x;
|
|
11330
|
+
if (space === "rgb") return x * 255;
|
|
11331
|
+
if (space[0] === "h") return x * 100;
|
|
11332
|
+
if (space[0] === "l" && !i) return x * 100;
|
|
11333
|
+
if (space === "lab") return x * 125;
|
|
11334
|
+
if (space === "lch") return i < 2 ? x * 150 : x * 360;
|
|
11335
|
+
if (space[0] === "o" && !i) return x;
|
|
11336
|
+
if (space === "oklab") return x * 0.4;
|
|
11337
|
+
if (space === "oklch") return i < 2 ? x * 0.4 : x * 360;
|
|
11408
11338
|
return x;
|
|
11409
11339
|
}
|
|
11410
11340
|
if (space[i] === "h" || i === 2 && space[space.length - 1] === "h") {
|
|
11411
|
-
if (baseHues[x] !== void 0)
|
|
11412
|
-
|
|
11413
|
-
if (x.endsWith("
|
|
11414
|
-
|
|
11415
|
-
if (x.endsWith("
|
|
11416
|
-
return parseFloat(x) * 360;
|
|
11417
|
-
if (x.endsWith("grad"))
|
|
11418
|
-
return parseFloat(x) * 360 / 400;
|
|
11419
|
-
if (x.endsWith("rad"))
|
|
11420
|
-
return parseFloat(x) * 180 / Math.PI;
|
|
11341
|
+
if (baseHues[x] !== void 0) return baseHues[x];
|
|
11342
|
+
if (x.endsWith("deg")) return parseFloat(x);
|
|
11343
|
+
if (x.endsWith("turn")) return parseFloat(x) * 360;
|
|
11344
|
+
if (x.endsWith("grad")) return parseFloat(x) * 360 / 400;
|
|
11345
|
+
if (x.endsWith("rad")) return parseFloat(x) * 180 / Math.PI;
|
|
11421
11346
|
}
|
|
11422
|
-
if (x === "none")
|
|
11423
|
-
return 0;
|
|
11347
|
+
if (x === "none") return 0;
|
|
11424
11348
|
return parseFloat(x);
|
|
11425
11349
|
});
|
|
11426
11350
|
alpha2 = parts.length > dims ? parts.pop() : 1;
|
|
@@ -11455,8 +11379,7 @@
|
|
|
11455
11379
|
alias: ["HSL"],
|
|
11456
11380
|
rgb: function(hsl) {
|
|
11457
11381
|
var h = hsl[0] / 360, s = hsl[1] / 100, l = hsl[2] / 100, t1, t2, t3, rgb, val, i = 0;
|
|
11458
|
-
if (s === 0)
|
|
11459
|
-
return val = l * 255, [val, val, val];
|
|
11382
|
+
if (s === 0) return val = l * 255, [val, val, val];
|
|
11460
11383
|
t2 = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
11461
11384
|
t1 = 2 * l - t2;
|
|
11462
11385
|
rgb = [0, 0, 0];
|
|
@@ -11497,14 +11420,11 @@
|
|
|
11497
11420
|
|
|
11498
11421
|
// ../../node_modules/color-rgba/index.js
|
|
11499
11422
|
function rgba(color2) {
|
|
11500
|
-
if (Array.isArray(color2) && color2.raw)
|
|
11501
|
-
|
|
11502
|
-
if (color2 instanceof Number)
|
|
11503
|
-
color2 = +color2;
|
|
11423
|
+
if (Array.isArray(color2) && color2.raw) color2 = String.raw(...arguments);
|
|
11424
|
+
if (color2 instanceof Number) color2 = +color2;
|
|
11504
11425
|
var values, i, l;
|
|
11505
11426
|
var parsed = color_parse_default(color2);
|
|
11506
|
-
if (!parsed.space)
|
|
11507
|
-
return [];
|
|
11427
|
+
if (!parsed.space) return [];
|
|
11508
11428
|
const min = parsed.space[0] === "h" ? hsl_default.min : rgb_default.min;
|
|
11509
11429
|
const max = parsed.space[0] === "h" ? hsl_default.max : rgb_default.max;
|
|
11510
11430
|
values = Array(3);
|
|
@@ -11555,8 +11475,7 @@
|
|
|
11555
11475
|
});
|
|
11556
11476
|
}
|
|
11557
11477
|
equals(other) {
|
|
11558
|
-
if (this === other)
|
|
11559
|
-
return true;
|
|
11478
|
+
if (this === other) return true;
|
|
11560
11479
|
return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
|
|
11561
11480
|
}
|
|
11562
11481
|
};
|
|
@@ -11599,8 +11518,7 @@
|
|
|
11599
11518
|
return this.equals(other);
|
|
11600
11519
|
}
|
|
11601
11520
|
equals(other) {
|
|
11602
|
-
if (this === other)
|
|
11603
|
-
return true;
|
|
11521
|
+
if (this === other) return true;
|
|
11604
11522
|
return this.color === other.color && this.width === other.width && this.style === other.style && this.strokeAlign === other.strokeAlign;
|
|
11605
11523
|
}
|
|
11606
11524
|
static get none() {
|
|
@@ -11678,8 +11596,7 @@
|
|
|
11678
11596
|
});
|
|
11679
11597
|
}
|
|
11680
11598
|
equals(other) {
|
|
11681
|
-
if (this === other)
|
|
11682
|
-
return true;
|
|
11599
|
+
if (this === other) return true;
|
|
11683
11600
|
return this.top.equals(other.top) && this.right.equals(other.right) && this.bottom.equals(other.bottom) && this.left.equals(other.left);
|
|
11684
11601
|
}
|
|
11685
11602
|
/**
|
|
@@ -12299,8 +12216,7 @@
|
|
|
12299
12216
|
});
|
|
12300
12217
|
}
|
|
12301
12218
|
equals(other) {
|
|
12302
|
-
if (this === other)
|
|
12303
|
-
return true;
|
|
12219
|
+
if (this === other) return true;
|
|
12304
12220
|
return this.color === other.color && this.offset.equals(other.offset) && this.blurRadius === other.blurRadius;
|
|
12305
12221
|
}
|
|
12306
12222
|
};
|
|
@@ -12353,8 +12269,7 @@
|
|
|
12353
12269
|
});
|
|
12354
12270
|
}
|
|
12355
12271
|
equals(other) {
|
|
12356
|
-
if (this === other)
|
|
12357
|
-
return true;
|
|
12272
|
+
if (this === other) return true;
|
|
12358
12273
|
if (!(this.color == null && other.color == null) && (!(this.color != null && other.color != null) || !this.color.equals(other.color))) {
|
|
12359
12274
|
return false;
|
|
12360
12275
|
}
|
|
@@ -12367,8 +12282,7 @@
|
|
|
12367
12282
|
if (!(this.boxShadow == null && other.boxShadow == null) && (!(this.boxShadow != null && other.boxShadow != null) || !box_shadow_default.equals(this.boxShadow, other.boxShadow))) {
|
|
12368
12283
|
return false;
|
|
12369
12284
|
}
|
|
12370
|
-
if (this.shape !== other.shape)
|
|
12371
|
-
return false;
|
|
12285
|
+
if (this.shape !== other.shape) return false;
|
|
12372
12286
|
return true;
|
|
12373
12287
|
}
|
|
12374
12288
|
get padding() {
|
|
@@ -12600,8 +12514,7 @@
|
|
|
12600
12514
|
this.height = height;
|
|
12601
12515
|
}
|
|
12602
12516
|
equals(other) {
|
|
12603
|
-
if (this === other)
|
|
12604
|
-
return true;
|
|
12517
|
+
if (this === other) return true;
|
|
12605
12518
|
return this.inherit === other.inherit && this.color === other.color && this.fontSize === other.fontSize && this.fontWeight === other.fontWeight && this.fontFamily === other.fontFamily && this.textBaseline === other.textBaseline && this.fontStyle === other.fontStyle;
|
|
12606
12519
|
}
|
|
12607
12520
|
copyWidth({
|
|
@@ -12626,10 +12539,8 @@
|
|
|
12626
12539
|
});
|
|
12627
12540
|
}
|
|
12628
12541
|
merge(other) {
|
|
12629
|
-
if (other == null)
|
|
12630
|
-
|
|
12631
|
-
if (!other.inherit)
|
|
12632
|
-
return other;
|
|
12542
|
+
if (other == null) return this;
|
|
12543
|
+
if (!other.inherit) return other;
|
|
12633
12544
|
return this.copyWidth(__spreadValues({}, other));
|
|
12634
12545
|
}
|
|
12635
12546
|
getParagraphStyle({
|
|
@@ -12698,16 +12609,14 @@
|
|
|
12698
12609
|
this.style = style;
|
|
12699
12610
|
}
|
|
12700
12611
|
static equals(targets, values) {
|
|
12701
|
-
if (targets.length !== values.length)
|
|
12702
|
-
return false;
|
|
12612
|
+
if (targets.length !== values.length) return false;
|
|
12703
12613
|
return targets.every((value, i) => values[i].equals(value));
|
|
12704
12614
|
}
|
|
12705
12615
|
equals(other) {
|
|
12706
12616
|
if (this.style != null || other.style != null) {
|
|
12707
12617
|
return this.style.equals(other.style);
|
|
12708
12618
|
}
|
|
12709
|
-
if (this.style == null && other.style == null)
|
|
12710
|
-
return true;
|
|
12619
|
+
if (this.style == null && other.style == null) return true;
|
|
12711
12620
|
return false;
|
|
12712
12621
|
}
|
|
12713
12622
|
computeToPlainText() {
|
|
@@ -12739,8 +12648,7 @@
|
|
|
12739
12648
|
this.text = text;
|
|
12740
12649
|
}
|
|
12741
12650
|
equals(other) {
|
|
12742
|
-
if (other === this)
|
|
12743
|
-
return true;
|
|
12651
|
+
if (other === this) return true;
|
|
12744
12652
|
return this.text === other.text && this.style.equals(other.style) && Inline_span_default.equals(this.children, other.children);
|
|
12745
12653
|
}
|
|
12746
12654
|
visitChildren(visitor) {
|
|
@@ -12824,28 +12732,23 @@
|
|
|
12824
12732
|
return ((_a = this.text) == null ? void 0 : _a.toPlainText()) || "";
|
|
12825
12733
|
}
|
|
12826
12734
|
get width() {
|
|
12827
|
-
if (this.paragraph == null)
|
|
12828
|
-
return 0;
|
|
12735
|
+
if (this.paragraph == null) return 0;
|
|
12829
12736
|
return this.paragraph.width;
|
|
12830
12737
|
}
|
|
12831
12738
|
get height() {
|
|
12832
|
-
if (this.paragraph == null)
|
|
12833
|
-
return 0;
|
|
12739
|
+
if (this.paragraph == null) return 0;
|
|
12834
12740
|
return this.paragraph.height;
|
|
12835
12741
|
}
|
|
12836
12742
|
get intrinsicWidth() {
|
|
12837
|
-
if (this.paragraph == null)
|
|
12838
|
-
return 0;
|
|
12743
|
+
if (this.paragraph == null) return 0;
|
|
12839
12744
|
return this.paragraph.intrinsicWidth;
|
|
12840
12745
|
}
|
|
12841
12746
|
get intrinsicHeight() {
|
|
12842
|
-
if (this.paragraph == null)
|
|
12843
|
-
return 0;
|
|
12747
|
+
if (this.paragraph == null) return 0;
|
|
12844
12748
|
return this.paragraph.intrinsicHeight;
|
|
12845
12749
|
}
|
|
12846
12750
|
get longestLine() {
|
|
12847
|
-
if (this.paragraph == null)
|
|
12848
|
-
return 0;
|
|
12751
|
+
if (this.paragraph == null) return 0;
|
|
12849
12752
|
return this.paragraph.longestLine;
|
|
12850
12753
|
}
|
|
12851
12754
|
paintOnCanvas(ctx, offset) {
|
|
@@ -13461,6 +13364,30 @@
|
|
|
13461
13364
|
950: "#4c0519"
|
|
13462
13365
|
};
|
|
13463
13366
|
|
|
13367
|
+
// src/type/_types/object-fit.ts
|
|
13368
|
+
var ObjectFit = /* @__PURE__ */ ((ObjectFit2) => {
|
|
13369
|
+
ObjectFit2["fill"] = "fill";
|
|
13370
|
+
ObjectFit2["contain"] = "contain";
|
|
13371
|
+
ObjectFit2["cover"] = "cover";
|
|
13372
|
+
ObjectFit2["none"] = "none";
|
|
13373
|
+
ObjectFit2["scaleDown"] = "scale-down";
|
|
13374
|
+
return ObjectFit2;
|
|
13375
|
+
})(ObjectFit || {});
|
|
13376
|
+
|
|
13377
|
+
// src/type/_types/object-position.ts
|
|
13378
|
+
var ObjectPosition = /* @__PURE__ */ ((ObjectPosition2) => {
|
|
13379
|
+
ObjectPosition2["center"] = "center";
|
|
13380
|
+
ObjectPosition2["top"] = "top";
|
|
13381
|
+
ObjectPosition2["right"] = "right";
|
|
13382
|
+
ObjectPosition2["bottom"] = "bottom";
|
|
13383
|
+
ObjectPosition2["left"] = "left";
|
|
13384
|
+
ObjectPosition2["topLeft"] = "top left";
|
|
13385
|
+
ObjectPosition2["topRight"] = "top right";
|
|
13386
|
+
ObjectPosition2["bottomLeft"] = "bottom left";
|
|
13387
|
+
ObjectPosition2["bottomRight"] = "bottom right";
|
|
13388
|
+
return ObjectPosition2;
|
|
13389
|
+
})(ObjectPosition || {});
|
|
13390
|
+
|
|
13464
13391
|
// src/framework/renderer/renderer.ts
|
|
13465
13392
|
var _resizeHandlers;
|
|
13466
13393
|
var RenderContext = class {
|
|
@@ -13559,8 +13486,7 @@
|
|
|
13559
13486
|
const dirties = this.needsLayoutRenderObjects;
|
|
13560
13487
|
this.needsLayoutRenderObjects = [];
|
|
13561
13488
|
dirties.sort((a, b) => a.depth - b.depth).forEach((renderObject) => {
|
|
13562
|
-
if (!renderObject.needsLayout)
|
|
13563
|
-
return;
|
|
13489
|
+
if (!renderObject.needsLayout) return;
|
|
13564
13490
|
renderObject.layoutWithoutResize();
|
|
13565
13491
|
});
|
|
13566
13492
|
}
|
|
@@ -13569,8 +13495,7 @@
|
|
|
13569
13495
|
this.requestVisualUpdate();
|
|
13570
13496
|
}
|
|
13571
13497
|
recalculateZOrder() {
|
|
13572
|
-
if (!__privateGet(this, _zOrderChanged))
|
|
13573
|
-
return [];
|
|
13498
|
+
if (!__privateGet(this, _zOrderChanged)) return [];
|
|
13574
13499
|
__privateSet(this, _zOrderChanged, false);
|
|
13575
13500
|
const visitor = new ZOrderCalculatorVisitor();
|
|
13576
13501
|
this.renderView.accept(visitor);
|
|
@@ -13585,8 +13510,7 @@
|
|
|
13585
13510
|
const dirties = this.needsPaintTransformUpdateRenderObjects;
|
|
13586
13511
|
this.needsPaintTransformUpdateRenderObjects = [];
|
|
13587
13512
|
dirties.sort((a, b) => a.depth - b.depth).forEach((renderObject) => {
|
|
13588
|
-
if (!renderObject.needsPaintTransformUpdate)
|
|
13589
|
-
return;
|
|
13513
|
+
if (!renderObject.needsPaintTransformUpdate) return;
|
|
13590
13514
|
renderObject.updatePaintTransform();
|
|
13591
13515
|
});
|
|
13592
13516
|
}
|
|
@@ -13628,21 +13552,21 @@
|
|
|
13628
13552
|
this.renderObject.paintTransform = newValue;
|
|
13629
13553
|
}
|
|
13630
13554
|
};
|
|
13631
|
-
var
|
|
13555
|
+
var _ZOrderCalculatorVisitor_instances, visit_fn;
|
|
13632
13556
|
var ZOrderCalculatorVisitor = class {
|
|
13633
13557
|
constructor() {
|
|
13634
|
-
__privateAdd(this,
|
|
13558
|
+
__privateAdd(this, _ZOrderCalculatorVisitor_instances);
|
|
13635
13559
|
__publicField(this, "collectedRenderObjects", []);
|
|
13636
13560
|
__publicField(this, "currentVisitedOrder", 0);
|
|
13637
13561
|
__publicField(this, "currentStackingContext", []);
|
|
13638
13562
|
}
|
|
13639
13563
|
visit(renderObject) {
|
|
13640
|
-
__privateMethod(this,
|
|
13564
|
+
__privateMethod(this, _ZOrderCalculatorVisitor_instances, visit_fn).call(this, renderObject, {
|
|
13641
13565
|
willCollect: renderObject.isPainter
|
|
13642
13566
|
});
|
|
13643
13567
|
}
|
|
13644
13568
|
visitGestureDetector(gestureDetector) {
|
|
13645
|
-
__privateMethod(this,
|
|
13569
|
+
__privateMethod(this, _ZOrderCalculatorVisitor_instances, visit_fn).call(this, gestureDetector, { willCollect: true });
|
|
13646
13570
|
}
|
|
13647
13571
|
visitZIndex(renderObject) {
|
|
13648
13572
|
this.currentStackingContext = [...this.currentStackingContext];
|
|
@@ -13650,7 +13574,7 @@
|
|
|
13650
13574
|
visitedOrder: this.currentVisitedOrder,
|
|
13651
13575
|
zIndex: renderObject.zIndex
|
|
13652
13576
|
});
|
|
13653
|
-
__privateMethod(this,
|
|
13577
|
+
__privateMethod(this, _ZOrderCalculatorVisitor_instances, visit_fn).call(this, renderObject, { willCollect: false });
|
|
13654
13578
|
this.currentStackingContext = [...this.currentStackingContext];
|
|
13655
13579
|
this.currentStackingContext.pop();
|
|
13656
13580
|
}
|
|
@@ -13693,7 +13617,7 @@
|
|
|
13693
13617
|
return sorted.map(({ renderObject }) => renderObject);
|
|
13694
13618
|
}
|
|
13695
13619
|
};
|
|
13696
|
-
|
|
13620
|
+
_ZOrderCalculatorVisitor_instances = new WeakSet();
|
|
13697
13621
|
visit_fn = function(renderObject, { willCollect }) {
|
|
13698
13622
|
if (willCollect) {
|
|
13699
13623
|
this.collectedRenderObjects.push({
|
|
@@ -13708,11 +13632,11 @@
|
|
|
13708
13632
|
};
|
|
13709
13633
|
|
|
13710
13634
|
// src/framework/renderer/svg/svg-renderer.ts
|
|
13711
|
-
var
|
|
13635
|
+
var _SvgRenderPipeline_instances, rearrangeDomOrder_fn;
|
|
13712
13636
|
var SvgRenderPipeline = class extends RenderPipeline {
|
|
13713
13637
|
constructor() {
|
|
13714
13638
|
super(...arguments);
|
|
13715
|
-
__privateAdd(this,
|
|
13639
|
+
__privateAdd(this, _SvgRenderPipeline_instances);
|
|
13716
13640
|
__publicField(this, "paintContext", {
|
|
13717
13641
|
isOnBrowser: () => typeof this.renderContext.window !== "undefined",
|
|
13718
13642
|
createSvgEl: (tagName) => {
|
|
@@ -13740,21 +13664,20 @@
|
|
|
13740
13664
|
this.flushPaintTransformUpdate();
|
|
13741
13665
|
this.flushPaint();
|
|
13742
13666
|
const painterRenderObjects = this.recalculateZOrder();
|
|
13743
|
-
__privateMethod(this,
|
|
13667
|
+
__privateMethod(this, _SvgRenderPipeline_instances, rearrangeDomOrder_fn).call(this, painterRenderObjects);
|
|
13744
13668
|
}
|
|
13745
13669
|
reinitializeFrame() {
|
|
13746
13670
|
this.renderView.layout(constraints_default.tight(this.renderContext.viewSize));
|
|
13747
13671
|
this.renderView.updatePaintTransform();
|
|
13748
13672
|
this.renderView.svgPainter.paint(this.paintContext);
|
|
13749
13673
|
const painterRenderObjects = this.recalculateZOrder();
|
|
13750
|
-
__privateMethod(this,
|
|
13674
|
+
__privateMethod(this, _SvgRenderPipeline_instances, rearrangeDomOrder_fn).call(this, painterRenderObjects);
|
|
13751
13675
|
}
|
|
13752
13676
|
flushPaint() {
|
|
13753
13677
|
const dirties = this.needsPaintRenderObjects;
|
|
13754
13678
|
this.needsPaintRenderObjects = [];
|
|
13755
13679
|
dirties.sort((a, b) => a.depth - b.depth).forEach((renderObject) => {
|
|
13756
|
-
if (!renderObject.needsPaint)
|
|
13757
|
-
return;
|
|
13680
|
+
if (!renderObject.needsPaint) return;
|
|
13758
13681
|
renderObject.svgPainter.paintWithoutLayout(this.paintContext);
|
|
13759
13682
|
});
|
|
13760
13683
|
}
|
|
@@ -13777,7 +13700,7 @@
|
|
|
13777
13700
|
renderObject.svgPainter.didChangePaintTransform();
|
|
13778
13701
|
}
|
|
13779
13702
|
};
|
|
13780
|
-
|
|
13703
|
+
_SvgRenderPipeline_instances = new WeakSet();
|
|
13781
13704
|
rearrangeDomOrder_fn = function(painterRenderObjects) {
|
|
13782
13705
|
painterRenderObjects.reverse();
|
|
13783
13706
|
painterRenderObjects.forEach((child) => {
|
|
@@ -13797,16 +13720,15 @@
|
|
|
13797
13720
|
}
|
|
13798
13721
|
|
|
13799
13722
|
// src/framework/renderer/canvas/canvas-painting-context.ts
|
|
13800
|
-
var _estimateBound, _containerLayer, _currentLayer, _recorder, _ctx2,
|
|
13723
|
+
var _estimateBound, _containerLayer, _currentLayer, _recorder, _ctx2, _CanvasPaintingContext_instances, startRecording_fn, appendLayer_fn;
|
|
13801
13724
|
var _CanvasPaintingContext = class _CanvasPaintingContext {
|
|
13802
13725
|
constructor(containerLayer, estimateBound) {
|
|
13803
|
-
__privateAdd(this,
|
|
13804
|
-
__privateAdd(this,
|
|
13805
|
-
__privateAdd(this,
|
|
13806
|
-
__privateAdd(this,
|
|
13807
|
-
__privateAdd(this,
|
|
13808
|
-
__privateAdd(this,
|
|
13809
|
-
__privateAdd(this, _ctx2, void 0);
|
|
13726
|
+
__privateAdd(this, _CanvasPaintingContext_instances);
|
|
13727
|
+
__privateAdd(this, _estimateBound);
|
|
13728
|
+
__privateAdd(this, _containerLayer);
|
|
13729
|
+
__privateAdd(this, _currentLayer);
|
|
13730
|
+
__privateAdd(this, _recorder);
|
|
13731
|
+
__privateAdd(this, _ctx2);
|
|
13810
13732
|
__privateSet(this, _containerLayer, containerLayer);
|
|
13811
13733
|
__privateSet(this, _estimateBound, estimateBound);
|
|
13812
13734
|
}
|
|
@@ -13839,7 +13761,7 @@
|
|
|
13839
13761
|
}
|
|
13840
13762
|
get canvas() {
|
|
13841
13763
|
if (__privateGet(this, _ctx2) == null) {
|
|
13842
|
-
__privateMethod(this,
|
|
13764
|
+
__privateMethod(this, _CanvasPaintingContext_instances, startRecording_fn).call(this);
|
|
13843
13765
|
}
|
|
13844
13766
|
return __privateGet(this, _ctx2);
|
|
13845
13767
|
}
|
|
@@ -13851,7 +13773,7 @@
|
|
|
13851
13773
|
}
|
|
13852
13774
|
addLayer(layer) {
|
|
13853
13775
|
this.stopRecording();
|
|
13854
|
-
__privateMethod(this,
|
|
13776
|
+
__privateMethod(this, _CanvasPaintingContext_instances, appendLayer_fn).call(this, layer);
|
|
13855
13777
|
}
|
|
13856
13778
|
/**
|
|
13857
13779
|
*
|
|
@@ -13871,39 +13793,37 @@
|
|
|
13871
13793
|
_currentLayer = new WeakMap();
|
|
13872
13794
|
_recorder = new WeakMap();
|
|
13873
13795
|
_ctx2 = new WeakMap();
|
|
13874
|
-
|
|
13796
|
+
_CanvasPaintingContext_instances = new WeakSet();
|
|
13875
13797
|
startRecording_fn = function() {
|
|
13876
13798
|
__privateSet(this, _currentLayer, new PictureLayer(__privateGet(this, _estimateBound)));
|
|
13877
13799
|
__privateSet(this, _recorder, new PictureRecorder(__privateGet(this, _estimateBound)));
|
|
13878
13800
|
__privateSet(this, _ctx2, __privateGet(this, _recorder).createCanvasContext());
|
|
13879
13801
|
__privateGet(this, _containerLayer).append(__privateGet(this, _currentLayer));
|
|
13880
13802
|
};
|
|
13881
|
-
_appendLayer = new WeakSet();
|
|
13882
13803
|
appendLayer_fn = function(layer) {
|
|
13883
13804
|
__privateGet(this, _containerLayer).append(layer);
|
|
13884
13805
|
};
|
|
13885
13806
|
var CanvasPaintingContext = _CanvasPaintingContext;
|
|
13886
13807
|
|
|
13887
13808
|
// src/framework/renderer/canvas/canvas-renderer.ts
|
|
13888
|
-
var
|
|
13809
|
+
var _CanvasRenderPipeline_instances, compositeFrame_fn, prepareCanvas_fn;
|
|
13889
13810
|
var CanvasRenderPipeline = class extends RenderPipeline {
|
|
13890
13811
|
constructor() {
|
|
13891
13812
|
super(...arguments);
|
|
13892
|
-
__privateAdd(this,
|
|
13893
|
-
__privateAdd(this, _prepareCanvas);
|
|
13813
|
+
__privateAdd(this, _CanvasRenderPipeline_instances);
|
|
13894
13814
|
}
|
|
13895
13815
|
drawFrame() {
|
|
13896
13816
|
this.flushLayout();
|
|
13897
13817
|
this.flushPaintTransformUpdate();
|
|
13898
13818
|
this.flushPaint();
|
|
13899
13819
|
this.recalculateZOrder();
|
|
13900
|
-
__privateMethod(this,
|
|
13820
|
+
__privateMethod(this, _CanvasRenderPipeline_instances, compositeFrame_fn).call(this);
|
|
13901
13821
|
}
|
|
13902
13822
|
reinitializeFrame() {
|
|
13903
13823
|
this.renderView.layout(constraints_default.tight(this.renderContext.viewSize));
|
|
13904
13824
|
this.renderView.updatePaintTransform();
|
|
13905
13825
|
CanvasPaintingContext.repaintCompositedChild(this.renderView);
|
|
13906
|
-
__privateMethod(this,
|
|
13826
|
+
__privateMethod(this, _CanvasRenderPipeline_instances, compositeFrame_fn).call(this);
|
|
13907
13827
|
}
|
|
13908
13828
|
flushPaint() {
|
|
13909
13829
|
const dirties = this.needsPaintRenderObjects;
|
|
@@ -13948,14 +13868,13 @@
|
|
|
13948
13868
|
renderObjet.markNeedsPaint();
|
|
13949
13869
|
}
|
|
13950
13870
|
};
|
|
13951
|
-
|
|
13871
|
+
_CanvasRenderPipeline_instances = new WeakSet();
|
|
13952
13872
|
compositeFrame_fn = function() {
|
|
13953
13873
|
const builder = new SceneBuilder();
|
|
13954
|
-
const ctx = __privateMethod(this,
|
|
13874
|
+
const ctx = __privateMethod(this, _CanvasRenderPipeline_instances, prepareCanvas_fn).call(this, this.renderContext.view);
|
|
13955
13875
|
this.renderView.canvasPainter.layer.buildScene(builder);
|
|
13956
13876
|
builder.render(ctx);
|
|
13957
13877
|
};
|
|
13958
|
-
_prepareCanvas = new WeakSet();
|
|
13959
13878
|
prepareCanvas_fn = function(canvas) {
|
|
13960
13879
|
const size = this.renderContext.viewSize;
|
|
13961
13880
|
const dpr = window.devicePixelRatio;
|
|
@@ -13988,9 +13907,9 @@
|
|
|
13988
13907
|
var SvgPainter = class extends Painter {
|
|
13989
13908
|
constructor() {
|
|
13990
13909
|
super(...arguments);
|
|
13991
|
-
__privateAdd(this, _clipId
|
|
13910
|
+
__privateAdd(this, _clipId);
|
|
13992
13911
|
__privateAdd(this, _opacity, 1);
|
|
13993
|
-
__privateAdd(this, _domNode
|
|
13912
|
+
__privateAdd(this, _domNode);
|
|
13994
13913
|
/**
|
|
13995
13914
|
* domOrder is used to rearrange dom order
|
|
13996
13915
|
*/
|
|
@@ -14100,8 +14019,7 @@
|
|
|
14100
14019
|
* It is currently only used on ZIndexRenderObject
|
|
14101
14020
|
*/
|
|
14102
14021
|
rearrangeDomOrder() {
|
|
14103
|
-
if (!__privateGet(this, _domOrderChanged))
|
|
14104
|
-
return;
|
|
14022
|
+
if (!__privateGet(this, _domOrderChanged)) return;
|
|
14105
14023
|
if (this.isPainter && this.domNode) {
|
|
14106
14024
|
this.renderOwner.paintContext.insertSvgEl(
|
|
14107
14025
|
this.domNode,
|
|
@@ -14129,7 +14047,7 @@
|
|
|
14129
14047
|
var CanvasPainter = class extends Painter {
|
|
14130
14048
|
constructor() {
|
|
14131
14049
|
super(...arguments);
|
|
14132
|
-
__privateAdd(this, _layer
|
|
14050
|
+
__privateAdd(this, _layer);
|
|
14133
14051
|
}
|
|
14134
14052
|
get renderOwner() {
|
|
14135
14053
|
return this.renderObject.renderOwner;
|
|
@@ -14209,8 +14127,7 @@
|
|
|
14209
14127
|
}
|
|
14210
14128
|
}
|
|
14211
14129
|
schedule() {
|
|
14212
|
-
if (this.hasScheduledFrame)
|
|
14213
|
-
return;
|
|
14130
|
+
if (this.hasScheduledFrame) return;
|
|
14214
14131
|
this.renderFrameDispatcher.dispatch();
|
|
14215
14132
|
this.hasScheduledFrame = true;
|
|
14216
14133
|
}
|
|
@@ -14250,8 +14167,7 @@
|
|
|
14250
14167
|
this.onFrame = () => callback();
|
|
14251
14168
|
}
|
|
14252
14169
|
dispatch() {
|
|
14253
|
-
if (typeof window === "undefined")
|
|
14254
|
-
return;
|
|
14170
|
+
if (typeof window === "undefined") return;
|
|
14255
14171
|
window.requestAnimationFrame(() => {
|
|
14256
14172
|
var _a;
|
|
14257
14173
|
(_a = this.onFrame) == null ? void 0 : _a.call(this);
|
|
@@ -14277,10 +14193,10 @@
|
|
|
14277
14193
|
var Globalkey_default = GlobalKey;
|
|
14278
14194
|
|
|
14279
14195
|
// src/renderobject/RenderObject.ts
|
|
14280
|
-
var _zOrder, _svgPainter, _canvasPainter,
|
|
14196
|
+
var _zOrder, _svgPainter, _canvasPainter, _RenderObject_instances, didChangePaintTransform_fn;
|
|
14281
14197
|
var RenderObject = class {
|
|
14282
14198
|
constructor({ isPainter }) {
|
|
14283
|
-
__privateAdd(this,
|
|
14199
|
+
__privateAdd(this, _RenderObject_instances);
|
|
14284
14200
|
__publicField(this, "runtimeType", this.constructor.name);
|
|
14285
14201
|
__publicField(this, "isPainter");
|
|
14286
14202
|
__publicField(this, "ownerElement");
|
|
@@ -14295,9 +14211,9 @@
|
|
|
14295
14211
|
* zOrder is used to order the render objects in the z axis
|
|
14296
14212
|
* Also related to event bubbling on HitTestDispatcher
|
|
14297
14213
|
*/
|
|
14298
|
-
__privateAdd(this, _zOrder
|
|
14299
|
-
__privateAdd(this, _svgPainter
|
|
14300
|
-
__privateAdd(this, _canvasPainter
|
|
14214
|
+
__privateAdd(this, _zOrder);
|
|
14215
|
+
__privateAdd(this, _svgPainter);
|
|
14216
|
+
__privateAdd(this, _canvasPainter);
|
|
14301
14217
|
__publicField(this, "type", this.constructor.name);
|
|
14302
14218
|
__publicField(this, "constraints", constraints_default.loose(size_default.maximum()));
|
|
14303
14219
|
__publicField(this, "_offset", offset_default.zero());
|
|
@@ -14309,8 +14225,7 @@
|
|
|
14309
14225
|
return __privateGet(this, _zOrder);
|
|
14310
14226
|
}
|
|
14311
14227
|
updateZOrder(value) {
|
|
14312
|
-
if (__privateGet(this, _zOrder) === value)
|
|
14313
|
-
return;
|
|
14228
|
+
if (__privateGet(this, _zOrder) === value) return;
|
|
14314
14229
|
__privateSet(this, _zOrder, value);
|
|
14315
14230
|
if (__privateGet(this, _svgPainter) != null) {
|
|
14316
14231
|
__privateGet(this, _svgPainter).didDomOrderChange();
|
|
@@ -14347,8 +14262,7 @@
|
|
|
14347
14262
|
return this._offset;
|
|
14348
14263
|
}
|
|
14349
14264
|
set offset(value) {
|
|
14350
|
-
if (this.offset.x === value.x && this.offset.y === value.y)
|
|
14351
|
-
return;
|
|
14265
|
+
if (this.offset.x === value.x && this.offset.y === value.y) return;
|
|
14352
14266
|
this._offset = value;
|
|
14353
14267
|
this.markNeedsPaintTransformUpdate();
|
|
14354
14268
|
}
|
|
@@ -14381,10 +14295,10 @@
|
|
|
14381
14295
|
dispose() {
|
|
14382
14296
|
this.renderOwner.disposeRenderObject(this);
|
|
14383
14297
|
}
|
|
14384
|
-
getIntrinsicWidth(
|
|
14298
|
+
getIntrinsicWidth(_height2) {
|
|
14385
14299
|
return 0;
|
|
14386
14300
|
}
|
|
14387
|
-
getIntrinsicHeight(
|
|
14301
|
+
getIntrinsicHeight(_width2) {
|
|
14388
14302
|
return 0;
|
|
14389
14303
|
}
|
|
14390
14304
|
/*
|
|
@@ -14444,7 +14358,7 @@
|
|
|
14444
14358
|
}
|
|
14445
14359
|
this.needsPaintTransformUpdate = false;
|
|
14446
14360
|
this.paintTransform = newTransform;
|
|
14447
|
-
__privateMethod(this,
|
|
14361
|
+
__privateMethod(this, _RenderObject_instances, didChangePaintTransform_fn).call(this);
|
|
14448
14362
|
const childPaintTransform = this.applyPaintTransform(newTransform);
|
|
14449
14363
|
this.visitChildren((child) => {
|
|
14450
14364
|
child.updatePaintTransform(childPaintTransform);
|
|
@@ -14454,7 +14368,7 @@
|
|
|
14454
14368
|
_zOrder = new WeakMap();
|
|
14455
14369
|
_svgPainter = new WeakMap();
|
|
14456
14370
|
_canvasPainter = new WeakMap();
|
|
14457
|
-
|
|
14371
|
+
_RenderObject_instances = new WeakSet();
|
|
14458
14372
|
didChangePaintTransform_fn = function() {
|
|
14459
14373
|
this.renderOwner.didChangePaintTransform(this);
|
|
14460
14374
|
};
|
|
@@ -14472,8 +14386,7 @@
|
|
|
14472
14386
|
const constraint = this.constraints;
|
|
14473
14387
|
if (!constraint.isTight)
|
|
14474
14388
|
throw new Error("constraint must be tight on render view");
|
|
14475
|
-
if (constraint.maxWidth === 0 || constraint.maxHeight === 0)
|
|
14476
|
-
return;
|
|
14389
|
+
if (constraint.maxWidth === 0 || constraint.maxHeight === 0) return;
|
|
14477
14390
|
this.size = new size_default({
|
|
14478
14391
|
width: constraint.maxWidth,
|
|
14479
14392
|
height: constraint.maxHeight
|
|
@@ -14541,8 +14454,7 @@
|
|
|
14541
14454
|
result = child.renderObject;
|
|
14542
14455
|
}
|
|
14543
14456
|
});
|
|
14544
|
-
if (result == null)
|
|
14545
|
-
throw new Error("can not find render object");
|
|
14457
|
+
if (result == null) throw new Error("can not find render object");
|
|
14546
14458
|
return result;
|
|
14547
14459
|
}
|
|
14548
14460
|
//There are 5 case
|
|
@@ -14595,8 +14507,7 @@
|
|
|
14595
14507
|
return newChild;
|
|
14596
14508
|
}
|
|
14597
14509
|
rebuild({ force = false } = {}) {
|
|
14598
|
-
if (!this.dirty && !force)
|
|
14599
|
-
return;
|
|
14510
|
+
if (!this.dirty && !force) return;
|
|
14600
14511
|
this.dirty = false;
|
|
14601
14512
|
this.performRebuild();
|
|
14602
14513
|
}
|
|
@@ -14671,8 +14582,7 @@
|
|
|
14671
14582
|
return this.updateChild(matchedChild, newWidget);
|
|
14672
14583
|
});
|
|
14673
14584
|
oldChildren.forEach((oldChild, i) => {
|
|
14674
|
-
if (updatedChildIndexes.includes(i))
|
|
14675
|
-
return;
|
|
14585
|
+
if (updatedChildIndexes.includes(i)) return;
|
|
14676
14586
|
this.updateChild(oldChild, null);
|
|
14677
14587
|
});
|
|
14678
14588
|
this.children = newChildren;
|
|
@@ -14754,7 +14664,7 @@
|
|
|
14754
14664
|
__privateAdd(this, _activated, typeof window !== "undefined");
|
|
14755
14665
|
__privateAdd(this, _detectors, []);
|
|
14756
14666
|
__privateAdd(this, _rootPosition, null);
|
|
14757
|
-
__privateAdd(this, _renderContext
|
|
14667
|
+
__privateAdd(this, _renderContext);
|
|
14758
14668
|
__privateAdd(this, _hitPosition, new offset_default({ x: 0, y: 0 }));
|
|
14759
14669
|
__privateAdd(this, _handleMouseDown, (e) => {
|
|
14760
14670
|
this.hitTest(e, "onMouseDown");
|
|
@@ -14771,8 +14681,7 @@
|
|
|
14771
14681
|
e.isPropagationStopped = false;
|
|
14772
14682
|
for (const i in __privateGet(this, _detectors)) {
|
|
14773
14683
|
const detector = __privateGet(this, _detectors)[i];
|
|
14774
|
-
if (e.isPropagationStopped)
|
|
14775
|
-
return;
|
|
14684
|
+
if (e.isPropagationStopped) return;
|
|
14776
14685
|
if (!__privateGet(this, _hitHistory)[i] && detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) {
|
|
14777
14686
|
detector.onMouseEnter(e);
|
|
14778
14687
|
}
|
|
@@ -14780,8 +14689,7 @@
|
|
|
14780
14689
|
e.isPropagationStopped = false;
|
|
14781
14690
|
for (const i in __privateGet(this, _detectors)) {
|
|
14782
14691
|
const detector = __privateGet(this, _detectors)[i];
|
|
14783
|
-
if (e.isPropagationStopped)
|
|
14784
|
-
return;
|
|
14692
|
+
if (e.isPropagationStopped) return;
|
|
14785
14693
|
if (__privateGet(this, _hitHistory)[i] && !detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) {
|
|
14786
14694
|
detector.onMouseLeave(e);
|
|
14787
14695
|
}
|
|
@@ -14805,10 +14713,8 @@
|
|
|
14805
14713
|
this.hitTest(e, "onWheel");
|
|
14806
14714
|
e.isPropagationStopped = false;
|
|
14807
14715
|
for (const detector of __privateGet(this, _detectors)) {
|
|
14808
|
-
if (e.isPropagationStopped)
|
|
14809
|
-
|
|
14810
|
-
if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) }))
|
|
14811
|
-
continue;
|
|
14716
|
+
if (e.isPropagationStopped) return;
|
|
14717
|
+
if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) continue;
|
|
14812
14718
|
detector.onMouseEnter(e);
|
|
14813
14719
|
}
|
|
14814
14720
|
e.isPropagationStopped = false;
|
|
@@ -14825,10 +14731,8 @@
|
|
|
14825
14731
|
});
|
|
14826
14732
|
__publicField(this, "hitTest", (e, type) => {
|
|
14827
14733
|
for (const detector of __privateGet(this, _detectors)) {
|
|
14828
|
-
if (e.isPropagationStopped)
|
|
14829
|
-
|
|
14830
|
-
if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) }))
|
|
14831
|
-
continue;
|
|
14734
|
+
if (e.isPropagationStopped) return;
|
|
14735
|
+
if (!detector.hitTest({ globalPoint: __privateGet(this, _hitPosition) })) continue;
|
|
14832
14736
|
detector.invokeCallback(type, e);
|
|
14833
14737
|
}
|
|
14834
14738
|
});
|
|
@@ -14849,8 +14753,7 @@
|
|
|
14849
14753
|
__privateAdd(this, _didDomOrderChangeState, "idle");
|
|
14850
14754
|
}
|
|
14851
14755
|
init({ renderContext }) {
|
|
14852
|
-
if (!__privateGet(this, _activated))
|
|
14853
|
-
return;
|
|
14756
|
+
if (!__privateGet(this, _activated)) return;
|
|
14854
14757
|
__privateSet(this, _renderContext, renderContext);
|
|
14855
14758
|
const { view } = __privateGet(this, _renderContext);
|
|
14856
14759
|
view.addEventListener("mousedown", __privateGet(this, _wrapEvent).call(this, __privateGet(this, _handleMouseDown)));
|
|
@@ -14862,14 +14765,12 @@
|
|
|
14862
14765
|
view.addEventListener("mouseleave", __privateGet(this, _handleMouseLeave));
|
|
14863
14766
|
}
|
|
14864
14767
|
traceHitPosition(e) {
|
|
14865
|
-
if (__privateGet(this, _rootPosition) == null)
|
|
14866
|
-
return;
|
|
14768
|
+
if (__privateGet(this, _rootPosition) == null) return;
|
|
14867
14769
|
__privateGet(this, _hitPosition).x = e.clientX - __privateGet(this, _rootPosition).x;
|
|
14868
14770
|
__privateGet(this, _hitPosition).y = e.clientY - __privateGet(this, _rootPosition).y;
|
|
14869
14771
|
}
|
|
14870
14772
|
didZOrderChange() {
|
|
14871
|
-
if (__privateGet(this, _didDomOrderChangeState) === "processing")
|
|
14872
|
-
return;
|
|
14773
|
+
if (__privateGet(this, _didDomOrderChangeState) === "processing") return;
|
|
14873
14774
|
__privateSet(this, _didDomOrderChangeState, "processing");
|
|
14874
14775
|
setTimeout(() => {
|
|
14875
14776
|
__privateSet(this, _detectors, __privateGet(this, _detectors).sort((a, b) => b.zOrder - a.zOrder));
|
|
@@ -14877,13 +14778,11 @@
|
|
|
14877
14778
|
}, 0);
|
|
14878
14779
|
}
|
|
14879
14780
|
addDetector(detector) {
|
|
14880
|
-
if (!__privateGet(this, _activated))
|
|
14881
|
-
return;
|
|
14781
|
+
if (!__privateGet(this, _activated)) return;
|
|
14882
14782
|
__privateGet(this, _detectors).push(detector);
|
|
14883
14783
|
}
|
|
14884
14784
|
removeDetector(detector) {
|
|
14885
|
-
if (!__privateGet(this, _activated))
|
|
14886
|
-
return;
|
|
14785
|
+
if (!__privateGet(this, _activated)) return;
|
|
14887
14786
|
__privateSet(this, _detectors, __privateGet(this, _detectors).filter((d) => d !== detector));
|
|
14888
14787
|
}
|
|
14889
14788
|
};
|
|
@@ -15108,10 +15007,8 @@
|
|
|
15108
15007
|
while (parent != null) {
|
|
15109
15008
|
const current = parent;
|
|
15110
15009
|
parent = current.parent;
|
|
15111
|
-
if (!(current.type === 1 /* provider */))
|
|
15112
|
-
|
|
15113
|
-
if (current.providerKey !== key)
|
|
15114
|
-
continue;
|
|
15010
|
+
if (!(current.type === 1 /* provider */)) continue;
|
|
15011
|
+
if (current.providerKey !== key) continue;
|
|
15115
15012
|
return current.value;
|
|
15116
15013
|
}
|
|
15117
15014
|
throw { message: "can not find requested provider value" };
|
|
@@ -15269,9 +15166,8 @@
|
|
|
15269
15166
|
// ../../node_modules/popmotion/node_modules/tslib/tslib.es6.js
|
|
15270
15167
|
function __rest(s, e) {
|
|
15271
15168
|
var t = {};
|
|
15272
|
-
for (var p in s)
|
|
15273
|
-
|
|
15274
|
-
t[p] = s[p];
|
|
15169
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15170
|
+
t[p] = s[p];
|
|
15275
15171
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15276
15172
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
15277
15173
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
@@ -16214,8 +16110,7 @@
|
|
|
16214
16110
|
return this.status === "completed";
|
|
16215
16111
|
}
|
|
16216
16112
|
get value() {
|
|
16217
|
-
if (this._value == null)
|
|
16218
|
-
return 0;
|
|
16113
|
+
if (this._value == null) return 0;
|
|
16219
16114
|
return this._value;
|
|
16220
16115
|
}
|
|
16221
16116
|
set value(value) {
|
|
@@ -16286,8 +16181,7 @@
|
|
|
16286
16181
|
}
|
|
16287
16182
|
animate(target, overrideOptions = {}) {
|
|
16288
16183
|
var _a;
|
|
16289
|
-
if (typeof window === "undefined")
|
|
16290
|
-
return;
|
|
16184
|
+
if (typeof window === "undefined") return;
|
|
16291
16185
|
(_a = this.animation) == null ? void 0 : _a.stop();
|
|
16292
16186
|
this.animation = animate(__spreadValues({
|
|
16293
16187
|
from: this.value,
|
|
@@ -16415,10 +16309,8 @@
|
|
|
16415
16309
|
this.end = end != null ? end : begin;
|
|
16416
16310
|
}
|
|
16417
16311
|
transform(value) {
|
|
16418
|
-
if (value === 0)
|
|
16419
|
-
|
|
16420
|
-
if (value === 1)
|
|
16421
|
-
return this.end;
|
|
16312
|
+
if (value === 0) return this.begin;
|
|
16313
|
+
if (value === 1) return this.end;
|
|
16422
16314
|
return this.lerp(value);
|
|
16423
16315
|
}
|
|
16424
16316
|
lerp(t) {
|
|
@@ -16615,8 +16507,7 @@
|
|
|
16615
16507
|
function reactivate(obj) {
|
|
16616
16508
|
return new Proxy(obj, {
|
|
16617
16509
|
set(target, key, value2) {
|
|
16618
|
-
if (target[key] === value2)
|
|
16619
|
-
return false;
|
|
16510
|
+
if (target[key] === value2) return false;
|
|
16620
16511
|
target[key] = value2;
|
|
16621
16512
|
notifier.notifyListeners();
|
|
16622
16513
|
return true;
|
|
@@ -16664,8 +16555,7 @@
|
|
|
16664
16555
|
return this._alignment;
|
|
16665
16556
|
}
|
|
16666
16557
|
set alignment(value) {
|
|
16667
|
-
if (this._alignment.equals(value))
|
|
16668
|
-
return;
|
|
16558
|
+
if (this._alignment.equals(value)) return;
|
|
16669
16559
|
this._alignment = value;
|
|
16670
16560
|
this.markNeedsLayout();
|
|
16671
16561
|
}
|
|
@@ -16673,8 +16563,7 @@
|
|
|
16673
16563
|
return this._textDirection;
|
|
16674
16564
|
}
|
|
16675
16565
|
set textDirection(value) {
|
|
16676
|
-
if (this._textDirection == value)
|
|
16677
|
-
return;
|
|
16566
|
+
if (this._textDirection == value) return;
|
|
16678
16567
|
this._textDirection = value;
|
|
16679
16568
|
this.markNeedsLayout();
|
|
16680
16569
|
}
|
|
@@ -16682,8 +16571,7 @@
|
|
|
16682
16571
|
return this.alignment.resolve(this.textDirection);
|
|
16683
16572
|
}
|
|
16684
16573
|
alignChild() {
|
|
16685
|
-
if (this.child == null)
|
|
16686
|
-
throw Error("child must not be null");
|
|
16574
|
+
if (this.child == null) throw Error("child must not be null");
|
|
16687
16575
|
if (this.resolvedAlignment == null)
|
|
16688
16576
|
throw Error("resolved alignment must not be null");
|
|
16689
16577
|
this.child.offset = this.resolvedAlignment.alongOffset(
|
|
@@ -16724,8 +16612,7 @@
|
|
|
16724
16612
|
return this._clipper;
|
|
16725
16613
|
}
|
|
16726
16614
|
set clipper(value) {
|
|
16727
|
-
if (this._clipper === value)
|
|
16728
|
-
return;
|
|
16615
|
+
if (this._clipper === value) return;
|
|
16729
16616
|
this._clipper = value;
|
|
16730
16617
|
this.markNeedsPaint();
|
|
16731
16618
|
}
|
|
@@ -16820,8 +16707,7 @@
|
|
|
16820
16707
|
this.clipped = clipped;
|
|
16821
16708
|
}
|
|
16822
16709
|
build(_) {
|
|
16823
|
-
if (!this.clipped)
|
|
16824
|
-
return this.child;
|
|
16710
|
+
if (!this.clipped) return this.child;
|
|
16825
16711
|
return new BaseClipPath_default({ child: this.child, clipper: this.clipper });
|
|
16826
16712
|
}
|
|
16827
16713
|
};
|
|
@@ -16906,8 +16792,7 @@
|
|
|
16906
16792
|
return this._direction;
|
|
16907
16793
|
}
|
|
16908
16794
|
set direction(newDirection) {
|
|
16909
|
-
if (this._direction === newDirection)
|
|
16910
|
-
return;
|
|
16795
|
+
if (this._direction === newDirection) return;
|
|
16911
16796
|
this._direction = newDirection;
|
|
16912
16797
|
this.markNeedsLayout();
|
|
16913
16798
|
}
|
|
@@ -16915,8 +16800,7 @@
|
|
|
16915
16800
|
return this._mainAxisAlignment;
|
|
16916
16801
|
}
|
|
16917
16802
|
set mainAxisAlignment(newMainAxisAlignment) {
|
|
16918
|
-
if (this._mainAxisAlignment === newMainAxisAlignment)
|
|
16919
|
-
return;
|
|
16803
|
+
if (this._mainAxisAlignment === newMainAxisAlignment) return;
|
|
16920
16804
|
this._mainAxisAlignment = newMainAxisAlignment;
|
|
16921
16805
|
this.markNeedsLayout();
|
|
16922
16806
|
}
|
|
@@ -16924,8 +16808,7 @@
|
|
|
16924
16808
|
return this._crossAxisAlignment;
|
|
16925
16809
|
}
|
|
16926
16810
|
set crossAxisAlignment(newCrossAxisAlignment) {
|
|
16927
|
-
if (this._crossAxisAlignment === newCrossAxisAlignment)
|
|
16928
|
-
return;
|
|
16811
|
+
if (this._crossAxisAlignment === newCrossAxisAlignment) return;
|
|
16929
16812
|
this._crossAxisAlignment = newCrossAxisAlignment;
|
|
16930
16813
|
this.markNeedsLayout();
|
|
16931
16814
|
}
|
|
@@ -16933,8 +16816,7 @@
|
|
|
16933
16816
|
return this._verticalDirection;
|
|
16934
16817
|
}
|
|
16935
16818
|
set verticalDirection(newVerticalDirection) {
|
|
16936
|
-
if (this._verticalDirection === newVerticalDirection)
|
|
16937
|
-
return;
|
|
16819
|
+
if (this._verticalDirection === newVerticalDirection) return;
|
|
16938
16820
|
this._verticalDirection = newVerticalDirection;
|
|
16939
16821
|
this.markNeedsLayout();
|
|
16940
16822
|
}
|
|
@@ -16942,8 +16824,7 @@
|
|
|
16942
16824
|
return this._mainAxisSize;
|
|
16943
16825
|
}
|
|
16944
16826
|
set mainAxisSize(newMainAxisSize) {
|
|
16945
|
-
if (this._mainAxisSize === newMainAxisSize)
|
|
16946
|
-
return;
|
|
16827
|
+
if (this._mainAxisSize === newMainAxisSize) return;
|
|
16947
16828
|
this._mainAxisSize = newMainAxisSize;
|
|
16948
16829
|
this.markNeedsLayout();
|
|
16949
16830
|
}
|
|
@@ -17256,24 +17137,15 @@
|
|
|
17256
17137
|
});
|
|
17257
17138
|
}
|
|
17258
17139
|
updateRenderObject(renderObject) {
|
|
17259
|
-
if (this.softWrap != null)
|
|
17260
|
-
|
|
17261
|
-
if (this.
|
|
17262
|
-
|
|
17263
|
-
if (this.
|
|
17264
|
-
|
|
17265
|
-
if (this.
|
|
17266
|
-
|
|
17267
|
-
if (this.
|
|
17268
|
-
renderObject.textWidthBasis = this.textWidthBasis;
|
|
17269
|
-
if (this.text != null)
|
|
17270
|
-
renderObject.text = this.text;
|
|
17271
|
-
if (this.textAlign != null)
|
|
17272
|
-
renderObject.textAlign = this.textAlign;
|
|
17273
|
-
if (this.textDirection != null)
|
|
17274
|
-
renderObject.textDirection = this.textDirection;
|
|
17275
|
-
if (this.textPainter != null)
|
|
17276
|
-
renderObject.textPainter = this.textPainter;
|
|
17140
|
+
if (this.softWrap != null) renderObject.softWrap = this.softWrap;
|
|
17141
|
+
if (this.overflow != null) renderObject.overflow = this.overflow;
|
|
17142
|
+
if (this.textScaleFactor != null) renderObject.textScaleFactor = this.textScaleFactor;
|
|
17143
|
+
if (this.maxLines != null) renderObject.maxLines = this.maxLines;
|
|
17144
|
+
if (this.textWidthBasis != null) renderObject.textWidthBasis = this.textWidthBasis;
|
|
17145
|
+
if (this.text != null) renderObject.text = this.text;
|
|
17146
|
+
if (this.textAlign != null) renderObject.textAlign = this.textAlign;
|
|
17147
|
+
if (this.textDirection != null) renderObject.textDirection = this.textDirection;
|
|
17148
|
+
if (this.textPainter != null) renderObject.textPainter = this.textPainter;
|
|
17277
17149
|
}
|
|
17278
17150
|
};
|
|
17279
17151
|
var _softWrap, _overflow, _textPainter;
|
|
@@ -17290,9 +17162,9 @@
|
|
|
17290
17162
|
textPainter
|
|
17291
17163
|
}) {
|
|
17292
17164
|
super({ isPainter: true });
|
|
17293
|
-
__privateAdd(this, _softWrap
|
|
17294
|
-
__privateAdd(this, _overflow
|
|
17295
|
-
__privateAdd(this, _textPainter
|
|
17165
|
+
__privateAdd(this, _softWrap);
|
|
17166
|
+
__privateAdd(this, _overflow);
|
|
17167
|
+
__privateAdd(this, _textPainter);
|
|
17296
17168
|
__publicField(this, "previousWidth");
|
|
17297
17169
|
__publicField(this, "previousHeight");
|
|
17298
17170
|
__publicField(this, "changedLayout");
|
|
@@ -17320,8 +17192,7 @@
|
|
|
17320
17192
|
return __privateGet(this, _softWrap);
|
|
17321
17193
|
}
|
|
17322
17194
|
set softWrap(newSoftWrap) {
|
|
17323
|
-
if (__privateGet(this, _softWrap) === newSoftWrap)
|
|
17324
|
-
return;
|
|
17195
|
+
if (__privateGet(this, _softWrap) === newSoftWrap) return;
|
|
17325
17196
|
__privateSet(this, _softWrap, newSoftWrap);
|
|
17326
17197
|
this.markNeedsLayout();
|
|
17327
17198
|
}
|
|
@@ -17329,8 +17200,7 @@
|
|
|
17329
17200
|
return __privateGet(this, _overflow);
|
|
17330
17201
|
}
|
|
17331
17202
|
set overflow(newOverflow) {
|
|
17332
|
-
if (__privateGet(this, _overflow) === newOverflow)
|
|
17333
|
-
return;
|
|
17203
|
+
if (__privateGet(this, _overflow) === newOverflow) return;
|
|
17334
17204
|
__privateSet(this, _overflow, newOverflow);
|
|
17335
17205
|
this.markNeedsLayout();
|
|
17336
17206
|
}
|
|
@@ -17338,8 +17208,7 @@
|
|
|
17338
17208
|
return __privateGet(this, _textPainter);
|
|
17339
17209
|
}
|
|
17340
17210
|
set textPainter(value) {
|
|
17341
|
-
if (__privateGet(this, _textPainter) === value)
|
|
17342
|
-
return;
|
|
17211
|
+
if (__privateGet(this, _textPainter) === value) return;
|
|
17343
17212
|
__privateSet(this, _textPainter, value);
|
|
17344
17213
|
this.markNeedsLayout();
|
|
17345
17214
|
}
|
|
@@ -17347,8 +17216,7 @@
|
|
|
17347
17216
|
return this.textPainter.text;
|
|
17348
17217
|
}
|
|
17349
17218
|
set text(value) {
|
|
17350
|
-
if (this.textPainter.text.equals(value))
|
|
17351
|
-
return;
|
|
17219
|
+
if (this.textPainter.text.equals(value)) return;
|
|
17352
17220
|
this.textPainter.text = value;
|
|
17353
17221
|
this.markNeedsLayout();
|
|
17354
17222
|
}
|
|
@@ -17356,8 +17224,7 @@
|
|
|
17356
17224
|
return this.textPainter.textWidthBasis;
|
|
17357
17225
|
}
|
|
17358
17226
|
set textWidthBasis(value) {
|
|
17359
|
-
if (this.textPainter.textWidthBasis === value)
|
|
17360
|
-
return;
|
|
17227
|
+
if (this.textPainter.textWidthBasis === value) return;
|
|
17361
17228
|
this.textPainter.textWidthBasis = value;
|
|
17362
17229
|
this.markNeedsLayout();
|
|
17363
17230
|
}
|
|
@@ -17365,8 +17232,7 @@
|
|
|
17365
17232
|
return this.textPainter.textAlign;
|
|
17366
17233
|
}
|
|
17367
17234
|
set textAlign(textAlign) {
|
|
17368
|
-
if (this.textPainter.textAlign === textAlign)
|
|
17369
|
-
return;
|
|
17235
|
+
if (this.textPainter.textAlign === textAlign) return;
|
|
17370
17236
|
this.textPainter.textAlign = textAlign;
|
|
17371
17237
|
this.markNeedsLayout();
|
|
17372
17238
|
}
|
|
@@ -17374,8 +17240,7 @@
|
|
|
17374
17240
|
return this.textPainter.textDirection;
|
|
17375
17241
|
}
|
|
17376
17242
|
set textDirection(direction) {
|
|
17377
|
-
if (this.textPainter.textDirection === direction)
|
|
17378
|
-
return;
|
|
17243
|
+
if (this.textPainter.textDirection === direction) return;
|
|
17379
17244
|
this.textPainter.textDirection = direction;
|
|
17380
17245
|
this.markNeedsLayout();
|
|
17381
17246
|
}
|
|
@@ -17383,8 +17248,7 @@
|
|
|
17383
17248
|
return this.textPainter.textScaleFactor;
|
|
17384
17249
|
}
|
|
17385
17250
|
set textScaleFactor(scaleFactor) {
|
|
17386
|
-
if (this.textPainter.textScaleFactor === scaleFactor)
|
|
17387
|
-
return;
|
|
17251
|
+
if (this.textPainter.textScaleFactor === scaleFactor) return;
|
|
17388
17252
|
this.textPainter.textScaleFactor = scaleFactor;
|
|
17389
17253
|
this.markNeedsLayout();
|
|
17390
17254
|
}
|
|
@@ -17392,8 +17256,7 @@
|
|
|
17392
17256
|
return this.textPainter.maxLines;
|
|
17393
17257
|
}
|
|
17394
17258
|
set maxLines(value) {
|
|
17395
|
-
if (this.textPainter.maxLines === value)
|
|
17396
|
-
return;
|
|
17259
|
+
if (this.textPainter.maxLines === value) return;
|
|
17397
17260
|
this.textPainter.maxLines = value;
|
|
17398
17261
|
this.markNeedsLayout();
|
|
17399
17262
|
}
|
|
@@ -17464,8 +17327,7 @@
|
|
|
17464
17327
|
this.textPainter.paintOnSvg(newTextEl, context);
|
|
17465
17328
|
return;
|
|
17466
17329
|
}
|
|
17467
|
-
if (!this.needsPaint && !this.changedLayout)
|
|
17468
|
-
return;
|
|
17330
|
+
if (!this.needsPaint && !this.changedLayout) return;
|
|
17469
17331
|
this.textPainter.paintOnSvg(textEl, context);
|
|
17470
17332
|
}
|
|
17471
17333
|
};
|
|
@@ -17578,8 +17440,7 @@
|
|
|
17578
17440
|
__publicField(this, "isFlexible", true);
|
|
17579
17441
|
__publicField(this, "flex");
|
|
17580
17442
|
__publicField(this, "fit");
|
|
17581
|
-
if (flex < 0)
|
|
17582
|
-
throw new Error("flex must not be under zero");
|
|
17443
|
+
if (flex < 0) throw new Error("flex must not be under zero");
|
|
17583
17444
|
this.flex = flex;
|
|
17584
17445
|
this.fit = fit;
|
|
17585
17446
|
}
|
|
@@ -17604,8 +17465,7 @@
|
|
|
17604
17465
|
return this._flex;
|
|
17605
17466
|
}
|
|
17606
17467
|
set flex(newFlex) {
|
|
17607
|
-
if (this._flex === newFlex)
|
|
17608
|
-
return;
|
|
17468
|
+
if (this._flex === newFlex) return;
|
|
17609
17469
|
this._flex = newFlex;
|
|
17610
17470
|
this.markNeedsLayout();
|
|
17611
17471
|
}
|
|
@@ -17613,8 +17473,7 @@
|
|
|
17613
17473
|
return this._fit;
|
|
17614
17474
|
}
|
|
17615
17475
|
set fit(newFit) {
|
|
17616
|
-
if (this._fit === newFit)
|
|
17617
|
-
return;
|
|
17476
|
+
if (this._fit === newFit) return;
|
|
17618
17477
|
this._fit = newFit;
|
|
17619
17478
|
this.markNeedsLayout();
|
|
17620
17479
|
}
|
|
@@ -17667,8 +17526,7 @@
|
|
|
17667
17526
|
return this._additionalConstraint;
|
|
17668
17527
|
}
|
|
17669
17528
|
set additionalConstraint(constraint) {
|
|
17670
|
-
if (constraint.equals(this._additionalConstraint))
|
|
17671
|
-
return;
|
|
17529
|
+
if (constraint.equals(this._additionalConstraint)) return;
|
|
17672
17530
|
this._additionalConstraint = constraint;
|
|
17673
17531
|
this.markNeedsLayout();
|
|
17674
17532
|
}
|
|
@@ -17787,8 +17645,7 @@
|
|
|
17787
17645
|
return this._widthFactor;
|
|
17788
17646
|
}
|
|
17789
17647
|
set widthFactor(value) {
|
|
17790
|
-
if (this._widthFactor === value)
|
|
17791
|
-
return;
|
|
17648
|
+
if (this._widthFactor === value) return;
|
|
17792
17649
|
this._widthFactor = value;
|
|
17793
17650
|
this.markNeedsLayout();
|
|
17794
17651
|
}
|
|
@@ -17796,8 +17653,7 @@
|
|
|
17796
17653
|
return this._heightFactor;
|
|
17797
17654
|
}
|
|
17798
17655
|
set heightFactor(value) {
|
|
17799
|
-
if (this._heightFactor === value)
|
|
17800
|
-
return;
|
|
17656
|
+
if (this._heightFactor === value) return;
|
|
17801
17657
|
this._heightFactor = value;
|
|
17802
17658
|
this.markNeedsLayout();
|
|
17803
17659
|
}
|
|
@@ -17854,8 +17710,7 @@
|
|
|
17854
17710
|
return this._color;
|
|
17855
17711
|
}
|
|
17856
17712
|
set color(value) {
|
|
17857
|
-
if (value === this._color)
|
|
17858
|
-
return;
|
|
17713
|
+
if (value === this._color) return;
|
|
17859
17714
|
this._color = value;
|
|
17860
17715
|
this.markNeedsPaint();
|
|
17861
17716
|
}
|
|
@@ -17928,8 +17783,7 @@
|
|
|
17928
17783
|
return this._decoration;
|
|
17929
17784
|
}
|
|
17930
17785
|
set decoration(value) {
|
|
17931
|
-
if (this.decoration.equals(value))
|
|
17932
|
-
return;
|
|
17786
|
+
if (this.decoration.equals(value)) return;
|
|
17933
17787
|
this._decoration = value;
|
|
17934
17788
|
this.markNeedsPaint();
|
|
17935
17789
|
}
|
|
@@ -18021,8 +17875,7 @@
|
|
|
18021
17875
|
return this._maxWidth;
|
|
18022
17876
|
}
|
|
18023
17877
|
set maxWidth(newMaxWidth) {
|
|
18024
|
-
if (this._maxWidth === newMaxWidth)
|
|
18025
|
-
return;
|
|
17878
|
+
if (this._maxWidth === newMaxWidth) return;
|
|
18026
17879
|
this._maxWidth = newMaxWidth;
|
|
18027
17880
|
this.markNeedsLayout();
|
|
18028
17881
|
}
|
|
@@ -18030,8 +17883,7 @@
|
|
|
18030
17883
|
return this._maxHeight;
|
|
18031
17884
|
}
|
|
18032
17885
|
set maxHeight(newMaxHeight) {
|
|
18033
|
-
if (this._maxHeight === newMaxHeight)
|
|
18034
|
-
return;
|
|
17886
|
+
if (this._maxHeight === newMaxHeight) return;
|
|
18035
17887
|
this._maxHeight = newMaxHeight;
|
|
18036
17888
|
this.markNeedsLayout();
|
|
18037
17889
|
}
|
|
@@ -18089,14 +17941,12 @@
|
|
|
18089
17941
|
return this._padding;
|
|
18090
17942
|
}
|
|
18091
17943
|
set padding(value) {
|
|
18092
|
-
if (value.eqaul(this._padding))
|
|
18093
|
-
return;
|
|
17944
|
+
if (value.eqaul(this._padding)) return;
|
|
18094
17945
|
this._padding = value;
|
|
18095
17946
|
this.markNeedsLayout();
|
|
18096
17947
|
}
|
|
18097
17948
|
preformLayout() {
|
|
18098
|
-
if (this.child == null)
|
|
18099
|
-
return;
|
|
17949
|
+
if (this.child == null) return;
|
|
18100
17950
|
const { top, left, right, bottom } = this.padding;
|
|
18101
17951
|
const childConstraints = this.constraints.deflate(this.padding);
|
|
18102
17952
|
this.child.layout(childConstraints);
|
|
@@ -18262,8 +18112,7 @@
|
|
|
18262
18112
|
return this._origin;
|
|
18263
18113
|
}
|
|
18264
18114
|
set origin(value) {
|
|
18265
|
-
if (value == null && this._origin == null)
|
|
18266
|
-
return;
|
|
18115
|
+
if (value == null && this._origin == null) return;
|
|
18267
18116
|
if (value != null && this._origin != null && this._origin.x === value.x && this._origin.y === value.y)
|
|
18268
18117
|
return;
|
|
18269
18118
|
this._origin = value;
|
|
@@ -18273,8 +18122,7 @@
|
|
|
18273
18122
|
return this._alignment;
|
|
18274
18123
|
}
|
|
18275
18124
|
set alignment(value) {
|
|
18276
|
-
if (this._alignment.equal(value))
|
|
18277
|
-
return;
|
|
18125
|
+
if (this._alignment.equal(value)) return;
|
|
18278
18126
|
this._alignment = value;
|
|
18279
18127
|
this.markNeedsLayout();
|
|
18280
18128
|
}
|
|
@@ -18282,8 +18130,7 @@
|
|
|
18282
18130
|
return this._transform;
|
|
18283
18131
|
}
|
|
18284
18132
|
set transform(value) {
|
|
18285
|
-
if (this.transform.equals(value))
|
|
18286
|
-
return;
|
|
18133
|
+
if (this.transform.equals(value)) return;
|
|
18287
18134
|
this._transform = value;
|
|
18288
18135
|
this.markNeedsLayout();
|
|
18289
18136
|
this.markNeedsPaintTransformUpdate();
|
|
@@ -18292,8 +18139,7 @@
|
|
|
18292
18139
|
return this._textDirection;
|
|
18293
18140
|
}
|
|
18294
18141
|
set textDirection(value) {
|
|
18295
|
-
if (this._textDirection == value)
|
|
18296
|
-
return;
|
|
18142
|
+
if (this._textDirection == value) return;
|
|
18297
18143
|
this._textDirection = value;
|
|
18298
18144
|
this.markNeedsLayout();
|
|
18299
18145
|
}
|
|
@@ -18595,8 +18441,7 @@
|
|
|
18595
18441
|
return this._templateRows;
|
|
18596
18442
|
}
|
|
18597
18443
|
set templateRows(value) {
|
|
18598
|
-
if (GridTemplate.equals(value, this._templateRows))
|
|
18599
|
-
return;
|
|
18444
|
+
if (GridTemplate.equals(value, this._templateRows)) return;
|
|
18600
18445
|
this._templateRows = value;
|
|
18601
18446
|
this.markNeedsLayout();
|
|
18602
18447
|
}
|
|
@@ -18604,8 +18449,7 @@
|
|
|
18604
18449
|
return this._templateColumns;
|
|
18605
18450
|
}
|
|
18606
18451
|
set templateColumns(value) {
|
|
18607
|
-
if (GridTemplate.equals(value, this._templateColumns))
|
|
18608
|
-
return;
|
|
18452
|
+
if (GridTemplate.equals(value, this._templateColumns)) return;
|
|
18609
18453
|
this._templateColumns = value;
|
|
18610
18454
|
this.markNeedsLayout();
|
|
18611
18455
|
}
|
|
@@ -18613,8 +18457,7 @@
|
|
|
18613
18457
|
return this._autoColumn;
|
|
18614
18458
|
}
|
|
18615
18459
|
set autoColumn(value) {
|
|
18616
|
-
if (value.equals(this._autoColumn))
|
|
18617
|
-
return;
|
|
18460
|
+
if (value.equals(this._autoColumn)) return;
|
|
18618
18461
|
this._autoColumn = value;
|
|
18619
18462
|
this.markNeedsLayout();
|
|
18620
18463
|
}
|
|
@@ -18622,8 +18465,7 @@
|
|
|
18622
18465
|
return this._autoRow;
|
|
18623
18466
|
}
|
|
18624
18467
|
set autoRow(value) {
|
|
18625
|
-
if (value.equals(this._autoRow))
|
|
18626
|
-
return;
|
|
18468
|
+
if (value.equals(this._autoRow)) return;
|
|
18627
18469
|
this._autoRow = value;
|
|
18628
18470
|
this.markNeedsLayout();
|
|
18629
18471
|
}
|
|
@@ -18631,8 +18473,7 @@
|
|
|
18631
18473
|
return this._columnCounts;
|
|
18632
18474
|
}
|
|
18633
18475
|
set columnCounts(value) {
|
|
18634
|
-
if (Utils.arrayEqual(value, this._columnCounts))
|
|
18635
|
-
return;
|
|
18476
|
+
if (Utils.arrayEqual(value, this._columnCounts)) return;
|
|
18636
18477
|
this._columnCounts = value;
|
|
18637
18478
|
this.markNeedsLayout();
|
|
18638
18479
|
}
|
|
@@ -18782,13 +18623,11 @@
|
|
|
18782
18623
|
this.value = value;
|
|
18783
18624
|
}
|
|
18784
18625
|
static equals(target, other) {
|
|
18785
|
-
if (target.length !== other.length)
|
|
18786
|
-
return false;
|
|
18626
|
+
if (target.length !== other.length) return false;
|
|
18787
18627
|
return target.every((value, i) => value.equals(other[i]));
|
|
18788
18628
|
}
|
|
18789
18629
|
equals(other) {
|
|
18790
|
-
if (this === other)
|
|
18791
|
-
return true;
|
|
18630
|
+
if (this === other) return true;
|
|
18792
18631
|
return this.type === other.type && this.value === other.value;
|
|
18793
18632
|
}
|
|
18794
18633
|
static Fr(value) {
|
|
@@ -18870,8 +18709,7 @@
|
|
|
18870
18709
|
return this._alignment;
|
|
18871
18710
|
}
|
|
18872
18711
|
set alignment(value) {
|
|
18873
|
-
if (value.equal(this._alignment))
|
|
18874
|
-
return;
|
|
18712
|
+
if (value.equal(this._alignment)) return;
|
|
18875
18713
|
this._alignment = value;
|
|
18876
18714
|
this.markNeedsLayout();
|
|
18877
18715
|
}
|
|
@@ -18879,8 +18717,7 @@
|
|
|
18879
18717
|
return this._fit;
|
|
18880
18718
|
}
|
|
18881
18719
|
set fit(value) {
|
|
18882
|
-
if (this._fit !== value)
|
|
18883
|
-
return;
|
|
18720
|
+
if (this._fit !== value) return;
|
|
18884
18721
|
this._fit = value;
|
|
18885
18722
|
this.markNeedsLayout();
|
|
18886
18723
|
}
|
|
@@ -18888,8 +18725,7 @@
|
|
|
18888
18725
|
return this._textDirection;
|
|
18889
18726
|
}
|
|
18890
18727
|
set textDirection(value) {
|
|
18891
|
-
if (this._textDirection !== value)
|
|
18892
|
-
return;
|
|
18728
|
+
if (this._textDirection !== value) return;
|
|
18893
18729
|
this._textDirection = value;
|
|
18894
18730
|
this.markNeedsPaint();
|
|
18895
18731
|
}
|
|
@@ -19102,8 +18938,7 @@
|
|
|
19102
18938
|
return this._top;
|
|
19103
18939
|
}
|
|
19104
18940
|
set top(newTop) {
|
|
19105
|
-
if (this._top === newTop)
|
|
19106
|
-
return;
|
|
18941
|
+
if (this._top === newTop) return;
|
|
19107
18942
|
this._top = newTop;
|
|
19108
18943
|
this.markNeedsLayout();
|
|
19109
18944
|
}
|
|
@@ -19111,8 +18946,7 @@
|
|
|
19111
18946
|
return this._bottom;
|
|
19112
18947
|
}
|
|
19113
18948
|
set bottom(newBottom) {
|
|
19114
|
-
if (this._bottom === newBottom)
|
|
19115
|
-
return;
|
|
18949
|
+
if (this._bottom === newBottom) return;
|
|
19116
18950
|
this._bottom = newBottom;
|
|
19117
18951
|
this.markNeedsLayout();
|
|
19118
18952
|
}
|
|
@@ -19120,8 +18954,7 @@
|
|
|
19120
18954
|
return this._right;
|
|
19121
18955
|
}
|
|
19122
18956
|
set right(newRight) {
|
|
19123
|
-
if (this._right === newRight)
|
|
19124
|
-
return;
|
|
18957
|
+
if (this._right === newRight) return;
|
|
19125
18958
|
this._right = newRight;
|
|
19126
18959
|
this.markNeedsLayout();
|
|
19127
18960
|
}
|
|
@@ -19129,8 +18962,7 @@
|
|
|
19129
18962
|
return this._left;
|
|
19130
18963
|
}
|
|
19131
18964
|
set left(newLeft) {
|
|
19132
|
-
if (this._left === newLeft)
|
|
19133
|
-
return;
|
|
18965
|
+
if (this._left === newLeft) return;
|
|
19134
18966
|
this._left = newLeft;
|
|
19135
18967
|
this.markNeedsLayout();
|
|
19136
18968
|
}
|
|
@@ -19138,8 +18970,7 @@
|
|
|
19138
18970
|
return this._width;
|
|
19139
18971
|
}
|
|
19140
18972
|
set width(newWidth) {
|
|
19141
|
-
if (this._width === newWidth)
|
|
19142
|
-
return;
|
|
18973
|
+
if (this._width === newWidth) return;
|
|
19143
18974
|
this._width = newWidth;
|
|
19144
18975
|
this.markNeedsLayout();
|
|
19145
18976
|
}
|
|
@@ -19147,8 +18978,7 @@
|
|
|
19147
18978
|
return this._height;
|
|
19148
18979
|
}
|
|
19149
18980
|
set height(newHeight) {
|
|
19150
|
-
if (this._height === newHeight)
|
|
19151
|
-
return;
|
|
18981
|
+
if (this._height === newHeight) return;
|
|
19152
18982
|
this._height = newHeight;
|
|
19153
18983
|
this.markNeedsLayout();
|
|
19154
18984
|
}
|
|
@@ -19245,8 +19075,7 @@
|
|
|
19245
19075
|
return this._constraintsTransform;
|
|
19246
19076
|
}
|
|
19247
19077
|
set constraintsTransform(value) {
|
|
19248
|
-
if (value === this._constraintsTransform)
|
|
19249
|
-
return;
|
|
19078
|
+
if (value === this._constraintsTransform) return;
|
|
19250
19079
|
this._constraintsTransform = value;
|
|
19251
19080
|
this.markNeedsLayout();
|
|
19252
19081
|
}
|
|
@@ -19400,8 +19229,7 @@
|
|
|
19400
19229
|
return this._minWidth;
|
|
19401
19230
|
}
|
|
19402
19231
|
set minWidth(newMinWidth) {
|
|
19403
|
-
if (this._minWidth === newMinWidth)
|
|
19404
|
-
return;
|
|
19232
|
+
if (this._minWidth === newMinWidth) return;
|
|
19405
19233
|
this._minWidth = newMinWidth;
|
|
19406
19234
|
this.markNeedsLayout();
|
|
19407
19235
|
}
|
|
@@ -19409,8 +19237,7 @@
|
|
|
19409
19237
|
return this._maxWidth;
|
|
19410
19238
|
}
|
|
19411
19239
|
set maxWidth(newMaxWidth) {
|
|
19412
|
-
if (this._maxWidth === newMaxWidth)
|
|
19413
|
-
return;
|
|
19240
|
+
if (this._maxWidth === newMaxWidth) return;
|
|
19414
19241
|
this._maxWidth = newMaxWidth;
|
|
19415
19242
|
this.markNeedsLayout();
|
|
19416
19243
|
}
|
|
@@ -19418,8 +19245,7 @@
|
|
|
19418
19245
|
return this._minHeight;
|
|
19419
19246
|
}
|
|
19420
19247
|
set minHeight(newMinHeight) {
|
|
19421
|
-
if (this._minHeight === newMinHeight)
|
|
19422
|
-
return;
|
|
19248
|
+
if (this._minHeight === newMinHeight) return;
|
|
19423
19249
|
this._minHeight = newMinHeight;
|
|
19424
19250
|
this.markNeedsLayout();
|
|
19425
19251
|
}
|
|
@@ -19427,8 +19253,7 @@
|
|
|
19427
19253
|
return this._maxHeight;
|
|
19428
19254
|
}
|
|
19429
19255
|
set maxHeight(newMaxHeight) {
|
|
19430
|
-
if (this._maxHeight === newMaxHeight)
|
|
19431
|
-
return;
|
|
19256
|
+
if (this._maxHeight === newMaxHeight) return;
|
|
19432
19257
|
this._maxHeight = newMaxHeight;
|
|
19433
19258
|
this.markNeedsLayout();
|
|
19434
19259
|
}
|
|
@@ -19514,8 +19339,7 @@
|
|
|
19514
19339
|
return this._widthFactor;
|
|
19515
19340
|
}
|
|
19516
19341
|
set widthFactor(newWidthFactor) {
|
|
19517
|
-
if (this._widthFactor === newWidthFactor)
|
|
19518
|
-
return;
|
|
19342
|
+
if (this._widthFactor === newWidthFactor) return;
|
|
19519
19343
|
this._widthFactor = newWidthFactor;
|
|
19520
19344
|
this.markNeedsLayout();
|
|
19521
19345
|
}
|
|
@@ -19523,8 +19347,7 @@
|
|
|
19523
19347
|
return this._heightFactor;
|
|
19524
19348
|
}
|
|
19525
19349
|
set heightFactor(newHeightFactor) {
|
|
19526
|
-
if (this._heightFactor === newHeightFactor)
|
|
19527
|
-
return;
|
|
19350
|
+
if (this._heightFactor === newHeightFactor) return;
|
|
19528
19351
|
this._heightFactor = newHeightFactor;
|
|
19529
19352
|
this.markNeedsLayout();
|
|
19530
19353
|
}
|
|
@@ -19594,8 +19417,7 @@
|
|
|
19594
19417
|
};
|
|
19595
19418
|
var RenderIntrinsicHeight = class extends SingleChildRenderObject_default {
|
|
19596
19419
|
preformLayout() {
|
|
19597
|
-
if (this.child == null)
|
|
19598
|
-
return;
|
|
19420
|
+
if (this.child == null) return;
|
|
19599
19421
|
const height = this.child.getIntrinsicHeight(this.constraints.maxWidth) || 0;
|
|
19600
19422
|
const constraint = constraints_default.tightFor({ height }).enforce(
|
|
19601
19423
|
this.constraints
|
|
@@ -19618,8 +19440,7 @@
|
|
|
19618
19440
|
};
|
|
19619
19441
|
var RenderIntrinsicWidth = class extends SingleChildRenderObject_default {
|
|
19620
19442
|
preformLayout() {
|
|
19621
|
-
if (this.child == null)
|
|
19622
|
-
return;
|
|
19443
|
+
if (this.child == null) return;
|
|
19623
19444
|
const width = this.child.getIntrinsicWidth(this.constraints.maxHeight) || 0;
|
|
19624
19445
|
const constraint = constraints_default.tightFor({ width }).enforce(
|
|
19625
19446
|
this.constraints
|
|
@@ -19963,26 +19784,22 @@
|
|
|
19963
19784
|
return this._painter;
|
|
19964
19785
|
}
|
|
19965
19786
|
set painter(value) {
|
|
19966
|
-
if (this._painter === value)
|
|
19967
|
-
return;
|
|
19787
|
+
if (this._painter === value) return;
|
|
19968
19788
|
const oldPainter = this._painter;
|
|
19969
19789
|
this._painter = value;
|
|
19970
19790
|
this.didUpdatePainter(this._painter, oldPainter);
|
|
19971
19791
|
}
|
|
19972
19792
|
didUpdatePainter(newPainter, oldPainter) {
|
|
19973
19793
|
const { shouldRepaint } = newPainter;
|
|
19974
|
-
if (shouldRepaint == null)
|
|
19975
|
-
|
|
19976
|
-
if (!shouldRepaint(oldPainter))
|
|
19977
|
-
return;
|
|
19794
|
+
if (shouldRepaint == null) return;
|
|
19795
|
+
if (!shouldRepaint(oldPainter)) return;
|
|
19978
19796
|
this.markNeedsPaint();
|
|
19979
19797
|
}
|
|
19980
19798
|
get preferredSize() {
|
|
19981
19799
|
return this._preferredSize;
|
|
19982
19800
|
}
|
|
19983
19801
|
set preferredSize(value) {
|
|
19984
|
-
if (value.equal(this.preferredSize))
|
|
19985
|
-
return;
|
|
19802
|
+
if (value.equal(this.preferredSize)) return;
|
|
19986
19803
|
this.preferredSize = value;
|
|
19987
19804
|
this.markNeedsLayout();
|
|
19988
19805
|
}
|
|
@@ -20013,13 +19830,11 @@
|
|
|
20013
19830
|
return this.renderObject.painter;
|
|
20014
19831
|
}
|
|
20015
19832
|
performPaint(svgEls, _) {
|
|
20016
|
-
if (this.painter.svg == null)
|
|
20017
|
-
throw new Error("svg painter is not defined");
|
|
19833
|
+
if (this.painter.svg == null) throw new Error("svg painter is not defined");
|
|
20018
19834
|
this.painter.svg.paint(svgEls, this.size);
|
|
20019
19835
|
}
|
|
20020
19836
|
createDefaultSvgEl(paintContext) {
|
|
20021
|
-
if (this.painter.svg == null)
|
|
20022
|
-
throw new Error("svg painter is not defined");
|
|
19837
|
+
if (this.painter.svg == null) throw new Error("svg painter is not defined");
|
|
20023
19838
|
return this.painter.svg.createDefaultSvgEl(paintContext);
|
|
20024
19839
|
}
|
|
20025
19840
|
};
|
|
@@ -20169,8 +19984,7 @@
|
|
|
20169
19984
|
return this._cursor;
|
|
20170
19985
|
}
|
|
20171
19986
|
set cursor(prop) {
|
|
20172
|
-
if (this._cursor === prop)
|
|
20173
|
-
return;
|
|
19987
|
+
if (this._cursor === prop) return;
|
|
20174
19988
|
this._cursor = prop;
|
|
20175
19989
|
this.markNeedsPaint();
|
|
20176
19990
|
}
|
|
@@ -20178,88 +19992,77 @@
|
|
|
20178
19992
|
return this._onClick;
|
|
20179
19993
|
}
|
|
20180
19994
|
set onClick(prop) {
|
|
20181
|
-
if (this.onClick === prop)
|
|
20182
|
-
return;
|
|
19995
|
+
if (this.onClick === prop) return;
|
|
20183
19996
|
this._onClick = prop;
|
|
20184
19997
|
}
|
|
20185
19998
|
get onMouseDown() {
|
|
20186
19999
|
return this._onMouseDown;
|
|
20187
20000
|
}
|
|
20188
20001
|
set onMouseDown(prop) {
|
|
20189
|
-
if (this._onMouseDown === prop)
|
|
20190
|
-
return;
|
|
20002
|
+
if (this._onMouseDown === prop) return;
|
|
20191
20003
|
this._onMouseDown = prop;
|
|
20192
20004
|
}
|
|
20193
20005
|
get onMouseMove() {
|
|
20194
20006
|
return this._onMouseMove;
|
|
20195
20007
|
}
|
|
20196
20008
|
set onMouseMove(prop) {
|
|
20197
|
-
if (this._onMouseMove === prop)
|
|
20198
|
-
return;
|
|
20009
|
+
if (this._onMouseMove === prop) return;
|
|
20199
20010
|
this._onMouseMove = prop;
|
|
20200
20011
|
}
|
|
20201
20012
|
get onMouseUp() {
|
|
20202
20013
|
return this._onMouseUp;
|
|
20203
20014
|
}
|
|
20204
20015
|
set onMouseUp(prop) {
|
|
20205
|
-
if (this._onMouseUp === prop)
|
|
20206
|
-
return;
|
|
20016
|
+
if (this._onMouseUp === prop) return;
|
|
20207
20017
|
this._onMouseUp = prop;
|
|
20208
20018
|
}
|
|
20209
20019
|
get onMouseOver() {
|
|
20210
20020
|
return this._onMouseOver;
|
|
20211
20021
|
}
|
|
20212
20022
|
set onMouseOver(prop) {
|
|
20213
|
-
if (this._onMouseOver === prop)
|
|
20214
|
-
return;
|
|
20023
|
+
if (this._onMouseOver === prop) return;
|
|
20215
20024
|
this._onMouseOver = prop;
|
|
20216
20025
|
}
|
|
20217
20026
|
get onMouseEnter() {
|
|
20218
20027
|
return this._onMouseEnter;
|
|
20219
20028
|
}
|
|
20220
20029
|
set onMouseEnter(prop) {
|
|
20221
|
-
if (this._onMouseEnter === prop)
|
|
20222
|
-
return;
|
|
20030
|
+
if (this._onMouseEnter === prop) return;
|
|
20223
20031
|
this._onMouseEnter = prop;
|
|
20224
20032
|
}
|
|
20225
20033
|
get onMouseLeave() {
|
|
20226
20034
|
return this._onMouseLeave;
|
|
20227
20035
|
}
|
|
20228
20036
|
set onMouseLeave(prop) {
|
|
20229
|
-
if (this._onMouseLeave === prop)
|
|
20230
|
-
return;
|
|
20037
|
+
if (this._onMouseLeave === prop) return;
|
|
20231
20038
|
this._onMouseLeave = prop;
|
|
20232
20039
|
}
|
|
20233
20040
|
get onDragStart() {
|
|
20234
20041
|
return this._onDragStart;
|
|
20235
20042
|
}
|
|
20236
20043
|
set onDragStart(prop) {
|
|
20237
|
-
if (this._onDragStart === prop)
|
|
20238
|
-
return;
|
|
20044
|
+
if (this._onDragStart === prop) return;
|
|
20239
20045
|
this._onDragStart = prop;
|
|
20240
20046
|
}
|
|
20241
20047
|
get onDragMove() {
|
|
20242
20048
|
return this._onDragMove;
|
|
20243
20049
|
}
|
|
20244
20050
|
set onDragMove(prop) {
|
|
20245
|
-
if (this._onDragMove === prop)
|
|
20246
|
-
return;
|
|
20051
|
+
if (this._onDragMove === prop) return;
|
|
20247
20052
|
this._onDragMove = prop;
|
|
20248
20053
|
}
|
|
20249
20054
|
get onDragEnd() {
|
|
20250
20055
|
return this._onDragEnd;
|
|
20251
20056
|
}
|
|
20252
20057
|
set onDragEnd(prop) {
|
|
20253
|
-
if (this._onDragEnd === prop)
|
|
20254
|
-
return;
|
|
20058
|
+
if (this._onDragEnd === prop) return;
|
|
20255
20059
|
this._onDragEnd = prop;
|
|
20256
20060
|
}
|
|
20257
20061
|
get onWheel() {
|
|
20258
20062
|
return this._onWheel;
|
|
20259
20063
|
}
|
|
20260
20064
|
set onWheel(prop) {
|
|
20261
|
-
if (this._onWheel === prop)
|
|
20262
|
-
return;
|
|
20065
|
+
if (this._onWheel === prop) return;
|
|
20263
20066
|
this._onWheel = prop;
|
|
20264
20067
|
}
|
|
20265
20068
|
attach(ownerElement) {
|
|
@@ -20282,8 +20085,7 @@
|
|
|
20282
20085
|
}
|
|
20283
20086
|
addEventListeners() {
|
|
20284
20087
|
const isBrowser = typeof window !== "undefined";
|
|
20285
|
-
if (!isBrowser)
|
|
20286
|
-
return;
|
|
20088
|
+
if (!isBrowser) return;
|
|
20287
20089
|
const dragBackend = getSingletonDragBackend();
|
|
20288
20090
|
dragBackend.isSetup || dragBackend.setup();
|
|
20289
20091
|
backendRefCount++;
|
|
@@ -20325,14 +20127,12 @@
|
|
|
20325
20127
|
__publicField(this, "dragEndListener", {});
|
|
20326
20128
|
__publicField(this, "handleMouseMoveTop", (e) => {
|
|
20327
20129
|
var _a, _b;
|
|
20328
|
-
if (this.activeDragSourceId == null)
|
|
20329
|
-
return;
|
|
20130
|
+
if (this.activeDragSourceId == null) return;
|
|
20330
20131
|
(_b = (_a = this.dragMoveListener)[this.activeDragSourceId]) == null ? void 0 : _b.call(_a, e);
|
|
20331
20132
|
});
|
|
20332
20133
|
__publicField(this, "handleMouseUpTop", (e) => {
|
|
20333
20134
|
var _a, _b;
|
|
20334
|
-
if (this.activeDragSourceId == null)
|
|
20335
|
-
return;
|
|
20135
|
+
if (this.activeDragSourceId == null) return;
|
|
20336
20136
|
(_b = (_a = this.dragEndListener)[this.activeDragSourceId]) == null ? void 0 : _b.call(_a, e);
|
|
20337
20137
|
this.activeDragSourceId = null;
|
|
20338
20138
|
});
|
|
@@ -20345,17 +20145,14 @@
|
|
|
20345
20145
|
return document;
|
|
20346
20146
|
}
|
|
20347
20147
|
setup() {
|
|
20348
|
-
if (typeof window === "undefined")
|
|
20349
|
-
|
|
20350
|
-
if (this.isSetup)
|
|
20351
|
-
return;
|
|
20148
|
+
if (typeof window === "undefined") return;
|
|
20149
|
+
if (this.isSetup) return;
|
|
20352
20150
|
this.root.addEventListener("mousemove", this.handleMouseMoveTop);
|
|
20353
20151
|
this.root.addEventListener("mouseup", this.handleMouseUpTop);
|
|
20354
20152
|
this.isSetup = true;
|
|
20355
20153
|
}
|
|
20356
20154
|
teardown() {
|
|
20357
|
-
if (typeof window === "undefined")
|
|
20358
|
-
return;
|
|
20155
|
+
if (typeof window === "undefined") return;
|
|
20359
20156
|
this.root.removeEventListener("mousemove", this.handleMouseMoveTop);
|
|
20360
20157
|
this.root.removeEventListener("mouseup", this.handleMouseUpTop);
|
|
20361
20158
|
this.isSetup = false;
|
|
@@ -21027,8 +20824,7 @@
|
|
|
21027
20824
|
});
|
|
21028
20825
|
});
|
|
21029
20826
|
__publicField(this, "handleMouseMove", ({ x, y }) => {
|
|
21030
|
-
if (this.origin == null)
|
|
21031
|
-
return;
|
|
20827
|
+
if (this.origin == null) return;
|
|
21032
20828
|
this.setState(() => {
|
|
21033
20829
|
var _a, _b;
|
|
21034
20830
|
this.delta = this.lastDelta.plus(
|
|
@@ -21162,15 +20958,14 @@
|
|
|
21162
20958
|
var RenderZIndex = class extends SingleChildRenderObject_default {
|
|
21163
20959
|
constructor({ zIndex }) {
|
|
21164
20960
|
super({ isPainter: false });
|
|
21165
|
-
__privateAdd(this, _zIndex
|
|
20961
|
+
__privateAdd(this, _zIndex);
|
|
21166
20962
|
__privateSet(this, _zIndex, zIndex);
|
|
21167
20963
|
}
|
|
21168
20964
|
get zIndex() {
|
|
21169
20965
|
return __privateGet(this, _zIndex);
|
|
21170
20966
|
}
|
|
21171
20967
|
set zIndex(value) {
|
|
21172
|
-
if (__privateGet(this, _zIndex) === value)
|
|
21173
|
-
return;
|
|
20968
|
+
if (__privateGet(this, _zIndex) === value) return;
|
|
21174
20969
|
__privateSet(this, _zIndex, value);
|
|
21175
20970
|
this.markNeedsUpdateZOrder();
|
|
21176
20971
|
}
|
|
@@ -21238,52 +21033,39 @@
|
|
|
21238
21033
|
}
|
|
21239
21034
|
};
|
|
21240
21035
|
var ZERO_WIDTH_SPACE = "\u200B";
|
|
21241
|
-
var _nativeInput, _selection, _textPainter2, _selectionUI, _textKey, _selectionStart, _textFieldPosition, _focused, _isTyping, _typingTimer, _isComposing, _lineInfo, _currentCharUI,
|
|
21036
|
+
var _nativeInput, _selection, _textPainter2, _selectionUI, _textKey, _selectionStart, _textFieldPosition, _focused, _isTyping, _typingTimer, _isComposing, _lineInfo, _currentCharUI, _TextFieldState_instances, hasSelection_get, resetTypingTimer_fn, setText_fn, toTextSpan_fn, syncThis_fn, _syncBlur, render_fn, calculateLineInfo_fn, findLineIndexForPosition_fn, calculateCurrentCharRect_fn, calculateSelectionUI_fn, setSelection_fn, _getCharIndexFromMouseEvent;
|
|
21242
21037
|
var TextFieldState = class extends State {
|
|
21243
21038
|
constructor() {
|
|
21244
21039
|
super();
|
|
21245
|
-
__privateAdd(this,
|
|
21246
|
-
__privateAdd(this, _resetTypingTimer);
|
|
21247
|
-
__privateAdd(this, _setText);
|
|
21248
|
-
__privateAdd(this, _toTextSpan);
|
|
21249
|
-
/**
|
|
21250
|
-
* Sync the text field with the native input.
|
|
21251
|
-
*/
|
|
21252
|
-
__privateAdd(this, _syncThis);
|
|
21253
|
-
__privateAdd(this, _render);
|
|
21254
|
-
__privateAdd(this, _calculateLineInfo);
|
|
21255
|
-
__privateAdd(this, _findLineIndexForPosition);
|
|
21256
|
-
__privateAdd(this, _calculateCurrentCharRect);
|
|
21257
|
-
__privateAdd(this, _calculateSelectionUI);
|
|
21258
|
-
__privateAdd(this, _setSelection);
|
|
21040
|
+
__privateAdd(this, _TextFieldState_instances);
|
|
21259
21041
|
__privateAdd(this, _nativeInput, new NativeInput());
|
|
21260
21042
|
__publicField(this, "value", "");
|
|
21261
21043
|
__privateAdd(this, _selection, [0, 0]);
|
|
21262
|
-
__privateAdd(this, _textPainter2
|
|
21044
|
+
__privateAdd(this, _textPainter2);
|
|
21263
21045
|
__privateAdd(this, _selectionUI, []);
|
|
21264
21046
|
__privateAdd(this, _textKey, new Globalkey_default());
|
|
21265
21047
|
__privateAdd(this, _selectionStart, 0);
|
|
21266
21048
|
__privateAdd(this, _textFieldPosition, null);
|
|
21267
21049
|
__privateAdd(this, _focused, false);
|
|
21268
21050
|
__privateAdd(this, _isTyping, false);
|
|
21269
|
-
__privateAdd(this, _typingTimer
|
|
21051
|
+
__privateAdd(this, _typingTimer);
|
|
21270
21052
|
__privateAdd(this, _isComposing, false);
|
|
21271
21053
|
__privateAdd(this, _lineInfo, []);
|
|
21272
|
-
__privateAdd(this, _currentCharUI
|
|
21054
|
+
__privateAdd(this, _currentCharUI);
|
|
21273
21055
|
__privateAdd(this, _syncBlur, () => {
|
|
21274
21056
|
__privateSet(this, _selection, [0, 0]);
|
|
21275
21057
|
__privateSet(this, _currentCharUI, null);
|
|
21276
21058
|
__privateSet(this, _selectionUI, null);
|
|
21277
21059
|
__privateSet(this, _focused, false);
|
|
21278
|
-
__privateMethod(this,
|
|
21060
|
+
__privateMethod(this, _TextFieldState_instances, render_fn).call(this);
|
|
21279
21061
|
});
|
|
21280
21062
|
__publicField(this, "focus", (location = this.value.length) => {
|
|
21281
21063
|
__privateGet(this, _nativeInput).value = this.value;
|
|
21282
21064
|
__privateGet(this, _nativeInput).focus();
|
|
21283
|
-
__privateMethod(this,
|
|
21065
|
+
__privateMethod(this, _TextFieldState_instances, setSelection_fn).call(this, location);
|
|
21284
21066
|
__privateGet(this, _nativeInput).setCaret(location);
|
|
21285
21067
|
__privateSet(this, _focused, true);
|
|
21286
|
-
__privateMethod(this,
|
|
21068
|
+
__privateMethod(this, _TextFieldState_instances, render_fn).call(this);
|
|
21287
21069
|
});
|
|
21288
21070
|
__publicField(this, "blur", () => {
|
|
21289
21071
|
__privateGet(this, _syncBlur).call(this);
|
|
@@ -21372,12 +21154,11 @@
|
|
|
21372
21154
|
this.focus(globalCharIndex);
|
|
21373
21155
|
});
|
|
21374
21156
|
__publicField(this, "handleMouseMove", (e) => {
|
|
21375
|
-
if (!__privateGet(this, _textFieldPosition))
|
|
21376
|
-
return;
|
|
21157
|
+
if (!__privateGet(this, _textFieldPosition)) return;
|
|
21377
21158
|
const currentIndex = __privateGet(this, _getCharIndexFromMouseEvent).call(this, e);
|
|
21378
21159
|
const start = Math.min(__privateGet(this, _selectionStart), currentIndex);
|
|
21379
21160
|
const end = Math.max(__privateGet(this, _selectionStart), currentIndex);
|
|
21380
|
-
__privateMethod(this,
|
|
21161
|
+
__privateMethod(this, _TextFieldState_instances, setSelection_fn).call(this, start, end);
|
|
21381
21162
|
__privateGet(this, _nativeInput).setSelection(start, end);
|
|
21382
21163
|
});
|
|
21383
21164
|
__publicField(this, "handleMouseUp", () => {
|
|
@@ -21386,7 +21167,7 @@
|
|
|
21386
21167
|
}
|
|
21387
21168
|
didUpdateWidget(oldWidget) {
|
|
21388
21169
|
if (oldWidget.text !== this.widget.text || !oldWidget.style.equals(this.widget.style)) {
|
|
21389
|
-
__privateMethod(this,
|
|
21170
|
+
__privateMethod(this, _TextFieldState_instances, setText_fn).call(this, this.widget.text);
|
|
21390
21171
|
return;
|
|
21391
21172
|
}
|
|
21392
21173
|
}
|
|
@@ -21395,7 +21176,7 @@
|
|
|
21395
21176
|
return (_a = __privateGet(this, _textPainter2).paragraph) == null ? void 0 : _a.lines;
|
|
21396
21177
|
}
|
|
21397
21178
|
initState() {
|
|
21398
|
-
__privateMethod(this,
|
|
21179
|
+
__privateMethod(this, _TextFieldState_instances, setText_fn).call(this, this.widget.text);
|
|
21399
21180
|
__privateGet(this, _nativeInput).addEventListener("compositionstart", () => {
|
|
21400
21181
|
this.setState(() => {
|
|
21401
21182
|
__privateSet(this, _isComposing, true);
|
|
@@ -21417,7 +21198,7 @@
|
|
|
21417
21198
|
return;
|
|
21418
21199
|
}
|
|
21419
21200
|
setTimeout(() => {
|
|
21420
|
-
__privateMethod(this,
|
|
21201
|
+
__privateMethod(this, _TextFieldState_instances, syncThis_fn).call(this);
|
|
21421
21202
|
}, 0);
|
|
21422
21203
|
});
|
|
21423
21204
|
__privateGet(this, _nativeInput).addEventListener("blur", () => {
|
|
@@ -21528,25 +21309,23 @@
|
|
|
21528
21309
|
_isComposing = new WeakMap();
|
|
21529
21310
|
_lineInfo = new WeakMap();
|
|
21530
21311
|
_currentCharUI = new WeakMap();
|
|
21531
|
-
|
|
21312
|
+
_TextFieldState_instances = new WeakSet();
|
|
21532
21313
|
hasSelection_get = function() {
|
|
21533
21314
|
return __privateGet(this, _selection)[0] !== __privateGet(this, _selection)[1];
|
|
21534
21315
|
};
|
|
21535
|
-
_resetTypingTimer = new WeakSet();
|
|
21536
21316
|
resetTypingTimer_fn = function() {
|
|
21537
21317
|
if (__privateGet(this, _typingTimer)) {
|
|
21538
21318
|
clearTimeout(__privateGet(this, _typingTimer));
|
|
21539
21319
|
}
|
|
21540
21320
|
__privateSet(this, _typingTimer, setTimeout(() => {
|
|
21541
21321
|
__privateSet(this, _isTyping, false);
|
|
21542
|
-
__privateMethod(this,
|
|
21322
|
+
__privateMethod(this, _TextFieldState_instances, render_fn).call(this);
|
|
21543
21323
|
}, 10));
|
|
21544
21324
|
};
|
|
21545
|
-
_setText = new WeakSet();
|
|
21546
21325
|
setText_fn = function(text) {
|
|
21547
21326
|
this.value = text;
|
|
21548
21327
|
__privateSet(this, _textPainter2, new TextPainter({
|
|
21549
|
-
text: __privateMethod(this,
|
|
21328
|
+
text: __privateMethod(this, _TextFieldState_instances, toTextSpan_fn).call(this),
|
|
21550
21329
|
textDirection: this.widget.textDirection,
|
|
21551
21330
|
textScaleFactor: 1,
|
|
21552
21331
|
textWidthBasis: text_width_basis_default.parent,
|
|
@@ -21554,12 +21333,11 @@
|
|
|
21554
21333
|
maxLines: this.widget.maxLines,
|
|
21555
21334
|
ellipsis: void 0
|
|
21556
21335
|
}));
|
|
21557
|
-
__privateMethod(this,
|
|
21336
|
+
__privateMethod(this, _TextFieldState_instances, render_fn).call(this);
|
|
21558
21337
|
this.element.scheduler.addPostFrameCallbacks(() => {
|
|
21559
|
-
__privateSet(this, _lineInfo, __privateMethod(this,
|
|
21338
|
+
__privateSet(this, _lineInfo, __privateMethod(this, _TextFieldState_instances, calculateLineInfo_fn).call(this));
|
|
21560
21339
|
});
|
|
21561
21340
|
};
|
|
21562
|
-
_toTextSpan = new WeakSet();
|
|
21563
21341
|
toTextSpan_fn = function() {
|
|
21564
21342
|
return new text_span_default({
|
|
21565
21343
|
/**
|
|
@@ -21576,22 +21354,22 @@
|
|
|
21576
21354
|
)
|
|
21577
21355
|
});
|
|
21578
21356
|
};
|
|
21579
|
-
|
|
21357
|
+
/**
|
|
21358
|
+
* Sync the text field with the native input.
|
|
21359
|
+
*/
|
|
21580
21360
|
syncThis_fn = function() {
|
|
21581
|
-
__privateMethod(this,
|
|
21361
|
+
__privateMethod(this, _TextFieldState_instances, setText_fn).call(this, __privateGet(this, _nativeInput).value);
|
|
21582
21362
|
__privateSet(this, _isTyping, true);
|
|
21583
|
-
__privateMethod(this,
|
|
21363
|
+
__privateMethod(this, _TextFieldState_instances, resetTypingTimer_fn).call(this);
|
|
21584
21364
|
this.element.scheduler.addPostFrameCallbacks(() => {
|
|
21585
|
-
__privateMethod(this,
|
|
21586
|
-
__privateMethod(this,
|
|
21365
|
+
__privateMethod(this, _TextFieldState_instances, setSelection_fn).call(this, ...__privateGet(this, _nativeInput).getSelection());
|
|
21366
|
+
__privateMethod(this, _TextFieldState_instances, render_fn).call(this);
|
|
21587
21367
|
});
|
|
21588
21368
|
};
|
|
21589
21369
|
_syncBlur = new WeakMap();
|
|
21590
|
-
_render = new WeakSet();
|
|
21591
21370
|
render_fn = function() {
|
|
21592
21371
|
this.setState();
|
|
21593
21372
|
};
|
|
21594
|
-
_calculateLineInfo = new WeakSet();
|
|
21595
21373
|
calculateLineInfo_fn = function() {
|
|
21596
21374
|
const lines = __privateGet(this, _textPainter2).paragraph.lines;
|
|
21597
21375
|
let accumulatedChars = 0;
|
|
@@ -21608,7 +21386,6 @@
|
|
|
21608
21386
|
return lineInfo;
|
|
21609
21387
|
});
|
|
21610
21388
|
};
|
|
21611
|
-
_findLineIndexForPosition = new WeakSet();
|
|
21612
21389
|
findLineIndexForPosition_fn = function(position) {
|
|
21613
21390
|
let low = 0;
|
|
21614
21391
|
let high = __privateGet(this, _lineInfo).length - 1;
|
|
@@ -21626,10 +21403,9 @@
|
|
|
21626
21403
|
}
|
|
21627
21404
|
return __privateGet(this, _lineInfo).length - 1;
|
|
21628
21405
|
};
|
|
21629
|
-
_calculateCurrentCharRect = new WeakSet();
|
|
21630
21406
|
calculateCurrentCharRect_fn = function(caretLocation) {
|
|
21631
21407
|
var _a, _b, _c, _d, _e;
|
|
21632
|
-
const lineIndex = __privateMethod(this,
|
|
21408
|
+
const lineIndex = __privateMethod(this, _TextFieldState_instances, findLineIndexForPosition_fn).call(this, caretLocation);
|
|
21633
21409
|
const line = __privateGet(this, _lineInfo)[lineIndex];
|
|
21634
21410
|
const localCaretPosition = caretLocation - line.accumulatedChars;
|
|
21635
21411
|
const lines = (_c = (_b = (_a = __privateGet(this, _textPainter2)) == null ? void 0 : _a.paragraph) == null ? void 0 : _b.lines) != null ? _c : [];
|
|
@@ -21667,11 +21443,10 @@
|
|
|
21667
21443
|
}
|
|
21668
21444
|
return charUI;
|
|
21669
21445
|
};
|
|
21670
|
-
_calculateSelectionUI = new WeakSet();
|
|
21671
21446
|
calculateSelectionUI_fn = function(start, end) {
|
|
21672
21447
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
21673
|
-
const startLineIndex = __privateMethod(this,
|
|
21674
|
-
const endLineIndex = __privateMethod(this,
|
|
21448
|
+
const startLineIndex = __privateMethod(this, _TextFieldState_instances, findLineIndexForPosition_fn).call(this, start);
|
|
21449
|
+
const endLineIndex = __privateMethod(this, _TextFieldState_instances, findLineIndexForPosition_fn).call(this, end);
|
|
21675
21450
|
const segments = [];
|
|
21676
21451
|
const lines = (_c = (_b = (_a = __privateGet(this, _textPainter2)) == null ? void 0 : _a.paragraph) == null ? void 0 : _b.lines) != null ? _c : [];
|
|
21677
21452
|
for (let i = startLineIndex; i <= endLineIndex; i++) {
|
|
@@ -21690,18 +21465,17 @@
|
|
|
21690
21465
|
}
|
|
21691
21466
|
return segments;
|
|
21692
21467
|
};
|
|
21693
|
-
_setSelection = new WeakSet();
|
|
21694
21468
|
setSelection_fn = function(start, end = start) {
|
|
21695
21469
|
__privateSet(this, _selection, [start, end]);
|
|
21696
21470
|
const caretLocation = start;
|
|
21697
|
-
if (__privateGet(this,
|
|
21698
|
-
__privateSet(this, _selectionUI, __privateMethod(this,
|
|
21471
|
+
if (__privateGet(this, _TextFieldState_instances, hasSelection_get)) {
|
|
21472
|
+
__privateSet(this, _selectionUI, __privateMethod(this, _TextFieldState_instances, calculateSelectionUI_fn).call(this, start, end));
|
|
21699
21473
|
__privateSet(this, _currentCharUI, null);
|
|
21700
21474
|
} else {
|
|
21701
21475
|
__privateSet(this, _selectionUI, null);
|
|
21702
|
-
__privateSet(this, _currentCharUI, __privateMethod(this,
|
|
21476
|
+
__privateSet(this, _currentCharUI, __privateMethod(this, _TextFieldState_instances, calculateCurrentCharRect_fn).call(this, caretLocation));
|
|
21703
21477
|
}
|
|
21704
|
-
__privateMethod(this,
|
|
21478
|
+
__privateMethod(this, _TextFieldState_instances, render_fn).call(this);
|
|
21705
21479
|
};
|
|
21706
21480
|
_getCharIndexFromMouseEvent = new WeakMap();
|
|
21707
21481
|
var Caret = class extends StatefulWidget_default {
|
|
@@ -21774,12 +21548,10 @@
|
|
|
21774
21548
|
});
|
|
21775
21549
|
}
|
|
21776
21550
|
};
|
|
21777
|
-
var _isComposing2, _element, _listeners,
|
|
21551
|
+
var _isComposing2, _element, _listeners, _NativeInput_instances, createElement_fn, setComposing_fn, _disposed, dispatch_fn;
|
|
21778
21552
|
var NativeInput = class {
|
|
21779
21553
|
constructor() {
|
|
21780
|
-
__privateAdd(this,
|
|
21781
|
-
__privateAdd(this, _setComposing);
|
|
21782
|
-
__privateAdd(this, _dispatch);
|
|
21554
|
+
__privateAdd(this, _NativeInput_instances);
|
|
21783
21555
|
__privateAdd(this, _isComposing2, false);
|
|
21784
21556
|
__privateAdd(this, _element, null);
|
|
21785
21557
|
__privateAdd(this, _listeners, {});
|
|
@@ -21814,7 +21586,7 @@
|
|
|
21814
21586
|
assert(!__privateGet(this, _disposed), "invalid access. because native input is disposed");
|
|
21815
21587
|
if (__privateGet(this, _element) == null) {
|
|
21816
21588
|
if (browser) {
|
|
21817
|
-
__privateSet(this, _element, __privateMethod(this,
|
|
21589
|
+
__privateSet(this, _element, __privateMethod(this, _NativeInput_instances, createElement_fn).call(this));
|
|
21818
21590
|
document.body.appendChild(__privateGet(this, _element));
|
|
21819
21591
|
} else {
|
|
21820
21592
|
__privateSet(this, _element, {
|
|
@@ -21847,7 +21619,7 @@
|
|
|
21847
21619
|
_isComposing2 = new WeakMap();
|
|
21848
21620
|
_element = new WeakMap();
|
|
21849
21621
|
_listeners = new WeakMap();
|
|
21850
|
-
|
|
21622
|
+
_NativeInput_instances = new WeakSet();
|
|
21851
21623
|
createElement_fn = function() {
|
|
21852
21624
|
const el = document.createElement("textarea");
|
|
21853
21625
|
el.setAttribute(
|
|
@@ -21855,49 +21627,390 @@
|
|
|
21855
21627
|
"position: absolute; opacity: 0; height: 0; width: 0;"
|
|
21856
21628
|
);
|
|
21857
21629
|
el.addEventListener("input", (e) => {
|
|
21858
|
-
__privateMethod(this,
|
|
21630
|
+
__privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "input", { value: this.value });
|
|
21859
21631
|
if (e.isComposing && this.value[this.value.length - 1] === " ") {
|
|
21860
|
-
__privateMethod(this,
|
|
21632
|
+
__privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, false);
|
|
21861
21633
|
return;
|
|
21862
21634
|
}
|
|
21863
|
-
__privateMethod(this,
|
|
21635
|
+
__privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, e.isComposing);
|
|
21864
21636
|
});
|
|
21865
21637
|
el.addEventListener("keydown", (e) => {
|
|
21866
21638
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
21867
21639
|
e.preventDefault();
|
|
21868
|
-
__privateMethod(this,
|
|
21640
|
+
__privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, false);
|
|
21869
21641
|
}
|
|
21870
|
-
__privateMethod(this,
|
|
21871
|
-
__privateMethod(this,
|
|
21642
|
+
__privateMethod(this, _NativeInput_instances, setComposing_fn).call(this, e.isComposing);
|
|
21643
|
+
__privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "keydown", {
|
|
21872
21644
|
key: e.key,
|
|
21873
21645
|
ctrlKey: e.ctrlKey,
|
|
21874
21646
|
shiftKey: e.shiftKey
|
|
21875
21647
|
});
|
|
21876
21648
|
});
|
|
21877
21649
|
el.addEventListener("focus", () => {
|
|
21878
|
-
__privateMethod(this,
|
|
21650
|
+
__privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "focus", void 0);
|
|
21879
21651
|
});
|
|
21880
21652
|
el.addEventListener("blur", () => {
|
|
21881
|
-
__privateMethod(this,
|
|
21653
|
+
__privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "blur", void 0);
|
|
21882
21654
|
});
|
|
21883
21655
|
return el;
|
|
21884
21656
|
};
|
|
21885
|
-
_setComposing = new WeakSet();
|
|
21886
21657
|
setComposing_fn = function(isComposing) {
|
|
21887
|
-
if (__privateGet(this, _isComposing2) === isComposing)
|
|
21888
|
-
return;
|
|
21658
|
+
if (__privateGet(this, _isComposing2) === isComposing) return;
|
|
21889
21659
|
__privateSet(this, _isComposing2, isComposing);
|
|
21890
21660
|
if (isComposing) {
|
|
21891
|
-
__privateMethod(this,
|
|
21661
|
+
__privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "compositionstart", void 0);
|
|
21892
21662
|
} else {
|
|
21893
|
-
__privateMethod(this,
|
|
21663
|
+
__privateMethod(this, _NativeInput_instances, dispatch_fn).call(this, "compositionend", void 0);
|
|
21894
21664
|
}
|
|
21895
21665
|
};
|
|
21896
21666
|
_disposed = new WeakMap();
|
|
21897
|
-
_dispatch = new WeakSet();
|
|
21898
21667
|
dispatch_fn = function(type, event) {
|
|
21899
21668
|
var _a;
|
|
21900
21669
|
(_a = __privateGet(this, _listeners)[type]) == null ? void 0 : _a.forEach((listener) => listener(event));
|
|
21901
21670
|
};
|
|
21902
21671
|
var TextField_default = classToFunction_default(TextField);
|
|
21672
|
+
|
|
21673
|
+
// src/component/base/base-image/calculatePosition.ts
|
|
21674
|
+
var objectPositionMap = {
|
|
21675
|
+
center: { x: 0.5, y: 0.5 },
|
|
21676
|
+
top: { x: 0.5, y: 0 },
|
|
21677
|
+
right: { x: 1, y: 0.5 },
|
|
21678
|
+
bottom: { x: 0.5, y: 1 },
|
|
21679
|
+
left: { x: 0, y: 0.5 },
|
|
21680
|
+
"top left": { x: 0, y: 0 },
|
|
21681
|
+
"top right": { x: 1, y: 0 },
|
|
21682
|
+
"bottom left": { x: 0, y: 1 },
|
|
21683
|
+
"bottom right": { x: 1, y: 1 }
|
|
21684
|
+
};
|
|
21685
|
+
function calcSize(sourceSize, containerSize, imageSize, positionPercent) {
|
|
21686
|
+
if (imageSize > containerSize) {
|
|
21687
|
+
const ratio = sourceSize / imageSize;
|
|
21688
|
+
const sSize = Math.min(sourceSize, containerSize * ratio);
|
|
21689
|
+
const s = (sourceSize - sSize) * positionPercent;
|
|
21690
|
+
return {
|
|
21691
|
+
s: Math.max(0, Math.min(s, sourceSize - sSize)),
|
|
21692
|
+
sSize,
|
|
21693
|
+
d: 0,
|
|
21694
|
+
dSize: containerSize
|
|
21695
|
+
};
|
|
21696
|
+
} else {
|
|
21697
|
+
const d = (containerSize - imageSize) * positionPercent;
|
|
21698
|
+
return {
|
|
21699
|
+
s: 0,
|
|
21700
|
+
sSize: sourceSize,
|
|
21701
|
+
d,
|
|
21702
|
+
dSize: imageSize
|
|
21703
|
+
};
|
|
21704
|
+
}
|
|
21705
|
+
}
|
|
21706
|
+
function calculateImageRendering(sourceImageSize, calcImageSizeResult, objectPosition = "center") {
|
|
21707
|
+
const {
|
|
21708
|
+
container: { width: containerWidth, height: containerHeight },
|
|
21709
|
+
image: { width: imageWidth, height: imageHeight }
|
|
21710
|
+
} = calcImageSizeResult;
|
|
21711
|
+
const { x: xPercent, y: yPercent } = objectPositionMap[objectPosition];
|
|
21712
|
+
const horizontalResult = calcSize(
|
|
21713
|
+
sourceImageSize.width,
|
|
21714
|
+
containerWidth,
|
|
21715
|
+
imageWidth,
|
|
21716
|
+
xPercent
|
|
21717
|
+
);
|
|
21718
|
+
const verticalResult = calcSize(
|
|
21719
|
+
sourceImageSize.height,
|
|
21720
|
+
containerHeight,
|
|
21721
|
+
imageHeight,
|
|
21722
|
+
yPercent
|
|
21723
|
+
);
|
|
21724
|
+
return {
|
|
21725
|
+
sx: Math.round(horizontalResult.s),
|
|
21726
|
+
sy: Math.round(verticalResult.s),
|
|
21727
|
+
sWidth: Math.round(horizontalResult.sSize),
|
|
21728
|
+
sHeight: Math.round(verticalResult.sSize),
|
|
21729
|
+
dx: Math.round(horizontalResult.d),
|
|
21730
|
+
dy: Math.round(verticalResult.d),
|
|
21731
|
+
dWidth: Math.round(horizontalResult.dSize),
|
|
21732
|
+
dHeight: Math.round(verticalResult.dSize)
|
|
21733
|
+
};
|
|
21734
|
+
}
|
|
21735
|
+
|
|
21736
|
+
// src/component/base/base-image/calculateSize.ts
|
|
21737
|
+
function calculateSize(source, container, objectFit = "none") {
|
|
21738
|
+
var _a, _b;
|
|
21739
|
+
const aspectRatio = source.width / source.height;
|
|
21740
|
+
let containerWidth = (_a = container.width) != null ? _a : source.width;
|
|
21741
|
+
let containerHeight = (_b = container.height) != null ? _b : source.height;
|
|
21742
|
+
if (container.width != null && container.height == null) {
|
|
21743
|
+
containerHeight = Math.round(container.width / aspectRatio);
|
|
21744
|
+
} else if (container.width == null && container.height != null) {
|
|
21745
|
+
containerWidth = Math.round(container.height * aspectRatio);
|
|
21746
|
+
}
|
|
21747
|
+
const imageSize = fitFunctions[objectFit](source, {
|
|
21748
|
+
width: containerWidth,
|
|
21749
|
+
height: containerHeight
|
|
21750
|
+
});
|
|
21751
|
+
return {
|
|
21752
|
+
width: Math.round(containerWidth),
|
|
21753
|
+
height: Math.round(containerHeight),
|
|
21754
|
+
image: {
|
|
21755
|
+
width: Math.round(imageSize.width),
|
|
21756
|
+
height: Math.round(imageSize.height)
|
|
21757
|
+
}
|
|
21758
|
+
};
|
|
21759
|
+
}
|
|
21760
|
+
var fitFunctions = {
|
|
21761
|
+
fill: fillFit,
|
|
21762
|
+
contain: containFit,
|
|
21763
|
+
cover: coverFit,
|
|
21764
|
+
none: noneFit,
|
|
21765
|
+
"scale-down": scaleDownFit
|
|
21766
|
+
};
|
|
21767
|
+
function fillFit(source, container) {
|
|
21768
|
+
return { width: container.width, height: container.height };
|
|
21769
|
+
}
|
|
21770
|
+
function containFit(source, result) {
|
|
21771
|
+
const aspectRatio = source.width / source.height;
|
|
21772
|
+
if (result.width / result.height > aspectRatio) {
|
|
21773
|
+
return { width: result.height * aspectRatio, height: result.height };
|
|
21774
|
+
} else {
|
|
21775
|
+
return { width: result.width, height: result.width / aspectRatio };
|
|
21776
|
+
}
|
|
21777
|
+
}
|
|
21778
|
+
function coverFit(source, container) {
|
|
21779
|
+
const aspectRatio = source.width / source.height;
|
|
21780
|
+
if (container.width / container.height > aspectRatio) {
|
|
21781
|
+
return { width: container.width, height: container.width / aspectRatio };
|
|
21782
|
+
} else {
|
|
21783
|
+
return { width: container.height * aspectRatio, height: container.height };
|
|
21784
|
+
}
|
|
21785
|
+
}
|
|
21786
|
+
function noneFit(source, _) {
|
|
21787
|
+
return { width: source.width, height: source.height };
|
|
21788
|
+
}
|
|
21789
|
+
function scaleDownFit(source, container) {
|
|
21790
|
+
const containSize = containFit(source, container);
|
|
21791
|
+
if (containSize.width > source.width || containSize.height > source.height) {
|
|
21792
|
+
return { width: source.width, height: source.height };
|
|
21793
|
+
}
|
|
21794
|
+
return containSize;
|
|
21795
|
+
}
|
|
21796
|
+
|
|
21797
|
+
// src/component/base/base-image/BaseImage.ts
|
|
21798
|
+
var _Image = class extends SingleChildRenderObjectWidget_default {
|
|
21799
|
+
constructor({
|
|
21800
|
+
key,
|
|
21801
|
+
src,
|
|
21802
|
+
objectFit: fit,
|
|
21803
|
+
width,
|
|
21804
|
+
height,
|
|
21805
|
+
objectPosition: position
|
|
21806
|
+
}) {
|
|
21807
|
+
super(key);
|
|
21808
|
+
__publicField(this, "_src");
|
|
21809
|
+
__publicField(this, "_fit");
|
|
21810
|
+
__publicField(this, "_width");
|
|
21811
|
+
__publicField(this, "_height");
|
|
21812
|
+
__publicField(this, "_position");
|
|
21813
|
+
this._src = src;
|
|
21814
|
+
this._fit = fit;
|
|
21815
|
+
this._width = width;
|
|
21816
|
+
this._height = height;
|
|
21817
|
+
this._position = position;
|
|
21818
|
+
}
|
|
21819
|
+
createRenderObject() {
|
|
21820
|
+
return new RenderImage({
|
|
21821
|
+
src: this._src,
|
|
21822
|
+
objectFit: this._fit,
|
|
21823
|
+
width: this._width,
|
|
21824
|
+
height: this._height,
|
|
21825
|
+
objectPosition: this._position
|
|
21826
|
+
});
|
|
21827
|
+
}
|
|
21828
|
+
updateRenderObject(renderObject) {
|
|
21829
|
+
renderObject.src = this._src;
|
|
21830
|
+
renderObject.fit = this._fit;
|
|
21831
|
+
renderObject.width = this._width;
|
|
21832
|
+
renderObject.height = this._height;
|
|
21833
|
+
renderObject.position = this._position;
|
|
21834
|
+
}
|
|
21835
|
+
};
|
|
21836
|
+
var _src, _fit, _width, _height, _position, _mounted;
|
|
21837
|
+
var RenderImage = class extends SingleChildRenderObject_default {
|
|
21838
|
+
constructor({
|
|
21839
|
+
src,
|
|
21840
|
+
objectFit,
|
|
21841
|
+
width,
|
|
21842
|
+
height,
|
|
21843
|
+
objectPosition
|
|
21844
|
+
}) {
|
|
21845
|
+
super({ isPainter: true });
|
|
21846
|
+
__privateAdd(this, _src);
|
|
21847
|
+
__privateAdd(this, _fit);
|
|
21848
|
+
__privateAdd(this, _width);
|
|
21849
|
+
__privateAdd(this, _height);
|
|
21850
|
+
__privateAdd(this, _position);
|
|
21851
|
+
__publicField(this, "image");
|
|
21852
|
+
__publicField(this, "imageLoaded", false);
|
|
21853
|
+
__publicField(this, "calculatedImageSize");
|
|
21854
|
+
__privateAdd(this, _mounted, false);
|
|
21855
|
+
__privateSet(this, _src, src);
|
|
21856
|
+
__privateSet(this, _fit, objectFit);
|
|
21857
|
+
__privateSet(this, _width, width);
|
|
21858
|
+
__privateSet(this, _height, height);
|
|
21859
|
+
__privateSet(this, _position, objectPosition);
|
|
21860
|
+
if (browser) {
|
|
21861
|
+
this.image = new Image();
|
|
21862
|
+
this.image.onload = () => {
|
|
21863
|
+
this.imageLoaded = true;
|
|
21864
|
+
if (!__privateGet(this, _mounted)) return;
|
|
21865
|
+
this.markNeedsLayout();
|
|
21866
|
+
};
|
|
21867
|
+
this.image.src = src;
|
|
21868
|
+
}
|
|
21869
|
+
}
|
|
21870
|
+
get src() {
|
|
21871
|
+
return __privateGet(this, _src);
|
|
21872
|
+
}
|
|
21873
|
+
set src(value) {
|
|
21874
|
+
if (__privateGet(this, _src) === value) return;
|
|
21875
|
+
__privateSet(this, _src, value);
|
|
21876
|
+
if (this.image != null) {
|
|
21877
|
+
this.image.src = value;
|
|
21878
|
+
}
|
|
21879
|
+
this.markNeedsLayout();
|
|
21880
|
+
}
|
|
21881
|
+
get fit() {
|
|
21882
|
+
return __privateGet(this, _fit);
|
|
21883
|
+
}
|
|
21884
|
+
set fit(value) {
|
|
21885
|
+
if (__privateGet(this, _fit) === value) return;
|
|
21886
|
+
__privateSet(this, _fit, value);
|
|
21887
|
+
this.markNeedsLayout();
|
|
21888
|
+
}
|
|
21889
|
+
get width() {
|
|
21890
|
+
return __privateGet(this, _width);
|
|
21891
|
+
}
|
|
21892
|
+
set width(value) {
|
|
21893
|
+
if (__privateGet(this, _width) === value) return;
|
|
21894
|
+
__privateSet(this, _width, value);
|
|
21895
|
+
this.markNeedsLayout();
|
|
21896
|
+
}
|
|
21897
|
+
get height() {
|
|
21898
|
+
return __privateGet(this, _height);
|
|
21899
|
+
}
|
|
21900
|
+
set height(value) {
|
|
21901
|
+
if (__privateGet(this, _height) === value) return;
|
|
21902
|
+
__privateSet(this, _height, value);
|
|
21903
|
+
this.markNeedsLayout();
|
|
21904
|
+
}
|
|
21905
|
+
get position() {
|
|
21906
|
+
return __privateGet(this, _position);
|
|
21907
|
+
}
|
|
21908
|
+
set position(value) {
|
|
21909
|
+
if (__privateGet(this, _position) === value) return;
|
|
21910
|
+
__privateSet(this, _position, value);
|
|
21911
|
+
this.markNeedsLayout();
|
|
21912
|
+
}
|
|
21913
|
+
getIntrinsicWidth() {
|
|
21914
|
+
if (this.width != null) return this.width;
|
|
21915
|
+
return 0;
|
|
21916
|
+
}
|
|
21917
|
+
getIntrinsicHeight() {
|
|
21918
|
+
if (this.height != null) return this.height;
|
|
21919
|
+
return 0;
|
|
21920
|
+
}
|
|
21921
|
+
preformLayout() {
|
|
21922
|
+
var _a, _b;
|
|
21923
|
+
__privateSet(this, _mounted, true);
|
|
21924
|
+
if (!this.imageLoaded) {
|
|
21925
|
+
this.size = this.constraints.constrain(
|
|
21926
|
+
new size_default({
|
|
21927
|
+
width: (_a = this.width) != null ? _a : 0,
|
|
21928
|
+
height: (_b = this.height) != null ? _b : 0
|
|
21929
|
+
})
|
|
21930
|
+
);
|
|
21931
|
+
return;
|
|
21932
|
+
}
|
|
21933
|
+
assert(this.image != null);
|
|
21934
|
+
const sourceSize = { width: this.image.width, height: this.image.height };
|
|
21935
|
+
const { width, height } = calculateSize(
|
|
21936
|
+
sourceSize,
|
|
21937
|
+
{
|
|
21938
|
+
width: this.width && this.constraints.constrainWidth(this.width),
|
|
21939
|
+
height: this.height && this.constraints.constrainHeight(this.height)
|
|
21940
|
+
},
|
|
21941
|
+
this.fit
|
|
21942
|
+
);
|
|
21943
|
+
const size = new size_default({ width, height });
|
|
21944
|
+
this.size = this.constraints.constrain(size);
|
|
21945
|
+
this.calculatedImageSize = calculateSize(
|
|
21946
|
+
sourceSize,
|
|
21947
|
+
{
|
|
21948
|
+
width: this.size.width,
|
|
21949
|
+
height: this.size.height
|
|
21950
|
+
},
|
|
21951
|
+
this.fit
|
|
21952
|
+
).image;
|
|
21953
|
+
}
|
|
21954
|
+
createCanvasPainter() {
|
|
21955
|
+
return new ImageCanvasPatiner(this);
|
|
21956
|
+
}
|
|
21957
|
+
createSvgPainter() {
|
|
21958
|
+
return new ImageSvgPainter(this);
|
|
21959
|
+
}
|
|
21960
|
+
};
|
|
21961
|
+
_src = new WeakMap();
|
|
21962
|
+
_fit = new WeakMap();
|
|
21963
|
+
_width = new WeakMap();
|
|
21964
|
+
_height = new WeakMap();
|
|
21965
|
+
_position = new WeakMap();
|
|
21966
|
+
_mounted = new WeakMap();
|
|
21967
|
+
var ImageCanvasPatiner = class extends CanvasPainter {
|
|
21968
|
+
performPaint(context, offset) {
|
|
21969
|
+
const {
|
|
21970
|
+
size,
|
|
21971
|
+
image,
|
|
21972
|
+
imageLoaded,
|
|
21973
|
+
calculatedImageSize: imageSize,
|
|
21974
|
+
position = "center"
|
|
21975
|
+
} = this.renderObject;
|
|
21976
|
+
if (!image) return;
|
|
21977
|
+
if (!imageLoaded) return;
|
|
21978
|
+
assert(imageSize != null);
|
|
21979
|
+
const { sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight } = calculateImageRendering(
|
|
21980
|
+
{ width: image.width, height: image.height },
|
|
21981
|
+
{
|
|
21982
|
+
container: size,
|
|
21983
|
+
image: { width: imageSize.width, height: imageSize.height }
|
|
21984
|
+
},
|
|
21985
|
+
position
|
|
21986
|
+
);
|
|
21987
|
+
context.canvas.drawImage(
|
|
21988
|
+
image,
|
|
21989
|
+
sx,
|
|
21990
|
+
sy,
|
|
21991
|
+
sWidth,
|
|
21992
|
+
sHeight,
|
|
21993
|
+
offset.x + dx,
|
|
21994
|
+
offset.y + dy,
|
|
21995
|
+
dWidth,
|
|
21996
|
+
dHeight
|
|
21997
|
+
);
|
|
21998
|
+
}
|
|
21999
|
+
};
|
|
22000
|
+
var ImageSvgPainter = class extends SvgPainter {
|
|
22001
|
+
createDefaultSvgEl(context) {
|
|
22002
|
+
return {
|
|
22003
|
+
img: context.createSvgEl("image")
|
|
22004
|
+
};
|
|
22005
|
+
}
|
|
22006
|
+
performPaint({ img }) {
|
|
22007
|
+
const { src } = this.renderObject;
|
|
22008
|
+
img.setAttribute("href", src);
|
|
22009
|
+
console.warn("not implemented svg painter on image widget");
|
|
22010
|
+
}
|
|
22011
|
+
};
|
|
22012
|
+
var BaseImage_default = _Image;
|
|
22013
|
+
|
|
22014
|
+
// src/component/Image.ts
|
|
22015
|
+
var Image_default = classToFunction_default(BaseImage_default);
|
|
21903
22016
|
})();
|