@harbour-enterprises/superdoc 1.0.0-alpha.67 → 1.0.0-alpha.68
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/dist/__vite-browser-external-DYxpcVy9.js +4 -0
- package/dist/assets/pdf.worker-a8FZwH1n.js +52 -0
- package/dist/index-BfdXe_BH.js +230 -0
- package/dist/style.css +2 -19209
- package/dist/superdoc.es.js +48289 -78396
- package/package.json +5 -5
- package/dist/__vite-browser-external-2Ng8QIWW.js +0 -5
- package/dist/__vite-browser-external-2Ng8QIWW.js.map +0 -1
- package/dist/assets/pdf.worker-JT4q6QJf.js +0 -55145
- package/dist/assets/pdf.worker-JT4q6QJf.js.map +0 -1
- package/dist/index-DgQ1Fc0x.js +0 -518
- package/dist/index-DgQ1Fc0x.js.map +0 -1
- package/dist/superdoc.es.js.map +0 -1
package/dist/index-DgQ1Fc0x.js
DELETED
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
var ARG_LENGTH = {
|
|
2
|
-
a: 7,
|
|
3
|
-
c: 6,
|
|
4
|
-
h: 1,
|
|
5
|
-
l: 2,
|
|
6
|
-
m: 2,
|
|
7
|
-
q: 4,
|
|
8
|
-
s: 4,
|
|
9
|
-
t: 2,
|
|
10
|
-
v: 1,
|
|
11
|
-
z: 0
|
|
12
|
-
};
|
|
13
|
-
var SEGMENT_PATTERN = /([astvzqmhlc])([^astvzqmhlc]*)/gi;
|
|
14
|
-
var NUMBER = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;
|
|
15
|
-
function parseValues(args) {
|
|
16
|
-
const numbers = args.match(NUMBER);
|
|
17
|
-
return numbers ? numbers.map(Number) : [];
|
|
18
|
-
}
|
|
19
|
-
function parsePath(path) {
|
|
20
|
-
const data = [];
|
|
21
|
-
const p = String(path).trim();
|
|
22
|
-
if (p[0] !== "M" && p[0] !== "m") {
|
|
23
|
-
return data;
|
|
24
|
-
}
|
|
25
|
-
p.replace(SEGMENT_PATTERN, (_, command, args) => {
|
|
26
|
-
const theArgs = parseValues(args);
|
|
27
|
-
let type = command.toLowerCase();
|
|
28
|
-
let theCommand = command;
|
|
29
|
-
if (type === "m" && theArgs.length > 2) {
|
|
30
|
-
data.push([theCommand, ...theArgs.splice(0, 2)]);
|
|
31
|
-
type = "l";
|
|
32
|
-
theCommand = theCommand === "m" ? "l" : "L";
|
|
33
|
-
}
|
|
34
|
-
if (theArgs.length < ARG_LENGTH[type]) {
|
|
35
|
-
return "";
|
|
36
|
-
}
|
|
37
|
-
data.push([theCommand, ...theArgs.splice(0, ARG_LENGTH[type])]);
|
|
38
|
-
while (theArgs.length >= ARG_LENGTH[type] && theArgs.length && ARG_LENGTH[type]) {
|
|
39
|
-
data.push([theCommand, ...theArgs.splice(0, ARG_LENGTH[type])]);
|
|
40
|
-
}
|
|
41
|
-
return "";
|
|
42
|
-
});
|
|
43
|
-
return data;
|
|
44
|
-
}
|
|
45
|
-
function rotatePoint(point, angle) {
|
|
46
|
-
const nx = point.x * Math.cos(angle) - point.y * Math.sin(angle);
|
|
47
|
-
const ny = point.y * Math.cos(angle) + point.x * Math.sin(angle);
|
|
48
|
-
point.x = nx;
|
|
49
|
-
point.y = ny;
|
|
50
|
-
}
|
|
51
|
-
function translatePoint(point, dx, dy) {
|
|
52
|
-
point.x += dx;
|
|
53
|
-
point.y += dy;
|
|
54
|
-
}
|
|
55
|
-
function scalePoint(point, s) {
|
|
56
|
-
point.x *= s;
|
|
57
|
-
point.y *= s;
|
|
58
|
-
}
|
|
59
|
-
var Path2D = class _Path2D {
|
|
60
|
-
constructor(path) {
|
|
61
|
-
this.commands = [];
|
|
62
|
-
if (path && path instanceof _Path2D) {
|
|
63
|
-
this.commands.push(...path.commands);
|
|
64
|
-
} else if (path) {
|
|
65
|
-
this.commands = parsePath(path);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
addPath(path) {
|
|
69
|
-
if (path && path instanceof _Path2D) {
|
|
70
|
-
this.commands.push(...path.commands);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
moveTo(x, y) {
|
|
74
|
-
this.commands.push(["M", x, y]);
|
|
75
|
-
}
|
|
76
|
-
lineTo(x, y) {
|
|
77
|
-
this.commands.push(["L", x, y]);
|
|
78
|
-
}
|
|
79
|
-
arc(x, y, r, start, end, ccw) {
|
|
80
|
-
this.commands.push(["AC", x, y, r, start, end, !!ccw]);
|
|
81
|
-
}
|
|
82
|
-
arcTo(x1, y1, x2, y2, r) {
|
|
83
|
-
this.commands.push(["AT", x1, y1, x2, y2, r]);
|
|
84
|
-
}
|
|
85
|
-
ellipse(x, y, rx, ry, angle, start, end, ccw) {
|
|
86
|
-
this.commands.push(["E", x, y, rx, ry, angle, start, end, !!ccw]);
|
|
87
|
-
}
|
|
88
|
-
closePath() {
|
|
89
|
-
this.commands.push(["Z"]);
|
|
90
|
-
}
|
|
91
|
-
bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
|
|
92
|
-
this.commands.push(["C", cp1x, cp1y, cp2x, cp2y, x, y]);
|
|
93
|
-
}
|
|
94
|
-
quadraticCurveTo(cpx, cpy, x, y) {
|
|
95
|
-
this.commands.push(["Q", cpx, cpy, x, y]);
|
|
96
|
-
}
|
|
97
|
-
rect(x, y, width, height) {
|
|
98
|
-
this.commands.push(["R", x, y, width, height]);
|
|
99
|
-
}
|
|
100
|
-
roundRect(x, y, width, height, radii) {
|
|
101
|
-
if (typeof radii === "undefined") {
|
|
102
|
-
this.commands.push(["RR", x, y, width, height, 0]);
|
|
103
|
-
} else {
|
|
104
|
-
this.commands.push(["RR", x, y, width, height, radii]);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
function buildPath(ctx, commands) {
|
|
109
|
-
let x = 0;
|
|
110
|
-
let y = 0;
|
|
111
|
-
let endAngle;
|
|
112
|
-
let startAngle;
|
|
113
|
-
let largeArcFlag;
|
|
114
|
-
let sweepFlag;
|
|
115
|
-
let endPoint;
|
|
116
|
-
let midPoint;
|
|
117
|
-
let angle;
|
|
118
|
-
let lambda;
|
|
119
|
-
let t1;
|
|
120
|
-
let t2;
|
|
121
|
-
let x1;
|
|
122
|
-
let y1;
|
|
123
|
-
let r;
|
|
124
|
-
let rx;
|
|
125
|
-
let ry;
|
|
126
|
-
let w;
|
|
127
|
-
let h;
|
|
128
|
-
let pathType;
|
|
129
|
-
let centerPoint;
|
|
130
|
-
let ccw;
|
|
131
|
-
let radii;
|
|
132
|
-
let cpx = null;
|
|
133
|
-
let cpy = null;
|
|
134
|
-
let qcpx = null;
|
|
135
|
-
let qcpy = null;
|
|
136
|
-
let startPoint = null;
|
|
137
|
-
let currentPoint = null;
|
|
138
|
-
ctx.beginPath();
|
|
139
|
-
for (let i = 0; i < commands.length; ++i) {
|
|
140
|
-
pathType = commands[i][0];
|
|
141
|
-
if (pathType !== "S" && pathType !== "s" && pathType !== "C" && pathType !== "c") {
|
|
142
|
-
cpx = null;
|
|
143
|
-
cpy = null;
|
|
144
|
-
}
|
|
145
|
-
if (pathType !== "T" && pathType !== "t" && pathType !== "Q" && pathType !== "q") {
|
|
146
|
-
qcpx = null;
|
|
147
|
-
qcpy = null;
|
|
148
|
-
}
|
|
149
|
-
let c;
|
|
150
|
-
switch (pathType) {
|
|
151
|
-
case "m":
|
|
152
|
-
case "M":
|
|
153
|
-
c = commands[i];
|
|
154
|
-
if (pathType === "m") {
|
|
155
|
-
x += c[1];
|
|
156
|
-
y += c[2];
|
|
157
|
-
} else {
|
|
158
|
-
x = c[1];
|
|
159
|
-
y = c[2];
|
|
160
|
-
}
|
|
161
|
-
if (pathType === "M" || !startPoint) {
|
|
162
|
-
startPoint = { x, y };
|
|
163
|
-
}
|
|
164
|
-
ctx.moveTo(x, y);
|
|
165
|
-
break;
|
|
166
|
-
case "l":
|
|
167
|
-
c = commands[i];
|
|
168
|
-
x += c[1];
|
|
169
|
-
y += c[2];
|
|
170
|
-
ctx.lineTo(x, y);
|
|
171
|
-
break;
|
|
172
|
-
case "L":
|
|
173
|
-
c = commands[i];
|
|
174
|
-
x = c[1];
|
|
175
|
-
y = c[2];
|
|
176
|
-
ctx.lineTo(x, y);
|
|
177
|
-
break;
|
|
178
|
-
case "H":
|
|
179
|
-
c = commands[i];
|
|
180
|
-
x = c[1];
|
|
181
|
-
ctx.lineTo(x, y);
|
|
182
|
-
break;
|
|
183
|
-
case "h":
|
|
184
|
-
c = commands[i];
|
|
185
|
-
x += c[1];
|
|
186
|
-
ctx.lineTo(x, y);
|
|
187
|
-
break;
|
|
188
|
-
case "V":
|
|
189
|
-
c = commands[i];
|
|
190
|
-
y = c[1];
|
|
191
|
-
ctx.lineTo(x, y);
|
|
192
|
-
break;
|
|
193
|
-
case "v":
|
|
194
|
-
c = commands[i];
|
|
195
|
-
y += c[1];
|
|
196
|
-
ctx.lineTo(x, y);
|
|
197
|
-
break;
|
|
198
|
-
case "a":
|
|
199
|
-
case "A":
|
|
200
|
-
c = commands[i];
|
|
201
|
-
if (currentPoint === null) {
|
|
202
|
-
throw new Error("This should never happen");
|
|
203
|
-
}
|
|
204
|
-
if (pathType === "a") {
|
|
205
|
-
x += c[6];
|
|
206
|
-
y += c[7];
|
|
207
|
-
} else {
|
|
208
|
-
x = c[6];
|
|
209
|
-
y = c[7];
|
|
210
|
-
}
|
|
211
|
-
rx = c[1];
|
|
212
|
-
ry = c[2];
|
|
213
|
-
angle = c[3] * Math.PI / 180;
|
|
214
|
-
largeArcFlag = !!c[4];
|
|
215
|
-
sweepFlag = !!c[5];
|
|
216
|
-
endPoint = { x, y };
|
|
217
|
-
midPoint = {
|
|
218
|
-
x: (currentPoint.x - endPoint.x) / 2,
|
|
219
|
-
y: (currentPoint.y - endPoint.y) / 2
|
|
220
|
-
};
|
|
221
|
-
rotatePoint(midPoint, -angle);
|
|
222
|
-
lambda = midPoint.x * midPoint.x / (rx * rx) + midPoint.y * midPoint.y / (ry * ry);
|
|
223
|
-
if (lambda > 1) {
|
|
224
|
-
lambda = Math.sqrt(lambda);
|
|
225
|
-
rx *= lambda;
|
|
226
|
-
ry *= lambda;
|
|
227
|
-
}
|
|
228
|
-
centerPoint = {
|
|
229
|
-
x: rx * midPoint.y / ry,
|
|
230
|
-
y: -(ry * midPoint.x) / rx
|
|
231
|
-
};
|
|
232
|
-
t1 = rx * rx * ry * ry;
|
|
233
|
-
t2 = rx * rx * midPoint.y * midPoint.y + ry * ry * midPoint.x * midPoint.x;
|
|
234
|
-
if (sweepFlag !== largeArcFlag) {
|
|
235
|
-
scalePoint(centerPoint, Math.sqrt((t1 - t2) / t2) || 0);
|
|
236
|
-
} else {
|
|
237
|
-
scalePoint(centerPoint, -Math.sqrt((t1 - t2) / t2) || 0);
|
|
238
|
-
}
|
|
239
|
-
startAngle = Math.atan2((midPoint.y - centerPoint.y) / ry, (midPoint.x - centerPoint.x) / rx);
|
|
240
|
-
endAngle = Math.atan2(-(midPoint.y + centerPoint.y) / ry, -(midPoint.x + centerPoint.x) / rx);
|
|
241
|
-
rotatePoint(centerPoint, angle);
|
|
242
|
-
translatePoint(centerPoint, (endPoint.x + currentPoint.x) / 2, (endPoint.y + currentPoint.y) / 2);
|
|
243
|
-
ctx.save();
|
|
244
|
-
ctx.translate(centerPoint.x, centerPoint.y);
|
|
245
|
-
ctx.rotate(angle);
|
|
246
|
-
ctx.scale(rx, ry);
|
|
247
|
-
ctx.arc(0, 0, 1, startAngle, endAngle, !sweepFlag);
|
|
248
|
-
ctx.restore();
|
|
249
|
-
break;
|
|
250
|
-
case "C":
|
|
251
|
-
c = commands[i];
|
|
252
|
-
cpx = c[3];
|
|
253
|
-
cpy = c[4];
|
|
254
|
-
x = c[5];
|
|
255
|
-
y = c[6];
|
|
256
|
-
ctx.bezierCurveTo(c[1], c[2], cpx, cpy, x, y);
|
|
257
|
-
break;
|
|
258
|
-
case "c":
|
|
259
|
-
c = commands[i];
|
|
260
|
-
ctx.bezierCurveTo(c[1] + x, c[2] + y, c[3] + x, c[4] + y, c[5] + x, c[6] + y);
|
|
261
|
-
cpx = c[3] + x;
|
|
262
|
-
cpy = c[4] + y;
|
|
263
|
-
x += c[5];
|
|
264
|
-
y += c[6];
|
|
265
|
-
break;
|
|
266
|
-
case "S":
|
|
267
|
-
c = commands[i];
|
|
268
|
-
if (cpx === null || cpy === null) {
|
|
269
|
-
cpx = x;
|
|
270
|
-
cpy = y;
|
|
271
|
-
}
|
|
272
|
-
ctx.bezierCurveTo(2 * x - cpx, 2 * y - cpy, c[1], c[2], c[3], c[4]);
|
|
273
|
-
cpx = c[1];
|
|
274
|
-
cpy = c[2];
|
|
275
|
-
x = c[3];
|
|
276
|
-
y = c[4];
|
|
277
|
-
break;
|
|
278
|
-
case "s":
|
|
279
|
-
c = commands[i];
|
|
280
|
-
if (cpx === null || cpy === null) {
|
|
281
|
-
cpx = x;
|
|
282
|
-
cpy = y;
|
|
283
|
-
}
|
|
284
|
-
ctx.bezierCurveTo(2 * x - cpx, 2 * y - cpy, c[1] + x, c[2] + y, c[3] + x, c[4] + y);
|
|
285
|
-
cpx = c[1] + x;
|
|
286
|
-
cpy = c[2] + y;
|
|
287
|
-
x += c[3];
|
|
288
|
-
y += c[4];
|
|
289
|
-
break;
|
|
290
|
-
case "Q":
|
|
291
|
-
c = commands[i];
|
|
292
|
-
qcpx = c[1];
|
|
293
|
-
qcpy = c[2];
|
|
294
|
-
x = c[3];
|
|
295
|
-
y = c[4];
|
|
296
|
-
ctx.quadraticCurveTo(qcpx, qcpy, x, y);
|
|
297
|
-
break;
|
|
298
|
-
case "q":
|
|
299
|
-
c = commands[i];
|
|
300
|
-
qcpx = c[1] + x;
|
|
301
|
-
qcpy = c[2] + y;
|
|
302
|
-
x += c[3];
|
|
303
|
-
y += c[4];
|
|
304
|
-
ctx.quadraticCurveTo(qcpx, qcpy, x, y);
|
|
305
|
-
break;
|
|
306
|
-
case "T":
|
|
307
|
-
c = commands[i];
|
|
308
|
-
if (qcpx === null || qcpy === null) {
|
|
309
|
-
qcpx = x;
|
|
310
|
-
qcpy = y;
|
|
311
|
-
}
|
|
312
|
-
qcpx = 2 * x - qcpx;
|
|
313
|
-
qcpy = 2 * y - qcpy;
|
|
314
|
-
x = c[1];
|
|
315
|
-
y = c[2];
|
|
316
|
-
ctx.quadraticCurveTo(qcpx, qcpy, x, y);
|
|
317
|
-
break;
|
|
318
|
-
case "t":
|
|
319
|
-
c = commands[i];
|
|
320
|
-
if (qcpx === null || qcpy === null) {
|
|
321
|
-
qcpx = x;
|
|
322
|
-
qcpy = y;
|
|
323
|
-
}
|
|
324
|
-
qcpx = 2 * x - qcpx;
|
|
325
|
-
qcpy = 2 * y - qcpy;
|
|
326
|
-
x += c[1];
|
|
327
|
-
y += c[2];
|
|
328
|
-
ctx.quadraticCurveTo(qcpx, qcpy, x, y);
|
|
329
|
-
break;
|
|
330
|
-
case "z":
|
|
331
|
-
case "Z":
|
|
332
|
-
if (startPoint) {
|
|
333
|
-
x = startPoint.x;
|
|
334
|
-
y = startPoint.y;
|
|
335
|
-
}
|
|
336
|
-
startPoint = null;
|
|
337
|
-
ctx.closePath();
|
|
338
|
-
break;
|
|
339
|
-
case "AC":
|
|
340
|
-
c = commands[i];
|
|
341
|
-
x = c[1];
|
|
342
|
-
y = c[2];
|
|
343
|
-
r = c[3];
|
|
344
|
-
startAngle = c[4];
|
|
345
|
-
endAngle = c[5];
|
|
346
|
-
ccw = c[6];
|
|
347
|
-
ctx.arc(x, y, r, startAngle, endAngle, ccw);
|
|
348
|
-
break;
|
|
349
|
-
case "AT":
|
|
350
|
-
c = commands[i];
|
|
351
|
-
x1 = c[1];
|
|
352
|
-
y1 = c[2];
|
|
353
|
-
x = c[3];
|
|
354
|
-
y = c[4];
|
|
355
|
-
r = c[5];
|
|
356
|
-
ctx.arcTo(x1, y1, x, y, r);
|
|
357
|
-
break;
|
|
358
|
-
case "E":
|
|
359
|
-
c = commands[i];
|
|
360
|
-
x = c[1];
|
|
361
|
-
y = c[2];
|
|
362
|
-
rx = c[3];
|
|
363
|
-
ry = c[4];
|
|
364
|
-
angle = c[5];
|
|
365
|
-
startAngle = c[6];
|
|
366
|
-
endAngle = c[7];
|
|
367
|
-
ccw = c[8];
|
|
368
|
-
ctx.save();
|
|
369
|
-
ctx.translate(x, y);
|
|
370
|
-
ctx.rotate(angle);
|
|
371
|
-
ctx.scale(rx, ry);
|
|
372
|
-
ctx.arc(0, 0, 1, startAngle, endAngle, ccw);
|
|
373
|
-
ctx.restore();
|
|
374
|
-
break;
|
|
375
|
-
case "R":
|
|
376
|
-
c = commands[i];
|
|
377
|
-
x = c[1];
|
|
378
|
-
y = c[2];
|
|
379
|
-
w = c[3];
|
|
380
|
-
h = c[4];
|
|
381
|
-
startPoint = { x, y };
|
|
382
|
-
ctx.rect(x, y, w, h);
|
|
383
|
-
break;
|
|
384
|
-
case "RR":
|
|
385
|
-
c = commands[i];
|
|
386
|
-
x = c[1];
|
|
387
|
-
y = c[2];
|
|
388
|
-
w = c[3];
|
|
389
|
-
h = c[4];
|
|
390
|
-
radii = c[5];
|
|
391
|
-
startPoint = { x, y };
|
|
392
|
-
ctx.roundRect(x, y, w, h, radii);
|
|
393
|
-
break;
|
|
394
|
-
default:
|
|
395
|
-
throw new Error(`Invalid path command: ${pathType}`);
|
|
396
|
-
}
|
|
397
|
-
if (!currentPoint) {
|
|
398
|
-
currentPoint = { x, y };
|
|
399
|
-
} else {
|
|
400
|
-
currentPoint.x = x;
|
|
401
|
-
currentPoint.y = y;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
function roundRect(x, y, width, height, radii = 0) {
|
|
406
|
-
if (typeof radii === "number") {
|
|
407
|
-
radii = [radii];
|
|
408
|
-
}
|
|
409
|
-
if (Array.isArray(radii)) {
|
|
410
|
-
if (radii.length === 0 || radii.length > 4) {
|
|
411
|
-
throw new RangeError(
|
|
412
|
-
`Failed to execute 'roundRect' on '${this.constructor.name}': ${radii.length} radii provided. Between one and four radii are necessary.`
|
|
413
|
-
);
|
|
414
|
-
}
|
|
415
|
-
radii.forEach((v) => {
|
|
416
|
-
if (v < 0) {
|
|
417
|
-
throw new RangeError(
|
|
418
|
-
`Failed to execute 'roundRect' on '${this.constructor.name}': Radius value ${v} is negative.`
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
} else {
|
|
423
|
-
return;
|
|
424
|
-
}
|
|
425
|
-
if (radii.length === 1 && radii[0] === 0) {
|
|
426
|
-
this.rect(x, y, width, height);
|
|
427
|
-
return;
|
|
428
|
-
}
|
|
429
|
-
const minRadius = Math.min(width, height) / 2;
|
|
430
|
-
const tl = Math.min(minRadius, radii[0]);
|
|
431
|
-
let tr = tl;
|
|
432
|
-
let br = tl;
|
|
433
|
-
let bl = tl;
|
|
434
|
-
if (radii.length === 2) {
|
|
435
|
-
tr = Math.min(minRadius, radii[1]);
|
|
436
|
-
bl = tr;
|
|
437
|
-
}
|
|
438
|
-
if (radii.length === 3) {
|
|
439
|
-
tr = Math.min(minRadius, radii[1]);
|
|
440
|
-
bl = tr;
|
|
441
|
-
br = Math.min(minRadius, radii[2]);
|
|
442
|
-
}
|
|
443
|
-
if (radii.length === 4) {
|
|
444
|
-
tr = Math.min(minRadius, radii[1]);
|
|
445
|
-
br = Math.min(minRadius, radii[2]);
|
|
446
|
-
bl = Math.min(minRadius, radii[3]);
|
|
447
|
-
}
|
|
448
|
-
this.moveTo(x, y + height - bl);
|
|
449
|
-
this.arcTo(x, y, x + tl, y, tl);
|
|
450
|
-
this.arcTo(x + width, y, x + width, y + tr, tr);
|
|
451
|
-
this.arcTo(x + width, y + height, x + width - br, y + height, br);
|
|
452
|
-
this.arcTo(x, y + height, x, y + height - bl, bl);
|
|
453
|
-
this.moveTo(x, y);
|
|
454
|
-
}
|
|
455
|
-
function applyPath2DToCanvasRenderingContext(CanvasRenderingContext2D) {
|
|
456
|
-
if (!CanvasRenderingContext2D) return;
|
|
457
|
-
const cClip = CanvasRenderingContext2D.prototype.clip;
|
|
458
|
-
const cFill = CanvasRenderingContext2D.prototype.fill;
|
|
459
|
-
const cStroke = CanvasRenderingContext2D.prototype.stroke;
|
|
460
|
-
const cIsPointInPath = CanvasRenderingContext2D.prototype.isPointInPath;
|
|
461
|
-
CanvasRenderingContext2D.prototype.clip = function clip(...args) {
|
|
462
|
-
if (args[0] instanceof Path2D) {
|
|
463
|
-
const path = args[0];
|
|
464
|
-
const fillRule2 = args[1] || "nonzero";
|
|
465
|
-
buildPath(this, path.commands);
|
|
466
|
-
return cClip.apply(this, [fillRule2]);
|
|
467
|
-
}
|
|
468
|
-
const fillRule = args[0] || "nonzero";
|
|
469
|
-
return cClip.apply(this, [fillRule]);
|
|
470
|
-
};
|
|
471
|
-
CanvasRenderingContext2D.prototype.fill = function fill(...args) {
|
|
472
|
-
if (args[0] instanceof Path2D) {
|
|
473
|
-
const path = args[0];
|
|
474
|
-
const fillRule2 = args[1] || "nonzero";
|
|
475
|
-
buildPath(this, path.commands);
|
|
476
|
-
return cFill.apply(this, [fillRule2]);
|
|
477
|
-
}
|
|
478
|
-
const fillRule = args[0] || "nonzero";
|
|
479
|
-
return cFill.apply(this, [fillRule]);
|
|
480
|
-
};
|
|
481
|
-
CanvasRenderingContext2D.prototype.stroke = function stroke(path) {
|
|
482
|
-
if (path) {
|
|
483
|
-
buildPath(this, path.commands);
|
|
484
|
-
}
|
|
485
|
-
cStroke.apply(this);
|
|
486
|
-
};
|
|
487
|
-
CanvasRenderingContext2D.prototype.isPointInPath = function isPointInPath(...args) {
|
|
488
|
-
if (args[0] instanceof Path2D) {
|
|
489
|
-
const path = args[0];
|
|
490
|
-
const x = args[1];
|
|
491
|
-
const y = args[2];
|
|
492
|
-
const fillRule = args[3] || "nonzero";
|
|
493
|
-
buildPath(this, path.commands);
|
|
494
|
-
return cIsPointInPath.apply(this, [x, y, fillRule]);
|
|
495
|
-
}
|
|
496
|
-
return cIsPointInPath.apply(this, args);
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
function applyRoundRectToCanvasRenderingContext2D(CanvasRenderingContext2D) {
|
|
500
|
-
if (CanvasRenderingContext2D && !CanvasRenderingContext2D.prototype.roundRect) {
|
|
501
|
-
CanvasRenderingContext2D.prototype.roundRect = roundRect;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
function applyRoundRectToPath2D(P2D) {
|
|
505
|
-
if (P2D && !P2D.prototype.roundRect) {
|
|
506
|
-
P2D.prototype.roundRect = roundRect;
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
export {
|
|
510
|
-
Path2D,
|
|
511
|
-
applyPath2DToCanvasRenderingContext,
|
|
512
|
-
applyRoundRectToCanvasRenderingContext2D,
|
|
513
|
-
applyRoundRectToPath2D,
|
|
514
|
-
buildPath,
|
|
515
|
-
parsePath,
|
|
516
|
-
roundRect
|
|
517
|
-
};
|
|
518
|
-
//# sourceMappingURL=index-DgQ1Fc0x.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DgQ1Fc0x.js","sources":["../../../node_modules/path2d/dist/index.js"],"sourcesContent":["// src/parse-path.ts\nvar ARG_LENGTH = {\n a: 7,\n c: 6,\n h: 1,\n l: 2,\n m: 2,\n q: 4,\n s: 4,\n t: 2,\n v: 1,\n z: 0\n};\nvar SEGMENT_PATTERN = /([astvzqmhlc])([^astvzqmhlc]*)/gi;\nvar NUMBER = /-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi;\nfunction parseValues(args) {\n const numbers = args.match(NUMBER);\n return numbers ? numbers.map(Number) : [];\n}\nfunction parsePath(path) {\n const data = [];\n const p = String(path).trim();\n if (p[0] !== \"M\" && p[0] !== \"m\") {\n return data;\n }\n p.replace(SEGMENT_PATTERN, (_, command, args) => {\n const theArgs = parseValues(args);\n let type = command.toLowerCase();\n let theCommand = command;\n if (type === \"m\" && theArgs.length > 2) {\n data.push([theCommand, ...theArgs.splice(0, 2)]);\n type = \"l\";\n theCommand = theCommand === \"m\" ? \"l\" : \"L\";\n }\n if (theArgs.length < ARG_LENGTH[type]) {\n return \"\";\n }\n data.push([theCommand, ...theArgs.splice(0, ARG_LENGTH[type])]);\n while (theArgs.length >= ARG_LENGTH[type] && theArgs.length && ARG_LENGTH[type]) {\n data.push([theCommand, ...theArgs.splice(0, ARG_LENGTH[type])]);\n }\n return \"\";\n });\n return data;\n}\n\n// src/path2d.ts\nfunction rotatePoint(point, angle) {\n const nx = point.x * Math.cos(angle) - point.y * Math.sin(angle);\n const ny = point.y * Math.cos(angle) + point.x * Math.sin(angle);\n point.x = nx;\n point.y = ny;\n}\nfunction translatePoint(point, dx, dy) {\n point.x += dx;\n point.y += dy;\n}\nfunction scalePoint(point, s) {\n point.x *= s;\n point.y *= s;\n}\nvar Path2D = class _Path2D {\n constructor(path) {\n this.commands = [];\n if (path && path instanceof _Path2D) {\n this.commands.push(...path.commands);\n } else if (path) {\n this.commands = parsePath(path);\n }\n }\n addPath(path) {\n if (path && path instanceof _Path2D) {\n this.commands.push(...path.commands);\n }\n }\n moveTo(x, y) {\n this.commands.push([\"M\", x, y]);\n }\n lineTo(x, y) {\n this.commands.push([\"L\", x, y]);\n }\n arc(x, y, r, start, end, ccw) {\n this.commands.push([\"AC\", x, y, r, start, end, !!ccw]);\n }\n arcTo(x1, y1, x2, y2, r) {\n this.commands.push([\"AT\", x1, y1, x2, y2, r]);\n }\n ellipse(x, y, rx, ry, angle, start, end, ccw) {\n this.commands.push([\"E\", x, y, rx, ry, angle, start, end, !!ccw]);\n }\n closePath() {\n this.commands.push([\"Z\"]);\n }\n bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {\n this.commands.push([\"C\", cp1x, cp1y, cp2x, cp2y, x, y]);\n }\n quadraticCurveTo(cpx, cpy, x, y) {\n this.commands.push([\"Q\", cpx, cpy, x, y]);\n }\n rect(x, y, width, height) {\n this.commands.push([\"R\", x, y, width, height]);\n }\n roundRect(x, y, width, height, radii) {\n if (typeof radii === \"undefined\") {\n this.commands.push([\"RR\", x, y, width, height, 0]);\n } else {\n this.commands.push([\"RR\", x, y, width, height, radii]);\n }\n }\n};\nfunction buildPath(ctx, commands) {\n let x = 0;\n let y = 0;\n let endAngle;\n let startAngle;\n let largeArcFlag;\n let sweepFlag;\n let endPoint;\n let midPoint;\n let angle;\n let lambda;\n let t1;\n let t2;\n let x1;\n let y1;\n let r;\n let rx;\n let ry;\n let w;\n let h;\n let pathType;\n let centerPoint;\n let ccw;\n let radii;\n let cpx = null;\n let cpy = null;\n let qcpx = null;\n let qcpy = null;\n let startPoint = null;\n let currentPoint = null;\n ctx.beginPath();\n for (let i = 0; i < commands.length; ++i) {\n pathType = commands[i][0];\n if (pathType !== \"S\" && pathType !== \"s\" && pathType !== \"C\" && pathType !== \"c\") {\n cpx = null;\n cpy = null;\n }\n if (pathType !== \"T\" && pathType !== \"t\" && pathType !== \"Q\" && pathType !== \"q\") {\n qcpx = null;\n qcpy = null;\n }\n let c;\n switch (pathType) {\n case \"m\":\n case \"M\":\n c = commands[i];\n if (pathType === \"m\") {\n x += c[1];\n y += c[2];\n } else {\n x = c[1];\n y = c[2];\n }\n if (pathType === \"M\" || !startPoint) {\n startPoint = { x, y };\n }\n ctx.moveTo(x, y);\n break;\n case \"l\":\n c = commands[i];\n x += c[1];\n y += c[2];\n ctx.lineTo(x, y);\n break;\n case \"L\":\n c = commands[i];\n x = c[1];\n y = c[2];\n ctx.lineTo(x, y);\n break;\n case \"H\":\n c = commands[i];\n x = c[1];\n ctx.lineTo(x, y);\n break;\n case \"h\":\n c = commands[i];\n x += c[1];\n ctx.lineTo(x, y);\n break;\n case \"V\":\n c = commands[i];\n y = c[1];\n ctx.lineTo(x, y);\n break;\n case \"v\":\n c = commands[i];\n y += c[1];\n ctx.lineTo(x, y);\n break;\n case \"a\":\n case \"A\":\n c = commands[i];\n if (currentPoint === null) {\n throw new Error(\"This should never happen\");\n }\n if (pathType === \"a\") {\n x += c[6];\n y += c[7];\n } else {\n x = c[6];\n y = c[7];\n }\n rx = c[1];\n ry = c[2];\n angle = c[3] * Math.PI / 180;\n largeArcFlag = !!c[4];\n sweepFlag = !!c[5];\n endPoint = { x, y };\n midPoint = {\n x: (currentPoint.x - endPoint.x) / 2,\n y: (currentPoint.y - endPoint.y) / 2\n };\n rotatePoint(midPoint, -angle);\n lambda = midPoint.x * midPoint.x / (rx * rx) + midPoint.y * midPoint.y / (ry * ry);\n if (lambda > 1) {\n lambda = Math.sqrt(lambda);\n rx *= lambda;\n ry *= lambda;\n }\n centerPoint = {\n x: rx * midPoint.y / ry,\n y: -(ry * midPoint.x) / rx\n };\n t1 = rx * rx * ry * ry;\n t2 = rx * rx * midPoint.y * midPoint.y + ry * ry * midPoint.x * midPoint.x;\n if (sweepFlag !== largeArcFlag) {\n scalePoint(centerPoint, Math.sqrt((t1 - t2) / t2) || 0);\n } else {\n scalePoint(centerPoint, -Math.sqrt((t1 - t2) / t2) || 0);\n }\n startAngle = Math.atan2((midPoint.y - centerPoint.y) / ry, (midPoint.x - centerPoint.x) / rx);\n endAngle = Math.atan2(-(midPoint.y + centerPoint.y) / ry, -(midPoint.x + centerPoint.x) / rx);\n rotatePoint(centerPoint, angle);\n translatePoint(centerPoint, (endPoint.x + currentPoint.x) / 2, (endPoint.y + currentPoint.y) / 2);\n ctx.save();\n ctx.translate(centerPoint.x, centerPoint.y);\n ctx.rotate(angle);\n ctx.scale(rx, ry);\n ctx.arc(0, 0, 1, startAngle, endAngle, !sweepFlag);\n ctx.restore();\n break;\n case \"C\":\n c = commands[i];\n cpx = c[3];\n cpy = c[4];\n x = c[5];\n y = c[6];\n ctx.bezierCurveTo(c[1], c[2], cpx, cpy, x, y);\n break;\n case \"c\":\n c = commands[i];\n ctx.bezierCurveTo(c[1] + x, c[2] + y, c[3] + x, c[4] + y, c[5] + x, c[6] + y);\n cpx = c[3] + x;\n cpy = c[4] + y;\n x += c[5];\n y += c[6];\n break;\n case \"S\":\n c = commands[i];\n if (cpx === null || cpy === null) {\n cpx = x;\n cpy = y;\n }\n ctx.bezierCurveTo(2 * x - cpx, 2 * y - cpy, c[1], c[2], c[3], c[4]);\n cpx = c[1];\n cpy = c[2];\n x = c[3];\n y = c[4];\n break;\n case \"s\":\n c = commands[i];\n if (cpx === null || cpy === null) {\n cpx = x;\n cpy = y;\n }\n ctx.bezierCurveTo(2 * x - cpx, 2 * y - cpy, c[1] + x, c[2] + y, c[3] + x, c[4] + y);\n cpx = c[1] + x;\n cpy = c[2] + y;\n x += c[3];\n y += c[4];\n break;\n case \"Q\":\n c = commands[i];\n qcpx = c[1];\n qcpy = c[2];\n x = c[3];\n y = c[4];\n ctx.quadraticCurveTo(qcpx, qcpy, x, y);\n break;\n case \"q\":\n c = commands[i];\n qcpx = c[1] + x;\n qcpy = c[2] + y;\n x += c[3];\n y += c[4];\n ctx.quadraticCurveTo(qcpx, qcpy, x, y);\n break;\n case \"T\":\n c = commands[i];\n if (qcpx === null || qcpy === null) {\n qcpx = x;\n qcpy = y;\n }\n qcpx = 2 * x - qcpx;\n qcpy = 2 * y - qcpy;\n x = c[1];\n y = c[2];\n ctx.quadraticCurveTo(qcpx, qcpy, x, y);\n break;\n case \"t\":\n c = commands[i];\n if (qcpx === null || qcpy === null) {\n qcpx = x;\n qcpy = y;\n }\n qcpx = 2 * x - qcpx;\n qcpy = 2 * y - qcpy;\n x += c[1];\n y += c[2];\n ctx.quadraticCurveTo(qcpx, qcpy, x, y);\n break;\n case \"z\":\n case \"Z\":\n if (startPoint) {\n x = startPoint.x;\n y = startPoint.y;\n }\n startPoint = null;\n ctx.closePath();\n break;\n case \"AC\":\n c = commands[i];\n x = c[1];\n y = c[2];\n r = c[3];\n startAngle = c[4];\n endAngle = c[5];\n ccw = c[6];\n ctx.arc(x, y, r, startAngle, endAngle, ccw);\n break;\n case \"AT\":\n c = commands[i];\n x1 = c[1];\n y1 = c[2];\n x = c[3];\n y = c[4];\n r = c[5];\n ctx.arcTo(x1, y1, x, y, r);\n break;\n case \"E\":\n c = commands[i];\n x = c[1];\n y = c[2];\n rx = c[3];\n ry = c[4];\n angle = c[5];\n startAngle = c[6];\n endAngle = c[7];\n ccw = c[8];\n ctx.save();\n ctx.translate(x, y);\n ctx.rotate(angle);\n ctx.scale(rx, ry);\n ctx.arc(0, 0, 1, startAngle, endAngle, ccw);\n ctx.restore();\n break;\n case \"R\":\n c = commands[i];\n x = c[1];\n y = c[2];\n w = c[3];\n h = c[4];\n startPoint = { x, y };\n ctx.rect(x, y, w, h);\n break;\n case \"RR\":\n c = commands[i];\n x = c[1];\n y = c[2];\n w = c[3];\n h = c[4];\n radii = c[5];\n startPoint = { x, y };\n ctx.roundRect(x, y, w, h, radii);\n break;\n default:\n throw new Error(`Invalid path command: ${pathType}`);\n }\n if (!currentPoint) {\n currentPoint = { x, y };\n } else {\n currentPoint.x = x;\n currentPoint.y = y;\n }\n }\n}\n\n// src/round-rect.ts\nfunction roundRect(x, y, width, height, radii = 0) {\n if (typeof radii === \"number\") {\n radii = [radii];\n }\n if (Array.isArray(radii)) {\n if (radii.length === 0 || radii.length > 4) {\n throw new RangeError(\n `Failed to execute 'roundRect' on '${this.constructor.name}': ${radii.length} radii provided. Between one and four radii are necessary.`\n );\n }\n radii.forEach((v) => {\n if (v < 0) {\n throw new RangeError(\n `Failed to execute 'roundRect' on '${this.constructor.name}': Radius value ${v} is negative.`\n );\n }\n });\n } else {\n return;\n }\n if (radii.length === 1 && radii[0] === 0) {\n this.rect(x, y, width, height);\n return;\n }\n const minRadius = Math.min(width, height) / 2;\n const tl = Math.min(minRadius, radii[0]);\n let tr = tl;\n let br = tl;\n let bl = tl;\n if (radii.length === 2) {\n tr = Math.min(minRadius, radii[1]);\n bl = tr;\n }\n if (radii.length === 3) {\n tr = Math.min(minRadius, radii[1]);\n bl = tr;\n br = Math.min(minRadius, radii[2]);\n }\n if (radii.length === 4) {\n tr = Math.min(minRadius, radii[1]);\n br = Math.min(minRadius, radii[2]);\n bl = Math.min(minRadius, radii[3]);\n }\n this.moveTo(x, y + height - bl);\n this.arcTo(x, y, x + tl, y, tl);\n this.arcTo(x + width, y, x + width, y + tr, tr);\n this.arcTo(x + width, y + height, x + width - br, y + height, br);\n this.arcTo(x, y + height, x, y + height - bl, bl);\n this.moveTo(x, y);\n}\n\n// src/apply.ts\nfunction applyPath2DToCanvasRenderingContext(CanvasRenderingContext2D) {\n if (!CanvasRenderingContext2D) return;\n const cClip = CanvasRenderingContext2D.prototype.clip;\n const cFill = CanvasRenderingContext2D.prototype.fill;\n const cStroke = CanvasRenderingContext2D.prototype.stroke;\n const cIsPointInPath = CanvasRenderingContext2D.prototype.isPointInPath;\n CanvasRenderingContext2D.prototype.clip = function clip(...args) {\n if (args[0] instanceof Path2D) {\n const path = args[0];\n const fillRule2 = args[1] || \"nonzero\";\n buildPath(this, path.commands);\n return cClip.apply(this, [fillRule2]);\n }\n const fillRule = args[0] || \"nonzero\";\n return cClip.apply(this, [fillRule]);\n };\n CanvasRenderingContext2D.prototype.fill = function fill(...args) {\n if (args[0] instanceof Path2D) {\n const path = args[0];\n const fillRule2 = args[1] || \"nonzero\";\n buildPath(this, path.commands);\n return cFill.apply(this, [fillRule2]);\n }\n const fillRule = args[0] || \"nonzero\";\n return cFill.apply(this, [fillRule]);\n };\n CanvasRenderingContext2D.prototype.stroke = function stroke(path) {\n if (path) {\n buildPath(this, path.commands);\n }\n cStroke.apply(this);\n };\n CanvasRenderingContext2D.prototype.isPointInPath = function isPointInPath(...args) {\n if (args[0] instanceof Path2D) {\n const path = args[0];\n const x = args[1];\n const y = args[2];\n const fillRule = args[3] || \"nonzero\";\n buildPath(this, path.commands);\n return cIsPointInPath.apply(this, [x, y, fillRule]);\n }\n return cIsPointInPath.apply(this, args);\n };\n}\nfunction applyRoundRectToCanvasRenderingContext2D(CanvasRenderingContext2D) {\n if (CanvasRenderingContext2D && !CanvasRenderingContext2D.prototype.roundRect) {\n CanvasRenderingContext2D.prototype.roundRect = roundRect;\n }\n}\nfunction applyRoundRectToPath2D(P2D) {\n if (P2D && !P2D.prototype.roundRect) {\n P2D.prototype.roundRect = roundRect;\n }\n}\nexport {\n Path2D,\n applyPath2DToCanvasRenderingContext,\n applyRoundRectToCanvasRenderingContext2D,\n applyRoundRectToPath2D,\n buildPath,\n parsePath,\n roundRect\n};\n"],"names":[],"mappings":"AACA,IAAI,aAAa;AAAA,EACf,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AACA,IAAI,kBAAkB;AACtB,IAAI,SAAS;AACb,SAAS,YAAY,MAAM;AACzB,QAAM,UAAU,KAAK,MAAM,MAAM;AACjC,SAAO,UAAU,QAAQ,IAAI,MAAM,IAAI,CAAA;AACzC;AACA,SAAS,UAAU,MAAM;AACvB,QAAM,OAAO,CAAA;AACb,QAAM,IAAI,OAAO,IAAI,EAAE,KAAI;AAC3B,MAAI,EAAE,CAAC,MAAM,OAAO,EAAE,CAAC,MAAM,KAAK;AAChC,WAAO;AAAA,EACR;AACD,IAAE,QAAQ,iBAAiB,CAAC,GAAG,SAAS,SAAS;AAC/C,UAAM,UAAU,YAAY,IAAI;AAChC,QAAI,OAAO,QAAQ;AACnB,QAAI,aAAa;AACjB,QAAI,SAAS,OAAO,QAAQ,SAAS,GAAG;AACtC,WAAK,KAAK,CAAC,YAAY,GAAG,QAAQ,OAAO,GAAG,CAAC,CAAC,CAAC;AAC/C,aAAO;AACP,mBAAa,eAAe,MAAM,MAAM;AAAA,IACzC;AACD,QAAI,QAAQ,SAAS,WAAW,IAAI,GAAG;AACrC,aAAO;AAAA,IACR;AACD,SAAK,KAAK,CAAC,YAAY,GAAG,QAAQ,OAAO,GAAG,WAAW,IAAI,CAAC,CAAC,CAAC;AAC9D,WAAO,QAAQ,UAAU,WAAW,IAAI,KAAK,QAAQ,UAAU,WAAW,IAAI,GAAG;AAC/E,WAAK,KAAK,CAAC,YAAY,GAAG,QAAQ,OAAO,GAA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