@pixerate/editor 0.114.0 → 0.116.0
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/THIRD_PARTY_NOTICES.md +6 -0
- package/dist/animation-editor/index.cjs +54 -54
- package/dist/animation-editor/index.d.cts +2 -2
- package/dist/animation-editor/index.d.ts +2 -2
- package/dist/animation-editor/index.js +2 -2
- package/dist/{chunk-DFQEX3AM.cjs → chunk-2UT4GXYA.cjs} +133 -8
- package/dist/chunk-2UT4GXYA.cjs.map +1 -0
- package/dist/{chunk-VXR7XWMF.js → chunk-7LNZAWSJ.js} +437 -41
- package/dist/chunk-7LNZAWSJ.js.map +1 -0
- package/dist/{chunk-LKCYANMW.js → chunk-ARQ7PQ6Q.js} +129 -4
- package/dist/chunk-ARQ7PQ6Q.js.map +1 -0
- package/dist/chunk-COAMRKVI.cjs +159 -0
- package/dist/chunk-COAMRKVI.cjs.map +1 -0
- package/dist/{chunk-C6C5PDKU.js → chunk-D53KSJUV.js} +3 -322
- package/dist/chunk-D53KSJUV.js.map +1 -0
- package/dist/chunk-D53VQGEJ.js +3262 -0
- package/dist/chunk-D53VQGEJ.js.map +1 -0
- package/dist/chunk-EJVDBITD.cjs +501 -0
- package/dist/chunk-EJVDBITD.cjs.map +1 -0
- package/dist/{chunk-LPLCWZTM.cjs → chunk-FODKPD44.cjs} +555 -159
- package/dist/chunk-FODKPD44.cjs.map +1 -0
- package/dist/chunk-HOCPSFGA.cjs +3262 -0
- package/dist/chunk-HOCPSFGA.cjs.map +1 -0
- package/dist/chunk-IPFRWILU.js +1908 -0
- package/dist/chunk-IPFRWILU.js.map +1 -0
- package/dist/{chunk-FV5AXTSF.cjs → chunk-JSSBHMMU.cjs} +36 -188
- package/dist/chunk-JSSBHMMU.cjs.map +1 -0
- package/dist/chunk-LF4WOZXZ.js +159 -0
- package/dist/chunk-LF4WOZXZ.js.map +1 -0
- package/dist/{chunk-26PGXHY7.cjs → chunk-M7O4BJRH.cjs} +36 -36
- package/dist/{chunk-26PGXHY7.cjs.map → chunk-M7O4BJRH.cjs.map} +1 -1
- package/dist/chunk-N3467VD6.js +501 -0
- package/dist/chunk-N3467VD6.js.map +1 -0
- package/dist/{chunk-ST7E3NEE.cjs → chunk-PAOWHJ5O.cjs} +18 -337
- package/dist/chunk-PAOWHJ5O.cjs.map +1 -0
- package/dist/{chunk-EUVSQ25B.js → chunk-SEBYNBHW.js} +85 -46
- package/dist/chunk-SEBYNBHW.js.map +1 -0
- package/dist/chunk-SMJGE7HM.cjs +1908 -0
- package/dist/chunk-SMJGE7HM.cjs.map +1 -0
- package/dist/{chunk-MMVHBKMM.js → chunk-T2P5TIZ6.js} +2 -2
- package/dist/{chunk-FGW5OWJ4.js → chunk-VJUML33I.js} +4 -156
- package/dist/chunk-VJUML33I.js.map +1 -0
- package/dist/{chunk-5OVJHMZQ.cjs → chunk-ZYZGEILO.cjs} +332 -293
- package/dist/chunk-ZYZGEILO.cjs.map +1 -0
- package/dist/export/index.cjs +4 -2
- package/dist/export/index.cjs.map +1 -1
- package/dist/export/index.js +5 -3
- package/dist/{export-b6NjCZ5-.d.cts → export-BXxSGBCq.d.cts} +67 -5
- package/dist/{export-_1dUKwpF.d.ts → export-Dm44YUvS.d.ts} +67 -5
- package/dist/export-Dv0-ZVrV.d.cts +501 -0
- package/dist/export-Dv0-ZVrV.d.ts +501 -0
- package/dist/{retouch-Do6tBs2H.d.ts → flow-BMtHAmg4.d.ts} +561 -2
- package/dist/{retouch-Bxkuc0KH.d.cts → flow-COCB42TP.d.cts} +561 -2
- package/dist/image-editor/index.cjs +1227 -934
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +18 -10
- package/dist/image-editor/index.d.ts +18 -10
- package/dist/image-editor/index.js +324 -31
- package/dist/image-editor/index.js.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/kernel-wasm-WYCGNZR4.js +10 -0
- package/dist/kernel-wasm-WYCGNZR4.js.map +1 -0
- package/dist/kernel-wasm-YPVAEMVN.cjs +10 -0
- package/dist/kernel-wasm-YPVAEMVN.cjs.map +1 -0
- package/dist/paint/index.cjs +165 -3
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +225 -3
- package/dist/paint/index.d.ts +225 -3
- package/dist/paint/index.js +166 -4
- package/dist/paint-editor/index.cjs +4691 -845
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +1525 -277
- package/dist/paint-editor/index.d.ts +1525 -277
- package/dist/paint-editor/index.js +4561 -715
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/raster/index.cjs +4 -3
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.js +10 -9
- package/dist/{svg-BnRj0q8i.d.cts → svg-CVdFc80-.d.cts} +2 -2
- package/dist/{svg-CmmBFfGT.d.ts → svg-DlEuhwoX.d.ts} +2 -2
- package/dist/{types-1SUQKDAw.d.ts → types-CDLGhAZp.d.ts} +40 -2
- package/dist/{types-yINF17Ta.d.cts → types-Tfly4Aya.d.cts} +40 -2
- package/dist/vector/index.cjs +1897 -975
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +292 -32
- package/dist/vector/index.d.ts +292 -32
- package/dist/vector/index.js +928 -6
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.cjs +502 -2165
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +3 -501
- package/dist/video-editor/index.d.ts +3 -501
- package/dist/video-editor/index.js +151 -1814
- package/dist/video-editor/index.js.map +1 -1
- package/package.json +4 -2
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-image-editor/references/color-management.md +8 -3
- package/skills/pixerate-image-editor/references/photoshop-files.md +15 -9
- package/skills/pixerate-paint-editor/SKILL.md +136 -4
- package/skills/pixerate-vector/SKILL.md +22 -1
- package/dist/chunk-5OVJHMZQ.cjs.map +0 -1
- package/dist/chunk-C6C5PDKU.js.map +0 -1
- package/dist/chunk-DFQEX3AM.cjs.map +0 -1
- package/dist/chunk-EUVSQ25B.js.map +0 -1
- package/dist/chunk-FGW5OWJ4.js.map +0 -1
- package/dist/chunk-FV5AXTSF.cjs.map +0 -1
- package/dist/chunk-GX332W2C.js +0 -181
- package/dist/chunk-GX332W2C.js.map +0 -1
- package/dist/chunk-LKCYANMW.js.map +0 -1
- package/dist/chunk-LPLCWZTM.cjs.map +0 -1
- package/dist/chunk-MUUXNRU4.cjs +0 -181
- package/dist/chunk-MUUXNRU4.cjs.map +0 -1
- package/dist/chunk-ST7E3NEE.cjs.map +0 -1
- package/dist/chunk-TCKIXI46.cjs +0 -1136
- package/dist/chunk-TCKIXI46.cjs.map +0 -1
- package/dist/chunk-UBIXVXPR.js +0 -1136
- package/dist/chunk-UBIXVXPR.js.map +0 -1
- package/dist/chunk-VXR7XWMF.js.map +0 -1
- /package/dist/{chunk-MMVHBKMM.js.map → chunk-T2P5TIZ6.js.map} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import {
|
|
2
|
+
zipCrc32
|
|
3
|
+
} from "./chunk-33AHNSEB.js";
|
|
4
|
+
|
|
5
|
+
// src/export/zip-writer.ts
|
|
6
|
+
var encoder = new TextEncoder();
|
|
7
|
+
var MAX_SIZE = 4294967295;
|
|
8
|
+
async function readAll(readable) {
|
|
9
|
+
const reader = readable.getReader();
|
|
10
|
+
const chunks = [];
|
|
11
|
+
let length = 0;
|
|
12
|
+
for (; ; ) {
|
|
13
|
+
const { done, value } = await reader.read();
|
|
14
|
+
if (done) break;
|
|
15
|
+
chunks.push(value);
|
|
16
|
+
length += value.length;
|
|
17
|
+
}
|
|
18
|
+
const out = new Uint8Array(length);
|
|
19
|
+
let pos = 0;
|
|
20
|
+
for (const chunk of chunks) {
|
|
21
|
+
out.set(chunk, pos);
|
|
22
|
+
pos += chunk.length;
|
|
23
|
+
}
|
|
24
|
+
return out;
|
|
25
|
+
}
|
|
26
|
+
async function deflateRaw(data) {
|
|
27
|
+
const Stream = globalThis.CompressionStream;
|
|
28
|
+
if (typeof Stream !== "function") return null;
|
|
29
|
+
let stream;
|
|
30
|
+
try {
|
|
31
|
+
stream = new Stream("deflate-raw");
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const writer = stream.writable.getWriter();
|
|
36
|
+
const written = writer.write(data).then(() => writer.close()).catch(() => {
|
|
37
|
+
});
|
|
38
|
+
const out = await readAll(stream.readable);
|
|
39
|
+
await written;
|
|
40
|
+
return out;
|
|
41
|
+
}
|
|
42
|
+
function dosDateTime(date) {
|
|
43
|
+
const year = Math.min(Math.max(date.getUTCFullYear(), 1980), 2107);
|
|
44
|
+
return {
|
|
45
|
+
time: date.getUTCHours() << 11 | date.getUTCMinutes() << 5 | Math.floor(date.getUTCSeconds() / 2),
|
|
46
|
+
date: year - 1980 << 9 | date.getUTCMonth() + 1 << 5 | date.getUTCDate()
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
var ByteSink = class {
|
|
50
|
+
chunks = [];
|
|
51
|
+
length = 0;
|
|
52
|
+
bytes(data) {
|
|
53
|
+
this.chunks.push(data);
|
|
54
|
+
this.length += data.length;
|
|
55
|
+
}
|
|
56
|
+
header(fields) {
|
|
57
|
+
const size = fields.reduce((n, [, width]) => n + width, 0);
|
|
58
|
+
const buffer = new Uint8Array(size);
|
|
59
|
+
const view = new DataView(buffer.buffer);
|
|
60
|
+
let pos = 0;
|
|
61
|
+
for (const [value, width] of fields) {
|
|
62
|
+
if (width === 2) view.setUint16(pos, value, true);
|
|
63
|
+
else view.setUint32(pos, value >>> 0, true);
|
|
64
|
+
pos += width;
|
|
65
|
+
}
|
|
66
|
+
this.bytes(buffer);
|
|
67
|
+
}
|
|
68
|
+
toUint8Array() {
|
|
69
|
+
const out = new Uint8Array(this.length);
|
|
70
|
+
let pos = 0;
|
|
71
|
+
for (const chunk of this.chunks) {
|
|
72
|
+
out.set(chunk, pos);
|
|
73
|
+
pos += chunk.length;
|
|
74
|
+
}
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
async function writeZip(entries, options = {}) {
|
|
79
|
+
if (entries.length > 65535) throw new RangeError("Too many ZIP entries (no ZIP64 support).");
|
|
80
|
+
const { time, date } = dosDateTime(options.modified ?? new Date(Date.UTC(1980, 0, 1)));
|
|
81
|
+
const out = new ByteSink();
|
|
82
|
+
const central = new ByteSink();
|
|
83
|
+
const seen = /* @__PURE__ */ new Set();
|
|
84
|
+
for (const entry of entries) {
|
|
85
|
+
const name = entry.name;
|
|
86
|
+
if (!name || name.startsWith("/") || name.includes("\\") || name.split("/").includes("..") || name.includes("\0")) {
|
|
87
|
+
throw new Error(`Unsafe ZIP entry name: ${JSON.stringify(name)}`);
|
|
88
|
+
}
|
|
89
|
+
if (seen.has(name)) throw new Error(`Duplicate ZIP entry name: ${JSON.stringify(name)}`);
|
|
90
|
+
seen.add(name);
|
|
91
|
+
const raw = typeof entry.data === "string" ? encoder.encode(entry.data) : entry.data;
|
|
92
|
+
const deflated = options.compression === "store" || raw.length === 0 ? null : await deflateRaw(raw);
|
|
93
|
+
const useDeflate = !!deflated && deflated.length < raw.length;
|
|
94
|
+
const body = useDeflate ? deflated : raw;
|
|
95
|
+
const method = useDeflate ? 8 : 0;
|
|
96
|
+
const nameBytes = encoder.encode(name);
|
|
97
|
+
const crc = zipCrc32(raw);
|
|
98
|
+
const offset = out.length;
|
|
99
|
+
if (body.length > MAX_SIZE || raw.length > MAX_SIZE || offset > MAX_SIZE) {
|
|
100
|
+
throw new RangeError("ZIP archive too large (no ZIP64 support).");
|
|
101
|
+
}
|
|
102
|
+
const flags = 2048;
|
|
103
|
+
out.header([
|
|
104
|
+
[67324752, 4],
|
|
105
|
+
[20, 2],
|
|
106
|
+
[flags, 2],
|
|
107
|
+
[method, 2],
|
|
108
|
+
[time, 2],
|
|
109
|
+
[date, 2],
|
|
110
|
+
[crc, 4],
|
|
111
|
+
[body.length, 4],
|
|
112
|
+
[raw.length, 4],
|
|
113
|
+
[nameBytes.length, 2],
|
|
114
|
+
[0, 2]
|
|
115
|
+
]);
|
|
116
|
+
out.bytes(nameBytes);
|
|
117
|
+
out.bytes(body);
|
|
118
|
+
central.header([
|
|
119
|
+
[33639248, 4],
|
|
120
|
+
[20, 2],
|
|
121
|
+
[20, 2],
|
|
122
|
+
[flags, 2],
|
|
123
|
+
[method, 2],
|
|
124
|
+
[time, 2],
|
|
125
|
+
[date, 2],
|
|
126
|
+
[crc, 4],
|
|
127
|
+
[body.length, 4],
|
|
128
|
+
[raw.length, 4],
|
|
129
|
+
[nameBytes.length, 2],
|
|
130
|
+
[0, 2],
|
|
131
|
+
[0, 2],
|
|
132
|
+
[0, 2],
|
|
133
|
+
[0, 2],
|
|
134
|
+
[0, 4],
|
|
135
|
+
[offset, 4]
|
|
136
|
+
]);
|
|
137
|
+
central.bytes(nameBytes);
|
|
138
|
+
}
|
|
139
|
+
const cdOffset = out.length;
|
|
140
|
+
const cd = central.toUint8Array();
|
|
141
|
+
out.bytes(cd);
|
|
142
|
+
out.header([
|
|
143
|
+
[101010256, 4],
|
|
144
|
+
[0, 2],
|
|
145
|
+
[0, 2],
|
|
146
|
+
[entries.length, 2],
|
|
147
|
+
[entries.length, 2],
|
|
148
|
+
[cd.length, 4],
|
|
149
|
+
[cdOffset, 4],
|
|
150
|
+
[0, 2]
|
|
151
|
+
]);
|
|
152
|
+
return out.toUint8Array();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export {
|
|
156
|
+
deflateRaw,
|
|
157
|
+
writeZip
|
|
158
|
+
};
|
|
159
|
+
//# sourceMappingURL=chunk-LF4WOZXZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/export/zip-writer.ts"],"sourcesContent":["import { zipCrc32 } from \"../import/zip\";\n\n/**\n * Minimal, dependency-free ZIP writer (the counterpart of `readZip`), used by\n * the DOCX export. Entries are deflated with the platform\n * `CompressionStream(\"deflate-raw\")` when it exists (modern browsers,\n * Node ≥ 18) and stored otherwise, or when deflating does not make them\n * smaller. Names are written as UTF-8 (flag bit 11). No ZIP64: archives are\n * limited to 65 535 entries and 4 GiB.\n */\n\nexport interface ZipWriteEntry {\n /** Entry path with `/` separators; must be relative and free of `..`. */\n name: string;\n /** Strings are encoded as UTF-8. */\n data: Uint8Array | string;\n}\n\nexport interface ZipWriteOptions {\n /**\n * `\"auto\"` (default) deflates when `CompressionStream` is available,\n * `\"store\"` never compresses.\n */\n compression?: \"auto\" | \"store\";\n /**\n * Modification time written for every entry (default 1980-01-01, the DOS\n * epoch, so the output is deterministic).\n */\n modified?: Date;\n}\n\nconst encoder = new TextEncoder();\nconst MAX_SIZE = 0xffffffff;\n\nasync function readAll(readable: ReadableStream<Uint8Array>): Promise<Uint8Array> {\n const reader = readable.getReader();\n const chunks: Uint8Array[] = [];\n let length = 0;\n for (;;) {\n const { done, value } = await reader.read();\n if (done) break;\n chunks.push(value);\n length += value.length;\n }\n const out = new Uint8Array(length);\n let pos = 0;\n for (const chunk of chunks) {\n out.set(chunk, pos);\n pos += chunk.length;\n }\n return out;\n}\n\n/** Raw deflate with `CompressionStream`, or `null` when it is unavailable. */\nexport async function deflateRaw(data: Uint8Array): Promise<Uint8Array | null> {\n const Stream = (globalThis as { CompressionStream?: typeof CompressionStream }).CompressionStream;\n if (typeof Stream !== \"function\") return null;\n let stream: CompressionStream;\n try {\n stream = new Stream(\"deflate-raw\" as CompressionFormat);\n } catch {\n return null;\n }\n // Plain stream APIs only: jsdom's Blob has no `stream()` (see GOTCHAS).\n const writer = stream.writable.getWriter();\n const written = writer\n .write(data as unknown as BufferSource)\n .then(() => writer.close())\n .catch(() => {});\n const out = await readAll(stream.readable as ReadableStream<Uint8Array>);\n await written;\n return out;\n}\n\nfunction dosDateTime(date: Date): { time: number; date: number } {\n const year = Math.min(Math.max(date.getUTCFullYear(), 1980), 2107);\n return {\n time: (date.getUTCHours() << 11) | (date.getUTCMinutes() << 5) | Math.floor(date.getUTCSeconds() / 2),\n date: ((year - 1980) << 9) | ((date.getUTCMonth() + 1) << 5) | date.getUTCDate(),\n };\n}\n\nclass ByteSink {\n private chunks: Uint8Array[] = [];\n length = 0;\n\n bytes(data: Uint8Array): void {\n this.chunks.push(data);\n this.length += data.length;\n }\n\n header(fields: [number, 2 | 4][]): void {\n const size = fields.reduce((n, [, width]) => n + width, 0);\n const buffer = new Uint8Array(size);\n const view = new DataView(buffer.buffer);\n let pos = 0;\n for (const [value, width] of fields) {\n if (width === 2) view.setUint16(pos, value, true);\n else view.setUint32(pos, value >>> 0, true);\n pos += width;\n }\n this.bytes(buffer);\n }\n\n toUint8Array(): Uint8Array {\n const out = new Uint8Array(this.length);\n let pos = 0;\n for (const chunk of this.chunks) {\n out.set(chunk, pos);\n pos += chunk.length;\n }\n return out;\n }\n}\n\n/** Writes a ZIP archive. Throws on unsafe or duplicate names and oversized archives. */\nexport async function writeZip(entries: readonly ZipWriteEntry[], options: ZipWriteOptions = {}): Promise<Uint8Array> {\n if (entries.length > 0xffff) throw new RangeError(\"Too many ZIP entries (no ZIP64 support).\");\n const { time, date } = dosDateTime(options.modified ?? new Date(Date.UTC(1980, 0, 1)));\n const out = new ByteSink();\n const central = new ByteSink();\n const seen = new Set<string>();\n for (const entry of entries) {\n const name = entry.name;\n if (!name || name.startsWith(\"/\") || name.includes(\"\\\\\") || name.split(\"/\").includes(\"..\") || name.includes(\"\\0\")) {\n throw new Error(`Unsafe ZIP entry name: ${JSON.stringify(name)}`);\n }\n if (seen.has(name)) throw new Error(`Duplicate ZIP entry name: ${JSON.stringify(name)}`);\n seen.add(name);\n const raw = typeof entry.data === \"string\" ? encoder.encode(entry.data) : entry.data;\n const deflated = options.compression === \"store\" || raw.length === 0 ? null : await deflateRaw(raw);\n const useDeflate = !!deflated && deflated.length < raw.length;\n const body = useDeflate ? deflated! : raw;\n const method = useDeflate ? 8 : 0;\n const nameBytes = encoder.encode(name);\n const crc = zipCrc32(raw);\n const offset = out.length;\n if (body.length > MAX_SIZE || raw.length > MAX_SIZE || offset > MAX_SIZE) {\n throw new RangeError(\"ZIP archive too large (no ZIP64 support).\");\n }\n const flags = 0x0800;\n out.header([\n [0x04034b50, 4], [20, 2], [flags, 2], [method, 2], [time, 2], [date, 2],\n [crc, 4], [body.length, 4], [raw.length, 4], [nameBytes.length, 2], [0, 2],\n ]);\n out.bytes(nameBytes);\n out.bytes(body);\n central.header([\n [0x02014b50, 4], [20, 2], [20, 2], [flags, 2], [method, 2], [time, 2], [date, 2],\n [crc, 4], [body.length, 4], [raw.length, 4], [nameBytes.length, 2], [0, 2], [0, 2],\n [0, 2], [0, 2], [0, 4], [offset, 4],\n ]);\n central.bytes(nameBytes);\n }\n const cdOffset = out.length;\n const cd = central.toUint8Array();\n out.bytes(cd);\n out.header([\n [0x06054b50, 4], [0, 2], [0, 2], [entries.length, 2], [entries.length, 2],\n [cd.length, 4], [cdOffset, 4], [0, 2],\n ]);\n return out.toUint8Array();\n}\n"],"mappings":";;;;;AA+BA,IAAM,UAAU,IAAI,YAAY;AAChC,IAAM,WAAW;AAEjB,eAAe,QAAQ,UAA2D;AAChF,QAAM,SAAS,SAAS,UAAU;AAClC,QAAM,SAAuB,CAAC;AAC9B,MAAI,SAAS;AACb,aAAS;AACP,UAAM,EAAE,MAAM,MAAM,IAAI,MAAM,OAAO,KAAK;AAC1C,QAAI,KAAM;AACV,WAAO,KAAK,KAAK;AACjB,cAAU,MAAM;AAAA,EAClB;AACA,QAAM,MAAM,IAAI,WAAW,MAAM;AACjC,MAAI,MAAM;AACV,aAAW,SAAS,QAAQ;AAC1B,QAAI,IAAI,OAAO,GAAG;AAClB,WAAO,MAAM;AAAA,EACf;AACA,SAAO;AACT;AAGA,eAAsB,WAAW,MAA8C;AAC7E,QAAM,SAAU,WAAgE;AAChF,MAAI,OAAO,WAAW,WAAY,QAAO;AAC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I,OAAO;AAAA,IACT,CAAC,WAAY,CAAC;AAAA,IAAG,CAAC,GAAG,CAAC;AAAA,IAAG,CAAC,GAAG,CAAC;AAAA,IAAG,CAAC,QAAQ,QAAQ,CAAC;AAAA,IAAG,CAAC,QAAQ,QAAQ,CAAC;AAAA,IACxE,CAAC,GAAG,QAAQ,CAAC;AAAA,IAAG,CAAC,UAAU,CAAC;AAAA,IAAG,CAAC,GAAG,CAAC;AAAA,EACtC,CAAC;AACD,SAAO,IAAI,aAAa;AAC1B;","names":[]}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkFODKPD44cjs = require('./chunk-FODKPD44.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -37,7 +37,7 @@ var lerpP = (a, b, t) => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t];
|
|
|
37
37
|
var toP = (v) => [v.x, v.y];
|
|
38
38
|
var mapP = (m, p) => [m[0] * p[0] + m[2] * p[1] + m[4], m[1] * p[0] + m[3] * p[1] + m[5]];
|
|
39
39
|
var curvesOf = (c) => Math.max(0, (c.pts.length - 1) / 3) | 0;
|
|
40
|
-
function subpathToMorphContour(sp, m =
|
|
40
|
+
function subpathToMorphContour(sp, m = _chunkFODKPD44cjs.IDENTITY_MATRIX) {
|
|
41
41
|
const n = sp.anchors.length;
|
|
42
42
|
if (!n) return null;
|
|
43
43
|
const first = mapP(m, toP(sp.anchors[0]));
|
|
@@ -67,8 +67,8 @@ function isStraight(p0, p1, p2, p3) {
|
|
|
67
67
|
const u2 = along(p2);
|
|
68
68
|
return off(p1) < tol && off(p2) < tol && u1 >= -1e-9 && u1 <= 1 + 1e-9 && u2 >= -1e-9 && u2 <= 1 + 1e-9;
|
|
69
69
|
}
|
|
70
|
-
function morphContourToSubpath(c, m =
|
|
71
|
-
const pts =
|
|
70
|
+
function morphContourToSubpath(c, m = _chunkFODKPD44cjs.IDENTITY_MATRIX, closed = c.closed) {
|
|
71
|
+
const pts = _chunkFODKPD44cjs.isIdentityMatrix.call(void 0, m) ? c.pts : c.pts.map((p) => mapP(m, p));
|
|
72
72
|
const curves = curvesOf(c);
|
|
73
73
|
const dropLast = closed && c.closed && curves > 0;
|
|
74
74
|
const count = dropLast ? curves : curves + 1;
|
|
@@ -84,7 +84,7 @@ function morphContourToSubpath(c, m = _chunkLPLCWZTMcjs.IDENTITY_MATRIX, closed
|
|
|
84
84
|
anchors[(k + 1) % count].in = { x: p2[0], y: p2[1] };
|
|
85
85
|
}
|
|
86
86
|
for (const a of anchors) {
|
|
87
|
-
const type =
|
|
87
|
+
const type = _chunkFODKPD44cjs.inferAnchorType.call(void 0, a);
|
|
88
88
|
if (type !== "corner") a.type = type;
|
|
89
89
|
}
|
|
90
90
|
const isClosed = closed && curves > 0;
|
|
@@ -267,7 +267,7 @@ function bestStart(fixed, free, useShapeContext) {
|
|
|
267
267
|
return best;
|
|
268
268
|
}
|
|
269
269
|
function placeIn(c, from, to) {
|
|
270
|
-
const b =
|
|
270
|
+
const b = _chunkFODKPD44cjs.unionBounds.call(void 0, [boundsOfPoints(c.pts)]);
|
|
271
271
|
const p = b ? [b.x + b.width / 2, b.y + b.height / 2] : c.pts[0];
|
|
272
272
|
if (!from || !to) return p;
|
|
273
273
|
const fx = from.width > 0 ? (p[0] - from.x) / from.width : 0.5;
|
|
@@ -456,7 +456,7 @@ function interpolateVectorColor(a, b, t) {
|
|
|
456
456
|
}
|
|
457
457
|
function resampleGradientStops(g, offsets) {
|
|
458
458
|
return offsets.map((offset) => {
|
|
459
|
-
const s =
|
|
459
|
+
const s = _chunkFODKPD44cjs.sampleVectorGradient.call(void 0, g, offset);
|
|
460
460
|
return s.opacity < 1 ? { offset, color: s.color, opacity: Math.round(s.opacity * 1e4) / 1e4 } : { offset, color: s.color };
|
|
461
461
|
});
|
|
462
462
|
}
|
|
@@ -467,11 +467,11 @@ function lerpAngle(a, b, t) {
|
|
|
467
467
|
var lerpPoint = (a, b, t) => ({ x: lerpN(a.x, b.x, t), y: lerpN(a.y, b.y, t) });
|
|
468
468
|
var sameColourModel = (a, b) => (_nullishCoalesce(a.interpolation, () => ( "srgb"))) === (_nullishCoalesce(b.interpolation, () => ( "srgb"))) && (_nullishCoalesce(a.smoothness, () => ( 0))) === (_nullishCoalesce(b.smoothness, () => ( 0)));
|
|
469
469
|
function lerpStops(a, b, t) {
|
|
470
|
-
let stopsA =
|
|
471
|
-
let stopsB =
|
|
470
|
+
let stopsA = _chunkFODKPD44cjs.sortedVectorGradientStops.call(void 0, a);
|
|
471
|
+
let stopsB = _chunkFODKPD44cjs.sortedVectorGradientStops.call(void 0, b);
|
|
472
472
|
const resampled = stopsA.length !== stopsB.length || !sameColourModel(a, b);
|
|
473
473
|
if (resampled) {
|
|
474
|
-
const offs = [...
|
|
474
|
+
const offs = [..._chunkFODKPD44cjs.expandVectorGradientStops.call(void 0, a), ..._chunkFODKPD44cjs.expandVectorGradientStops.call(void 0, b), ...stopsA, ...stopsB].map((s) => s.offset).filter(Number.isFinite).sort((x, y) => x - y);
|
|
475
475
|
const common = offs.filter((o, i) => i === 0 || o - offs[i - 1] > 1e-4);
|
|
476
476
|
stopsA = resampleGradientStops(a, common);
|
|
477
477
|
stopsB = resampleGradientStops(b, common);
|
|
@@ -498,8 +498,8 @@ function lerpGradient(a, b, t) {
|
|
|
498
498
|
}
|
|
499
499
|
if (near.spread && near.spread !== "pad") out.spread = near.spread;
|
|
500
500
|
if (near.strokeMode && near.strokeMode !== "within") out.strokeMode = near.strokeMode;
|
|
501
|
-
const ea =
|
|
502
|
-
const eb =
|
|
501
|
+
const ea = _chunkFODKPD44cjs.hasExplicitGradientGeometry.call(void 0, a);
|
|
502
|
+
const eb = _chunkFODKPD44cjs.hasExplicitGradientGeometry.call(void 0, b);
|
|
503
503
|
if (!ea && !eb) {
|
|
504
504
|
if (a.angle !== void 0 || b.angle !== void 0 || a.type === "linear" || a.type === "reflected") {
|
|
505
505
|
const fallback = a.type === "linear" || a.type === "reflected" ? 180 : 90;
|
|
@@ -512,10 +512,10 @@ function lerpGradient(a, b, t) {
|
|
|
512
512
|
}
|
|
513
513
|
return out;
|
|
514
514
|
}
|
|
515
|
-
const pa =
|
|
516
|
-
const pb =
|
|
515
|
+
const pa = _chunkFODKPD44cjs.vectorGradientPoints.call(void 0, a);
|
|
516
|
+
const pb = _chunkFODKPD44cjs.vectorGradientPoints.call(void 0, b);
|
|
517
517
|
if (pa.units !== pb.units) {
|
|
518
|
-
const src =
|
|
518
|
+
const src = _chunkFODKPD44cjs.explicitVectorGradient.call(void 0, near);
|
|
519
519
|
return { ...src, stops: out.stops, ...out.interpolation ? { interpolation: out.interpolation } : {}, ...out.smoothness ? { smoothness: out.smoothness } : {} };
|
|
520
520
|
}
|
|
521
521
|
out.start = lerpPoint(pa.start, pb.start, t);
|
|
@@ -535,14 +535,14 @@ function solidLike(color, like) {
|
|
|
535
535
|
function interpolateVectorPaint(a, b, t) {
|
|
536
536
|
if (t <= 0) return a;
|
|
537
537
|
if (t >= 1) return b;
|
|
538
|
-
const pa =
|
|
539
|
-
const pb =
|
|
538
|
+
const pa = _chunkFODKPD44cjs.hasPaint.call(void 0, a);
|
|
539
|
+
const pb = _chunkFODKPD44cjs.hasPaint.call(void 0, b);
|
|
540
540
|
if (!pa && !pb) return t < 0.5 ? a : b;
|
|
541
541
|
if (typeof a === "string" && pa && typeof b === "string" && pb) return interpolateVectorColor(a, b, t);
|
|
542
542
|
if (!pa && typeof b === "string") return interpolateVectorColor("transparent", b, t);
|
|
543
543
|
if (!pb && typeof a === "string") return interpolateVectorColor(a, "transparent", t);
|
|
544
|
-
const ga = pa &&
|
|
545
|
-
const gb = pb &&
|
|
544
|
+
const ga = pa && _chunkFODKPD44cjs.isVectorGradient.call(void 0, a) ? a : null;
|
|
545
|
+
const gb = pb && _chunkFODKPD44cjs.isVectorGradient.call(void 0, b) ? b : null;
|
|
546
546
|
if (ga && gb) return _nullishCoalesce(lerpGradient(ga, gb, t), () => ( (t < 0.5 ? a : b)));
|
|
547
547
|
if (gb) return _nullishCoalesce(lerpGradient(solidLike(pa ? a : null, gb), gb, t), () => ( b));
|
|
548
548
|
if (ga) return _nullishCoalesce(lerpGradient(ga, solidLike(pb ? b : null, ga), t), () => ( a));
|
|
@@ -553,8 +553,8 @@ function interpolateWidthProfiles(a, b, t) {
|
|
|
553
553
|
const at = [..._nullishCoalesce(a, () => ( [])), ..._nullishCoalesce(b, () => ( [])), { t: 0 }, { t: 1 }].map((p) => p.t).sort((x, y) => x - y);
|
|
554
554
|
const ts = at.filter((v, i) => i === 0 || v - at[i - 1] > 1e-6);
|
|
555
555
|
return ts.map((pos) => {
|
|
556
|
-
const x =
|
|
557
|
-
const y =
|
|
556
|
+
const x = _chunkFODKPD44cjs.widthProfileAt.call(void 0, a, pos);
|
|
557
|
+
const y = _chunkFODKPD44cjs.widthProfileAt.call(void 0, b, pos);
|
|
558
558
|
return { t: pos, left: lerpN(x.left, y.left, t), right: lerpN(x.right, y.right, t) };
|
|
559
559
|
});
|
|
560
560
|
}
|
|
@@ -597,7 +597,7 @@ function reversedStyle(s) {
|
|
|
597
597
|
out.endArrow = s.startArrow;
|
|
598
598
|
out.startArrowScale = s.endArrowScale;
|
|
599
599
|
out.endArrowScale = s.startArrowScale;
|
|
600
|
-
if (_optionalChain([s, 'access', _6 => _6.strokeWidthProfile, 'optionalAccess', _7 => _7.length])) out.strokeWidthProfile =
|
|
600
|
+
if (_optionalChain([s, 'access', _6 => _6.strokeWidthProfile, 'optionalAccess', _7 => _7.length])) out.strokeWidthProfile = _chunkFODKPD44cjs.reverseWidthProfile.call(void 0, s.strokeWidthProfile);
|
|
601
601
|
for (const k of ["startArrow", "endArrow", "startArrowScale", "endArrowScale"]) if (out[k] === void 0) delete out[k];
|
|
602
602
|
return out;
|
|
603
603
|
}
|
|
@@ -623,19 +623,19 @@ function styleOf(n) {
|
|
|
623
623
|
return out;
|
|
624
624
|
}
|
|
625
625
|
function contoursOf(node, m) {
|
|
626
|
-
return
|
|
626
|
+
return _chunkFODKPD44cjs.expandVectorCorners.call(void 0, node.subpaths).map((sp) => subpathToMorphContour(sp, m)).filter((c) => !!c);
|
|
627
627
|
}
|
|
628
|
-
function preparePathMorph(a, b, options, ma =
|
|
628
|
+
function preparePathMorph(a, b, options, ma = _chunkFODKPD44cjs.nodeMatrix.call(void 0, a), mb = _chunkFODKPD44cjs.nodeMatrix.call(void 0, b)) {
|
|
629
629
|
const corr = correspondMorphContours(contoursOf(a, ma), contoursOf(b, mb), options);
|
|
630
630
|
const sim = procrustes(corr.a, corr.b);
|
|
631
631
|
const styleA = styleOf(a);
|
|
632
632
|
const styleB = corr.reversed ? reversedStyle(styleOf(b)) : styleOf(b);
|
|
633
|
-
const rigid = !
|
|
633
|
+
const rigid = !_chunkFODKPD44cjs.isIdentityMatrix.call(void 0, ma) || !_chunkFODKPD44cjs.isIdentityMatrix.call(void 0, mb);
|
|
634
634
|
const id = _nullishCoalesce(options.id, () => ( a.id));
|
|
635
635
|
return (t) => {
|
|
636
636
|
const contours = interpolateMorphContours(corr.a, corr.b, t, { linear: options.linear, rigidity: options.rigidity, similarity: sim });
|
|
637
|
-
const m = rigid ? interpolateRigidMatrix(ma, mb, t) :
|
|
638
|
-
const back = rigid ?
|
|
637
|
+
const m = rigid ? interpolateRigidMatrix(ma, mb, t) : _chunkFODKPD44cjs.IDENTITY_MATRIX;
|
|
638
|
+
const back = rigid ? _chunkFODKPD44cjs.invertMatrix.call(void 0, m) : _chunkFODKPD44cjs.IDENTITY_MATRIX;
|
|
639
639
|
const subpaths = contours.map((c, k) => {
|
|
640
640
|
const closed = t <= 0 ? corr.a[k].closed : t >= 1 ? corr.b[k].closed : corr.a[k].closed && corr.b[k].closed;
|
|
641
641
|
return morphContourToSubpath({ closed: corr.a[k].closed && corr.b[k].closed, pts: c.pts }, back, closed);
|
|
@@ -643,14 +643,14 @@ function preparePathMorph(a, b, options, ma = _chunkLPLCWZTMcjs.nodeMatrix.call(
|
|
|
643
643
|
const node = { id, type: "path", subpaths, ...interpolateVectorStyle(styleA, styleB, t) };
|
|
644
644
|
const opacity = lerpN(_nullishCoalesce(a.opacity, () => ( 1)), _nullishCoalesce(b.opacity, () => ( 1)), t);
|
|
645
645
|
if (opacity < 1) node.opacity = opacity;
|
|
646
|
-
if (rigid && !
|
|
646
|
+
if (rigid && !_chunkFODKPD44cjs.isIdentityMatrix.call(void 0, m)) node.transform = m;
|
|
647
647
|
return node;
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
function flattenPaths(node, parent =
|
|
651
|
-
const m =
|
|
650
|
+
function flattenPaths(node, parent = _chunkFODKPD44cjs.IDENTITY_MATRIX) {
|
|
651
|
+
const m = _chunkFODKPD44cjs.multiplyMatrices.call(void 0, _chunkFODKPD44cjs.nodeMatrix.call(void 0, node), parent);
|
|
652
652
|
if (node.type === "path") return [{ path: node, m, opacity: 1 }];
|
|
653
|
-
if (node.type === "text" || node.type === "instance") return flattenPaths(
|
|
653
|
+
if (node.type === "text" || node.type === "instance") return flattenPaths(_chunkFODKPD44cjs.expandVectorAppearance.call(void 0, node), parent);
|
|
654
654
|
const o = _nullishCoalesce(node.opacity, () => ( 1));
|
|
655
655
|
return node.children.filter((c) => c.visible !== false).flatMap((c) => flattenPaths(c, m)).map((e) => ({ ...e, opacity: e.opacity * o }));
|
|
656
656
|
}
|
|
@@ -672,8 +672,8 @@ function createVectorMorph(a, b, options = {}) {
|
|
|
672
672
|
}
|
|
673
673
|
const pa = flattenPaths(a);
|
|
674
674
|
const pb = flattenPaths(b);
|
|
675
|
-
const ba =
|
|
676
|
-
const bb =
|
|
675
|
+
const ba = _chunkFODKPD44cjs.unionBounds.call(void 0, pa.map((e) => placedBounds(e.path, e.m)));
|
|
676
|
+
const bb = _chunkFODKPD44cjs.unionBounds.call(void 0, pb.map((e) => placedBounds(e.path, e.m)));
|
|
677
677
|
const id = _nullishCoalesce(options.id, () => ( a.id));
|
|
678
678
|
const parts = [];
|
|
679
679
|
const opacities = [];
|
|
@@ -685,10 +685,10 @@ function createVectorMorph(a, b, options = {}) {
|
|
|
685
685
|
parts.push(preparePathMorph(x.path, y.path, sub, x.m, y.m));
|
|
686
686
|
opacities.push([x.opacity, y.opacity]);
|
|
687
687
|
} else if (x) {
|
|
688
|
-
parts.push(preparePathMorph(x.path, collapsedPath(x.path, x.m, ba, bb), sub, x.m,
|
|
688
|
+
parts.push(preparePathMorph(x.path, collapsedPath(x.path, x.m, ba, bb), sub, x.m, _chunkFODKPD44cjs.IDENTITY_MATRIX));
|
|
689
689
|
opacities.push([x.opacity, x.opacity]);
|
|
690
690
|
} else if (y) {
|
|
691
|
-
parts.push(preparePathMorph(collapsedPath(y.path, y.m, bb, ba), y.path, sub,
|
|
691
|
+
parts.push(preparePathMorph(collapsedPath(y.path, y.m, bb, ba), y.path, sub, _chunkFODKPD44cjs.IDENTITY_MATRIX, y.m));
|
|
692
692
|
opacities.push([y.opacity, y.opacity]);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
@@ -750,4 +750,4 @@ function evaluateVectorPathKeyframes(keyframes, time, options = {}) {
|
|
|
750
750
|
|
|
751
751
|
|
|
752
752
|
exports.subpathToMorphContour = subpathToMorphContour; exports.morphContourToSubpath = morphContourToSubpath; exports.refineMorphContour = refineMorphContour; exports.reverseMorphContour = reverseMorphContour; exports.turnMorphContour = turnMorphContour; exports.correspondMorphContours = correspondMorphContours; exports.morphPathsCross = morphPathsCross; exports.interpolateMorphContours = interpolateMorphContours; exports.interpolateRigidMatrix = interpolateRigidMatrix; exports.interpolateVectorColor = interpolateVectorColor; exports.resampleGradientStops = resampleGradientStops; exports.interpolateVectorPaint = interpolateVectorPaint; exports.interpolateWidthProfiles = interpolateWidthProfiles; exports.interpolateVectorStyle = interpolateVectorStyle; exports.createVectorMorph = createVectorMorph; exports.interpolateVectorPaths = interpolateVectorPaths; exports.evaluateVectorPathKeyframes = evaluateVectorPathKeyframes;
|
|
753
|
-
//# sourceMappingURL=chunk-
|
|
753
|
+
//# sourceMappingURL=chunk-M7O4BJRH.cjs.map
|