@pixerate/editor 0.245.0 → 0.248.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 +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/{brushstrokeRender-QA5WVIDT.cjs → brushstrokeRender-DTDPFBLC.cjs} +5 -5
- package/dist/{brushstrokeRender-4542T5HP.js → brushstrokeRender-QLCXROJK.js} +2 -2
- package/dist/canvas/index.cjs +8 -8
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-OSTKS3YN.js → chunk-5GLYUSNT.js} +1 -1
- package/dist/{chunk-4T47Z4J3.cjs → chunk-6G6ZDDDB.cjs} +400 -27
- package/dist/chunk-7T7JWTVE.cjs +192 -0
- package/dist/{chunk-SD23XMVJ.cjs → chunk-IBDU6EGZ.cjs} +35 -35
- package/dist/{chunk-IZL5V5RK.cjs → chunk-L6REDLNB.cjs} +2 -2
- package/dist/{chunk-L5PB7EG3.js → chunk-NZ3O3A5C.js} +1 -1
- package/dist/{chunk-4EQY4TZJ.js → chunk-Q2HA52V4.js} +1 -1
- package/dist/chunk-SC2RZ5EF.js +192 -0
- package/dist/{chunk-HZ547SGQ.cjs → chunk-TPWB4Y6L.cjs} +1 -1
- package/dist/{chunk-TBJEMELS.js → chunk-VNBUDVD4.js} +398 -25
- package/dist/{chunk-M6JORA5Z.cjs → chunk-WVS5KQDH.cjs} +442 -87
- package/dist/{chunk-5RFENYO5.js → chunk-XNRBMYNB.js} +1 -1
- package/dist/{chunk-BDIH4DYR.cjs → chunk-XWTRATIM.cjs} +23 -23
- package/dist/{chunk-7YQNKSQ7.js → chunk-ZFSLEOSQ.js} +357 -2
- package/dist/image-editor/effect-tools.d.cts +37 -4
- package/dist/image-editor/effect-tools.d.ts +37 -4
- package/dist/image-editor/index.cjs +1059 -1552
- package/dist/image-editor/index.d.cts +1 -1
- package/dist/image-editor/index.d.ts +1 -1
- package/dist/image-editor/index.js +275 -768
- package/dist/paint-editor/controller.d.cts +34 -1
- package/dist/paint-editor/controller.d.ts +34 -1
- package/dist/paint-editor/index.cjs +426 -257
- package/dist/paint-editor/index.js +184 -15
- package/dist/paint-editor/procedural.d.cts +82 -5
- package/dist/paint-editor/procedural.d.ts +82 -5
- package/dist/paint-editor/tools.d.cts +1 -1
- package/dist/paint-editor/tools.d.ts +1 -1
- package/dist/paint-editor/ui.d.cts +15 -2
- package/dist/paint-editor/ui.d.ts +15 -2
- package/dist/{image-editor/layers/effects-ui.d.cts → raster/effects/ui.d.cts} +32 -5
- package/dist/{image-editor/layers/effects-ui.d.ts → raster/effects/ui.d.ts} +32 -5
- package/dist/raster/index.cjs +13 -1
- package/dist/raster/index.d.cts +1 -0
- package/dist/raster/index.d.ts +1 -0
- package/dist/raster/index.js +12 -0
- package/dist/vector/index.cjs +962 -962
- package/dist/vector/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +18 -27
- package/skills/pixerate-paint-editor/references/gradient-paint.md +23 -0
- package/skills/pixerate-paint-editor/references/layer-effects.md +28 -0
- package/skills/pixerate-paint-editor/references/light-paint.md +10 -2
- package/skills/pixerate-paint-editor/references/particle-brushes.md +66 -0
|
@@ -43,6 +43,8 @@ var _chunkSS53NNZOcjs = require('./chunk-SS53NNZO.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
|
|
47
|
+
|
|
46
48
|
|
|
47
49
|
|
|
48
50
|
|
|
@@ -104,7 +106,7 @@ var _chunkBROJYMWUcjs = require('./chunk-BROJYMWU.cjs');
|
|
|
104
106
|
|
|
105
107
|
|
|
106
108
|
|
|
107
|
-
var
|
|
109
|
+
var _chunkL6REDLNBcjs = require('./chunk-L6REDLNB.cjs');
|
|
108
110
|
|
|
109
111
|
|
|
110
112
|
|
|
@@ -129,6 +131,7 @@ var _chunkGF2RBSDMcjs = require('./chunk-GF2RBSDM.cjs');
|
|
|
129
131
|
|
|
130
132
|
|
|
131
133
|
|
|
134
|
+
|
|
132
135
|
var _chunkOLNIPTB3cjs = require('./chunk-OLNIPTB3.cjs');
|
|
133
136
|
|
|
134
137
|
|
|
@@ -2323,7 +2326,7 @@ function mapAnchor(a, f) {
|
|
|
2323
2326
|
return out;
|
|
2324
2327
|
}
|
|
2325
2328
|
function mapSubpaths(subpaths, f) {
|
|
2326
|
-
return
|
|
2329
|
+
return _chunkL6REDLNBcjs.expandVectorCorners.call(void 0, subpaths).map((sp) => ({ closed: sp.closed, anchors: sp.anchors.map((a) => mapAnchor(a, f)) }));
|
|
2327
2330
|
}
|
|
2328
2331
|
function liveShapeSubpaths(live) {
|
|
2329
2332
|
let out;
|
|
@@ -2331,19 +2334,19 @@ function liveShapeSubpaths(live) {
|
|
|
2331
2334
|
case "rect": {
|
|
2332
2335
|
const x = Math.min(live.x, live.x + live.width);
|
|
2333
2336
|
const y = Math.min(live.y, live.y + live.height);
|
|
2334
|
-
const sp =
|
|
2337
|
+
const sp = _chunkL6REDLNBcjs.rectSubpath.call(void 0, { x, y, width: Math.abs(live.width), height: Math.abs(live.height) });
|
|
2335
2338
|
const r = _nullishCoalesce(live.radii, () => ( [0, 0, 0, 0]));
|
|
2336
|
-
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ?
|
|
2339
|
+
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ? _chunkL6REDLNBcjs.setAnchorCorner.call(void 0, a, r[i]) : a) }];
|
|
2337
2340
|
break;
|
|
2338
2341
|
}
|
|
2339
2342
|
case "ellipse":
|
|
2340
|
-
out = [
|
|
2343
|
+
out = [_chunkL6REDLNBcjs.ellipseSubpath.call(void 0, normBox(live))];
|
|
2341
2344
|
break;
|
|
2342
2345
|
case "polygon":
|
|
2343
|
-
out = [
|
|
2346
|
+
out = [_chunkL6REDLNBcjs.polygonSubpath.call(void 0, normBox(live), live.sides)];
|
|
2344
2347
|
break;
|
|
2345
2348
|
case "star":
|
|
2346
|
-
out = [
|
|
2349
|
+
out = [_chunkL6REDLNBcjs.starSubpath.call(void 0, normBox(live), live.points, Math.max(0, Math.min(1, live.innerRatio)))];
|
|
2347
2350
|
break;
|
|
2348
2351
|
case "line": {
|
|
2349
2352
|
const a = { x: live.x1, y: live.y1 };
|
|
@@ -2366,7 +2369,7 @@ function liveShapeSubpaths(live) {
|
|
|
2366
2369
|
}
|
|
2367
2370
|
}
|
|
2368
2371
|
const m = live.transform;
|
|
2369
|
-
return m && !
|
|
2372
|
+
return m && !_chunkL6REDLNBcjs.isIdentityMatrix.call(void 0, m) ? mapSubpaths(out, (p) => _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, p)) : out;
|
|
2370
2373
|
}
|
|
2371
2374
|
function normBox(b) {
|
|
2372
2375
|
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) };
|
|
@@ -2378,7 +2381,7 @@ var pathCache = /* @__PURE__ */ new WeakMap();
|
|
|
2378
2381
|
function componentPath(c) {
|
|
2379
2382
|
let p = pathCache.get(c.subpaths);
|
|
2380
2383
|
if (!p) {
|
|
2381
|
-
p =
|
|
2384
|
+
p = _chunkL6REDLNBcjs.subpathsToBezier.call(void 0, c.subpaths);
|
|
2382
2385
|
pathCache.set(c.subpaths, p);
|
|
2383
2386
|
}
|
|
2384
2387
|
return p;
|
|
@@ -2705,7 +2708,7 @@ function matrixArg(v, path) {
|
|
|
2705
2708
|
if (!Array.isArray(v) || v.length !== 6 || !v.every(isNum)) fail(`${path} must be six numbers [a, b, c, d, e, f].`);
|
|
2706
2709
|
const m = v;
|
|
2707
2710
|
if (Math.abs(m[0] * m[3] - m[1] * m[2]) < 1e-12) fail(`${path} is singular.`);
|
|
2708
|
-
return
|
|
2711
|
+
return _chunkL6REDLNBcjs.isIdentityMatrix.call(void 0, m) ? void 0 : [...m];
|
|
2709
2712
|
}
|
|
2710
2713
|
function normalizeLiveShape(v, path = "shape") {
|
|
2711
2714
|
if (!v || typeof v !== "object") return fail(`${path} must be an object with kind ${LIVE_SHAPE_KINDS.join(", ")}.`);
|
|
@@ -2766,7 +2769,7 @@ function normalizeSubpaths(v, path = "subpaths") {
|
|
|
2766
2769
|
if (typeof v === "string") {
|
|
2767
2770
|
let subs;
|
|
2768
2771
|
try {
|
|
2769
|
-
subs =
|
|
2772
|
+
subs = _chunkL6REDLNBcjs.bezierToSubpaths.call(void 0, v);
|
|
2770
2773
|
} catch (e5) {
|
|
2771
2774
|
return fail(`${path}: could not read the SVG path data.`);
|
|
2772
2775
|
}
|
|
@@ -2852,15 +2855,15 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
|
|
|
2852
2855
|
function transformShapeComponents(components, f, affine) {
|
|
2853
2856
|
return components.map((c) => {
|
|
2854
2857
|
if (affine && c.live) {
|
|
2855
|
-
const live = { ...c.live, transform:
|
|
2856
|
-
if (
|
|
2858
|
+
const live = { ...c.live, transform: _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, _nullishCoalesce(c.live.transform, () => ( _chunkL6REDLNBcjs.IDENTITY_MATRIX)), affine) };
|
|
2859
|
+
if (_chunkL6REDLNBcjs.isIdentityMatrix.call(void 0, live.transform)) delete live.transform;
|
|
2857
2860
|
return { op: c.op, subpaths: liveShapeSubpaths(live), live };
|
|
2858
2861
|
}
|
|
2859
2862
|
return { op: c.op, subpaths: mapSubpaths(c.subpaths, f) };
|
|
2860
2863
|
});
|
|
2861
2864
|
}
|
|
2862
2865
|
function offsetShape(layer, dx, dy, env) {
|
|
2863
|
-
const m =
|
|
2866
|
+
const m = _chunkL6REDLNBcjs.translateMatrix.call(void 0, dx, dy);
|
|
2864
2867
|
const next = { ...layer, components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), m) };
|
|
2865
2868
|
delete next.annotation;
|
|
2866
2869
|
return rerenderShape(next, env);
|
|
@@ -2868,7 +2871,7 @@ function offsetShape(layer, dx, dy, env) {
|
|
|
2868
2871
|
function mergeShapeComponents(components, fillRule = "nonzero") {
|
|
2869
2872
|
if (components.length < 2) return [...components];
|
|
2870
2873
|
const path = shapeOutline(components, fillRule);
|
|
2871
|
-
const subpaths =
|
|
2874
|
+
const subpaths = _chunkL6REDLNBcjs.bezierToSubpaths.call(void 0, path);
|
|
2872
2875
|
if (!subpaths.length) fail("The components combine to nothing (the operations remove every area), so there is nothing to merge into.");
|
|
2873
2876
|
return [{ op: "combine", subpaths }];
|
|
2874
2877
|
}
|
|
@@ -2885,7 +2888,7 @@ function annotationPaint(color, opacity) {
|
|
|
2885
2888
|
function shapeFromAnnotation(a) {
|
|
2886
2889
|
const opacity = _nullishCoalesce(a.opacity, () => ( 1));
|
|
2887
2890
|
const lineWidth = "strokeWidth" in a && a.strokeWidth > 0 ? a.strokeWidth : 1;
|
|
2888
|
-
const rotation = a.rotation ?
|
|
2891
|
+
const rotation = a.rotation ? _chunkL6REDLNBcjs.rotateMatrix.call(void 0, a.rotation, { x: a.x, y: a.y }) : void 0;
|
|
2889
2892
|
const t = rotation ? { transform: rotation } : {};
|
|
2890
2893
|
const live = (l) => liveComponent(l);
|
|
2891
2894
|
switch (a.type) {
|
|
@@ -2928,7 +2931,7 @@ function shapeFromAnnotation(a) {
|
|
|
2928
2931
|
case "pen": {
|
|
2929
2932
|
const paint = annotationPaint(a.strokeColor, opacity);
|
|
2930
2933
|
if (!paint) return null;
|
|
2931
|
-
const pts = rotation ? a.points.map((p) =>
|
|
2934
|
+
const pts = rotation ? a.points.map((p) => _chunkL6REDLNBcjs.applyMatrix.call(void 0, rotation, p)) : a.points;
|
|
2932
2935
|
const subpaths = pts.length > 1 ? [{ closed: false, anchors: pts.map((p) => ({ x: p.x, y: p.y })) }] : [];
|
|
2933
2936
|
return {
|
|
2934
2937
|
components: [{ op: "combine", subpaths }],
|
|
@@ -2961,7 +2964,7 @@ var JOIN_SIGMA = 2;
|
|
|
2961
2964
|
function vectorMaskSegments(components) {
|
|
2962
2965
|
const out = [];
|
|
2963
2966
|
components.forEach((c, ci) => c.subpaths.forEach((sp, si) => {
|
|
2964
|
-
for (let k = 0; k <
|
|
2967
|
+
for (let k = 0; k < _chunkL6REDLNBcjs.subpathSegmentCount.call(void 0, sp); k++) out.push({ component: ci, subpath: si, segment: k });
|
|
2965
2968
|
}));
|
|
2966
2969
|
return out;
|
|
2967
2970
|
}
|
|
@@ -2969,7 +2972,7 @@ function validVectorMaskEdges(edges, components) {
|
|
|
2969
2972
|
if (!_optionalChain([edges, 'optionalAccess', _34 => _34.length])) return [];
|
|
2970
2973
|
return edges.filter((e) => {
|
|
2971
2974
|
const sp = _optionalChain([components, 'access', _35 => _35[e.component], 'optionalAccess', _36 => _36.subpaths, 'access', _37 => _37[e.subpath]]);
|
|
2972
|
-
return Boolean(sp) && e.segment >= 0 && e.segment <
|
|
2975
|
+
return Boolean(sp) && e.segment >= 0 && e.segment < _chunkL6REDLNBcjs.subpathSegmentCount.call(void 0, sp);
|
|
2973
2976
|
});
|
|
2974
2977
|
}
|
|
2975
2978
|
function reach(e) {
|
|
@@ -2992,8 +2995,8 @@ function hybridVectorMaskCoverage(vm, hard, width, height, guide) {
|
|
|
2992
2995
|
const seedClass = [];
|
|
2993
2996
|
vm.components.forEach(
|
|
2994
2997
|
(c, ci) => c.subpaths.forEach((sp, si) => {
|
|
2995
|
-
for (let k = 0; k <
|
|
2996
|
-
const seg =
|
|
2998
|
+
for (let k = 0; k < _chunkL6REDLNBcjs.subpathSegmentCount.call(void 0, sp); k++) {
|
|
2999
|
+
const seg = _chunkL6REDLNBcjs.subpathSegment.call(void 0, sp, k);
|
|
2997
3000
|
let len = 0;
|
|
2998
3001
|
for (let i = 1; i < seg.length; i++) len += Math.hypot(seg[i][0] - seg[i - 1][0], seg[i][1] - seg[i - 1][1]);
|
|
2999
3002
|
const steps = Math.max(2, Math.ceil(len * 2));
|
|
@@ -3893,7 +3896,7 @@ var fail3 = (message) => {
|
|
|
3893
3896
|
};
|
|
3894
3897
|
var TEXT_RENDER_MARGIN = _chunkHB4ICNNAcjs.MAX_EFFECT_REACH;
|
|
3895
3898
|
function textMatrix(layer) {
|
|
3896
|
-
return _nullishCoalesce(layer.transform, () => (
|
|
3899
|
+
return _nullishCoalesce(layer.transform, () => ( _chunkL6REDLNBcjs.IDENTITY_MATRIX));
|
|
3897
3900
|
}
|
|
3898
3901
|
function rectCorners(r) {
|
|
3899
3902
|
return [
|
|
@@ -3904,7 +3907,7 @@ function rectCorners(r) {
|
|
|
3904
3907
|
];
|
|
3905
3908
|
}
|
|
3906
3909
|
function docRect(r, m) {
|
|
3907
|
-
const pts = rectCorners(r).map((p) =>
|
|
3910
|
+
const pts = rectCorners(r).map((p) => _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, p));
|
|
3908
3911
|
const x0 = Math.floor(Math.min(...pts.map((p) => p.x)));
|
|
3909
3912
|
const y0 = Math.floor(Math.min(...pts.map((p) => p.y)));
|
|
3910
3913
|
const x1 = Math.ceil(Math.max(...pts.map((p) => p.x)));
|
|
@@ -3924,7 +3927,7 @@ function inkBounds(layout) {
|
|
|
3924
3927
|
for (const f of l.fragments) {
|
|
3925
3928
|
const pad = f.style.fontSize * (l.matrix ? 1 : 0.5);
|
|
3926
3929
|
const w = f.carets[f.carets.length - 1];
|
|
3927
|
-
const r =
|
|
3930
|
+
const r = _chunkL6REDLNBcjs.transformTextRect.call(void 0, l.matrix, { x: f.x - pad, y: l.baseline - l.ascent - pad + Math.min(0, f.y - l.baseline), width: w + 2 * pad, height: l.ascent + l.descent + 2 * pad + Math.abs(f.y - l.baseline) });
|
|
3928
3931
|
if (!b) b = r;
|
|
3929
3932
|
else {
|
|
3930
3933
|
const x0 = Math.min(b.x, r.x);
|
|
@@ -3937,14 +3940,14 @@ function inkBounds(layout) {
|
|
|
3937
3940
|
}
|
|
3938
3941
|
function textOutlines(layer, shaper) {
|
|
3939
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.`);
|
|
3940
|
-
const layout =
|
|
3943
|
+
const layout = _chunkL6REDLNBcjs.layoutText.call(void 0, layer, shaper);
|
|
3941
3944
|
const m = textMatrix(layer);
|
|
3942
3945
|
const out = [];
|
|
3943
3946
|
for (const l of layout.lines) {
|
|
3944
3947
|
for (const f of l.fragments) {
|
|
3945
|
-
let path =
|
|
3946
|
-
for (const r of
|
|
3947
|
-
out.push({ fragment: f, path:
|
|
3948
|
+
let path = _chunkL6REDLNBcjs.textFragmentOutline.call(void 0, shaper, layer.text, f);
|
|
3949
|
+
for (const r of _chunkL6REDLNBcjs.textDecorations.call(void 0, f, l)) path = [...path, ..._chunkL6REDLNBcjs.textRectPath.call(void 0, r)];
|
|
3950
|
+
out.push({ fragment: f, path: _chunkL6REDLNBcjs.isIdentityMatrix.call(void 0, m) ? path : _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, path, m) });
|
|
3948
3951
|
}
|
|
3949
3952
|
}
|
|
3950
3953
|
return out;
|
|
@@ -4000,7 +4003,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4000
4003
|
const canvas = env.createCanvas(region.width, region.height);
|
|
4001
4004
|
const ctx = canvas.getContext("2d");
|
|
4002
4005
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
4003
|
-
const layout =
|
|
4006
|
+
const layout = _chunkL6REDLNBcjs.layoutText.call(void 0, layer, shaper);
|
|
4004
4007
|
const m = textMatrix(layer);
|
|
4005
4008
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
4006
4009
|
ctx.clearRect(0, 0, region.width, region.height);
|
|
@@ -4010,8 +4013,8 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4010
4013
|
const [r, g, b] = rgbOf(f.style.color);
|
|
4011
4014
|
ctx.fillStyle = `rgb(${r}, ${g}, ${b})`;
|
|
4012
4015
|
ctx.globalAlpha = _nullishCoalesce(f.style.opacity, () => ( 1));
|
|
4013
|
-
|
|
4014
|
-
for (const d of
|
|
4016
|
+
_chunkL6REDLNBcjs.drawTextFragment.call(void 0, ctx, shaper, layer.text, f);
|
|
4017
|
+
for (const d of _chunkL6REDLNBcjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
|
|
4015
4018
|
}
|
|
4016
4019
|
}
|
|
4017
4020
|
ctx.globalAlpha = 1;
|
|
@@ -4022,7 +4025,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4022
4025
|
function renderText(layer, env) {
|
|
4023
4026
|
const shaper = env.shaper;
|
|
4024
4027
|
if (!shaper || !shaper.outline && !shaper.draw) return null;
|
|
4025
|
-
const layout =
|
|
4028
|
+
const layout = _chunkL6REDLNBcjs.layoutText.call(void 0, layer, shaper);
|
|
4026
4029
|
const ink = inkBounds(layout);
|
|
4027
4030
|
const clip = { x: -TEXT_RENDER_MARGIN, y: -TEXT_RENDER_MARGIN, width: env.width + 2 * TEXT_RENDER_MARGIN, height: env.height + 2 * TEXT_RENDER_MARGIN };
|
|
4028
4031
|
const region = ink ? intersect2(docRect(ink, textMatrix(layer)), clip) : null;
|
|
@@ -4123,7 +4126,7 @@ function patchParagraphStyle(base, patch, path = "paragraph") {
|
|
|
4123
4126
|
continue;
|
|
4124
4127
|
}
|
|
4125
4128
|
const value = k === "autoLeading" ? num(v, `${path}.${k}`, 0.1, 10) : num(v, `${path}.${k}`, -1e4, 1e4);
|
|
4126
|
-
if (k === "autoLeading" && value ===
|
|
4129
|
+
if (k === "autoLeading" && value === _chunkL6REDLNBcjs.DEFAULT_AUTO_LEADING || k !== "autoLeading" && value === 0) delete o[k];
|
|
4127
4130
|
else o[k] = value;
|
|
4128
4131
|
} else fail3(`${path}.${k} is not a paragraph style field; use ${PARAGRAPH_STYLE_FIELDS.join(", ")}.`);
|
|
4129
4132
|
}
|
|
@@ -4164,15 +4167,15 @@ function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
|
|
|
4164
4167
|
opacity: 1,
|
|
4165
4168
|
blend: "normal",
|
|
4166
4169
|
text: text3,
|
|
4167
|
-
runs:
|
|
4168
|
-
paragraphs:
|
|
4170
|
+
runs: _chunkL6REDLNBcjs.fitRuns.call(void 0, init.runs, text3.length, _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE),
|
|
4171
|
+
paragraphs: _chunkL6REDLNBcjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
|
|
4169
4172
|
frame: init.frame,
|
|
4170
4173
|
...init.orientation === "vertical" ? { orientation: "vertical" } : {},
|
|
4171
4174
|
surface: _chunk474IQG74cjs.emptySurface.call(void 0, 4),
|
|
4172
4175
|
offset: { x: 0, y: 0 }
|
|
4173
4176
|
};
|
|
4174
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _79 => _79.runs, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.style]), () => (
|
|
4175
|
-
if (init.transform && !
|
|
4177
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _79 => _79.runs, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.style]), () => ( _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE)) }];
|
|
4178
|
+
if (init.transform && !_chunkL6REDLNBcjs.isIdentityMatrix.call(void 0, init.transform)) layer.transform = init.transform;
|
|
4176
4179
|
if (lenient && !renderText(layer, env)) return { ...layer, rendering: "stored" };
|
|
4177
4180
|
return rerenderText(layer, env);
|
|
4178
4181
|
}
|
|
@@ -4183,24 +4186,24 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
|
|
|
4183
4186
|
const next = { ...current, ...patch };
|
|
4184
4187
|
if (!("annotation" in patch)) delete next.annotation;
|
|
4185
4188
|
if (next.orientation !== "vertical") delete next.orientation;
|
|
4186
|
-
if ("text" in patch || "runs" in patch) next.runs =
|
|
4187
|
-
if (!next.runs.length) next.runs = [{ length: 0, style:
|
|
4188
|
-
if ("text" in patch || "paragraphs" in patch) next.paragraphs =
|
|
4189
|
+
if ("text" in patch || "runs" in patch) next.runs = _chunkL6REDLNBcjs.fitRuns.call(void 0, next.runs, next.text.length, _nullishCoalesce(_optionalChain([current, 'access', _82 => _82.runs, 'access', _83 => _83[0], 'optionalAccess', _84 => _84.style]), () => ( _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE)));
|
|
4190
|
+
if (!next.runs.length) next.runs = [{ length: 0, style: _chunkL6REDLNBcjs.styleAt.call(void 0, current.runs, 0, _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE) }];
|
|
4191
|
+
if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkL6REDLNBcjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
|
|
4189
4192
|
const rendered = rerenderText(next, env);
|
|
4190
4193
|
return { layers: _chunkHB4ICNNAcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
|
|
4191
4194
|
}
|
|
4192
4195
|
function replaceTextRange(layer, start, end, insert) {
|
|
4193
4196
|
const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
|
|
4194
|
-
const style =
|
|
4195
|
-
const runs =
|
|
4196
|
-
const pstyle =
|
|
4197
|
-
const paragraphs =
|
|
4198
|
-
return { text: text3, runs, paragraphs:
|
|
4197
|
+
const style = _chunkL6REDLNBcjs.styleAt.call(void 0, layer.runs, start > 0 && start === layer.text.length ? start - 1 : start, _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE);
|
|
4198
|
+
const runs = _chunkL6REDLNBcjs.spliceRuns.call(void 0, layer.runs, start, end, insert.length, style);
|
|
4199
|
+
const pstyle = _chunkL6REDLNBcjs.styleAt.call(void 0, layer.paragraphs, start, {});
|
|
4200
|
+
const paragraphs = _chunkL6REDLNBcjs.spliceRuns.call(void 0, layer.paragraphs, start, end, insert.length, pstyle);
|
|
4201
|
+
return { text: text3, runs, paragraphs: _chunkL6REDLNBcjs.fitParagraphRuns.call(void 0, paragraphs, text3) };
|
|
4199
4202
|
}
|
|
4200
4203
|
function transformTypeLayer(layer, m) {
|
|
4201
|
-
const t =
|
|
4204
|
+
const t = _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, textMatrix(layer), m);
|
|
4202
4205
|
const next = { ...layer };
|
|
4203
|
-
if (
|
|
4206
|
+
if (_chunkL6REDLNBcjs.isIdentityMatrix.call(void 0, t)) delete next.transform;
|
|
4204
4207
|
else next.transform = t;
|
|
4205
4208
|
delete next.annotation;
|
|
4206
4209
|
return next;
|
|
@@ -4208,7 +4211,7 @@ function transformTypeLayer(layer, m) {
|
|
|
4208
4211
|
function typeFrame(layer, shaper) {
|
|
4209
4212
|
if (layer.frame.kind === "box") return { x: 0, y: 0, width: layer.frame.width, height: layer.frame.height };
|
|
4210
4213
|
if (!shaper) return fail3("Type layers need a text shaper to be measured; none is set here.");
|
|
4211
|
-
const b =
|
|
4214
|
+
const b = _chunkL6REDLNBcjs.layoutText.call(void 0, layer, shaper).bounds;
|
|
4212
4215
|
return { x: b.x, y: b.y, width: Math.max(b.width, 1), height: Math.max(b.height, 1) };
|
|
4213
4216
|
}
|
|
4214
4217
|
function typeAsPixelLayer(layer) {
|
|
@@ -4216,7 +4219,7 @@ function typeAsPixelLayer(layer) {
|
|
|
4216
4219
|
return { ...rest, type: "pixel", surface: layer.surface, offset: { x: 0, y: 0 } };
|
|
4217
4220
|
}
|
|
4218
4221
|
function toTextSpace(layer, p) {
|
|
4219
|
-
return
|
|
4222
|
+
return _chunkL6REDLNBcjs.applyMatrix.call(void 0, _chunkL6REDLNBcjs.invertMatrix.call(void 0, textMatrix(layer)), p);
|
|
4220
4223
|
}
|
|
4221
4224
|
function typeFromAnnotation(a) {
|
|
4222
4225
|
if (a.type !== "text") return null;
|
|
@@ -4230,7 +4233,7 @@ function typeFromAnnotation(a) {
|
|
|
4230
4233
|
if (op !== 1) style.opacity = op;
|
|
4231
4234
|
const text3 = t.text.replace(/\r?\n|\r/g, " ");
|
|
4232
4235
|
const translate = [1, 0, 0, 1, t.x, t.y];
|
|
4233
|
-
const transform = t.rotation ?
|
|
4236
|
+
const transform = t.rotation ? _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, translate, _chunkL6REDLNBcjs.rotateMatrix.call(void 0, t.rotation, { x: t.x, y: t.y })) : translate;
|
|
4234
4237
|
return { text: text3, runs: [{ length: text3.length, style }], frame: { kind: "point", origin: "top" }, transform };
|
|
4235
4238
|
}
|
|
4236
4239
|
function annotationOfType(layer) {
|
|
@@ -4564,7 +4567,7 @@ function identityTransform(box2) {
|
|
|
4564
4567
|
}
|
|
4565
4568
|
function cornersFromMatrix(box2, m) {
|
|
4566
4569
|
const q2 = _chunkQT26RHKKcjs.boxQuad.call(void 0, box2);
|
|
4567
|
-
return [
|
|
4570
|
+
return [_chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[0]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[1]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[2]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
4568
4571
|
}
|
|
4569
4572
|
function matrixFromCorners(box2, corners, eps = 1e-6) {
|
|
4570
4573
|
const [tl, tr, br, bl] = corners;
|
|
@@ -4581,7 +4584,7 @@ function transformHomography(geometry) {
|
|
|
4581
4584
|
function hasWarp(geometry) {
|
|
4582
4585
|
const w = geometry.warp;
|
|
4583
4586
|
if (!w) return false;
|
|
4584
|
-
const id =
|
|
4587
|
+
const id = _chunkL6REDLNBcjs.identityWarpMesh.call(void 0, geometry.box, w.us.length - 1, w.vs.length - 1);
|
|
4585
4588
|
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;
|
|
4586
4589
|
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);
|
|
4587
4590
|
}
|
|
@@ -4596,7 +4599,7 @@ function transformMap(geometry) {
|
|
|
4596
4599
|
const { box: box2 } = geometry;
|
|
4597
4600
|
const warp = hasWarp(geometry) ? geometry.warp : null;
|
|
4598
4601
|
if (!warp) return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h, p);
|
|
4599
|
-
return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h,
|
|
4602
|
+
return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h, _chunkL6REDLNBcjs.evalWarpMesh.call(void 0, warp, (p.x - box2.x) / box2.width, (p.y - box2.y) / box2.height));
|
|
4600
4603
|
}
|
|
4601
4604
|
function transformedPoint(geometry, fx, fy) {
|
|
4602
4605
|
const f = transformMap(geometry);
|
|
@@ -4640,8 +4643,8 @@ function matrixFromParams(box2, params) {
|
|
|
4640
4643
|
const tx = Math.tan((_nullishCoalesce(params.skewX, () => ( 0))) * Math.PI / 180);
|
|
4641
4644
|
const ty = Math.tan((_nullishCoalesce(params.skewY, () => ( 0))) * Math.PI / 180);
|
|
4642
4645
|
const ref = referencePoint(box2, params.reference);
|
|
4643
|
-
const linear =
|
|
4644
|
-
return
|
|
4646
|
+
const linear = _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, [1, ty, tx, 1, 0, 0], [sx, 0, 0, sy, 0, 0]), _chunkL6REDLNBcjs.rotateMatrix.call(void 0, _nullishCoalesce(params.rotate, () => ( 0))));
|
|
4647
|
+
return _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, _chunkL6REDLNBcjs.matrixAbout.call(void 0, linear, ref), _chunkL6REDLNBcjs.translateMatrix.call(void 0, _nullishCoalesce(params.dx, () => ( 0)), _nullishCoalesce(params.dy, () => ( 0))));
|
|
4645
4648
|
}
|
|
4646
4649
|
function describeTransform(geometry, reference = "center") {
|
|
4647
4650
|
const m = hasWarp(geometry) ? null : matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -4658,7 +4661,7 @@ function describeTransform(geometry, reference = "center") {
|
|
|
4658
4661
|
const shear = sxAbs ? (a * c + b * d) / sxAbs : 0;
|
|
4659
4662
|
const sy = sxAbs ? (a * d - b * c) / sxAbs : 0;
|
|
4660
4663
|
const skew = sxAbs ? Math.atan(shear / sxAbs) * 180 / Math.PI : 0;
|
|
4661
|
-
const at =
|
|
4664
|
+
const at = _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, ref);
|
|
4662
4665
|
const clean = (v) => Math.abs(v) < 1e-9 ? 0 : v;
|
|
4663
4666
|
return {
|
|
4664
4667
|
affine: true,
|
|
@@ -4676,24 +4679,24 @@ function applyParams(geometry, params) {
|
|
|
4676
4679
|
const ref = params.reference && typeof params.reference === "object" ? params.reference : anchorPoint(geometry, _nullishCoalesce(params.reference, () => ( "center")));
|
|
4677
4680
|
const m = matrixFromParams({ x: ref.x, y: ref.y, width: 0, height: 0 }, { ...params, reference: ref });
|
|
4678
4681
|
const c = geometry.corners;
|
|
4679
|
-
return [
|
|
4682
|
+
return [_chunkL6REDLNBcjs.applyMatrix.call(void 0, m, c[0]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, c[1]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, c[2]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, c[3])];
|
|
4680
4683
|
}
|
|
4681
4684
|
function flipCorners(geometry, axis) {
|
|
4682
4685
|
const c = anchorPoint(geometry, "center");
|
|
4683
4686
|
const m = axis === "horizontal" ? [-1, 0, 0, 1, 2 * c.x, 0] : [1, 0, 0, -1, 0, 2 * c.y];
|
|
4684
4687
|
const q2 = geometry.corners;
|
|
4685
|
-
return [
|
|
4688
|
+
return [_chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[0]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[1]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[2]), _chunkL6REDLNBcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
4686
4689
|
}
|
|
4687
4690
|
function boxPointOf(geometry, p) {
|
|
4688
4691
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
4689
|
-
if (m) return
|
|
4692
|
+
if (m) return _chunkL6REDLNBcjs.applyMatrix.call(void 0, _chunkL6REDLNBcjs.invertMatrix.call(void 0, m), p);
|
|
4690
4693
|
return null;
|
|
4691
4694
|
}
|
|
4692
4695
|
function presetWarp(box2, preset) {
|
|
4693
|
-
return
|
|
4696
|
+
return _chunkL6REDLNBcjs.warpPresetMesh.call(void 0, preset, box2);
|
|
4694
4697
|
}
|
|
4695
4698
|
function isValidWarp(mesh) {
|
|
4696
|
-
return
|
|
4699
|
+
return _chunkL6REDLNBcjs.isValidWarpMesh.call(void 0, mesh);
|
|
4697
4700
|
}
|
|
4698
4701
|
function geometryHomography(geometry) {
|
|
4699
4702
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -4972,7 +4975,7 @@ function normalizePlacement(raw, contents) {
|
|
|
4972
4975
|
}
|
|
4973
4976
|
const out = { corners: c.map((p) => ({ x: p.x, y: p.y })) };
|
|
4974
4977
|
if (raw.warp) {
|
|
4975
|
-
if (!
|
|
4978
|
+
if (!_chunkL6REDLNBcjs.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.");
|
|
4976
4979
|
out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
4977
4980
|
}
|
|
4978
4981
|
if (raw.interpolation !== void 0) {
|
|
@@ -5076,7 +5079,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5076
5079
|
case "shape": {
|
|
5077
5080
|
const next = {
|
|
5078
5081
|
...layer,
|
|
5079
|
-
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }),
|
|
5082
|
+
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkL6REDLNBcjs.translateMatrix.call(void 0, dx, dy)),
|
|
5080
5083
|
surface: _chunk474IQG74cjs.translateSurface.call(void 0, layer.surface, dx, dy),
|
|
5081
5084
|
mask: moveMask(layer.mask)
|
|
5082
5085
|
};
|
|
@@ -5085,7 +5088,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5085
5088
|
return next;
|
|
5086
5089
|
}
|
|
5087
5090
|
case "type": {
|
|
5088
|
-
const next = { ...transformTypeLayer(layer,
|
|
5091
|
+
const next = { ...transformTypeLayer(layer, _chunkL6REDLNBcjs.translateMatrix.call(void 0, dx, dy)), surface: _chunk474IQG74cjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
|
|
5089
5092
|
if (!next.mask) delete next.mask;
|
|
5090
5093
|
return next;
|
|
5091
5094
|
}
|
|
@@ -5271,7 +5274,7 @@ function refitPlacement(layer, contents) {
|
|
|
5271
5274
|
});
|
|
5272
5275
|
const out = { corners: pts };
|
|
5273
5276
|
if (layer.placement.interpolation) out.interpolation = layer.placement.interpolation;
|
|
5274
|
-
if (layer.placement.warp) out.warp =
|
|
5277
|
+
if (layer.placement.warp) out.warp = _chunkL6REDLNBcjs.mapWarpMeshPoints.call(void 0, layer.placement.warp, (p) => ({ x: p.x * W1 / W0, y: p.y * H1 / H0 }));
|
|
5275
5278
|
return out;
|
|
5276
5279
|
}
|
|
5277
5280
|
function normalizeSmartFilter(raw, id = newLayerId("flt")) {
|
|
@@ -5648,7 +5651,7 @@ function readType(r, base, ctx) {
|
|
|
5648
5651
|
const text3 = normalizeText(_nullishCoalesce(r.text, () => ( "")));
|
|
5649
5652
|
const runs = (Array.isArray(r.runs) ? r.runs : []).map((run, i) => ({
|
|
5650
5653
|
length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess', _166 => _166.length]), 0, 1e9, 0))),
|
|
5651
|
-
style: patchTextStyle(
|
|
5654
|
+
style: patchTextStyle(_chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _167 => _167.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
|
|
5652
5655
|
}));
|
|
5653
5656
|
const paragraphs = (Array.isArray(r.paragraphs) ? r.paragraphs : []).map((p, i) => ({
|
|
5654
5657
|
length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess', _168 => _168.length]), 0, 1e9, 0))),
|
|
@@ -5661,13 +5664,13 @@ function readType(r, base, ctx) {
|
|
|
5661
5664
|
...base,
|
|
5662
5665
|
type: "type",
|
|
5663
5666
|
text: text3,
|
|
5664
|
-
runs:
|
|
5665
|
-
paragraphs:
|
|
5667
|
+
runs: _chunkL6REDLNBcjs.fitRuns.call(void 0, runs, text3.length, _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE),
|
|
5668
|
+
paragraphs: _chunkL6REDLNBcjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
|
|
5666
5669
|
frame,
|
|
5667
5670
|
surface: _chunk474IQG74cjs.emptySurface.call(void 0, 4),
|
|
5668
5671
|
offset: { x: 0, y: 0 }
|
|
5669
5672
|
};
|
|
5670
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _172 => _172[0], 'optionalAccess', _173 => _173.style]), () => (
|
|
5673
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _172 => _172[0], 'optionalAccess', _173 => _173.style]), () => ( _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE)) }];
|
|
5671
5674
|
if (m) layer.transform = m;
|
|
5672
5675
|
if (r.orientation === "vertical") layer.orientation = "vertical";
|
|
5673
5676
|
if (r.antiAlias === false) layer.antiAlias = false;
|
|
@@ -6137,7 +6140,7 @@ function readSmartObject(r, base, ctx) {
|
|
|
6137
6140
|
let placement;
|
|
6138
6141
|
try {
|
|
6139
6142
|
const raw = { corners: p.corners };
|
|
6140
|
-
if (p.warp &&
|
|
6143
|
+
if (p.warp && _chunkL6REDLNBcjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
|
|
6141
6144
|
if (_chunkHB4ICNNAcjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
|
|
6142
6145
|
placement = normalizePlacement(raw, contents);
|
|
6143
6146
|
} catch (e) {
|
|
@@ -7308,7 +7311,7 @@ function vectorBlockForComponents(components, inverted, width, height, flags = 0
|
|
|
7308
7311
|
const fr = (p) => ({ x: p.x / w, y: p.y / h });
|
|
7309
7312
|
const subpaths = [];
|
|
7310
7313
|
components.forEach((c, ci) => {
|
|
7311
|
-
|
|
7314
|
+
_chunkL6REDLNBcjs.expandVectorCorners.call(void 0, c.subpaths).forEach((sp, si) => {
|
|
7312
7315
|
if (!sp.anchors.length) return;
|
|
7313
7316
|
subpaths.push({
|
|
7314
7317
|
closed: sp.closed,
|
|
@@ -8134,7 +8137,7 @@ function merged(levels) {
|
|
|
8134
8137
|
function charStyle(d, fonts, notes, vertical = false) {
|
|
8135
8138
|
const n = (k) => eNum(eGet(d, k));
|
|
8136
8139
|
const flag = (k) => eBool(eGet(d, k));
|
|
8137
|
-
const s = { ...
|
|
8140
|
+
const s = { ..._chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE };
|
|
8138
8141
|
const fi = n("Font");
|
|
8139
8142
|
const ps = fi !== void 0 ? fonts[fi] : void 0;
|
|
8140
8143
|
if (ps) {
|
|
@@ -8219,7 +8222,7 @@ function typeFromTySh(data, notes) {
|
|
|
8219
8222
|
}
|
|
8220
8223
|
const edText = _nullishCoalesce(eStr(ePath(_nullishCoalesce(engine, () => ( void 0)), ["EngineDict", "Editor", "Text"])), () => ( ""));
|
|
8221
8224
|
const text3 = (_nullishCoalesce(txt, () => ( edText.replace(/\r$/, "")))).replace(/\r\n?/g, "\n");
|
|
8222
|
-
let runs = [{ length: text3.length, style: { ...
|
|
8225
|
+
let runs = [{ length: text3.length, style: { ..._chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE } }];
|
|
8223
8226
|
let paragraphs = [{ length: text3.length, style: {} }];
|
|
8224
8227
|
let frame = { kind: "point" };
|
|
8225
8228
|
let transform = t.transform;
|
|
@@ -8275,14 +8278,14 @@ function typeFromTySh(data, notes) {
|
|
|
8275
8278
|
const b = eArray(ePath(shape, ["Cookie", "Photoshop", "BoxBounds"])).map((v) => _nullishCoalesce(eNum(v), () => ( 0)));
|
|
8276
8279
|
if (b.length === 4 && b[2] > b[0] && b[3] > b[1]) {
|
|
8277
8280
|
frame = { kind: "box", width: b[2] - b[0], height: b[3] - b[1] };
|
|
8278
|
-
transform =
|
|
8281
|
+
transform = _chunkL6REDLNBcjs.multiplyMatrices.call(void 0, [1, 0, 0, 1, b[0], b[1]], t.transform);
|
|
8279
8282
|
}
|
|
8280
8283
|
}
|
|
8281
8284
|
}
|
|
8282
8285
|
return {
|
|
8283
8286
|
text: text3,
|
|
8284
|
-
runs:
|
|
8285
|
-
paragraphs:
|
|
8287
|
+
runs: _chunkL6REDLNBcjs.fitRuns.call(void 0, runs, text3.length, _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE),
|
|
8288
|
+
paragraphs: _chunkL6REDLNBcjs.fitParagraphRuns.call(void 0, paragraphs, text3),
|
|
8286
8289
|
frame,
|
|
8287
8290
|
orientation: vertical ? "vertical" : "horizontal",
|
|
8288
8291
|
transform,
|
|
@@ -8358,7 +8361,7 @@ function buildEngineData(layer, template) {
|
|
|
8358
8361
|
fonts.push(ps);
|
|
8359
8362
|
return fonts.length - 1;
|
|
8360
8363
|
};
|
|
8361
|
-
const runs =
|
|
8364
|
+
const runs = _chunkL6REDLNBcjs.fitRuns.call(void 0, layer.runs, layer.text.length, _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE);
|
|
8362
8365
|
const vertical = layer.orientation === "vertical";
|
|
8363
8366
|
const sruns = [];
|
|
8364
8367
|
const slens = [];
|
|
@@ -8367,10 +8370,10 @@ function buildEngineData(layer, template) {
|
|
|
8367
8370
|
slens.push(E.int(r.length + (i === runs.length - 1 ? 1 : 0)));
|
|
8368
8371
|
});
|
|
8369
8372
|
if (!runs.length) {
|
|
8370
|
-
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(
|
|
8373
|
+
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(_chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE, fontIndex(postScriptFor(_chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE)))]])]]));
|
|
8371
8374
|
slens.push(E.int(1));
|
|
8372
8375
|
}
|
|
8373
|
-
const paras =
|
|
8376
|
+
const paras = _chunkL6REDLNBcjs.fitParagraphRuns.call(void 0, layer.paragraphs, layer.text);
|
|
8374
8377
|
const pruns = [];
|
|
8375
8378
|
const plens = [];
|
|
8376
8379
|
paras.forEach((p, i) => {
|
|
@@ -8426,7 +8429,7 @@ function buildEngineData(layer, template) {
|
|
|
8426
8429
|
eSet(e, key, rd);
|
|
8427
8430
|
}
|
|
8428
8431
|
eSet(rd, "FontSet", fontSet);
|
|
8429
|
-
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _248 => _248[0], 'optionalAccess', _249 => _249.style]), () => (
|
|
8432
|
+
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _248 => _248[0], 'optionalAccess', _249 => _249.style]), () => ( _chunkL6REDLNBcjs.DEFAULT_TEXT_STYLE)), 0)]])]));
|
|
8430
8433
|
if (!eGet(rd, "ParagraphSheetSet")) eSet(rd, "ParagraphSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["DefaultStyleSheet", E.int(0)], ["Properties", paragraphProperties({})]])]));
|
|
8431
8434
|
if (!eGet(rd, "TheNormalStyleSheet")) eSet(rd, "TheNormalStyleSheet", E.int(0));
|
|
8432
8435
|
if (!eGet(rd, "TheNormalParagraphSheet")) eSet(rd, "TheNormalParagraphSheet", E.int(0));
|
|
@@ -8437,13 +8440,13 @@ function inkBounds2(layer) {
|
|
|
8437
8440
|
if (layer.frame.kind === "box") return [0, 0, layer.frame.width, layer.frame.height];
|
|
8438
8441
|
const b = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
|
|
8439
8442
|
if (!b) return [0, 0, 0, 0];
|
|
8440
|
-
const inv =
|
|
8443
|
+
const inv = _chunkL6REDLNBcjs.invertMatrix.call(void 0, textMatrix(layer));
|
|
8441
8444
|
const pts = [
|
|
8442
8445
|
{ x: b.x, y: b.y },
|
|
8443
8446
|
{ x: b.x + b.width, y: b.y },
|
|
8444
8447
|
{ x: b.x + b.width, y: b.y + b.height },
|
|
8445
8448
|
{ x: b.x, y: b.y + b.height }
|
|
8446
|
-
].map((p) =>
|
|
8449
|
+
].map((p) => _chunkL6REDLNBcjs.applyMatrix.call(void 0, inv, p));
|
|
8447
8450
|
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))];
|
|
8448
8451
|
}
|
|
8449
8452
|
function tyShForLayer(layer) {
|
|
@@ -8724,7 +8727,7 @@ function filterMaskItem(placed, mask, area) {
|
|
|
8724
8727
|
var warpStyleOf = (name) => {
|
|
8725
8728
|
if (!name.startsWith("warp")) return null;
|
|
8726
8729
|
const s = _optionalChain([name, 'access', _263 => _263[4], 'optionalAccess', _264 => _264.toLowerCase, 'call', _265 => _265()]) + name.slice(5);
|
|
8727
|
-
return
|
|
8730
|
+
return _chunkL6REDLNBcjs.WARP_STYLES.includes(s) ? s : null;
|
|
8728
8731
|
};
|
|
8729
8732
|
function warpFromDescriptor(w, contents) {
|
|
8730
8733
|
const full = { x: 0, y: 0, width: contents.width, height: contents.height };
|
|
@@ -8754,7 +8757,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
8754
8757
|
} else {
|
|
8755
8758
|
const style = warpStyleOf(styleName);
|
|
8756
8759
|
if (!style) return void 0;
|
|
8757
|
-
mesh =
|
|
8760
|
+
mesh = _chunkL6REDLNBcjs.warpPresetMesh.call(void 0,
|
|
8758
8761
|
{
|
|
8759
8762
|
style,
|
|
8760
8763
|
bend: _nullishCoalesce(descNumber(w, "warpValue"), () => ( 0)),
|
|
@@ -8769,7 +8772,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
8769
8772
|
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;
|
|
8770
8773
|
if (!same) {
|
|
8771
8774
|
const m = mesh;
|
|
8772
|
-
mesh =
|
|
8775
|
+
mesh = _chunkL6REDLNBcjs.fitWarpMesh.call(void 0, (s, t) => _chunkL6REDLNBcjs.evalWarpMesh.call(void 0, m, (s * contents.width - bounds.x) / bounds.width, (t * contents.height - bounds.y) / bounds.height), [0, 1], [0, 1]);
|
|
8773
8776
|
}
|
|
8774
8777
|
return { mesh, frame };
|
|
8775
8778
|
}
|
|
@@ -10361,7 +10364,7 @@ function importSmart(ctx, rec, name, notes, props) {
|
|
|
10361
10364
|
if (placement && (size.width !== contents.width || size.height !== contents.height)) {
|
|
10362
10365
|
const kx = contents.width / size.width;
|
|
10363
10366
|
const ky = contents.height / size.height;
|
|
10364
|
-
if (placement.warp) placement = { ...placement, warp:
|
|
10367
|
+
if (placement.warp) placement = { ...placement, warp: _chunkL6REDLNBcjs.mapWarpMeshPoints.call(void 0, placement.warp, (p) => ({ x: p.x * kx, y: p.y * ky })) };
|
|
10365
10368
|
}
|
|
10366
10369
|
}
|
|
10367
10370
|
if (!contents || !placement) {
|
|
@@ -11723,6 +11726,358 @@ function exportPsd(input) {
|
|
|
11723
11726
|
return { bytes, psb, records: records.length, warnings };
|
|
11724
11727
|
}
|
|
11725
11728
|
|
|
11729
|
+
// src/image-editor/effect-tools.ts
|
|
11730
|
+
var READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
11731
|
+
var WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
|
|
11732
|
+
var WRITE_IDEMPOTENT = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
11733
|
+
var DESTRUCTIVE = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
|
|
11734
|
+
var EFFECT_ID = { type: "string", description: "Effect id from list_layer_effects or add_layer_effect." };
|
|
11735
|
+
var BLEND_IDS = _chunkOLNIPTB3cjs.BLEND_MODES.map((m) => m.id).filter((id) => id !== "pigment");
|
|
11736
|
+
var DEFS = {
|
|
11737
|
+
color: { type: "string", pattern: "^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$", description: "Colour as #rrggbb." },
|
|
11738
|
+
contour: {
|
|
11739
|
+
type: "object",
|
|
11740
|
+
description: "A transfer curve over the effect coverage: points { input, output } from 0 to 1 (at least 2), sorted by input. Linear is [{0,0},{1,1}].",
|
|
11741
|
+
properties: {
|
|
11742
|
+
name: { type: "string", description: 'Display name (e.g. "Cone", "Gaussian").' },
|
|
11743
|
+
points: {
|
|
11744
|
+
type: "array",
|
|
11745
|
+
minItems: 2,
|
|
11746
|
+
description: "Curve points.",
|
|
11747
|
+
items: {
|
|
11748
|
+
type: "object",
|
|
11749
|
+
properties: {
|
|
11750
|
+
input: { type: "number", minimum: 0, maximum: 1, description: "Coverage in (0..1)." },
|
|
11751
|
+
output: { type: "number", minimum: 0, maximum: 1, description: "Coverage out (0..1)." },
|
|
11752
|
+
corner: { type: "boolean", description: "Sharp corner instead of a smooth point (default false)." }
|
|
11753
|
+
},
|
|
11754
|
+
required: ["input", "output"],
|
|
11755
|
+
additionalProperties: false
|
|
11756
|
+
}
|
|
11757
|
+
}
|
|
11758
|
+
},
|
|
11759
|
+
required: ["name", "points"],
|
|
11760
|
+
additionalProperties: false
|
|
11761
|
+
},
|
|
11762
|
+
gradient: {
|
|
11763
|
+
type: "object",
|
|
11764
|
+
description: "A gradient: colour stops, optional opacity stops and its layout.",
|
|
11765
|
+
properties: {
|
|
11766
|
+
stops: {
|
|
11767
|
+
type: "array",
|
|
11768
|
+
minItems: 1,
|
|
11769
|
+
description: "Colour stops { position 0..1, color #rrggbb }.",
|
|
11770
|
+
items: {
|
|
11771
|
+
type: "object",
|
|
11772
|
+
properties: { position: { type: "number", minimum: 0, maximum: 1, description: "0..1 along the gradient." }, color: { $ref: "#/$defs/color" } },
|
|
11773
|
+
required: ["position", "color"],
|
|
11774
|
+
additionalProperties: false
|
|
11775
|
+
}
|
|
11776
|
+
},
|
|
11777
|
+
opacityStops: {
|
|
11778
|
+
type: "array",
|
|
11779
|
+
description: "Opacity stops { position 0..1, opacity 0..1 } (default opaque).",
|
|
11780
|
+
items: {
|
|
11781
|
+
type: "object",
|
|
11782
|
+
properties: {
|
|
11783
|
+
position: { type: "number", minimum: 0, maximum: 1, description: "0..1 along the gradient." },
|
|
11784
|
+
opacity: { type: "number", minimum: 0, maximum: 1, description: "0..1." }
|
|
11785
|
+
},
|
|
11786
|
+
required: ["position", "opacity"],
|
|
11787
|
+
additionalProperties: false
|
|
11788
|
+
}
|
|
11789
|
+
},
|
|
11790
|
+
style: { type: "string", enum: ["linear", "radial", "angle", "reflected", "diamond"], description: "Geometry." },
|
|
11791
|
+
angle: { type: "number", minimum: -360, maximum: 360, description: "Degrees, 90 = bottom to top." },
|
|
11792
|
+
scale: { type: "number", minimum: 0.1, maximum: 1.5, description: "1 = 100 %." },
|
|
11793
|
+
reverse: { type: "boolean", description: "Swap the ends." },
|
|
11794
|
+
align: { type: "boolean", description: "Lay out over the layer bounds (true) or the canvas." },
|
|
11795
|
+
offset: {
|
|
11796
|
+
type: "object",
|
|
11797
|
+
description: "Centre offset as fractions of the bounds.",
|
|
11798
|
+
properties: { x: { type: "number", minimum: -1, maximum: 1, description: "Fraction of the width." }, y: { type: "number", minimum: -1, maximum: 1, description: "Fraction of the height." } },
|
|
11799
|
+
required: ["x", "y"],
|
|
11800
|
+
additionalProperties: false
|
|
11801
|
+
}
|
|
11802
|
+
},
|
|
11803
|
+
required: ["stops", "style", "angle", "scale", "reverse", "align", "offset"],
|
|
11804
|
+
additionalProperties: false
|
|
11805
|
+
},
|
|
11806
|
+
phase: {
|
|
11807
|
+
type: "object",
|
|
11808
|
+
description: "Pattern origin offset in px.",
|
|
11809
|
+
properties: { x: { type: "number", description: "px." }, y: { type: "number", description: "px." } },
|
|
11810
|
+
required: ["x", "y"],
|
|
11811
|
+
additionalProperties: false
|
|
11812
|
+
},
|
|
11813
|
+
fill: {
|
|
11814
|
+
description: "What a stroke or glow paints with. Glows take color or gradient only.",
|
|
11815
|
+
anyOf: [
|
|
11816
|
+
{
|
|
11817
|
+
type: "object",
|
|
11818
|
+
properties: { type: { const: "color", description: "Solid colour." }, color: { $ref: "#/$defs/color" } },
|
|
11819
|
+
required: ["type", "color"],
|
|
11820
|
+
additionalProperties: false
|
|
11821
|
+
},
|
|
11822
|
+
{
|
|
11823
|
+
type: "object",
|
|
11824
|
+
properties: { type: { const: "gradient", description: "Gradient." }, gradient: { $ref: "#/$defs/gradient" } },
|
|
11825
|
+
required: ["type", "gradient"],
|
|
11826
|
+
additionalProperties: false
|
|
11827
|
+
},
|
|
11828
|
+
{
|
|
11829
|
+
type: "object",
|
|
11830
|
+
properties: {
|
|
11831
|
+
type: { const: "pattern", description: "Pattern (strokes only)." },
|
|
11832
|
+
patternId: { type: "string", description: "Pattern id from list_layer_effects.patterns." },
|
|
11833
|
+
name: { type: "string", description: "Display name." },
|
|
11834
|
+
scale: { type: "number", minimum: 0.01, maximum: 10, description: "1 = 100 %." },
|
|
11835
|
+
angle: { type: "number", minimum: -360, maximum: 360, description: "Rotation in degrees (default 0)." },
|
|
11836
|
+
link: { type: "boolean", description: "Tile from the layer (default true) or the canvas origin." },
|
|
11837
|
+
phase: { $ref: "#/$defs/phase" }
|
|
11838
|
+
},
|
|
11839
|
+
required: ["type", "patternId", "scale"],
|
|
11840
|
+
additionalProperties: false
|
|
11841
|
+
}
|
|
11842
|
+
]
|
|
11843
|
+
}
|
|
11844
|
+
};
|
|
11845
|
+
var nullable = (schema, description) => ({ anyOf: [schema, { type: "null" }], description });
|
|
11846
|
+
function settingsSchema(forUpdate) {
|
|
11847
|
+
const opt = (schema, description) => forUpdate ? nullable(schema, `${description} null removes it.`) : { ...schema, description };
|
|
11848
|
+
return {
|
|
11849
|
+
type: "object",
|
|
11850
|
+
description: forUpdate ? "Settings to change (only these; nested objects are replaced whole). Which settings a kind takes: see add_layer_effect." : "Settings to change from Photoshop's defaults (all optional). Unknown settings for the kind are refused with the list of its settings.",
|
|
11851
|
+
properties: {
|
|
11852
|
+
enabled: { type: "boolean", description: "All kinds: false keeps the effect but hides it (default true)." },
|
|
11853
|
+
blend: { type: "string", enum: BLEND_IDS, description: "All but bevel-emboss: blend mode (shadows multiply, glows screen, others normal)." },
|
|
11854
|
+
opacity: { type: "number", minimum: 0, maximum: 1, description: "All but bevel-emboss: 0..1 (shadows / glows 0.75, satin 0.5, others 1)." },
|
|
11855
|
+
color: { $ref: "#/$defs/color", description: "drop-shadow, inner-shadow, satin, color-overlay: #rrggbb." },
|
|
11856
|
+
angle: { type: "number", minimum: -360, maximum: 360, description: "Shadows, satin, bevel-emboss: light direction in degrees, counter-clockwise from 3 o'clock (default 120; satin 19)." },
|
|
11857
|
+
useGlobalLight: { type: "boolean", description: "Shadows, bevel-emboss: follow the document global light instead of angle (default true)." },
|
|
11858
|
+
distance: { type: "number", minimum: 0, maximum: 3e4, description: "Shadows, satin: offset in px (default 5; satin 11)." },
|
|
11859
|
+
spread: { type: "number", minimum: 0, maximum: 1, description: "drop-shadow, outer-glow: 0..1 of the size made solid (default 0)." },
|
|
11860
|
+
choke: { type: "number", minimum: 0, maximum: 1, description: "inner-shadow, inner-glow: 0..1 of the size made solid (default 0)." },
|
|
11861
|
+
size: { type: "number", minimum: 0, maximum: 250, description: "Shadows, glows, satin, bevel-emboss: blur / size in px (default 5; satin 14); stroke: width in px (default 3)." },
|
|
11862
|
+
contour: opt({ $ref: "#/$defs/contour" }, "Shadows, glows, satin: coverage contour (default linear)."),
|
|
11863
|
+
antiAlias: { type: "boolean", description: "Shadows, glows, satin: smooth the contour (default false; satin true)." },
|
|
11864
|
+
noise: { type: "number", minimum: 0, maximum: 1, description: "Shadows, glows: speckle 0..1 (default 0)." },
|
|
11865
|
+
knocksOut: { type: "boolean", description: "drop-shadow: the layer hides the shadow beneath its see-through fill (default true)." },
|
|
11866
|
+
fill: { $ref: "#/$defs/fill", description: "outer-glow, inner-glow (color or gradient), stroke (color, gradient or pattern)." },
|
|
11867
|
+
technique: { type: "string", enum: ["softer", "precise", "smooth", "chisel-hard", "chisel-soft"], description: "Glows: softer | precise (default softer); bevel-emboss: smooth | chisel-hard | chisel-soft (default smooth)." },
|
|
11868
|
+
range: { type: "number", minimum: 0.01, maximum: 1, description: "Glows: the part of the glow the contour spans (default 0.5)." },
|
|
11869
|
+
jitter: { type: "number", minimum: 0, maximum: 1, description: "Glows: gradient jitter 0..1 (stored, not rendered; default 0)." },
|
|
11870
|
+
source: { type: "string", enum: ["edge", "center"], description: "inner-glow: glow from the edge (default) or the centre." },
|
|
11871
|
+
style: { type: "string", enum: ["inner-bevel", "outer-bevel", "emboss", "pillow-emboss", "stroke-emboss"], description: "bevel-emboss: style (default inner-bevel)." },
|
|
11872
|
+
depth: { type: "number", minimum: 0, maximum: 10, description: "bevel-emboss: depth, 1 = 100 % (default 1)." },
|
|
11873
|
+
direction: { type: "string", enum: ["up", "down"], description: "bevel-emboss: raised (up, default) or sunk (down)." },
|
|
11874
|
+
soften: { type: "number", minimum: 0, maximum: 16, description: "bevel-emboss: blur of the height in px (default 0)." },
|
|
11875
|
+
altitude: { type: "number", minimum: 0, maximum: 90, description: "bevel-emboss: light altitude in degrees (default 30)." },
|
|
11876
|
+
glossContour: opt({ $ref: "#/$defs/contour" }, "bevel-emboss: gloss contour over the shading (default linear)."),
|
|
11877
|
+
highlightColor: { $ref: "#/$defs/color", description: "bevel-emboss: highlight colour (default #ffffff)." },
|
|
11878
|
+
highlightBlend: { type: "string", enum: BLEND_IDS, description: "bevel-emboss: highlight mode (default screen)." },
|
|
11879
|
+
highlightOpacity: { type: "number", minimum: 0, maximum: 1, description: "bevel-emboss: highlight opacity (default 0.75)." },
|
|
11880
|
+
shadowColor: { $ref: "#/$defs/color", description: "bevel-emboss: shadow colour (default #000000)." },
|
|
11881
|
+
shadowBlend: { type: "string", enum: BLEND_IDS, description: "bevel-emboss: shadow mode (default multiply)." },
|
|
11882
|
+
shadowOpacity: { type: "number", minimum: 0, maximum: 1, description: "bevel-emboss: shadow opacity (default 0.75)." },
|
|
11883
|
+
contourElement: opt(
|
|
11884
|
+
{
|
|
11885
|
+
type: "object",
|
|
11886
|
+
properties: {
|
|
11887
|
+
contour: { $ref: "#/$defs/contour" },
|
|
11888
|
+
range: { type: "number", minimum: 0, maximum: 1, description: "Stored range (default 0.5)." },
|
|
11889
|
+
antiAlias: { type: "boolean", description: "Smooth the contour." }
|
|
11890
|
+
},
|
|
11891
|
+
required: ["contour", "range", "antiAlias"],
|
|
11892
|
+
additionalProperties: false
|
|
11893
|
+
},
|
|
11894
|
+
"bevel-emboss: the Contour element, shaping the bevel's height profile (default off)."
|
|
11895
|
+
),
|
|
11896
|
+
texture: opt(
|
|
11897
|
+
{
|
|
11898
|
+
type: "object",
|
|
11899
|
+
properties: {
|
|
11900
|
+
patternId: { type: "string", description: "Pattern id from list_layer_effects.patterns." },
|
|
11901
|
+
name: { type: "string", description: "Display name." },
|
|
11902
|
+
scale: { type: "number", minimum: 0.01, maximum: 10, description: "1 = 100 %." },
|
|
11903
|
+
depth: { type: "number", minimum: -10, maximum: 10, description: "1 = +100 %; negative carves the pattern in." },
|
|
11904
|
+
invert: { type: "boolean", description: "Invert the pattern." },
|
|
11905
|
+
link: { type: "boolean", description: "Tile from the layer (default true)." },
|
|
11906
|
+
phase: { $ref: "#/$defs/phase" }
|
|
11907
|
+
},
|
|
11908
|
+
required: ["patternId", "scale", "depth", "invert"],
|
|
11909
|
+
additionalProperties: false
|
|
11910
|
+
},
|
|
11911
|
+
"bevel-emboss: the Texture element, a pattern's luminance as extra height (default off)."
|
|
11912
|
+
),
|
|
11913
|
+
invert: { type: "boolean", description: "satin: invert (default true)." },
|
|
11914
|
+
gradient: { $ref: "#/$defs/gradient", description: "gradient-overlay: the gradient (default black to white, 90\xB0)." },
|
|
11915
|
+
dither: { type: "boolean", description: "gradient-overlay: dither (stored; default false)." },
|
|
11916
|
+
patternId: { type: "string", description: "pattern-overlay: pattern id from list_layer_effects.patterns (default checker)." },
|
|
11917
|
+
name: { type: "string", description: "pattern-overlay: pattern display name." },
|
|
11918
|
+
scale: { type: "number", minimum: 0.01, maximum: 10, description: "pattern-overlay: 1 = 100 % (default 1)." },
|
|
11919
|
+
link: { type: "boolean", description: "pattern-overlay: tile from the layer (default true) or the canvas origin." },
|
|
11920
|
+
phase: { $ref: "#/$defs/phase", description: "pattern-overlay: origin offset in px (default 0, 0)." },
|
|
11921
|
+
position: { type: "string", enum: ["outside", "inside", "center"], description: "stroke: where the stroke sits on the edge (default outside)." }
|
|
11922
|
+
},
|
|
11923
|
+
additionalProperties: false
|
|
11924
|
+
};
|
|
11925
|
+
}
|
|
11926
|
+
function patternList(documentPatterns) {
|
|
11927
|
+
const doc = documentPatterns.map((p) => ({ id: p.id, name: p.name, width: p.width, height: p.height, builtin: false }));
|
|
11928
|
+
const builtins = _chunkHB4ICNNAcjs.builtinPatternIds.call(void 0, ).map((id) => {
|
|
11929
|
+
const p = _chunkHB4ICNNAcjs.builtinPattern.call(void 0, id);
|
|
11930
|
+
return { id, name: p.name, width: p.width, height: p.height, builtin: true };
|
|
11931
|
+
});
|
|
11932
|
+
return [...doc, ...builtins];
|
|
11933
|
+
}
|
|
11934
|
+
function describeLayerEffects(effects) {
|
|
11935
|
+
return {
|
|
11936
|
+
enabled: effects.enabled,
|
|
11937
|
+
scale: _nullishCoalesce(effects.scale, () => ( 1)),
|
|
11938
|
+
margin: _chunkHB4ICNNAcjs.effectsMargin.call(void 0, effects),
|
|
11939
|
+
fromPsd: Boolean(effects.psd),
|
|
11940
|
+
effects: effects.items.map((e) => ({ ...JSON.parse(JSON.stringify(e)), label: _chunkHB4ICNNAcjs.layerEffectLabel.call(void 0, e.kind) }))
|
|
11941
|
+
};
|
|
11942
|
+
}
|
|
11943
|
+
function createImageEffectTools(controller) {
|
|
11944
|
+
return createLayerEffectTools(
|
|
11945
|
+
{
|
|
11946
|
+
requireLayer: (id) => void requireLayer(controller.getLayers(), id),
|
|
11947
|
+
getLayerEffects: (id) => controller.getLayerEffects(id),
|
|
11948
|
+
addLayerEffect: (id, kind, settings, index) => controller.addLayerEffect(id, kind, settings, index),
|
|
11949
|
+
updateLayerEffect: (id, effectId, changes) => controller.updateLayerEffect(id, effectId, changes),
|
|
11950
|
+
removeLayerEffect: (id, effectId) => controller.removeLayerEffect(id, effectId),
|
|
11951
|
+
setLayerEffectsEnabled: (id, enabled, scale) => controller.setLayerEffectsEnabled(id, enabled, scale),
|
|
11952
|
+
getGlobalLight: () => controller.getGlobalLight(),
|
|
11953
|
+
setGlobalLight: (light) => controller.setGlobalLight(light),
|
|
11954
|
+
getDocumentPatterns: () => controller.getDocumentPatterns()
|
|
11955
|
+
},
|
|
11956
|
+
{ layers: "a pixel, shape, type, smart object, annotation or group layer" }
|
|
11957
|
+
);
|
|
11958
|
+
}
|
|
11959
|
+
function createLayerEffectTools(host, options) {
|
|
11960
|
+
const error = _nullishCoalesce(options.error, () => ( ((m) => new LayerOperationError(m))));
|
|
11961
|
+
const LAYER_ID = { type: "string", description: `Layer id from list_layers (${options.layers}).` };
|
|
11962
|
+
const layerArg = (id) => {
|
|
11963
|
+
if (typeof id !== "string" || !id) throw error("layerId is required (a layer id from list_layers).");
|
|
11964
|
+
host.requireLayer(id);
|
|
11965
|
+
return id;
|
|
11966
|
+
};
|
|
11967
|
+
const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(host.getLayerEffects(layerId)) });
|
|
11968
|
+
const globalLight = () => _nullishCoalesce(_optionalChain([host, 'access', _325 => _325.getGlobalLight, 'optionalCall', _326 => _326()]), () => ( { ..._chunkHB4ICNNAcjs.DEFAULT_GLOBAL_LIGHT }));
|
|
11969
|
+
const list2 = {
|
|
11970
|
+
name: "list_layer_effects",
|
|
11971
|
+
title: "List layer effects",
|
|
11972
|
+
description: "Returns a layer's effects: the master switch (enabled), Scale Effects (scale, 1 = 100 %), margin (px the effects reach beyond the shape), whether they came from a PSD, and every effect with its id, kind, label and all settings. Also returns the document global light and the pattern ids pattern effects can use.",
|
|
11973
|
+
inputSchema: { type: "object", properties: { layerId: LAYER_ID }, required: ["layerId"], additionalProperties: false },
|
|
11974
|
+
annotations: { title: "List layer effects", ...READ },
|
|
11975
|
+
handler: ({ layerId }) => result(layerArg(layerId), { globalLight: globalLight(), patterns: patternList(_nullishCoalesce(_optionalChain([host, 'access', _327 => _327.getDocumentPatterns, 'optionalCall', _328 => _328()]), () => ( []))), kinds: [..._chunkHB4ICNNAcjs.LAYER_EFFECT_KINDS] })
|
|
11976
|
+
};
|
|
11977
|
+
const add = {
|
|
11978
|
+
name: "add_layer_effect",
|
|
11979
|
+
title: "Add a layer effect",
|
|
11980
|
+
description: `Adds a live effect to ${options.layers} with Photoshop's defaults, changed by settings: drop-shadow, inner-shadow, outer-glow, inner-glow, bevel-emboss, satin, color-overlay, gradient-overlay, pattern-overlay or stroke. Several of one kind are allowed (the first listed is on top). The effect is drawn from the layer's pixels, so it follows later changes. One undo step. Returns the new effect's id and the layer's effects.`,
|
|
11981
|
+
inputSchema: {
|
|
11982
|
+
type: "object",
|
|
11983
|
+
$defs: DEFS,
|
|
11984
|
+
properties: {
|
|
11985
|
+
layerId: LAYER_ID,
|
|
11986
|
+
kind: { type: "string", enum: [..._chunkHB4ICNNAcjs.LAYER_EFFECT_KINDS], description: "Effect kind." },
|
|
11987
|
+
settings: settingsSchema(false),
|
|
11988
|
+
index: { type: "integer", minimum: 0, description: "Position in the layer's effect list (default the end)." }
|
|
11989
|
+
},
|
|
11990
|
+
required: ["layerId", "kind"],
|
|
11991
|
+
additionalProperties: false
|
|
11992
|
+
},
|
|
11993
|
+
annotations: { title: "Add a layer effect", ...WRITE },
|
|
11994
|
+
handler: ({ layerId, kind, settings, index }) => {
|
|
11995
|
+
const id = layerArg(layerId);
|
|
11996
|
+
if (!_chunkHB4ICNNAcjs.isLayerEffectKind.call(void 0, kind)) throw error(`kind must be one of ${_chunkHB4ICNNAcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
|
|
11997
|
+
const { effect } = host.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
|
|
11998
|
+
return result(id, { effectId: effect.id });
|
|
11999
|
+
}
|
|
12000
|
+
};
|
|
12001
|
+
const update = {
|
|
12002
|
+
name: "update_layer_effect",
|
|
12003
|
+
title: "Change a layer effect",
|
|
12004
|
+
description: "Changes settings of one effect (only the given ones; fill, gradient, contour and texture objects are replaced whole, null removes an optional contour or texture). The kind cannot change. Validates everything before changing anything. One undo step. Returns the layer's effects.",
|
|
12005
|
+
inputSchema: {
|
|
12006
|
+
type: "object",
|
|
12007
|
+
$defs: DEFS,
|
|
12008
|
+
properties: { layerId: LAYER_ID, effectId: EFFECT_ID, settings: settingsSchema(true) },
|
|
12009
|
+
required: ["layerId", "effectId", "settings"],
|
|
12010
|
+
additionalProperties: false
|
|
12011
|
+
},
|
|
12012
|
+
annotations: { title: "Change a layer effect", ...WRITE_IDEMPOTENT },
|
|
12013
|
+
handler: ({ layerId, effectId, settings }) => {
|
|
12014
|
+
const id = layerArg(layerId);
|
|
12015
|
+
const changes = _nullishCoalesce(settings, () => ( {}));
|
|
12016
|
+
if (!Object.keys(changes).length) throw error("Give at least one setting to change.");
|
|
12017
|
+
host.updateLayerEffect(id, effectId, changes);
|
|
12018
|
+
return result(id);
|
|
12019
|
+
}
|
|
12020
|
+
};
|
|
12021
|
+
const remove = {
|
|
12022
|
+
name: "remove_layer_effect",
|
|
12023
|
+
title: "Remove a layer effect",
|
|
12024
|
+
description: "Removes one effect from a layer (to hide it but keep its settings, set enabled false with update_layer_effect instead). One undo step. Returns the layer's remaining effects.",
|
|
12025
|
+
inputSchema: { type: "object", properties: { layerId: LAYER_ID, effectId: EFFECT_ID }, required: ["layerId", "effectId"], additionalProperties: false },
|
|
12026
|
+
annotations: { title: "Remove a layer effect", ...DESTRUCTIVE },
|
|
12027
|
+
handler: ({ layerId, effectId }) => {
|
|
12028
|
+
const id = layerArg(layerId);
|
|
12029
|
+
host.removeLayerEffect(id, effectId);
|
|
12030
|
+
return result(id);
|
|
12031
|
+
}
|
|
12032
|
+
};
|
|
12033
|
+
const setEnabled = {
|
|
12034
|
+
name: "set_layer_effects_enabled",
|
|
12035
|
+
title: "Switch layer effects on or off",
|
|
12036
|
+
description: "Turns all of a layer's effects on or off at once (the master switch; each effect keeps its own enabled flag) and optionally sets Scale Effects, which multiplies every size, distance and pattern scale. One undo step. Returns the layer's effects.",
|
|
12037
|
+
inputSchema: {
|
|
12038
|
+
type: "object",
|
|
12039
|
+
properties: {
|
|
12040
|
+
layerId: LAYER_ID,
|
|
12041
|
+
enabled: { type: "boolean", description: "true renders the enabled effects; false hides them all." },
|
|
12042
|
+
scale: { type: "number", minimum: 0.01, maximum: 10, description: "Scale Effects, 1 = 100 % (unchanged when left out)." }
|
|
12043
|
+
},
|
|
12044
|
+
required: ["layerId", "enabled"],
|
|
12045
|
+
additionalProperties: false
|
|
12046
|
+
},
|
|
12047
|
+
annotations: { title: "Switch layer effects on or off", ...WRITE_IDEMPOTENT },
|
|
12048
|
+
handler: ({ layerId, enabled, scale }) => {
|
|
12049
|
+
const id = layerArg(layerId);
|
|
12050
|
+
host.setLayerEffectsEnabled(id, enabled, scale);
|
|
12051
|
+
return result(id);
|
|
12052
|
+
}
|
|
12053
|
+
};
|
|
12054
|
+
const light = {
|
|
12055
|
+
name: "set_global_light",
|
|
12056
|
+
title: "Set the global light",
|
|
12057
|
+
description: "Sets the document global light that shadows and bevels with useGlobalLight follow (Photoshop default: angle 120\xB0, altitude 30\xB0). One undo step. Returns the light.",
|
|
12058
|
+
inputSchema: {
|
|
12059
|
+
type: "object",
|
|
12060
|
+
properties: {
|
|
12061
|
+
angle: { type: "number", minimum: -360, maximum: 360, description: "Degrees, counter-clockwise from 3 o'clock: where the light comes from (unchanged when left out)." },
|
|
12062
|
+
altitude: { type: "number", minimum: 0, maximum: 90, description: "Degrees above the canvas, for bevels (unchanged when left out)." }
|
|
12063
|
+
},
|
|
12064
|
+
additionalProperties: false
|
|
12065
|
+
},
|
|
12066
|
+
annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT },
|
|
12067
|
+
handler: ({ angle, altitude }) => {
|
|
12068
|
+
if (angle === void 0 && altitude === void 0) throw error("Give angle, altitude or both.");
|
|
12069
|
+
const next = {};
|
|
12070
|
+
if (angle !== void 0) next.angle = angle;
|
|
12071
|
+
if (altitude !== void 0) next.altitude = altitude;
|
|
12072
|
+
return { globalLight: host.setGlobalLight(next) };
|
|
12073
|
+
}
|
|
12074
|
+
};
|
|
12075
|
+
return host.setGlobalLight ? [list2, add, update, remove, setEnabled, light] : [list2, add, update, remove, setEnabled];
|
|
12076
|
+
}
|
|
12077
|
+
|
|
12078
|
+
|
|
12079
|
+
|
|
12080
|
+
|
|
11726
12081
|
|
|
11727
12082
|
|
|
11728
12083
|
|
|
@@ -12085,4 +12440,4 @@ function exportPsd(input) {
|
|
|
12085
12440
|
|
|
12086
12441
|
|
|
12087
12442
|
|
|
12088
|
-
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.MARGIN_FIT_MIN_GUTTER = MARGIN_FIT_MIN_GUTTER; 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.layerMaskSelection = layerMaskSelection; 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.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.TEXT_ORIENTATIONS = TEXT_ORIENTATIONS; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.MAX_EFFECT_ANIMATION_MS = MAX_EFFECT_ANIMATION_MS; 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.LayerOperationError = LayerOperationError; exports.userErrorMessage = userErrorMessage; exports.isPaintableLayer = isPaintableLayer; exports.defaultActiveLayerId = defaultActiveLayerId; exports.activeLayerAfterRemoval = activeLayerAfterRemoval; 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.componentsCoverage = componentsCoverage; 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.VECTOR_MASK_EDGE_DEFAULTS = VECTOR_MASK_EDGE_DEFAULTS; exports.vectorMaskSegments = vectorMaskSegments; exports.validVectorMaskEdges = validVectorMaskEdges; exports.hybridVectorMaskCoverage = hybridVectorMaskCoverage; exports.isActiveVectorMask = isActiveVectorMask; exports.vectorMaskCoverage = vectorMaskCoverage; exports.layerGuide = layerGuide; exports.effectiveLayerMask = effectiveLayerMask; exports.resolveVectorMasks = resolveVectorMasks; exports.offsetVectorMask = offsetVectorMask; exports.transformVectorMask = transformVectorMask; exports.followLayerMove = followLayerMove; exports.vectorMaskBounds = vectorMaskBounds; exports.vectorMaskThumbnail = vectorMaskThumbnail; exports.EDGE_COLOR_RADIUS = EDGE_COLOR_RADIUS; exports.hasEdgeUnmix = hasEdgeUnmix; exports.maskCoverageOverCanvas = maskCoverageOverCanvas; exports.hasSoftBand = hasSoftBand; exports.despillEdge = despillEdge; exports.applyEdgeUnmix = applyEdgeUnmix; 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.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.textOrientation = textOrientation; 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.ANCHOR_FRACTION = ANCHOR_FRACTION; 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.translateLayer = translateLayer; 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.readEdgeColor = readEdgeColor; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.readShapeComponents = readShapeComponents; 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.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; 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.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;
|
|
12443
|
+
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.MARGIN_FIT_MIN_GUTTER = MARGIN_FIT_MIN_GUTTER; 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.layerMaskSelection = layerMaskSelection; 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.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.TEXT_ORIENTATIONS = TEXT_ORIENTATIONS; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.MAX_EFFECT_ANIMATION_MS = MAX_EFFECT_ANIMATION_MS; 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.LayerOperationError = LayerOperationError; exports.userErrorMessage = userErrorMessage; exports.isPaintableLayer = isPaintableLayer; exports.defaultActiveLayerId = defaultActiveLayerId; exports.activeLayerAfterRemoval = activeLayerAfterRemoval; 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.componentsCoverage = componentsCoverage; 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.VECTOR_MASK_EDGE_DEFAULTS = VECTOR_MASK_EDGE_DEFAULTS; exports.vectorMaskSegments = vectorMaskSegments; exports.validVectorMaskEdges = validVectorMaskEdges; exports.hybridVectorMaskCoverage = hybridVectorMaskCoverage; exports.isActiveVectorMask = isActiveVectorMask; exports.vectorMaskCoverage = vectorMaskCoverage; exports.layerGuide = layerGuide; exports.effectiveLayerMask = effectiveLayerMask; exports.resolveVectorMasks = resolveVectorMasks; exports.offsetVectorMask = offsetVectorMask; exports.transformVectorMask = transformVectorMask; exports.followLayerMove = followLayerMove; exports.vectorMaskBounds = vectorMaskBounds; exports.vectorMaskThumbnail = vectorMaskThumbnail; exports.EDGE_COLOR_RADIUS = EDGE_COLOR_RADIUS; exports.hasEdgeUnmix = hasEdgeUnmix; exports.maskCoverageOverCanvas = maskCoverageOverCanvas; exports.hasSoftBand = hasSoftBand; exports.despillEdge = despillEdge; exports.applyEdgeUnmix = applyEdgeUnmix; 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.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.textOrientation = textOrientation; 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.ANCHOR_FRACTION = ANCHOR_FRACTION; 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.translateLayer = translateLayer; 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.readEdgeColor = readEdgeColor; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.readShapeComponents = readShapeComponents; 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.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; 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.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; exports.describeLayerEffects = describeLayerEffects; exports.createImageEffectTools = createImageEffectTools; exports.createLayerEffectTools = createLayerEffectTools;
|