@pixerate/editor 0.138.0 → 0.139.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/dist/animation-editor/index.cjs +55 -55
- package/dist/animation-editor/index.d.cts +5 -4
- package/dist/animation-editor/index.d.ts +5 -4
- package/dist/animation-editor/index.js +2 -2
- package/dist/{bezier-DPmdGwgR.d.ts → bezier-B6cK8SR6.d.ts} +1 -1
- package/dist/{bezier-CUaH8hcK.d.cts → bezier-CEJ8Uw4O.d.cts} +1 -1
- package/dist/{grain-GCt_O2kv.d.cts → blending-D7jCmjO6.d.cts} +1 -58
- package/dist/{grain-COgYMMHv.d.ts → blending-NgF3qo3d.d.ts} +1 -58
- package/dist/{brushes-B1ABdDAs.d.ts → brushes-CQpL7_Lc.d.ts} +2 -1
- package/dist/{brushes-DnIdJYxN.d.cts → brushes-aEnjqoji.d.cts} +2 -1
- package/dist/canvas/index.d.cts +8 -7
- package/dist/canvas/index.d.ts +8 -7
- package/dist/{chunk-7MN75BXI.cjs → chunk-3QHPFSQM.cjs} +36 -36
- package/dist/{chunk-7MN75BXI.cjs.map → chunk-3QHPFSQM.cjs.map} +1 -1
- package/dist/{chunk-OV7253FC.js → chunk-NI6RORDS.js} +2 -2
- package/dist/{chunk-CM3LJPR3.cjs → chunk-PMEHFHSP.cjs} +82 -82
- package/dist/{chunk-CM3LJPR3.cjs.map → chunk-PMEHFHSP.cjs.map} +1 -1
- package/dist/{chunk-QBARQGSG.js → chunk-QEIN6JQO.js} +2 -2
- package/dist/{chunk-V45ZTW4R.js → chunk-TJBYBSTN.js} +49 -4
- package/dist/chunk-TJBYBSTN.js.map +1 -0
- package/dist/{chunk-SXOTFV3V.cjs → chunk-XFXHA5MU.cjs} +50 -5
- package/dist/chunk-XFXHA5MU.cjs.map +1 -0
- package/dist/effects/index.d.cts +5 -4
- package/dist/effects/index.d.ts +5 -4
- package/dist/{export-BwFRiItd.d.ts → export-0ZaTK__4.d.ts} +5 -5
- package/dist/{export-41rL6Cne.d.ts → export-C45v6MYq.d.ts} +1 -1
- package/dist/{export-DuN3dpCg.d.cts → export-D-7WCDJ9.d.cts} +5 -5
- package/dist/{export-D9mXp05Q.d.cts → export-DSdCfd6O.d.cts} +1 -1
- package/dist/grain-BWmGZxP4.d.cts +58 -0
- package/dist/grain-BWmGZxP4.d.ts +58 -0
- package/dist/{helpers-v6GMazzg.d.cts → helpers-Cavy1TB7.d.cts} +21 -1
- package/dist/{helpers-C-RgeyvH.d.ts → helpers-LZQ4cpg4.d.ts} +21 -1
- package/dist/image-editor/index.cjs +614 -614
- package/dist/image-editor/index.d.cts +12 -11
- package/dist/image-editor/index.d.ts +12 -11
- package/dist/image-editor/index.js +2 -2
- package/dist/{opentype-n99lqxEZ.d.cts → opentype-BpIJhGpj.d.cts} +1 -1
- package/dist/{opentype-T7bkbR2D.d.ts → opentype-CyxDScVz.d.ts} +1 -1
- package/dist/paint/index.d.cts +6 -4
- package/dist/paint/index.d.ts +6 -4
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.d.cts +13 -11
- package/dist/paint-editor/index.d.ts +13 -11
- package/dist/paint-editor/index.js +2 -2
- package/dist/{pathfinder-CQlldanv.d.cts → pathfinder-BMQEcS0k.d.cts} +1 -1
- package/dist/{pathfinder-D-V6JLSw.d.ts → pathfinder-CQIxubuP.d.ts} +1 -1
- package/dist/{pool-CZQOrSXZ.d.ts → pool-Cynuj89K.d.ts} +1 -1
- package/dist/{pool-FjZZmZ80.d.cts → pool-DedjxDKo.d.cts} +1 -1
- package/dist/{rand-DJGxSq9d.d.ts → rand-COS4_E1g.d.ts} +1 -1
- package/dist/{rand-D7nfeD1p.d.cts → rand-D1JqpR-p.d.cts} +1 -1
- package/dist/{svg-DPJMUSNt.d.cts → svg-RcixtBFR.d.cts} +2 -2
- package/dist/{svg-CnDCpIy9.d.ts → svg-nWBJEpnk.d.ts} +2 -2
- package/dist/{tools-Ca0kI1qo.d.cts → tools-CL82d7nw.d.cts} +1 -1
- package/dist/{tools-B0wXP5cF.d.ts → tools-DrxgDnXY.d.ts} +1 -1
- package/dist/vector/index.cjs +994 -954
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +44 -18
- package/dist/vector/index.d.ts +44 -18
- package/dist/vector/index.js +54 -14
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +5 -4
- package/dist/video-editor/index.d.ts +5 -4
- package/dist/{warp-C7rMWUgW.d.cts → warp-CHi_P_G6.d.cts} +1 -1
- package/dist/{warp-Doasjpyr.d.ts → warp-CPaHULUL.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +4 -2
- package/dist/chunk-SXOTFV3V.cjs.map +0 -1
- package/dist/chunk-V45ZTW4R.js.map +0 -1
- /package/dist/{chunk-OV7253FC.js.map → chunk-NI6RORDS.js.map} +0 -0
- /package/dist/{chunk-QBARQGSG.js.map → chunk-QEIN6JQO.js.map} +0 -0
|
@@ -89,7 +89,7 @@ var _chunkG5NMLUVFcjs = require('./chunk-G5NMLUVF.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
var
|
|
92
|
+
var _chunkXFXHA5MUcjs = require('./chunk-XFXHA5MU.cjs');
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
@@ -3262,7 +3262,7 @@ function mapAnchor(a, f) {
|
|
|
3262
3262
|
return out;
|
|
3263
3263
|
}
|
|
3264
3264
|
function mapSubpaths(subpaths, f) {
|
|
3265
|
-
return
|
|
3265
|
+
return _chunkXFXHA5MUcjs.expandVectorCorners.call(void 0, subpaths).map((sp) => ({ closed: sp.closed, anchors: sp.anchors.map((a) => mapAnchor(a, f)) }));
|
|
3266
3266
|
}
|
|
3267
3267
|
function liveShapeSubpaths(live) {
|
|
3268
3268
|
let out;
|
|
@@ -3270,19 +3270,19 @@ function liveShapeSubpaths(live) {
|
|
|
3270
3270
|
case "rect": {
|
|
3271
3271
|
const x = Math.min(live.x, live.x + live.width);
|
|
3272
3272
|
const y = Math.min(live.y, live.y + live.height);
|
|
3273
|
-
const sp =
|
|
3273
|
+
const sp = _chunkXFXHA5MUcjs.rectSubpath.call(void 0, { x, y, width: Math.abs(live.width), height: Math.abs(live.height) });
|
|
3274
3274
|
const r = _nullishCoalesce(live.radii, () => ( [0, 0, 0, 0]));
|
|
3275
|
-
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ?
|
|
3275
|
+
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ? _chunkXFXHA5MUcjs.setAnchorCorner.call(void 0, a, r[i]) : a) }];
|
|
3276
3276
|
break;
|
|
3277
3277
|
}
|
|
3278
3278
|
case "ellipse":
|
|
3279
|
-
out = [
|
|
3279
|
+
out = [_chunkXFXHA5MUcjs.ellipseSubpath.call(void 0, normBox(live))];
|
|
3280
3280
|
break;
|
|
3281
3281
|
case "polygon":
|
|
3282
|
-
out = [
|
|
3282
|
+
out = [_chunkXFXHA5MUcjs.polygonSubpath.call(void 0, normBox(live), live.sides)];
|
|
3283
3283
|
break;
|
|
3284
3284
|
case "star":
|
|
3285
|
-
out = [
|
|
3285
|
+
out = [_chunkXFXHA5MUcjs.starSubpath.call(void 0, normBox(live), live.points, Math.max(0, Math.min(1, live.innerRatio)))];
|
|
3286
3286
|
break;
|
|
3287
3287
|
case "line": {
|
|
3288
3288
|
const a = { x: live.x1, y: live.y1 };
|
|
@@ -3305,7 +3305,7 @@ function liveShapeSubpaths(live) {
|
|
|
3305
3305
|
}
|
|
3306
3306
|
}
|
|
3307
3307
|
const m = live.transform;
|
|
3308
|
-
return m && !
|
|
3308
|
+
return m && !_chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, m) ? mapSubpaths(out, (p) => _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, p)) : out;
|
|
3309
3309
|
}
|
|
3310
3310
|
function normBox(b) {
|
|
3311
3311
|
return { x: Math.min(b.x, b.x + b.width), y: Math.min(b.y, b.y + b.height), width: Math.abs(b.width), height: Math.abs(b.height) };
|
|
@@ -3317,7 +3317,7 @@ var pathCache = /* @__PURE__ */ new WeakMap();
|
|
|
3317
3317
|
function componentPath(c) {
|
|
3318
3318
|
let p = pathCache.get(c.subpaths);
|
|
3319
3319
|
if (!p) {
|
|
3320
|
-
p =
|
|
3320
|
+
p = _chunkXFXHA5MUcjs.subpathsToBezier.call(void 0, c.subpaths);
|
|
3321
3321
|
pathCache.set(c.subpaths, p);
|
|
3322
3322
|
}
|
|
3323
3323
|
return p;
|
|
@@ -3640,7 +3640,7 @@ function matrixArg(v, path) {
|
|
|
3640
3640
|
if (!Array.isArray(v) || v.length !== 6 || !v.every(isNum)) fail2(`${path} must be six numbers [a, b, c, d, e, f].`);
|
|
3641
3641
|
const m = v;
|
|
3642
3642
|
if (Math.abs(m[0] * m[3] - m[1] * m[2]) < 1e-12) fail2(`${path} is singular.`);
|
|
3643
|
-
return
|
|
3643
|
+
return _chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, m) ? void 0 : [...m];
|
|
3644
3644
|
}
|
|
3645
3645
|
function normalizeLiveShape(v, path = "shape") {
|
|
3646
3646
|
if (!v || typeof v !== "object") return fail2(`${path} must be an object with kind ${LIVE_SHAPE_KINDS.join(", ")}.`);
|
|
@@ -3701,7 +3701,7 @@ function normalizeSubpaths(v, path = "subpaths") {
|
|
|
3701
3701
|
if (typeof v === "string") {
|
|
3702
3702
|
let subs;
|
|
3703
3703
|
try {
|
|
3704
|
-
subs =
|
|
3704
|
+
subs = _chunkXFXHA5MUcjs.bezierToSubpaths.call(void 0, v);
|
|
3705
3705
|
} catch (e5) {
|
|
3706
3706
|
return fail2(`${path}: could not read the SVG path data.`);
|
|
3707
3707
|
}
|
|
@@ -3787,15 +3787,15 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
|
|
|
3787
3787
|
function transformShapeComponents(components, f, affine) {
|
|
3788
3788
|
return components.map((c) => {
|
|
3789
3789
|
if (affine && c.live) {
|
|
3790
|
-
const live = { ...c.live, transform:
|
|
3791
|
-
if (
|
|
3790
|
+
const live = { ...c.live, transform: _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _nullishCoalesce(c.live.transform, () => ( _chunkXFXHA5MUcjs.IDENTITY_MATRIX)), affine) };
|
|
3791
|
+
if (_chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, live.transform)) delete live.transform;
|
|
3792
3792
|
return { op: c.op, subpaths: liveShapeSubpaths(live), live };
|
|
3793
3793
|
}
|
|
3794
3794
|
return { op: c.op, subpaths: mapSubpaths(c.subpaths, f) };
|
|
3795
3795
|
});
|
|
3796
3796
|
}
|
|
3797
3797
|
function offsetShape(layer, dx, dy, env) {
|
|
3798
|
-
const m =
|
|
3798
|
+
const m = _chunkXFXHA5MUcjs.translateMatrix.call(void 0, dx, dy);
|
|
3799
3799
|
const next = { ...layer, components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), m) };
|
|
3800
3800
|
delete next.annotation;
|
|
3801
3801
|
return rerenderShape(next, env);
|
|
@@ -3803,7 +3803,7 @@ function offsetShape(layer, dx, dy, env) {
|
|
|
3803
3803
|
function mergeShapeComponents(components, fillRule = "nonzero") {
|
|
3804
3804
|
if (components.length < 2) return [...components];
|
|
3805
3805
|
const path = shapeOutline(components, fillRule);
|
|
3806
|
-
const subpaths =
|
|
3806
|
+
const subpaths = _chunkXFXHA5MUcjs.bezierToSubpaths.call(void 0, path);
|
|
3807
3807
|
if (!subpaths.length) fail2("The components combine to nothing (the operations remove every area), so there is nothing to merge into.");
|
|
3808
3808
|
return [{ op: "combine", subpaths }];
|
|
3809
3809
|
}
|
|
@@ -3820,7 +3820,7 @@ function annotationPaint(color, opacity) {
|
|
|
3820
3820
|
function shapeFromAnnotation(a) {
|
|
3821
3821
|
const opacity = _nullishCoalesce(a.opacity, () => ( 1));
|
|
3822
3822
|
const lineWidth = "strokeWidth" in a && a.strokeWidth > 0 ? a.strokeWidth : 1;
|
|
3823
|
-
const rotation = a.rotation ?
|
|
3823
|
+
const rotation = a.rotation ? _chunkXFXHA5MUcjs.rotateMatrix.call(void 0, a.rotation, { x: a.x, y: a.y }) : void 0;
|
|
3824
3824
|
const t = rotation ? { transform: rotation } : {};
|
|
3825
3825
|
const live = (l) => liveComponent(l);
|
|
3826
3826
|
switch (a.type) {
|
|
@@ -3863,7 +3863,7 @@ function shapeFromAnnotation(a) {
|
|
|
3863
3863
|
case "pen": {
|
|
3864
3864
|
const paint = annotationPaint(a.strokeColor, opacity);
|
|
3865
3865
|
if (!paint) return null;
|
|
3866
|
-
const pts = rotation ? a.points.map((p) =>
|
|
3866
|
+
const pts = rotation ? a.points.map((p) => _chunkXFXHA5MUcjs.applyMatrix.call(void 0, rotation, p)) : a.points;
|
|
3867
3867
|
const subpaths = pts.length > 1 ? [{ closed: false, anchors: pts.map((p) => ({ x: p.x, y: p.y })) }] : [];
|
|
3868
3868
|
return {
|
|
3869
3869
|
components: [{ op: "combine", subpaths }],
|
|
@@ -3896,7 +3896,7 @@ var fail3 = (message) => {
|
|
|
3896
3896
|
};
|
|
3897
3897
|
var TEXT_RENDER_MARGIN = _chunkAEAAN4ADcjs.MAX_EFFECT_REACH;
|
|
3898
3898
|
function textMatrix(layer) {
|
|
3899
|
-
return _nullishCoalesce(layer.transform, () => (
|
|
3899
|
+
return _nullishCoalesce(layer.transform, () => ( _chunkXFXHA5MUcjs.IDENTITY_MATRIX));
|
|
3900
3900
|
}
|
|
3901
3901
|
function rectCorners(r) {
|
|
3902
3902
|
return [
|
|
@@ -3907,7 +3907,7 @@ function rectCorners(r) {
|
|
|
3907
3907
|
];
|
|
3908
3908
|
}
|
|
3909
3909
|
function docRect(r, m) {
|
|
3910
|
-
const pts = rectCorners(r).map((p) =>
|
|
3910
|
+
const pts = rectCorners(r).map((p) => _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, p));
|
|
3911
3911
|
const x0 = Math.floor(Math.min(...pts.map((p) => p.x)));
|
|
3912
3912
|
const y0 = Math.floor(Math.min(...pts.map((p) => p.y)));
|
|
3913
3913
|
const x1 = Math.ceil(Math.max(...pts.map((p) => p.x)));
|
|
@@ -3940,14 +3940,14 @@ function inkBounds(layout) {
|
|
|
3940
3940
|
}
|
|
3941
3941
|
function textOutlines(layer, shaper) {
|
|
3942
3942
|
if (!shaper.outline) fail3(`The text shaper "${shaper.id}" cannot give glyph outlines; plug in an outline shaper (createOutlineTextShaper) to convert text to shapes.`);
|
|
3943
|
-
const layout =
|
|
3943
|
+
const layout = _chunkXFXHA5MUcjs.layoutText.call(void 0, layer, shaper);
|
|
3944
3944
|
const m = textMatrix(layer);
|
|
3945
3945
|
const out = [];
|
|
3946
3946
|
for (const l of layout.lines) {
|
|
3947
3947
|
for (const f of l.fragments) {
|
|
3948
|
-
let path =
|
|
3949
|
-
for (const r of
|
|
3950
|
-
out.push({ fragment: f, path:
|
|
3948
|
+
let path = _chunkXFXHA5MUcjs.textFragmentOutline.call(void 0, shaper, layer.text, f);
|
|
3949
|
+
for (const r of _chunkXFXHA5MUcjs.textDecorations.call(void 0, f, l)) path = [...path, ..._chunkXFXHA5MUcjs.textRectPath.call(void 0, r)];
|
|
3950
|
+
out.push({ fragment: f, path: _chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, m) ? path : _chunkBJTCSLF6cjs.transformBezierPath.call(void 0, path, m) });
|
|
3951
3951
|
}
|
|
3952
3952
|
}
|
|
3953
3953
|
return out;
|
|
@@ -4003,7 +4003,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4003
4003
|
const canvas = env.createCanvas(region.width, region.height);
|
|
4004
4004
|
const ctx = canvas.getContext("2d");
|
|
4005
4005
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
4006
|
-
const layout =
|
|
4006
|
+
const layout = _chunkXFXHA5MUcjs.layoutText.call(void 0, layer, shaper);
|
|
4007
4007
|
const m = textMatrix(layer);
|
|
4008
4008
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
4009
4009
|
ctx.clearRect(0, 0, region.width, region.height);
|
|
@@ -4015,8 +4015,8 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4015
4015
|
ctx.globalAlpha = _nullishCoalesce(f.style.opacity, () => ( 1));
|
|
4016
4016
|
const s = layer.text.slice(f.start, f.end);
|
|
4017
4017
|
if (!f.spaced) shaper.draw(ctx, s, f.font, f.x, f.y);
|
|
4018
|
-
else for (let k = 0; k < s.length; k++) if (!
|
|
4019
|
-
for (const d of
|
|
4018
|
+
else for (let k = 0; k < s.length; k++) if (!_chunkXFXHA5MUcjs.isTextSpace.call(void 0, s[k])) shaper.draw(ctx, s[k], f.font, f.x + f.carets[k], f.y);
|
|
4019
|
+
for (const d of _chunkXFXHA5MUcjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
|
|
4020
4020
|
}
|
|
4021
4021
|
}
|
|
4022
4022
|
ctx.globalAlpha = 1;
|
|
@@ -4027,7 +4027,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4027
4027
|
function renderText(layer, env) {
|
|
4028
4028
|
const shaper = env.shaper;
|
|
4029
4029
|
if (!shaper || !shaper.outline && !shaper.draw) return null;
|
|
4030
|
-
const layout =
|
|
4030
|
+
const layout = _chunkXFXHA5MUcjs.layoutText.call(void 0, layer, shaper);
|
|
4031
4031
|
const ink = inkBounds(layout);
|
|
4032
4032
|
const clip = { x: -TEXT_RENDER_MARGIN, y: -TEXT_RENDER_MARGIN, width: env.width + 2 * TEXT_RENDER_MARGIN, height: env.height + 2 * TEXT_RENDER_MARGIN };
|
|
4033
4033
|
const region = ink ? intersect2(docRect(ink, textMatrix(layer)), clip) : null;
|
|
@@ -4122,7 +4122,7 @@ function patchParagraphStyle(base, patch, path = "paragraph") {
|
|
|
4122
4122
|
continue;
|
|
4123
4123
|
}
|
|
4124
4124
|
const value = k === "autoLeading" ? num(v, `${path}.${k}`, 0.1, 10) : num(v, `${path}.${k}`, -1e4, 1e4);
|
|
4125
|
-
if (k === "autoLeading" && value ===
|
|
4125
|
+
if (k === "autoLeading" && value === _chunkXFXHA5MUcjs.DEFAULT_AUTO_LEADING || k !== "autoLeading" && value === 0) delete o[k];
|
|
4126
4126
|
else o[k] = value;
|
|
4127
4127
|
} else fail3(`${path}.${k} is not a paragraph style field; use ${PARAGRAPH_STYLE_FIELDS.join(", ")}.`);
|
|
4128
4128
|
}
|
|
@@ -4159,14 +4159,14 @@ function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
|
|
|
4159
4159
|
opacity: 1,
|
|
4160
4160
|
blend: "normal",
|
|
4161
4161
|
text: text3,
|
|
4162
|
-
runs:
|
|
4163
|
-
paragraphs:
|
|
4162
|
+
runs: _chunkXFXHA5MUcjs.fitRuns.call(void 0, init.runs, text3.length, _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE),
|
|
4163
|
+
paragraphs: _chunkXFXHA5MUcjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
|
|
4164
4164
|
frame: init.frame,
|
|
4165
4165
|
surface: _chunkO7LUD7MHcjs.emptySurface.call(void 0, 4),
|
|
4166
4166
|
offset: { x: 0, y: 0 }
|
|
4167
4167
|
};
|
|
4168
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _61 => _61.runs, 'access', _62 => _62[0], 'optionalAccess', _63 => _63.style]), () => (
|
|
4169
|
-
if (init.transform && !
|
|
4168
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _61 => _61.runs, 'access', _62 => _62[0], 'optionalAccess', _63 => _63.style]), () => ( _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE)) }];
|
|
4169
|
+
if (init.transform && !_chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, init.transform)) layer.transform = init.transform;
|
|
4170
4170
|
if (lenient && !renderText(layer, env)) return { ...layer, rendering: "stored" };
|
|
4171
4171
|
return rerenderText(layer, env);
|
|
4172
4172
|
}
|
|
@@ -4176,24 +4176,24 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
|
|
|
4176
4176
|
const patch = change(current);
|
|
4177
4177
|
const next = { ...current, ...patch };
|
|
4178
4178
|
if (!("annotation" in patch)) delete next.annotation;
|
|
4179
|
-
if ("text" in patch || "runs" in patch) next.runs =
|
|
4180
|
-
if (!next.runs.length) next.runs = [{ length: 0, style:
|
|
4181
|
-
if ("text" in patch || "paragraphs" in patch) next.paragraphs =
|
|
4179
|
+
if ("text" in patch || "runs" in patch) next.runs = _chunkXFXHA5MUcjs.fitRuns.call(void 0, next.runs, next.text.length, _nullishCoalesce(_optionalChain([current, 'access', _64 => _64.runs, 'access', _65 => _65[0], 'optionalAccess', _66 => _66.style]), () => ( _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE)));
|
|
4180
|
+
if (!next.runs.length) next.runs = [{ length: 0, style: _chunkXFXHA5MUcjs.styleAt.call(void 0, current.runs, 0, _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE) }];
|
|
4181
|
+
if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkXFXHA5MUcjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
|
|
4182
4182
|
const rendered = rerenderText(next, env);
|
|
4183
4183
|
return { layers: _chunkAEAAN4ADcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
|
|
4184
4184
|
}
|
|
4185
4185
|
function replaceTextRange(layer, start, end, insert) {
|
|
4186
4186
|
const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
|
|
4187
|
-
const style =
|
|
4188
|
-
const runs =
|
|
4189
|
-
const pstyle =
|
|
4190
|
-
const paragraphs =
|
|
4191
|
-
return { text: text3, runs, paragraphs:
|
|
4187
|
+
const style = _chunkXFXHA5MUcjs.styleAt.call(void 0, layer.runs, start > 0 && start === layer.text.length ? start - 1 : start, _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE);
|
|
4188
|
+
const runs = _chunkXFXHA5MUcjs.spliceRuns.call(void 0, layer.runs, start, end, insert.length, style);
|
|
4189
|
+
const pstyle = _chunkXFXHA5MUcjs.styleAt.call(void 0, layer.paragraphs, start, {});
|
|
4190
|
+
const paragraphs = _chunkXFXHA5MUcjs.spliceRuns.call(void 0, layer.paragraphs, start, end, insert.length, pstyle);
|
|
4191
|
+
return { text: text3, runs, paragraphs: _chunkXFXHA5MUcjs.fitParagraphRuns.call(void 0, paragraphs, text3) };
|
|
4192
4192
|
}
|
|
4193
4193
|
function transformTypeLayer(layer, m) {
|
|
4194
|
-
const t =
|
|
4194
|
+
const t = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, textMatrix(layer), m);
|
|
4195
4195
|
const next = { ...layer };
|
|
4196
|
-
if (
|
|
4196
|
+
if (_chunkXFXHA5MUcjs.isIdentityMatrix.call(void 0, t)) delete next.transform;
|
|
4197
4197
|
else next.transform = t;
|
|
4198
4198
|
delete next.annotation;
|
|
4199
4199
|
return next;
|
|
@@ -4201,7 +4201,7 @@ function transformTypeLayer(layer, m) {
|
|
|
4201
4201
|
function typeFrame(layer, shaper) {
|
|
4202
4202
|
if (layer.frame.kind === "box") return { x: 0, y: 0, width: layer.frame.width, height: layer.frame.height };
|
|
4203
4203
|
if (!shaper) return fail3("Type layers need a text shaper to be measured; none is set here.");
|
|
4204
|
-
const b =
|
|
4204
|
+
const b = _chunkXFXHA5MUcjs.layoutText.call(void 0, layer, shaper).bounds;
|
|
4205
4205
|
return { x: b.x, y: b.y, width: Math.max(b.width, 1), height: Math.max(b.height, 1) };
|
|
4206
4206
|
}
|
|
4207
4207
|
function typeAsPixelLayer(layer) {
|
|
@@ -4209,7 +4209,7 @@ function typeAsPixelLayer(layer) {
|
|
|
4209
4209
|
return { ...rest, type: "pixel", surface: layer.surface, offset: { x: 0, y: 0 } };
|
|
4210
4210
|
}
|
|
4211
4211
|
function toTextSpace(layer, p) {
|
|
4212
|
-
return
|
|
4212
|
+
return _chunkXFXHA5MUcjs.applyMatrix.call(void 0, _chunkXFXHA5MUcjs.invertMatrix.call(void 0, textMatrix(layer)), p);
|
|
4213
4213
|
}
|
|
4214
4214
|
function typeFromAnnotation(a) {
|
|
4215
4215
|
if (a.type !== "text") return null;
|
|
@@ -4223,7 +4223,7 @@ function typeFromAnnotation(a) {
|
|
|
4223
4223
|
if (op !== 1) style.opacity = op;
|
|
4224
4224
|
const text3 = t.text.replace(/\r?\n|\r/g, " ");
|
|
4225
4225
|
const translate = [1, 0, 0, 1, t.x, t.y];
|
|
4226
|
-
const transform = t.rotation ?
|
|
4226
|
+
const transform = t.rotation ? _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, translate, _chunkXFXHA5MUcjs.rotateMatrix.call(void 0, t.rotation, { x: t.x, y: t.y })) : translate;
|
|
4227
4227
|
return { text: text3, runs: [{ length: text3.length, style }], frame: { kind: "point", origin: "top" }, transform };
|
|
4228
4228
|
}
|
|
4229
4229
|
function annotationOfType(layer) {
|
|
@@ -4557,7 +4557,7 @@ function identityTransform(box2) {
|
|
|
4557
4557
|
}
|
|
4558
4558
|
function cornersFromMatrix(box2, m) {
|
|
4559
4559
|
const q2 = _chunkMUUXNRU4cjs.boxQuad.call(void 0, box2);
|
|
4560
|
-
return [
|
|
4560
|
+
return [_chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[0]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[1]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[2]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
4561
4561
|
}
|
|
4562
4562
|
function matrixFromCorners(box2, corners, eps = 1e-6) {
|
|
4563
4563
|
const [tl, tr, br, bl] = corners;
|
|
@@ -4574,7 +4574,7 @@ function transformHomography(geometry) {
|
|
|
4574
4574
|
function hasWarp(geometry) {
|
|
4575
4575
|
const w = geometry.warp;
|
|
4576
4576
|
if (!w) return false;
|
|
4577
|
-
const id =
|
|
4577
|
+
const id = _chunkXFXHA5MUcjs.identityWarpMesh.call(void 0, geometry.box, w.us.length - 1, w.vs.length - 1);
|
|
4578
4578
|
if (id.points.length !== w.points.length || id.us.some((u, i) => Math.abs(u - w.us[i]) > 1e-12) || id.vs.some((v, i) => Math.abs(v - w.vs[i]) > 1e-12)) return true;
|
|
4579
4579
|
return w.points.some((p, i) => Math.abs(p.x - id.points[i].x) > 1e-6 || Math.abs(p.y - id.points[i].y) > 1e-6);
|
|
4580
4580
|
}
|
|
@@ -4589,7 +4589,7 @@ function transformMap(geometry) {
|
|
|
4589
4589
|
const { box: box2 } = geometry;
|
|
4590
4590
|
const warp = hasWarp(geometry) ? geometry.warp : null;
|
|
4591
4591
|
if (!warp) return (p) => _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p);
|
|
4592
|
-
return (p) => _chunkMUUXNRU4cjs.applyHomography.call(void 0, h,
|
|
4592
|
+
return (p) => _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, _chunkXFXHA5MUcjs.evalWarpMesh.call(void 0, warp, (p.x - box2.x) / box2.width, (p.y - box2.y) / box2.height));
|
|
4593
4593
|
}
|
|
4594
4594
|
function transformedPoint(geometry, fx, fy) {
|
|
4595
4595
|
const f = transformMap(geometry);
|
|
@@ -4633,8 +4633,8 @@ function matrixFromParams(box2, params) {
|
|
|
4633
4633
|
const tx = Math.tan((_nullishCoalesce(params.skewX, () => ( 0))) * Math.PI / 180);
|
|
4634
4634
|
const ty = Math.tan((_nullishCoalesce(params.skewY, () => ( 0))) * Math.PI / 180);
|
|
4635
4635
|
const ref = referencePoint(box2, params.reference);
|
|
4636
|
-
const linear =
|
|
4637
|
-
return
|
|
4636
|
+
const linear = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, [1, ty, tx, 1, 0, 0], [sx, 0, 0, sy, 0, 0]), _chunkXFXHA5MUcjs.rotateMatrix.call(void 0, _nullishCoalesce(params.rotate, () => ( 0))));
|
|
4637
|
+
return _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, _chunkXFXHA5MUcjs.matrixAbout.call(void 0, linear, ref), _chunkXFXHA5MUcjs.translateMatrix.call(void 0, _nullishCoalesce(params.dx, () => ( 0)), _nullishCoalesce(params.dy, () => ( 0))));
|
|
4638
4638
|
}
|
|
4639
4639
|
function describeTransform(geometry, reference = "center") {
|
|
4640
4640
|
const m = hasWarp(geometry) ? null : matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -4651,7 +4651,7 @@ function describeTransform(geometry, reference = "center") {
|
|
|
4651
4651
|
const shear = sxAbs ? (a * c + b * d) / sxAbs : 0;
|
|
4652
4652
|
const sy = sxAbs ? (a * d - b * c) / sxAbs : 0;
|
|
4653
4653
|
const skew = sxAbs ? Math.atan(shear / sxAbs) * 180 / Math.PI : 0;
|
|
4654
|
-
const at =
|
|
4654
|
+
const at = _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, ref);
|
|
4655
4655
|
const clean = (v) => Math.abs(v) < 1e-9 ? 0 : v;
|
|
4656
4656
|
return {
|
|
4657
4657
|
affine: true,
|
|
@@ -4669,24 +4669,24 @@ function applyParams(geometry, params) {
|
|
|
4669
4669
|
const ref = params.reference && typeof params.reference === "object" ? params.reference : anchorPoint(geometry, _nullishCoalesce(params.reference, () => ( "center")));
|
|
4670
4670
|
const m = matrixFromParams({ x: ref.x, y: ref.y, width: 0, height: 0 }, { ...params, reference: ref });
|
|
4671
4671
|
const c = geometry.corners;
|
|
4672
|
-
return [
|
|
4672
|
+
return [_chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, c[0]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, c[1]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, c[2]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, c[3])];
|
|
4673
4673
|
}
|
|
4674
4674
|
function flipCorners(geometry, axis) {
|
|
4675
4675
|
const c = anchorPoint(geometry, "center");
|
|
4676
4676
|
const m = axis === "horizontal" ? [-1, 0, 0, 1, 2 * c.x, 0] : [1, 0, 0, -1, 0, 2 * c.y];
|
|
4677
4677
|
const q2 = geometry.corners;
|
|
4678
|
-
return [
|
|
4678
|
+
return [_chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[0]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[1]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[2]), _chunkXFXHA5MUcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
4679
4679
|
}
|
|
4680
4680
|
function boxPointOf(geometry, p) {
|
|
4681
4681
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
4682
|
-
if (m) return
|
|
4682
|
+
if (m) return _chunkXFXHA5MUcjs.applyMatrix.call(void 0, _chunkXFXHA5MUcjs.invertMatrix.call(void 0, m), p);
|
|
4683
4683
|
return null;
|
|
4684
4684
|
}
|
|
4685
4685
|
function presetWarp(box2, preset) {
|
|
4686
|
-
return
|
|
4686
|
+
return _chunkXFXHA5MUcjs.warpPresetMesh.call(void 0, preset, box2);
|
|
4687
4687
|
}
|
|
4688
4688
|
function isValidWarp(mesh) {
|
|
4689
|
-
return
|
|
4689
|
+
return _chunkXFXHA5MUcjs.isValidWarpMesh.call(void 0, mesh);
|
|
4690
4690
|
}
|
|
4691
4691
|
function geometryHomography(geometry) {
|
|
4692
4692
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -4952,7 +4952,7 @@ function normalizePlacement(raw, contents) {
|
|
|
4952
4952
|
}
|
|
4953
4953
|
const out = { corners: c.map((p) => ({ x: p.x, y: p.y })) };
|
|
4954
4954
|
if (raw.warp) {
|
|
4955
|
-
if (!
|
|
4955
|
+
if (!_chunkXFXHA5MUcjs.isValidWarpMesh.call(void 0, raw.warp)) fail4("warp must be a mesh with us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels.");
|
|
4956
4956
|
out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
4957
4957
|
}
|
|
4958
4958
|
if (raw.interpolation !== void 0) {
|
|
@@ -5055,7 +5055,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5055
5055
|
case "shape": {
|
|
5056
5056
|
const next = {
|
|
5057
5057
|
...layer,
|
|
5058
|
-
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }),
|
|
5058
|
+
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkXFXHA5MUcjs.translateMatrix.call(void 0, dx, dy)),
|
|
5059
5059
|
surface: _chunkO7LUD7MHcjs.translateSurface.call(void 0, layer.surface, dx, dy),
|
|
5060
5060
|
mask: moveMask(layer.mask)
|
|
5061
5061
|
};
|
|
@@ -5064,7 +5064,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5064
5064
|
return next;
|
|
5065
5065
|
}
|
|
5066
5066
|
case "type": {
|
|
5067
|
-
const next = { ...transformTypeLayer(layer,
|
|
5067
|
+
const next = { ...transformTypeLayer(layer, _chunkXFXHA5MUcjs.translateMatrix.call(void 0, dx, dy)), surface: _chunkO7LUD7MHcjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
|
|
5068
5068
|
if (!next.mask) delete next.mask;
|
|
5069
5069
|
return next;
|
|
5070
5070
|
}
|
|
@@ -5250,7 +5250,7 @@ function refitPlacement(layer, contents) {
|
|
|
5250
5250
|
});
|
|
5251
5251
|
const out = { corners: pts };
|
|
5252
5252
|
if (layer.placement.interpolation) out.interpolation = layer.placement.interpolation;
|
|
5253
|
-
if (layer.placement.warp) out.warp =
|
|
5253
|
+
if (layer.placement.warp) out.warp = _chunkXFXHA5MUcjs.mapWarpMeshPoints.call(void 0, layer.placement.warp, (p) => ({ x: p.x * W1 / W0, y: p.y * H1 / H0 }));
|
|
5254
5254
|
return out;
|
|
5255
5255
|
}
|
|
5256
5256
|
function normalizeSmartFilter(raw, id = newLayerId("flt")) {
|
|
@@ -5564,7 +5564,7 @@ function readType(r, base, ctx) {
|
|
|
5564
5564
|
const text3 = normalizeText(_nullishCoalesce(r.text, () => ( "")));
|
|
5565
5565
|
const runs = (Array.isArray(r.runs) ? r.runs : []).map((run, i) => ({
|
|
5566
5566
|
length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess', _139 => _139.length]), 0, 1e9, 0))),
|
|
5567
|
-
style: patchTextStyle(
|
|
5567
|
+
style: patchTextStyle(_chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _140 => _140.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
|
|
5568
5568
|
}));
|
|
5569
5569
|
const paragraphs = (Array.isArray(r.paragraphs) ? r.paragraphs : []).map((p, i) => ({
|
|
5570
5570
|
length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess', _141 => _141.length]), 0, 1e9, 0))),
|
|
@@ -5577,13 +5577,13 @@ function readType(r, base, ctx) {
|
|
|
5577
5577
|
...base,
|
|
5578
5578
|
type: "type",
|
|
5579
5579
|
text: text3,
|
|
5580
|
-
runs:
|
|
5581
|
-
paragraphs:
|
|
5580
|
+
runs: _chunkXFXHA5MUcjs.fitRuns.call(void 0, runs, text3.length, _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE),
|
|
5581
|
+
paragraphs: _chunkXFXHA5MUcjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
|
|
5582
5582
|
frame,
|
|
5583
5583
|
surface: _chunkO7LUD7MHcjs.emptySurface.call(void 0, 4),
|
|
5584
5584
|
offset: { x: 0, y: 0 }
|
|
5585
5585
|
};
|
|
5586
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.style]), () => (
|
|
5586
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.style]), () => ( _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE)) }];
|
|
5587
5587
|
if (m) layer.transform = m;
|
|
5588
5588
|
if (r.antiAlias === false) layer.antiAlias = false;
|
|
5589
5589
|
if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num2(r.fillOpacity, 0, 1, 1);
|
|
@@ -6036,7 +6036,7 @@ function readSmartObject(r, base, ctx) {
|
|
|
6036
6036
|
let placement;
|
|
6037
6037
|
try {
|
|
6038
6038
|
const raw = { corners: p.corners };
|
|
6039
|
-
if (p.warp &&
|
|
6039
|
+
if (p.warp && _chunkXFXHA5MUcjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
|
|
6040
6040
|
if (_chunkAEAAN4ADcjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
|
|
6041
6041
|
placement = normalizePlacement(raw, contents);
|
|
6042
6042
|
} catch (e) {
|
|
@@ -7019,7 +7019,7 @@ function vectorBlockForComponents(components, inverted, width, height, flags = 0
|
|
|
7019
7019
|
const fr = (p) => ({ x: p.x / w, y: p.y / h });
|
|
7020
7020
|
const subpaths = [];
|
|
7021
7021
|
components.forEach((c, ci) => {
|
|
7022
|
-
|
|
7022
|
+
_chunkXFXHA5MUcjs.expandVectorCorners.call(void 0, c.subpaths).forEach((sp, si) => {
|
|
7023
7023
|
if (!sp.anchors.length) return;
|
|
7024
7024
|
subpaths.push({
|
|
7025
7025
|
closed: sp.closed,
|
|
@@ -7741,7 +7741,7 @@ function merged(levels) {
|
|
|
7741
7741
|
function charStyle(d, fonts, notes) {
|
|
7742
7742
|
const n = (k) => eNum(eGet(d, k));
|
|
7743
7743
|
const flag = (k) => eBool(eGet(d, k));
|
|
7744
|
-
const s = { ...
|
|
7744
|
+
const s = { ..._chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE };
|
|
7745
7745
|
const fi = n("Font");
|
|
7746
7746
|
const ps = fi !== void 0 ? fonts[fi] : void 0;
|
|
7747
7747
|
if (ps) {
|
|
@@ -7824,7 +7824,7 @@ function typeFromTySh(data, notes) {
|
|
|
7824
7824
|
}
|
|
7825
7825
|
const edText = _nullishCoalesce(eStr(ePath(_nullishCoalesce(engine, () => ( void 0)), ["EngineDict", "Editor", "Text"])), () => ( ""));
|
|
7826
7826
|
const text3 = (_nullishCoalesce(txt, () => ( edText.replace(/\r$/, "")))).replace(/\r\n?/g, "\n");
|
|
7827
|
-
let runs = [{ length: text3.length, style: { ...
|
|
7827
|
+
let runs = [{ length: text3.length, style: { ..._chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE } }];
|
|
7828
7828
|
let paragraphs = [{ length: text3.length, style: {} }];
|
|
7829
7829
|
let frame = { kind: "point" };
|
|
7830
7830
|
let transform = t.transform;
|
|
@@ -7880,14 +7880,14 @@ function typeFromTySh(data, notes) {
|
|
|
7880
7880
|
const b = eArray(ePath(shape, ["Cookie", "Photoshop", "BoxBounds"])).map((v) => _nullishCoalesce(eNum(v), () => ( 0)));
|
|
7881
7881
|
if (b.length === 4 && b[2] > b[0] && b[3] > b[1]) {
|
|
7882
7882
|
frame = { kind: "box", width: b[2] - b[0], height: b[3] - b[1] };
|
|
7883
|
-
transform =
|
|
7883
|
+
transform = _chunkXFXHA5MUcjs.multiplyMatrices.call(void 0, [1, 0, 0, 1, b[0], b[1]], t.transform);
|
|
7884
7884
|
}
|
|
7885
7885
|
}
|
|
7886
7886
|
}
|
|
7887
7887
|
return {
|
|
7888
7888
|
text: text3,
|
|
7889
|
-
runs:
|
|
7890
|
-
paragraphs:
|
|
7889
|
+
runs: _chunkXFXHA5MUcjs.fitRuns.call(void 0, runs, text3.length, _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE),
|
|
7890
|
+
paragraphs: _chunkXFXHA5MUcjs.fitParagraphRuns.call(void 0, paragraphs, text3),
|
|
7891
7891
|
frame,
|
|
7892
7892
|
transform,
|
|
7893
7893
|
antiAlias,
|
|
@@ -7961,7 +7961,7 @@ function buildEngineData(layer, template) {
|
|
|
7961
7961
|
fonts.push(ps);
|
|
7962
7962
|
return fonts.length - 1;
|
|
7963
7963
|
};
|
|
7964
|
-
const runs =
|
|
7964
|
+
const runs = _chunkXFXHA5MUcjs.fitRuns.call(void 0, layer.runs, layer.text.length, _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE);
|
|
7965
7965
|
const sruns = [];
|
|
7966
7966
|
const slens = [];
|
|
7967
7967
|
runs.forEach((r, i) => {
|
|
@@ -7969,10 +7969,10 @@ function buildEngineData(layer, template) {
|
|
|
7969
7969
|
slens.push(E.int(r.length + (i === runs.length - 1 ? 1 : 0)));
|
|
7970
7970
|
});
|
|
7971
7971
|
if (!runs.length) {
|
|
7972
|
-
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(
|
|
7972
|
+
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(_chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE, fontIndex(postScriptFor(_chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE)))]])]]));
|
|
7973
7973
|
slens.push(E.int(1));
|
|
7974
7974
|
}
|
|
7975
|
-
const paras =
|
|
7975
|
+
const paras = _chunkXFXHA5MUcjs.fitParagraphRuns.call(void 0, layer.paragraphs, layer.text);
|
|
7976
7976
|
const pruns = [];
|
|
7977
7977
|
const plens = [];
|
|
7978
7978
|
paras.forEach((p, i) => {
|
|
@@ -8028,7 +8028,7 @@ function buildEngineData(layer, template) {
|
|
|
8028
8028
|
eSet(e, key, rd);
|
|
8029
8029
|
}
|
|
8030
8030
|
eSet(rd, "FontSet", fontSet);
|
|
8031
|
-
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _211 => _211[0], 'optionalAccess', _212 => _212.style]), () => (
|
|
8031
|
+
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _211 => _211[0], 'optionalAccess', _212 => _212.style]), () => ( _chunkXFXHA5MUcjs.DEFAULT_TEXT_STYLE)), 0)]])]));
|
|
8032
8032
|
if (!eGet(rd, "ParagraphSheetSet")) eSet(rd, "ParagraphSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["DefaultStyleSheet", E.int(0)], ["Properties", paragraphProperties({})]])]));
|
|
8033
8033
|
if (!eGet(rd, "TheNormalStyleSheet")) eSet(rd, "TheNormalStyleSheet", E.int(0));
|
|
8034
8034
|
if (!eGet(rd, "TheNormalParagraphSheet")) eSet(rd, "TheNormalParagraphSheet", E.int(0));
|
|
@@ -8039,13 +8039,13 @@ function inkBounds2(layer) {
|
|
|
8039
8039
|
if (layer.frame.kind === "box") return [0, 0, layer.frame.width, layer.frame.height];
|
|
8040
8040
|
const b = _chunkO7LUD7MHcjs.contentBounds.call(void 0, layer.surface);
|
|
8041
8041
|
if (!b) return [0, 0, 0, 0];
|
|
8042
|
-
const inv =
|
|
8042
|
+
const inv = _chunkXFXHA5MUcjs.invertMatrix.call(void 0, textMatrix(layer));
|
|
8043
8043
|
const pts = [
|
|
8044
8044
|
{ x: b.x, y: b.y },
|
|
8045
8045
|
{ x: b.x + b.width, y: b.y },
|
|
8046
8046
|
{ x: b.x + b.width, y: b.y + b.height },
|
|
8047
8047
|
{ x: b.x, y: b.y + b.height }
|
|
8048
|
-
].map((p) =>
|
|
8048
|
+
].map((p) => _chunkXFXHA5MUcjs.applyMatrix.call(void 0, inv, p));
|
|
8049
8049
|
return [Math.min(...pts.map((p) => p.x)), Math.min(...pts.map((p) => p.y)), Math.max(...pts.map((p) => p.x)), Math.max(...pts.map((p) => p.y))];
|
|
8050
8050
|
}
|
|
8051
8051
|
function tyShForLayer(layer) {
|
|
@@ -8512,7 +8512,7 @@ function filterMaskItem(placed, mask, area) {
|
|
|
8512
8512
|
var warpStyleOf = (name) => {
|
|
8513
8513
|
if (!name.startsWith("warp")) return null;
|
|
8514
8514
|
const s = _optionalChain([name, 'access', _226 => _226[4], 'optionalAccess', _227 => _227.toLowerCase, 'call', _228 => _228()]) + name.slice(5);
|
|
8515
|
-
return
|
|
8515
|
+
return _chunkXFXHA5MUcjs.WARP_STYLES.includes(s) ? s : null;
|
|
8516
8516
|
};
|
|
8517
8517
|
function warpFromDescriptor(w, contents) {
|
|
8518
8518
|
const full = { x: 0, y: 0, width: contents.width, height: contents.height };
|
|
@@ -8542,7 +8542,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
8542
8542
|
} else {
|
|
8543
8543
|
const style = warpStyleOf(styleName);
|
|
8544
8544
|
if (!style) return void 0;
|
|
8545
|
-
mesh =
|
|
8545
|
+
mesh = _chunkXFXHA5MUcjs.warpPresetMesh.call(void 0,
|
|
8546
8546
|
{
|
|
8547
8547
|
style,
|
|
8548
8548
|
bend: _nullishCoalesce(descNumber(w, "warpValue"), () => ( 0)),
|
|
@@ -8557,7 +8557,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
8557
8557
|
const same = Math.abs(bounds.x) < 1e-6 && Math.abs(bounds.y) < 1e-6 && Math.abs(bounds.width - contents.width) < 1e-6 && Math.abs(bounds.height - contents.height) < 1e-6;
|
|
8558
8558
|
if (!same) {
|
|
8559
8559
|
const m = mesh;
|
|
8560
|
-
mesh =
|
|
8560
|
+
mesh = _chunkXFXHA5MUcjs.fitWarpMesh.call(void 0, (s, t) => _chunkXFXHA5MUcjs.evalWarpMesh.call(void 0, m, (s * contents.width - bounds.x) / bounds.width, (t * contents.height - bounds.y) / bounds.height), [0, 1], [0, 1]);
|
|
8561
8561
|
}
|
|
8562
8562
|
return { mesh, frame };
|
|
8563
8563
|
}
|
|
@@ -10133,7 +10133,7 @@ function importSmart(ctx, rec, name, notes, props) {
|
|
|
10133
10133
|
if (placement && (size.width !== contents.width || size.height !== contents.height)) {
|
|
10134
10134
|
const kx = contents.width / size.width;
|
|
10135
10135
|
const ky = contents.height / size.height;
|
|
10136
|
-
if (placement.warp) placement = { ...placement, warp:
|
|
10136
|
+
if (placement.warp) placement = { ...placement, warp: _chunkXFXHA5MUcjs.mapWarpMeshPoints.call(void 0, placement.warp, (p) => ({ x: p.x * kx, y: p.y * ky })) };
|
|
10137
10137
|
}
|
|
10138
10138
|
}
|
|
10139
10139
|
if (!contents || !placement) {
|
|
@@ -11803,4 +11803,4 @@ function exportPsd(input) {
|
|
|
11803
11803
|
|
|
11804
11804
|
|
|
11805
11805
|
exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.SELECTION_MODES = SELECTION_MODES; exports.isSelectionMode = isSelectionMode; exports.parseSelectionMode = parseSelectionMode; exports.computeSelectionBounds = computeSelectionBounds; exports.createSelectionMask = createSelectionMask; exports.fullSelection = fullSelection; exports.isSelectionEmpty = isSelectionEmpty; exports.selectionValueAt = selectionValueAt; exports.coverageToByte = coverageToByte; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionToCoverage = selectionToCoverage; exports.selectionArea = selectionArea; exports.combineSelections = combineSelections; exports.invertSelection = invertSelection; exports.resizeSelection = resizeSelection; exports.selectionFromPixels = selectionFromPixels; exports.selectionToPixels = selectionToPixels; exports.encodeSelectionRle = encodeSelectionRle; exports.decodeSelectionRle = decodeSelectionRle; exports.serializeSelection = serializeSelection; exports.deserializeSelection = deserializeSelection; exports.hashMaskContent = hashMaskContent; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.distanceTransform = distanceTransform; exports.expandCoverage = expandCoverage; exports.contractCoverage = contractCoverage; exports.borderCoverage = borderCoverage; exports.smoothCoverage = smoothCoverage; exports.featherCoverage = featherCoverage; exports.greyMorphology = greyMorphology; exports.shiftCoverage = shiftCoverage; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.modifySelection = modifySelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyLegacyFloat = applyLegacyFloat; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.LayerOperationError = LayerOperationError; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
|
|
11806
|
-
//# sourceMappingURL=chunk-
|
|
11806
|
+
//# sourceMappingURL=chunk-PMEHFHSP.cjs.map
|