@pixerate/editor 0.123.0 → 0.124.1
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/agent/index.cjs +2 -2
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.js +3 -3
- package/dist/animation/index.d.cts +2 -1
- package/dist/animation/index.d.ts +2 -1
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +11 -733
- package/dist/animation-editor/index.d.ts +11 -733
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-C-W9LFyD.d.cts → bezier-CBzKKDjl.d.cts} +2 -66
- package/dist/{bezier-DQZE5dxA.d.ts → bezier-CWv6LQal.d.ts} +2 -66
- package/dist/{brushstrokeRender-M4S65DHT.cjs → brushstrokeRender-EELTV7U4.cjs} +8 -8
- package/dist/{brushstrokeRender-M4S65DHT.cjs.map → brushstrokeRender-EELTV7U4.cjs.map} +1 -1
- package/dist/{brushstrokeRender-CDDRSV2W.js → brushstrokeRender-LRV7GXGD.js} +3 -3
- package/dist/canvas/index.cjs +6 -6
- package/dist/canvas/index.d.cts +10 -6
- package/dist/canvas/index.d.ts +10 -6
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-SMJGE7HM.cjs → chunk-4QQZV5Y5.cjs} +512 -39
- package/dist/chunk-4QQZV5Y5.cjs.map +1 -0
- package/dist/{chunk-TVXFHE4T.js → chunk-64PYNEHJ.js} +45 -12
- package/dist/chunk-64PYNEHJ.js.map +1 -0
- package/dist/{chunk-2IW3BWRT.cjs → chunk-7LQO6OHH.cjs} +2 -2
- package/dist/{chunk-2IW3BWRT.cjs.map → chunk-7LQO6OHH.cjs.map} +1 -1
- package/dist/chunk-CN4PJHUG.cjs +234 -0
- package/dist/chunk-CN4PJHUG.cjs.map +1 -0
- package/dist/chunk-FHYDQOPC.cjs +215 -0
- package/dist/chunk-FHYDQOPC.cjs.map +1 -0
- package/dist/{chunk-KMBC4HNV.js → chunk-J67OLQUQ.js} +2 -2
- package/dist/chunk-JRXJTPES.js +215 -0
- package/dist/chunk-JRXJTPES.js.map +1 -0
- package/dist/{chunk-IPFRWILU.js → chunk-ORHMVUR6.js} +488 -15
- package/dist/chunk-ORHMVUR6.js.map +1 -0
- package/dist/{chunk-6CJRDJCU.cjs → chunk-PEHYWUVV.cjs} +176 -111
- package/dist/chunk-PEHYWUVV.cjs.map +1 -0
- package/dist/chunk-QEG3GRN2.js +234 -0
- package/dist/chunk-QEG3GRN2.js.map +1 -0
- package/dist/{chunk-6ZBR4J62.js → chunk-WATAQ2Z2.js} +79 -14
- package/dist/chunk-WATAQ2Z2.js.map +1 -0
- package/dist/{chunk-RLRUAPBJ.cjs → chunk-Z6OUCS2K.cjs} +47 -14
- package/dist/chunk-Z6OUCS2K.cjs.map +1 -0
- package/dist/effects/index.cjs +605 -0
- package/dist/effects/index.cjs.map +1 -0
- package/dist/effects/index.d.cts +163 -0
- package/dist/effects/index.d.ts +163 -0
- package/dist/effects/index.js +605 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/evaluate-2S3vSPLy.d.cts +55 -0
- package/dist/evaluate-CfmT6xA3.d.ts +55 -0
- package/dist/{export-DfjzHAJI.d.ts → export-BGtXgMJ3.d.ts} +536 -128
- package/dist/{export-Dv0-ZVrV.d.cts → export-BdfY_lH0.d.ts} +392 -5
- package/dist/{export-Dv0-ZVrV.d.ts → export-CbpjwxaI.d.cts} +392 -5
- package/dist/{export-lU5qSpHE.d.cts → export-WmYoWmLM.d.cts} +536 -128
- package/dist/flair-CxB3fOcU.d.ts +739 -0
- package/dist/flair-D7BxyBwL.d.cts +739 -0
- package/dist/gradient-KDfCvhuj.d.cts +66 -0
- package/dist/gradient-KDfCvhuj.d.ts +66 -0
- package/dist/helpers-777mC6dc.d.cts +253 -0
- package/dist/helpers-DX2_7L5t.d.ts +253 -0
- package/dist/image-editor/index.cjs +1296 -805
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +39 -182
- package/dist/image-editor/index.d.ts +39 -182
- package/dist/image-editor/index.js +497 -6
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-p8Xxf-Wh.d.ts → opentype-14PDI5D2.d.ts} +1 -1
- package/dist/{opentype-BV7wWatY.d.cts → opentype-D80AVmMu.d.cts} +1 -1
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.d.cts +32 -10
- package/dist/paint/index.d.ts +32 -10
- package/dist/paint/index.js +1 -1
- package/dist/paint-editor/index.cjs +10 -8
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +11 -5
- package/dist/paint-editor/index.d.ts +11 -5
- package/dist/paint-editor/index.js +4 -2
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/parameters/index.d.cts +4 -184
- package/dist/parameters/index.d.ts +4 -184
- package/dist/{pathfinder-IxcyhO00.d.cts → pathfinder-C0UoFypx.d.cts} +1 -1
- package/dist/{pathfinder-StVChJOT.d.ts → pathfinder-DjISxkUv.d.ts} +1 -1
- package/dist/{player-DrcP2xqj.d.cts → player-CBtEoU2x.d.cts} +2 -54
- package/dist/{player-DV4Jujdq.d.ts → player-cGLrngL_.d.ts} +2 -54
- package/dist/{svg-BtND4TJu.d.cts → svg-BDrjRnL1.d.cts} +3 -2
- package/dist/{svg-BfVXG7hL.d.ts → svg-C-vZ3q50.d.ts} +3 -2
- package/dist/tools/index.cjs +2 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +3 -3
- package/dist/tools-C7JtLYzo.d.ts +126 -0
- package/dist/tools-DHKGHiSK.d.cts +126 -0
- package/dist/{types-fuXEme9j.d.ts → types-BcX7sCsn.d.ts} +2 -2
- package/dist/{types-DJF3Ghn5.d.cts → types-CznabG7m.d.cts} +2 -2
- package/dist/types-D3-J3TFf.d.ts +185 -0
- package/dist/types-DMcf_z4J.d.cts +185 -0
- package/dist/vector/index.d.cts +10 -10
- package/dist/vector/index.d.ts +10 -10
- package/dist/video-editor/index.cjs +749 -277
- package/dist/video-editor/index.cjs.map +1 -1
- package/dist/video-editor/index.d.cts +265 -138
- package/dist/video-editor/index.d.ts +265 -138
- package/dist/video-editor/index.js +490 -18
- package/dist/video-editor/index.js.map +1 -1
- package/dist/{warp-BjmAgQwq.d.cts → warp-CH9MM435.d.cts} +1 -1
- package/dist/{warp-Ca5fedzS.d.ts → warp-k_PdtXOG.d.ts} +1 -1
- package/package.json +6 -1
- package/skills/pixerate-image-editor/SKILL.md +7 -0
- package/skills/pixerate-image-editor/references/provider-effects.md +35 -0
- package/skills/pixerate-video-editor/SKILL.md +39 -1
- package/dist/chunk-6CJRDJCU.cjs.map +0 -1
- package/dist/chunk-6ZBR4J62.js.map +0 -1
- package/dist/chunk-IPFRWILU.js.map +0 -1
- package/dist/chunk-RLRUAPBJ.cjs.map +0 -1
- package/dist/chunk-SMJGE7HM.cjs.map +0 -1
- package/dist/chunk-TVXFHE4T.js.map +0 -1
- /package/dist/{brushstrokeRender-CDDRSV2W.js.map → brushstrokeRender-LRV7GXGD.js.map} +0 -0
- /package/dist/{chunk-KMBC4HNV.js.map → chunk-J67OLQUQ.js.map} +0 -0
|
@@ -4661,6 +4661,15 @@ var fail4 = (message) => {
|
|
|
4661
4661
|
throw new LayerOperationError(message);
|
|
4662
4662
|
};
|
|
4663
4663
|
var SMART_RENDER_MARGIN = _chunkMZXQTKUMcjs.MAX_EFFECT_REACH;
|
|
4664
|
+
var incompleteSurfaces = /* @__PURE__ */ new WeakSet();
|
|
4665
|
+
var isSmartSurfaceIncomplete = (surface) => incompleteSurfaces.has(surface);
|
|
4666
|
+
var surfaceIds = /* @__PURE__ */ new WeakMap();
|
|
4667
|
+
var nextSurfaceId = 0;
|
|
4668
|
+
var surfaceId = (s) => {
|
|
4669
|
+
let id = surfaceIds.get(s);
|
|
4670
|
+
if (id === void 0) surfaceIds.set(s, id = ++nextSurfaceId);
|
|
4671
|
+
return id;
|
|
4672
|
+
};
|
|
4664
4673
|
function newContentsId() {
|
|
4665
4674
|
return newLayerId("so");
|
|
4666
4675
|
}
|
|
@@ -4802,7 +4811,15 @@ function placeContents(layer, canvas, options = {}) {
|
|
|
4802
4811
|
}
|
|
4803
4812
|
function activeSmartFilters(stack) {
|
|
4804
4813
|
if (!_optionalChain([stack, 'optionalAccess', _89 => _89.enabled])) return [];
|
|
4805
|
-
return stack.filters.filter((f) => f.kind !== "psd" && isActiveFilter(f) && f.opacity > 0);
|
|
4814
|
+
return stack.filters.filter((f) => f.kind !== "psd" && f.kind !== "effect" && isActiveFilter(f) && f.opacity > 0);
|
|
4815
|
+
}
|
|
4816
|
+
function activeEffectSmartFilters(stack) {
|
|
4817
|
+
if (!_optionalChain([stack, 'optionalAccess', _90 => _90.enabled])) return [];
|
|
4818
|
+
return stack.filters.filter((f) => f.kind === "effect" && f.enabled && f.opacity > 0);
|
|
4819
|
+
}
|
|
4820
|
+
function runnableSmartFilters(stack) {
|
|
4821
|
+
if (!_optionalChain([stack, 'optionalAccess', _91 => _91.enabled])) return [];
|
|
4822
|
+
return stack.filters.filter((f) => f.opacity > 0 && (f.kind === "effect" ? f.enabled : f.kind !== "psd" && isActiveFilter(f)));
|
|
4806
4823
|
}
|
|
4807
4824
|
function filterMaskCoverage(mask, canvas) {
|
|
4808
4825
|
if (!mask || mask.enabled === false || mask.source) return null;
|
|
@@ -4823,27 +4840,41 @@ function filterMaskCoverage(mask, canvas) {
|
|
|
4823
4840
|
return v;
|
|
4824
4841
|
}
|
|
4825
4842
|
function applySmartFilters(placed, stack, canvas) {
|
|
4826
|
-
const active =
|
|
4843
|
+
const active = runnableSmartFilters(stack);
|
|
4827
4844
|
if (!active.length || !(canvas.width > 0 && canvas.height > 0)) return placed;
|
|
4828
4845
|
const W = canvas.width;
|
|
4829
4846
|
const H = canvas.height;
|
|
4830
|
-
const
|
|
4847
|
+
const token = active.some((f) => f.kind === "effect") ? _nullishCoalesce(_optionalChain([canvas, 'access', _92 => _92.effects, 'optionalAccess', _93 => _93.token]), () => ( -1)) : 0;
|
|
4848
|
+
const key = JSON.stringify([W, H, token, active.map((f) => ({ ...f, id: void 0 }))]);
|
|
4831
4849
|
let entry = filteredCache.get(placed);
|
|
4850
|
+
let incomplete = false;
|
|
4832
4851
|
if (!entry || entry.key !== key) {
|
|
4833
4852
|
const base = _chunkJ5BA3BQ6cjs.readRegion.call(void 0, placed, { x: 0, y: 0, width: W, height: H });
|
|
4834
4853
|
let acc = new Uint8ClampedArray(base);
|
|
4835
|
-
for (const f of active) {
|
|
4836
|
-
|
|
4837
|
-
|
|
4854
|
+
for (const [i, f] of active.entries()) {
|
|
4855
|
+
let out2;
|
|
4856
|
+
if (f.kind === "effect") {
|
|
4857
|
+
if (incomplete) continue;
|
|
4858
|
+
const inputKey = JSON.stringify([surfaceId(placed), W, H, active.slice(0, i + 1).map((x) => ({ ...x, id: void 0, blend: x === f ? void 0 : x.blend, opacity: x === f ? void 0 : x.opacity }))]);
|
|
4859
|
+
const r = _optionalChain([canvas, 'access', _94 => _94.effects, 'optionalAccess', _95 => _95.resolve, 'call', _96 => _96(f, acc, W, H, inputKey)]);
|
|
4860
|
+
if (!_optionalChain([r, 'optionalAccess', _97 => _97.result])) {
|
|
4861
|
+
if (_optionalChain([r, 'optionalAccess', _98 => _98.pending])) incomplete = true;
|
|
4862
|
+
continue;
|
|
4863
|
+
}
|
|
4864
|
+
out2 = new Uint8ClampedArray(r.result);
|
|
4865
|
+
} else {
|
|
4866
|
+
out2 = new Uint8ClampedArray(acc);
|
|
4867
|
+
runLayerFilters(out2, W, H, [f]);
|
|
4868
|
+
}
|
|
4838
4869
|
if (f.blend === "normal") {
|
|
4839
|
-
if (f.opacity >= 1) acc =
|
|
4840
|
-
else lerpInto(acc,
|
|
4870
|
+
if (f.opacity >= 1) acc = out2;
|
|
4871
|
+
else lerpInto(acc, out2, f.opacity, null);
|
|
4841
4872
|
} else {
|
|
4842
|
-
_chunkMZXQTKUMcjs.blendTile.call(void 0, acc,
|
|
4873
|
+
_chunkMZXQTKUMcjs.blendTile.call(void 0, acc, out2, f.blend, f.opacity, null);
|
|
4843
4874
|
}
|
|
4844
4875
|
}
|
|
4845
4876
|
entry = { key, base, filtered: acc };
|
|
4846
|
-
filteredCache.set(placed, entry);
|
|
4877
|
+
if (!incomplete) filteredCache.set(placed, entry);
|
|
4847
4878
|
}
|
|
4848
4879
|
const cov = filterMaskCoverage(stack.mask, canvas);
|
|
4849
4880
|
let result = entry.filtered;
|
|
@@ -4851,7 +4882,9 @@ function applySmartFilters(placed, stack, canvas) {
|
|
|
4851
4882
|
result = new Uint8ClampedArray(entry.base);
|
|
4852
4883
|
lerpInto(result, entry.filtered, 1, cov);
|
|
4853
4884
|
}
|
|
4854
|
-
|
|
4885
|
+
const out = _chunkJ5BA3BQ6cjs.surfaceFromPixels.call(void 0, { width: W, height: H, data: result }, 4, 0, 0);
|
|
4886
|
+
if (incomplete) incompleteSurfaces.add(out);
|
|
4887
|
+
return out;
|
|
4855
4888
|
}
|
|
4856
4889
|
function lerpInto(dst, src, k, coverage) {
|
|
4857
4890
|
for (let i = 0, p = 0; i < dst.length; i += 4, p++) {
|
|
@@ -4876,7 +4909,7 @@ function rerender(layer, canvas, action = "change") {
|
|
|
4876
4909
|
return { ...layer, surface: renderSmartObject(layer, canvas) };
|
|
4877
4910
|
}
|
|
4878
4911
|
function normalizePlacement(raw, contents) {
|
|
4879
|
-
const c = _optionalChain([raw, 'optionalAccess',
|
|
4912
|
+
const c = _optionalChain([raw, 'optionalAccess', _99 => _99.corners]);
|
|
4880
4913
|
if (!Array.isArray(c) || c.length !== 4 || !c.every((p) => p && Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
4881
4914
|
fail4("corners must be four finite points [top-left, top-right, bottom-right, bottom-left] in document pixels.");
|
|
4882
4915
|
}
|
|
@@ -4921,7 +4954,7 @@ function setSmartPlacement(layers, id, placement, canvas) {
|
|
|
4921
4954
|
masksMoved ||= m !== layer.mask;
|
|
4922
4955
|
next.mask = m;
|
|
4923
4956
|
}
|
|
4924
|
-
if (_optionalChain([next, 'access',
|
|
4957
|
+
if (_optionalChain([next, 'access', _100 => _100.smartFilters, 'optionalAccess', _101 => _101.mask])) {
|
|
4925
4958
|
const m = followMask(next.smartFilters.mask, layer, next);
|
|
4926
4959
|
masksMoved ||= m !== next.smartFilters.mask;
|
|
4927
4960
|
next.smartFilters = { ...next.smartFilters, mask: m };
|
|
@@ -4939,12 +4972,12 @@ function offsetSmartObject(layers, id, dx, dy, canvas) {
|
|
|
4939
4972
|
let next = { ...layer, placement: { ...layer.placement, corners } };
|
|
4940
4973
|
const moveMask = (m2) => m2 && m2.linked !== false && !m2.source ? { ...m2, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, m2.surface, mx, my) } : m2;
|
|
4941
4974
|
if (layer.mask) next.mask = moveMask(layer.mask);
|
|
4942
|
-
if (_optionalChain([layer, 'access',
|
|
4943
|
-
const spatial = activeSmartFilters(layer.smartFilters).some((f) => f.kind === "blur");
|
|
4975
|
+
if (_optionalChain([layer, 'access', _102 => _102.smartFilters, 'optionalAccess', _103 => _103.mask])) next.smartFilters = { ...layer.smartFilters, mask: moveMask(layer.smartFilters.mask) };
|
|
4976
|
+
const spatial = activeSmartFilters(layer.smartFilters).some((f) => f.kind === "blur") || activeEffectSmartFilters(layer.smartFilters).length > 0;
|
|
4944
4977
|
const b = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, layer.surface);
|
|
4945
4978
|
const m = SMART_RENDER_MARGIN;
|
|
4946
4979
|
const cut = b && (b.x <= -m || b.y <= -m || b.x + b.width >= canvas.width + m || b.y + b.height >= canvas.height + m);
|
|
4947
|
-
if (!spatial && !cut && !(_optionalChain([next, 'access',
|
|
4980
|
+
if (!spatial && !cut && !(_optionalChain([next, 'access', _104 => _104.smartFilters, 'optionalAccess', _105 => _105.mask]) && activeSmartFilters(next.smartFilters).length && next.smartFilters.mask.linked === false)) {
|
|
4948
4981
|
next = { ...next, surface: _chunkJ5BA3BQ6cjs.translateSurface.call(void 0, layer.surface, mx, my) };
|
|
4949
4982
|
} else {
|
|
4950
4983
|
next = rerender(next, canvas, "move");
|
|
@@ -4969,7 +5002,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
4969
5002
|
mask: moveMask(layer.mask)
|
|
4970
5003
|
};
|
|
4971
5004
|
if (!next.mask) delete next.mask;
|
|
4972
|
-
if (_optionalChain([layer, 'access',
|
|
5005
|
+
if (_optionalChain([layer, 'access', _106 => _106.smartFilters, 'optionalAccess', _107 => _107.mask])) next.smartFilters = { ...layer.smartFilters, mask: moveMask(layer.smartFilters.mask) };
|
|
4973
5006
|
return next;
|
|
4974
5007
|
}
|
|
4975
5008
|
case "group": {
|
|
@@ -5029,14 +5062,14 @@ function union(a, b) {
|
|
|
5029
5062
|
return { x, y, width: Math.max(a.x + a.width, b.x + b.width) - x, height: Math.max(a.y + a.height, b.y + b.height) - y };
|
|
5030
5063
|
}
|
|
5031
5064
|
function asSmartFilters(filters) {
|
|
5032
|
-
if (!_optionalChain([filters, 'optionalAccess',
|
|
5065
|
+
if (!_optionalChain([filters, 'optionalAccess', _108 => _108.length])) return void 0;
|
|
5033
5066
|
return { enabled: true, filters: filters.map((f) => ({ ...f, blend: "normal", opacity: 1 })) };
|
|
5034
5067
|
}
|
|
5035
5068
|
function convertToSmartObject(layers, ids, canvas, options) {
|
|
5036
5069
|
if (!ids.length) fail4("Give at least one layer id to convert.");
|
|
5037
5070
|
const locs = [...new Set(ids)].map((id) => requireLayer(layers, id));
|
|
5038
|
-
const parent = _nullishCoalesce(_optionalChain([locs, 'access',
|
|
5039
|
-
if (locs.some((l) => (_nullishCoalesce(_optionalChain([l, 'access',
|
|
5071
|
+
const parent = _nullishCoalesce(_optionalChain([locs, 'access', _109 => _109[0], 'access', _110 => _110.parent, 'optionalAccess', _111 => _111.id]), () => ( null));
|
|
5072
|
+
if (locs.some((l) => (_nullishCoalesce(_optionalChain([l, 'access', _112 => _112.parent, 'optionalAccess', _113 => _113.id]), () => ( null))) !== parent)) fail4("Layers to convert must share one parent; move them next to each other first.");
|
|
5040
5073
|
for (const l of locs) requireUnlocked(l.layer, "all", "convert it");
|
|
5041
5074
|
const ordered = locs.sort((a, b) => a.index - b.index);
|
|
5042
5075
|
const top = ordered[ordered.length - 1];
|
|
@@ -5094,7 +5127,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
|
|
|
5094
5127
|
delete first.clipped;
|
|
5095
5128
|
nested[0] = first;
|
|
5096
5129
|
}
|
|
5097
|
-
const name = _optionalChain([options, 'access',
|
|
5130
|
+
const name = _optionalChain([options, 'access', _114 => _114.name, 'optionalAccess', _115 => _115.trim, 'call', _116 => _116()]) || top.layer.name || "Smart Object";
|
|
5098
5131
|
const contents = documentContents({ layers: nested }, b.width, b.height, `${name}.psb`);
|
|
5099
5132
|
smart = {
|
|
5100
5133
|
type: "smart",
|
|
@@ -5109,7 +5142,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
|
|
|
5109
5142
|
offset: { x: 0, y: 0 }
|
|
5110
5143
|
};
|
|
5111
5144
|
}
|
|
5112
|
-
if (_optionalChain([options, 'access',
|
|
5145
|
+
if (_optionalChain([options, 'access', _117 => _117.name, 'optionalAccess', _118 => _118.trim, 'call', _119 => _119()])) smart.name = options.name.trim();
|
|
5113
5146
|
smart = { ...smart, surface: renderSmartObject(smart, canvas) };
|
|
5114
5147
|
const below = ordered.filter((l) => l.index < top.index).length;
|
|
5115
5148
|
let out = layers;
|
|
@@ -5139,12 +5172,12 @@ function rasterizeSmartObject(layers, id) {
|
|
|
5139
5172
|
function copySmartObject(layers, id, linked, name) {
|
|
5140
5173
|
const loc = requireLayer(layers, id);
|
|
5141
5174
|
const layer = requireSmartObject(layers, id);
|
|
5142
|
-
const copy = { ...layer, id: newLayerId("smart"), name: _optionalChain([name, 'optionalAccess',
|
|
5175
|
+
const copy = { ...layer, id: newLayerId("smart"), name: _optionalChain([name, 'optionalAccess', _120 => _120.trim, 'call', _121 => _121()]) || `${layer.name || "Smart Object"} copy` };
|
|
5143
5176
|
delete copy.locks;
|
|
5144
5177
|
delete copy.psd;
|
|
5145
5178
|
if (!linked) copy.contents = { ...layer.contents, id: newContentsId() };
|
|
5146
5179
|
if (copy.smartFilters) copy.smartFilters = { ...copy.smartFilters, filters: copy.smartFilters.filters.map((f) => ({ ...f, id: newLayerId("flt") })) };
|
|
5147
|
-
return { layers: _chunkMZXQTKUMcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5180
|
+
return { layers: _chunkMZXQTKUMcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _122 => _122.parent, 'optionalAccess', _123 => _123.id]), () => ( null)), loc.index + 1), layer: copy };
|
|
5148
5181
|
}
|
|
5149
5182
|
function instancesOf(layers, contentsId) {
|
|
5150
5183
|
return _chunkMZXQTKUMcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart" && l.contents.id === contentsId).map((l) => l.id);
|
|
@@ -5185,13 +5218,27 @@ function refitPlacement(layer, contents) {
|
|
|
5185
5218
|
}
|
|
5186
5219
|
function normalizeSmartFilter(raw, id = newLayerId("flt")) {
|
|
5187
5220
|
if (raw.kind === "psd") fail4("Photoshop filters can only come from a PSD; add develop or blur.");
|
|
5188
|
-
const base = normalizeFilter(raw, id);
|
|
5221
|
+
const base = raw.kind === "effect" ? normalizeEffectSmartFilter(raw, id) : normalizeFilter(raw, id);
|
|
5189
5222
|
const blend = _nullishCoalesce(raw.blend, () => ( "normal"));
|
|
5190
5223
|
if (!_chunkJ5BA3BQ6cjs.isBlendMode.call(void 0, blend) || blend === "pigment") fail4(`Unknown blend mode "${String(blend)}" for a smart filter.`);
|
|
5191
5224
|
const opacity = _nullishCoalesce(raw.opacity, () => ( 1));
|
|
5192
5225
|
if (!(typeof opacity === "number" && opacity >= 0 && opacity <= 1)) fail4("opacity must be a number from 0 to 1.");
|
|
5193
5226
|
return { ...base, blend, opacity };
|
|
5194
5227
|
}
|
|
5228
|
+
function normalizeEffectSmartFilter(raw, id) {
|
|
5229
|
+
if (typeof raw.effect !== "string" || !raw.effect) fail4('An effect smart filter needs an "effect" id from search_effects.');
|
|
5230
|
+
const values = _nullishCoalesce(raw.values, () => ( {}));
|
|
5231
|
+
if (typeof values !== "object" || values === null || Array.isArray(values)) fail4('"values" must be an object of control values.');
|
|
5232
|
+
return {
|
|
5233
|
+
id,
|
|
5234
|
+
kind: "effect",
|
|
5235
|
+
enabled: raw.enabled !== false,
|
|
5236
|
+
effect: raw.effect,
|
|
5237
|
+
...typeof raw.provider === "string" ? { provider: raw.provider } : {},
|
|
5238
|
+
...typeof raw.name === "string" ? { name: raw.name } : {},
|
|
5239
|
+
values: { ...values }
|
|
5240
|
+
};
|
|
5241
|
+
}
|
|
5195
5242
|
function withStack(layer, stack, canvas) {
|
|
5196
5243
|
const next = { ...layer };
|
|
5197
5244
|
if (stack && (stack.filters.length || stack.mask || !stack.enabled)) next.smartFilters = stack;
|
|
@@ -5202,7 +5249,7 @@ function stackOf(layer) {
|
|
|
5202
5249
|
return _nullishCoalesce(layer.smartFilters, () => ( { enabled: true, filters: [] }));
|
|
5203
5250
|
}
|
|
5204
5251
|
function requireFilter(layer, filterId) {
|
|
5205
|
-
const list2 = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
5252
|
+
const list2 = _nullishCoalesce(_optionalChain([layer, 'access', _124 => _124.smartFilters, 'optionalAccess', _125 => _125.filters]), () => ( []));
|
|
5206
5253
|
const i = list2.findIndex((f) => f.id === filterId);
|
|
5207
5254
|
if (i === -1) fail4(`Smart object "${layer.name || layer.id}" has no smart filter "${filterId}". Filters: ${list2.map((f) => `${f.id} (${f.kind})`).join(", ") || "none"}; call get_smart_object.`);
|
|
5208
5255
|
return i;
|
|
@@ -5269,7 +5316,7 @@ function setSmartFiltersEnabled(layers, id, enabled, canvas) {
|
|
|
5269
5316
|
}
|
|
5270
5317
|
function setSmartFilterMask(layers, id, mask, canvas) {
|
|
5271
5318
|
const layer = editableSmart(layers, id);
|
|
5272
|
-
if (_optionalChain([mask, 'optionalAccess',
|
|
5319
|
+
if (_optionalChain([mask, 'optionalAccess', _126 => _126.source])) fail4("A smart filter mask is painted, not generated; use a raster mask.");
|
|
5273
5320
|
const stack = { ...stackOf(layer) };
|
|
5274
5321
|
if (mask) stack.mask = mask;
|
|
5275
5322
|
else delete stack.mask;
|
|
@@ -5421,7 +5468,8 @@ function serializeLayer(layer, ctx) {
|
|
|
5421
5468
|
}
|
|
5422
5469
|
}
|
|
5423
5470
|
if (layer.fillOpacity !== void 0 && layer.fillOpacity !== 1) out.fillOpacity = layer.fillOpacity;
|
|
5424
|
-
if (_optionalChain([layer, 'access',
|
|
5471
|
+
if (_optionalChain([layer, 'access', _127 => _127.filters, 'optionalAccess', _128 => _128.length])) out.filters = JSON.parse(JSON.stringify(layer.filters));
|
|
5472
|
+
if (layer.generator) out.generator = JSON.parse(JSON.stringify(layer.generator));
|
|
5425
5473
|
if (layer.source !== "document") {
|
|
5426
5474
|
const deep = encodeDeepSurface(layer.surface);
|
|
5427
5475
|
if (deep) out.deep = deep;
|
|
@@ -5463,12 +5511,12 @@ function serializeType(layer, base, ctx) {
|
|
|
5463
5511
|
out.x = enc.x;
|
|
5464
5512
|
out.y = enc.y;
|
|
5465
5513
|
}
|
|
5466
|
-
if (_optionalChain([layer, 'access',
|
|
5514
|
+
if (_optionalChain([layer, 'access', _129 => _129.missingFonts, 'optionalAccess', _130 => _130.length])) out.missingFonts = [...layer.missingFonts];
|
|
5467
5515
|
if (layer.annotation) out.annotation = JSON.parse(JSON.stringify(layer.annotation));
|
|
5468
|
-
if (_optionalChain([layer, 'access',
|
|
5516
|
+
if (_optionalChain([layer, 'access', _131 => _131.psd, 'optionalAccess', _132 => _132.tySh]) || _optionalChain([layer, 'access', _133 => _133.psd, 'optionalAccess', _134 => _134.blocks, 'optionalAccess', _135 => _135.length])) {
|
|
5469
5517
|
out.psd = {};
|
|
5470
5518
|
if (layer.psd.tySh) out.psd.tySh = _chunkDCLJNVZScjs.bytesToBase64.call(void 0, layer.psd.tySh);
|
|
5471
|
-
if (_optionalChain([layer, 'access',
|
|
5519
|
+
if (_optionalChain([layer, 'access', _136 => _136.psd, 'access', _137 => _137.blocks, 'optionalAccess', _138 => _138.length])) out.psd.blocks = layer.psd.blocks.map((b) => ({ key: b.key, data: _chunkDCLJNVZScjs.bytesToBase64.call(void 0, b.data) }));
|
|
5472
5520
|
if (layer.psd.signature) out.psd.signature = layer.psd.signature;
|
|
5473
5521
|
}
|
|
5474
5522
|
return out;
|
|
@@ -5478,15 +5526,15 @@ function readType(r, base, ctx) {
|
|
|
5478
5526
|
try {
|
|
5479
5527
|
const text3 = normalizeText(_nullishCoalesce(r.text, () => ( "")));
|
|
5480
5528
|
const runs = (Array.isArray(r.runs) ? r.runs : []).map((run, i) => ({
|
|
5481
|
-
length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess',
|
|
5482
|
-
style: patchTextStyle(_chunk5XXMLBH4cjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess',
|
|
5529
|
+
length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess', _139 => _139.length]), 0, 1e9, 0))),
|
|
5530
|
+
style: patchTextStyle(_chunk5XXMLBH4cjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _140 => _140.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
|
|
5483
5531
|
}));
|
|
5484
5532
|
const paragraphs = (Array.isArray(r.paragraphs) ? r.paragraphs : []).map((p, i) => ({
|
|
5485
|
-
length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess',
|
|
5486
|
-
style: patchParagraphStyle({}, _optionalChain([p, 'optionalAccess',
|
|
5533
|
+
length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess', _141 => _141.length]), 0, 1e9, 0))),
|
|
5534
|
+
style: patchParagraphStyle({}, _optionalChain([p, 'optionalAccess', _142 => _142.style]) && typeof p.style === "object" ? p.style : {}, `paragraphs[${i}].style`)
|
|
5487
5535
|
}));
|
|
5488
5536
|
const f = r.frame;
|
|
5489
|
-
const frame = _optionalChain([f, 'optionalAccess',
|
|
5537
|
+
const frame = _optionalChain([f, 'optionalAccess', _143 => _143.kind]) === "box" ? { kind: "box", width: num2(f.width, 1, 1e6, 100), height: num2(f.height, 1, 1e6, 100) } : _optionalChain([f, 'optionalAccess', _144 => _144.origin]) === "top" ? { kind: "point", origin: "top" } : { kind: "point" };
|
|
5490
5538
|
const m = Array.isArray(r.transform) && r.transform.length === 6 && r.transform.every((v) => typeof v === "number" && Number.isFinite(v)) ? r.transform : void 0;
|
|
5491
5539
|
const layer = {
|
|
5492
5540
|
...base,
|
|
@@ -5498,7 +5546,7 @@ function readType(r, base, ctx) {
|
|
|
5498
5546
|
surface: _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 4),
|
|
5499
5547
|
offset: { x: 0, y: 0 }
|
|
5500
5548
|
};
|
|
5501
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access',
|
|
5549
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _145 => _145[0], 'optionalAccess', _146 => _146.style]), () => ( _chunk5XXMLBH4cjs.DEFAULT_TEXT_STYLE)) }];
|
|
5502
5550
|
if (m) layer.transform = m;
|
|
5503
5551
|
if (r.antiAlias === false) layer.antiAlias = false;
|
|
5504
5552
|
if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num2(r.fillOpacity, 0, 1, 1);
|
|
@@ -5509,10 +5557,10 @@ function readType(r, base, ctx) {
|
|
|
5509
5557
|
if (typeof r.psd.tySh === "string") psd.tySh = _chunkDCLJNVZScjs.base64ToBytes.call(void 0, r.psd.tySh);
|
|
5510
5558
|
if (Array.isArray(r.psd.blocks)) psd.blocks = r.psd.blocks.filter((b) => b && typeof b.key === "string" && typeof b.data === "string").map((b) => ({ key: b.key, data: _chunkDCLJNVZScjs.base64ToBytes.call(void 0, b.data) }));
|
|
5511
5559
|
if (typeof r.psd.signature === "string") psd.signature = r.psd.signature;
|
|
5512
|
-
if (psd.tySh || _optionalChain([psd, 'access',
|
|
5560
|
+
if (psd.tySh || _optionalChain([psd, 'access', _147 => _147.blocks, 'optionalAccess', _148 => _148.length])) layer.psd = psd;
|
|
5513
5561
|
}
|
|
5514
5562
|
if (typeof r.asset === "string") return { ...layer, surface: readSurface(r.asset, r.x, r.y, 4, 0, ctx, label), rendering: "stored" };
|
|
5515
|
-
const env = { ..._nullishCoalesce(ctx.canvas, () => ( { width: 1, height: 1 })), shaper: _nullishCoalesce(_optionalChain([ctx, 'access',
|
|
5563
|
+
const env = { ..._nullishCoalesce(ctx.canvas, () => ( { width: 1, height: 1 })), shaper: _nullishCoalesce(_optionalChain([ctx, 'access', _149 => _149.text, 'optionalAccess', _150 => _150.shaper]), () => ( null)), createCanvas: _optionalChain([ctx, 'access', _151 => _151.text, 'optionalAccess', _152 => _152.createCanvas]) };
|
|
5516
5564
|
try {
|
|
5517
5565
|
return rerenderText(layer, env);
|
|
5518
5566
|
} catch (e8) {
|
|
@@ -5535,7 +5583,7 @@ function serializeShape(layer, base) {
|
|
|
5535
5583
|
if (layer.inverted) out.inverted = true;
|
|
5536
5584
|
if (layer.fillOpacity !== void 0 && layer.fillOpacity !== 1) out.fillOpacity = layer.fillOpacity;
|
|
5537
5585
|
if (layer.annotation) out.annotation = JSON.parse(JSON.stringify(layer.annotation));
|
|
5538
|
-
if (_optionalChain([layer, 'access',
|
|
5586
|
+
if (_optionalChain([layer, 'access', _153 => _153.psd, 'optionalAccess', _154 => _154.blocks, 'optionalAccess', _155 => _155.length])) out.psd = { blocks: layer.psd.blocks.map((b) => ({ key: b.key, data: _chunkDCLJNVZScjs.bytesToBase64.call(void 0, b.data) })), ...layer.psd.signature ? { signature: layer.psd.signature } : {} };
|
|
5539
5587
|
return out;
|
|
5540
5588
|
}
|
|
5541
5589
|
function readShape(r, base, ctx) {
|
|
@@ -5549,12 +5597,12 @@ function readShape(r, base, ctx) {
|
|
|
5549
5597
|
if (!data) {
|
|
5550
5598
|
if (!Array.isArray(r.components) || !r.components.length) throw new Error("it has no components");
|
|
5551
5599
|
const components = r.components.map((c, i) => {
|
|
5552
|
-
const op = requireOperation(_optionalChain([c, 'optionalAccess',
|
|
5553
|
-
if (_optionalChain([c, 'optionalAccess',
|
|
5600
|
+
const op = requireOperation(_optionalChain([c, 'optionalAccess', _156 => _156.op]), `components[${i}].op`);
|
|
5601
|
+
if (_optionalChain([c, 'optionalAccess', _157 => _157.live])) {
|
|
5554
5602
|
const live = normalizeLiveShape(c.live, `components[${i}].live`);
|
|
5555
5603
|
return { op, subpaths: liveShapeSubpaths(live), live };
|
|
5556
5604
|
}
|
|
5557
|
-
return { op, subpaths: Array.isArray(_optionalChain([c, 'optionalAccess',
|
|
5605
|
+
return { op, subpaths: Array.isArray(_optionalChain([c, 'optionalAccess', _158 => _158.subpaths])) && !c.subpaths.length ? [] : normalizeSubpaths(_optionalChain([c, 'optionalAccess', _159 => _159.subpaths]), `components[${i}].subpaths`) };
|
|
5558
5606
|
});
|
|
5559
5607
|
data = {
|
|
5560
5608
|
components,
|
|
@@ -5625,7 +5673,7 @@ function serializeContents(c, ctx) {
|
|
|
5625
5673
|
if (c.kind === "document" && c.document) {
|
|
5626
5674
|
out.layers = c.document.layers.map((l) => serializeLayer(l, ctx));
|
|
5627
5675
|
if (c.document.globalLight) out.globalLight = { ...c.document.globalLight };
|
|
5628
|
-
if (_optionalChain([c, 'access',
|
|
5676
|
+
if (_optionalChain([c, 'access', _160 => _160.document, 'access', _161 => _161.patterns, 'optionalAccess', _162 => _162.length])) out.patterns = serializePatterns(c.document.patterns);
|
|
5629
5677
|
}
|
|
5630
5678
|
if (c.file) out.file = { type: c.file.type, data: _chunkDCLJNVZScjs.bytesToBase64.call(void 0, c.file.bytes) };
|
|
5631
5679
|
if (c.linked) out.linked = { path: c.linked.path };
|
|
@@ -5805,13 +5853,15 @@ function deserializeLayer(raw, ctx) {
|
|
|
5805
5853
|
...base,
|
|
5806
5854
|
type: "pixel",
|
|
5807
5855
|
surface: r.source === "document" ? _chunkJ5BA3BQ6cjs.emptySurface.call(void 0, 4) : readSurface(r.asset, r.x, r.y, 4, 0, ctx, `Layer "${base.name || id}"`),
|
|
5808
|
-
offset: { x: Math.round(num2(_optionalChain([r, 'access',
|
|
5856
|
+
offset: { x: Math.round(num2(_optionalChain([r, 'access', _163 => _163.offset, 'optionalAccess', _164 => _164.x]), -1e7, 1e7, 0)), y: Math.round(num2(_optionalChain([r, 'access', _165 => _165.offset, 'optionalAccess', _166 => _166.y]), -1e7, 1e7, 0)) }
|
|
5809
5857
|
};
|
|
5810
5858
|
if (r.source === "document") layer.source = "document";
|
|
5811
5859
|
else if (r.deep) layer.surface = decodeDeepSurface(layer.surface, r.deep, ctx.problems, `Layer "${base.name || id}"`);
|
|
5812
5860
|
if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num2(r.fillOpacity, 0, 1, 1);
|
|
5813
5861
|
const filters = readFilters(r.filters);
|
|
5814
5862
|
if (filters) layer.filters = filters;
|
|
5863
|
+
const generator = readEffectRef(r.generator);
|
|
5864
|
+
if (generator) layer.generator = { ...generator, ...typeof r.generator.time === "number" && r.generator.time > 0 ? { time: r.generator.time } : {} };
|
|
5815
5865
|
return layer;
|
|
5816
5866
|
}
|
|
5817
5867
|
case "adjustment": {
|
|
@@ -5836,7 +5886,7 @@ function deserializeLayer(raw, ctx) {
|
|
|
5836
5886
|
return null;
|
|
5837
5887
|
}
|
|
5838
5888
|
const annotation = JSON.parse(JSON.stringify({ ...a, id: typeof a.id === "string" ? a.id : id }));
|
|
5839
|
-
const migrated = annotationLayerFor(annotation, { ..._nullishCoalesce(ctx.canvas, () => ( { width: 1, height: 1 })), shaper: _nullishCoalesce(_optionalChain([ctx, 'access',
|
|
5889
|
+
const migrated = annotationLayerFor(annotation, { ..._nullishCoalesce(ctx.canvas, () => ( { width: 1, height: 1 })), shaper: _nullishCoalesce(_optionalChain([ctx, 'access', _167 => _167.text, 'optionalAccess', _168 => _168.shaper]), () => ( null)), createCanvas: _optionalChain([ctx, 'access', _169 => _169.text, 'optionalAccess', _170 => _170.createCanvas]) });
|
|
5840
5890
|
if (migrated.type === "shape" || migrated.type === "type") {
|
|
5841
5891
|
const blend = base.blend === "normal" ? migrated.blend : base.blend;
|
|
5842
5892
|
return { ...migrated, ...base, blend, id, name: base.name };
|
|
@@ -5898,6 +5948,15 @@ function readContents(id, ctx) {
|
|
|
5898
5948
|
memo.set(id, c);
|
|
5899
5949
|
return c;
|
|
5900
5950
|
}
|
|
5951
|
+
var isEffectValue = (x) => typeof x === "string" || typeof x === "boolean" || typeof x === "number" && Number.isFinite(x) || Array.isArray(x) && x.every((n) => typeof n === "number" && Number.isFinite(n));
|
|
5952
|
+
function readEffectRef(raw) {
|
|
5953
|
+
if (!raw || typeof raw !== "object" || typeof raw.effect !== "string" || !raw.effect) return void 0;
|
|
5954
|
+
const values = {};
|
|
5955
|
+
if (raw.values && typeof raw.values === "object") {
|
|
5956
|
+
for (const [k, v] of Object.entries(raw.values)) if (isEffectValue(v)) values[k] = Array.isArray(v) ? [...v] : v;
|
|
5957
|
+
}
|
|
5958
|
+
return { effect: raw.effect, ...typeof raw.provider === "string" ? { provider: raw.provider } : {}, ...typeof raw.name === "string" ? { name: raw.name } : {}, values };
|
|
5959
|
+
}
|
|
5901
5960
|
function readSmartFilters(raw, ctx, what) {
|
|
5902
5961
|
if (!raw || typeof raw !== "object") return void 0;
|
|
5903
5962
|
const r = raw;
|
|
@@ -5918,6 +5977,10 @@ function readSmartFilters(raw, ctx, what) {
|
|
|
5918
5977
|
} else if (f.kind === "develop" || f.kind === "blur") {
|
|
5919
5978
|
const base = plain[k++];
|
|
5920
5979
|
if (base) filters.push({ ...base, blend, opacity });
|
|
5980
|
+
} else if (f.kind === "effect") {
|
|
5981
|
+
const ref = readEffectRef(f);
|
|
5982
|
+
if (ref) filters.push({ id: typeof f.id === "string" ? f.id : newLayerId("flt"), kind: "effect", enabled: f.enabled !== false, ...ref, blend, opacity });
|
|
5983
|
+
else ctx.problems.push(`${what}: an effect smart filter without an effect id was left out`);
|
|
5921
5984
|
}
|
|
5922
5985
|
}
|
|
5923
5986
|
const stack = { enabled: r.enabled !== false, filters };
|
|
@@ -6215,7 +6278,7 @@ function descriptor(classId, items = []) {
|
|
|
6215
6278
|
return { name: "", classId, items };
|
|
6216
6279
|
}
|
|
6217
6280
|
function descGet(d, key) {
|
|
6218
|
-
return _optionalChain([d, 'access',
|
|
6281
|
+
return _optionalChain([d, 'access', _171 => _171.items, 'access', _172 => _172.find, 'call', _173 => _173(([k]) => k === key), 'optionalAccess', _174 => _174[1]]);
|
|
6219
6282
|
}
|
|
6220
6283
|
function descNumber(d, key) {
|
|
6221
6284
|
const v = descGet(d, key);
|
|
@@ -6225,7 +6288,7 @@ function descNumber(d, key) {
|
|
|
6225
6288
|
}
|
|
6226
6289
|
function descBool(d, key) {
|
|
6227
6290
|
const v = descGet(d, key);
|
|
6228
|
-
return _optionalChain([v, 'optionalAccess',
|
|
6291
|
+
return _optionalChain([v, 'optionalAccess', _175 => _175.type]) === "bool" ? v.value : void 0;
|
|
6229
6292
|
}
|
|
6230
6293
|
function descObject(d, key) {
|
|
6231
6294
|
const v = descGet(d, key);
|
|
@@ -6946,7 +7009,7 @@ var enumV = (typeId, value) => ({ type: "enum", typeId, value });
|
|
|
6946
7009
|
var obj = (d) => ({ type: "Objc", value: d });
|
|
6947
7010
|
var enumOf = (d, key) => {
|
|
6948
7011
|
const v = descGet(d, key);
|
|
6949
|
-
return _optionalChain([v, 'optionalAccess',
|
|
7012
|
+
return _optionalChain([v, 'optionalAccess', _176 => _176.type]) === "enum" ? v.value : void 0;
|
|
6950
7013
|
};
|
|
6951
7014
|
function read(data) {
|
|
6952
7015
|
try {
|
|
@@ -7028,7 +7091,7 @@ function strokeFromVstk(data, dpi, notes) {
|
|
|
7028
7091
|
const miter = descNumber(d, "strokeStyleMiterLimit");
|
|
7029
7092
|
if (miter !== void 0 && miter !== 100) stroke.miterLimit = Math.max(1, Math.min(500, miter));
|
|
7030
7093
|
const dashes = descGet(d, "strokeStyleLineDashSet");
|
|
7031
|
-
if (_optionalChain([dashes, 'optionalAccess',
|
|
7094
|
+
if (_optionalChain([dashes, 'optionalAccess', _177 => _177.type]) === "VlLs") {
|
|
7032
7095
|
const list2 = dashes.items.map((v) => v.type === "UntF" || v.type === "doub" || v.type === "long" ? v.value : NaN).filter((v) => Number.isFinite(v) && v >= 0);
|
|
7033
7096
|
if (list2.length && list2.some((v) => v > 0)) stroke.dashes = list2;
|
|
7034
7097
|
}
|
|
@@ -7180,7 +7243,7 @@ function vogkBytes(components, dpi) {
|
|
|
7180
7243
|
["keyOriginLineArrowEnd", boolV(Boolean(live.endArrow))],
|
|
7181
7244
|
["keyOriginLineArrWdth", dbl(head ? head.width / w * 100 : 0)],
|
|
7182
7245
|
["keyOriginLineArrLngth", dbl(head ? head.length / w * 100 : 0)],
|
|
7183
|
-
["keyOriginLineArrConc", long2(_optionalChain([head, 'optionalAccess',
|
|
7246
|
+
["keyOriginLineArrConc", long2(_optionalChain([head, 'optionalAccess', _178 => _178.concavity]) ? head.concavity * 100 : 0)]
|
|
7184
7247
|
];
|
|
7185
7248
|
}
|
|
7186
7249
|
const m = live.transform;
|
|
@@ -7213,7 +7276,7 @@ function shapeSignature(layer) {
|
|
|
7213
7276
|
return JSON.stringify([layer.components, layer.fill, layer.stroke, _nullishCoalesce(layer.fillRule, () => ( "nonzero")), Boolean(layer.inverted)]);
|
|
7214
7277
|
}
|
|
7215
7278
|
function shapeFromBlocks(blocks, width, height, dpi, notes) {
|
|
7216
|
-
const block = (k) => _optionalChain([blocks, 'access',
|
|
7279
|
+
const block = (k) => _optionalChain([blocks, 'access', _179 => _179.find, 'call', _180 => _180((b) => b.key === k), 'optionalAccess', _181 => _181.data]);
|
|
7217
7280
|
const vector = _nullishCoalesce(block("vsms"), () => ( block("vmsk")));
|
|
7218
7281
|
const path = vector ? componentsFromVectorBlock(vector, width, height) : null;
|
|
7219
7282
|
if (!path) return null;
|
|
@@ -7268,18 +7331,18 @@ function sameExtent(sub, c) {
|
|
|
7268
7331
|
return a.every((v, i) => Math.abs(v - b[i]) < 1);
|
|
7269
7332
|
}
|
|
7270
7333
|
function shapeBlocks(layer, width, height, dpi, notes) {
|
|
7271
|
-
const kept = _optionalChain([layer, 'access',
|
|
7272
|
-
if (_optionalChain([kept, 'optionalAccess',
|
|
7334
|
+
const kept = _optionalChain([layer, 'access', _182 => _182.psd, 'optionalAccess', _183 => _183.blocks]);
|
|
7335
|
+
if (_optionalChain([kept, 'optionalAccess', _184 => _184.length]) && _optionalChain([layer, 'access', _185 => _185.psd, 'optionalAccess', _186 => _186.signature]) === shapeSignature(layer)) return kept.map((b) => ({ key: b.key, data: b.data }));
|
|
7273
7336
|
const out = [];
|
|
7274
7337
|
out.push({ key: "vsms", data: vectorBlockForComponents(layer.components, Boolean(layer.inverted), width, height) });
|
|
7275
7338
|
if (layer.fillRule === "evenodd" && layer.components.some((c) => c.subpaths.length > 1)) notes.add("Even-odd fill rules were written as nonzero (Photoshop fills shapes nonzero)");
|
|
7276
7339
|
const fill = _nullishCoalesce(layer.fill, () => ( { type: "color", color: "#000000" }));
|
|
7277
|
-
if (_optionalChain([layer, 'access',
|
|
7340
|
+
if (_optionalChain([layer, 'access', _187 => _187.fill, 'optionalAccess', _188 => _188.opacity]) !== void 0 && layer.fill.opacity < 1) notes.add("Shape fill opacity has no PSD equivalent and was written as 100 % (use the layer fill opacity)");
|
|
7278
7341
|
out.push({ key: "vscg", data: vscgBytes(fill) });
|
|
7279
7342
|
if (layer.stroke || !layer.fill) out.push({ key: "vstk", data: vstkBytes(layer.stroke, Boolean(layer.fill), dpi) });
|
|
7280
7343
|
const vogk = vogkBytes(layer.components, dpi);
|
|
7281
7344
|
if (vogk) out.push({ key: "vogk", data: vogk });
|
|
7282
|
-
if (layer.components.some((c) => _optionalChain([c, 'access',
|
|
7345
|
+
if (layer.components.some((c) => _optionalChain([c, 'access', _189 => _189.live, 'optionalAccess', _190 => _190.kind]) === "line" && (c.live.startArrow && c.live.endArrow && JSON.stringify(c.live.startArrow) !== JSON.stringify(c.live.endArrow) || false))) {
|
|
7283
7346
|
notes.add("Lines with different start and end arrowheads were written with one arrowhead size (Photoshop has one)");
|
|
7284
7347
|
}
|
|
7285
7348
|
return out;
|
|
@@ -7488,7 +7551,7 @@ var E = {
|
|
|
7488
7551
|
bool: (value) => ({ t: "bool", value })
|
|
7489
7552
|
};
|
|
7490
7553
|
function eGet(v, key) {
|
|
7491
|
-
return _optionalChain([v, 'optionalAccess',
|
|
7554
|
+
return _optionalChain([v, 'optionalAccess', _191 => _191.t]) === "dict" ? _optionalChain([v, 'access', _192 => _192.items, 'access', _193 => _193.find, 'call', _194 => _194(([k]) => k === key), 'optionalAccess', _195 => _195[1]]) : void 0;
|
|
7492
7555
|
}
|
|
7493
7556
|
function ePath(v, keys) {
|
|
7494
7557
|
return keys.reduce((at, k) => eGet(at, k), v);
|
|
@@ -7506,7 +7569,7 @@ function eStr(v) {
|
|
|
7506
7569
|
return v && (v.t === "string" || v.t === "name") ? v.value : void 0;
|
|
7507
7570
|
}
|
|
7508
7571
|
function eArray(v) {
|
|
7509
|
-
return _optionalChain([v, 'optionalAccess',
|
|
7572
|
+
return _optionalChain([v, 'optionalAccess', _196 => _196.t]) === "array" ? v.items : [];
|
|
7510
7573
|
}
|
|
7511
7574
|
function eSet(d, key, value) {
|
|
7512
7575
|
if (d.t !== "dict") return;
|
|
@@ -7608,7 +7671,7 @@ function fontFromPostScript(ps) {
|
|
|
7608
7671
|
}
|
|
7609
7672
|
family += suffix;
|
|
7610
7673
|
const s = style.toLowerCase();
|
|
7611
|
-
const weight = _nullishCoalesce(_optionalChain([WEIGHTS, 'access',
|
|
7674
|
+
const weight = _nullishCoalesce(_optionalChain([WEIGHTS, 'access', _197 => _197.find, 'call', _198 => _198(([re]) => re.test(s)), 'optionalAccess', _199 => _199[1]]), () => ( 400));
|
|
7612
7675
|
return { family: family || ps, weight, italic: /italic|oblique|it$/.test(s) };
|
|
7613
7676
|
}
|
|
7614
7677
|
var STYLE_NAMES = [
|
|
@@ -7633,7 +7696,7 @@ var hex2 = (v) => Math.round(Math.max(0, Math.min(1, v)) * 255).toString(16).pad
|
|
|
7633
7696
|
function merged(levels) {
|
|
7634
7697
|
const items = [];
|
|
7635
7698
|
for (const l of levels) {
|
|
7636
|
-
if (_optionalChain([l, 'optionalAccess',
|
|
7699
|
+
if (_optionalChain([l, 'optionalAccess', _200 => _200.t]) !== "dict") continue;
|
|
7637
7700
|
for (const [k, v] of l.items) if (!items.some(([o]) => o === k)) items.push([k, v]);
|
|
7638
7701
|
}
|
|
7639
7702
|
return E.dict(items);
|
|
@@ -7704,10 +7767,10 @@ function typeFromTySh(data, notes) {
|
|
|
7704
7767
|
const t = parseTySh(data);
|
|
7705
7768
|
if (!t) return null;
|
|
7706
7769
|
const txtV = descGet(t.text, "Txt ");
|
|
7707
|
-
const txt = _optionalChain([txtV, 'optionalAccess',
|
|
7770
|
+
const txt = _optionalChain([txtV, 'optionalAccess', _201 => _201.type]) === "TEXT" ? txtV.value.replace(/\0+$/, "") : void 0;
|
|
7708
7771
|
const ed = descGet(t.text, "EngineData");
|
|
7709
7772
|
let engine = null;
|
|
7710
|
-
if (_optionalChain([ed, 'optionalAccess',
|
|
7773
|
+
if (_optionalChain([ed, 'optionalAccess', _202 => _202.type]) === "tdta") {
|
|
7711
7774
|
try {
|
|
7712
7775
|
engine = parseEngineData(ed.data);
|
|
7713
7776
|
} catch (e18) {
|
|
@@ -7715,12 +7778,12 @@ function typeFromTySh(data, notes) {
|
|
|
7715
7778
|
}
|
|
7716
7779
|
}
|
|
7717
7780
|
const anti = descGet(t.text, "AntA");
|
|
7718
|
-
const antiAlias = !(_optionalChain([anti, 'optionalAccess',
|
|
7781
|
+
const antiAlias = !(_optionalChain([anti, 'optionalAccess', _203 => _203.type]) === "enum" && (anti.value === "Anno" || anti.value === "antiAliasNone"));
|
|
7719
7782
|
const ornt = descGet(t.text, "Ornt");
|
|
7720
|
-
if (_optionalChain([ornt, 'optionalAccess',
|
|
7783
|
+
if (_optionalChain([ornt, 'optionalAccess', _204 => _204.type]) === "enum" && ornt.value === "Vrtc") notes.add("vertical type is laid out horizontally");
|
|
7721
7784
|
if (t.warp) {
|
|
7722
7785
|
const style = descGet(t.warp, "warpStyle");
|
|
7723
|
-
if (_optionalChain([style, 'optionalAccess',
|
|
7786
|
+
if (_optionalChain([style, 'optionalAccess', _205 => _205.type]) === "enum" && style.value !== "warpNone") notes.add("warped text is drawn without its warp when edited");
|
|
7724
7787
|
}
|
|
7725
7788
|
const edText = _nullishCoalesce(eStr(ePath(_nullishCoalesce(engine, () => ( void 0)), ["EngineDict", "Editor", "Text"])), () => ( ""));
|
|
7726
7789
|
const text3 = (_nullishCoalesce(txt, () => ( edText.replace(/\r$/, "")))).replace(/\r\n?/g, "\n");
|
|
@@ -7769,7 +7832,7 @@ function typeFromTySh(data, notes) {
|
|
|
7769
7832
|
let at = 0;
|
|
7770
7833
|
runs = ssheets.map((sheet, i) => {
|
|
7771
7834
|
const own = named(styleSet, sheet);
|
|
7772
|
-
const paraDefault = _optionalChain([paraBases, 'access',
|
|
7835
|
+
const paraDefault = _optionalChain([paraBases, 'access', _206 => _206[paraAt(at)], 'optionalAccess', _207 => _207.charDefault]);
|
|
7773
7836
|
at += _nullishCoalesce(slens[i], () => ( 0));
|
|
7774
7837
|
const d = merged([eGet(sheet, "StyleSheetData"), eGet(own, "StyleSheetData"), eGet(paraDefault, "StyleSheetData"), eGet(normalStyle, "StyleSheetData")]);
|
|
7775
7838
|
return { length: _nullishCoalesce(slens[i], () => ( 0)), style: charStyle(d, fonts, notes) };
|
|
@@ -7848,8 +7911,8 @@ var fontEntry = (name) => E.dict([
|
|
|
7848
7911
|
["Synthetic", E.int(0)]
|
|
7849
7912
|
]);
|
|
7850
7913
|
function buildEngineData(layer, template) {
|
|
7851
|
-
const e = _optionalChain([template, 'optionalAccess',
|
|
7852
|
-
if (_optionalChain([eGet, 'call',
|
|
7914
|
+
const e = _optionalChain([template, 'optionalAccess', _208 => _208.t]) === "dict" ? eClone(template) : E.dict([["EngineDict", E.dict()], ["ResourceDict", E.dict()]]);
|
|
7915
|
+
if (_optionalChain([eGet, 'call', _209 => _209(e, "EngineDict"), 'optionalAccess', _210 => _210.t]) !== "dict") eSet(e, "EngineDict", E.dict());
|
|
7853
7916
|
const dict = eGet(e, "EngineDict");
|
|
7854
7917
|
const text3 = layer.text.replace(/\n/g, "\r");
|
|
7855
7918
|
const edText = `${text3}\r`;
|
|
@@ -7928,7 +7991,7 @@ function buildEngineData(layer, template) {
|
|
|
7928
7991
|
eSet(e, key, rd);
|
|
7929
7992
|
}
|
|
7930
7993
|
eSet(rd, "FontSet", fontSet);
|
|
7931
|
-
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access',
|
|
7994
|
+
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _211 => _211[0], 'optionalAccess', _212 => _212.style]), () => ( _chunk5XXMLBH4cjs.DEFAULT_TEXT_STYLE)), 0)]])]));
|
|
7932
7995
|
if (!eGet(rd, "ParagraphSheetSet")) eSet(rd, "ParagraphSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["DefaultStyleSheet", E.int(0)], ["Properties", paragraphProperties({})]])]));
|
|
7933
7996
|
if (!eGet(rd, "TheNormalStyleSheet")) eSet(rd, "TheNormalStyleSheet", E.int(0));
|
|
7934
7997
|
if (!eGet(rd, "TheNormalParagraphSheet")) eSet(rd, "TheNormalParagraphSheet", E.int(0));
|
|
@@ -7949,12 +8012,12 @@ function inkBounds2(layer) {
|
|
|
7949
8012
|
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))];
|
|
7950
8013
|
}
|
|
7951
8014
|
function tyShForLayer(layer) {
|
|
7952
|
-
const raw = _optionalChain([layer, 'access',
|
|
7953
|
-
if (raw && _optionalChain([layer, 'access',
|
|
8015
|
+
const raw = _optionalChain([layer, 'access', _213 => _213.psd, 'optionalAccess', _214 => _214.tySh]);
|
|
8016
|
+
if (raw && _optionalChain([layer, 'access', _215 => _215.psd, 'optionalAccess', _216 => _216.signature]) === typeSignature(layer)) return raw;
|
|
7954
8017
|
const old = raw ? parseTySh(raw) : null;
|
|
7955
8018
|
const oldEd = old ? descGet(old.text, "EngineData") : void 0;
|
|
7956
8019
|
let template = null;
|
|
7957
|
-
if (_optionalChain([oldEd, 'optionalAccess',
|
|
8020
|
+
if (_optionalChain([oldEd, 'optionalAccess', _217 => _217.type]) === "tdta") {
|
|
7958
8021
|
try {
|
|
7959
8022
|
template = parseEngineData(oldEd.data);
|
|
7960
8023
|
} catch (e19) {
|
|
@@ -7986,8 +8049,8 @@ function tyShForLayer(layer) {
|
|
|
7986
8049
|
set("boundingBox", rect("boundingBox"));
|
|
7987
8050
|
if (!descGet(text3, "TextIndex")) set("TextIndex", { type: "long", value: 0 });
|
|
7988
8051
|
set("EngineData", { type: "tdta", data: writeEngineData(engine) });
|
|
7989
|
-
const warpStyle = _optionalChain([old, 'optionalAccess',
|
|
7990
|
-
const warp = _optionalChain([old, 'optionalAccess',
|
|
8052
|
+
const warpStyle = _optionalChain([old, 'optionalAccess', _218 => _218.warp]) ? descGet(old.warp, "warpStyle") : void 0;
|
|
8053
|
+
const warp = _optionalChain([old, 'optionalAccess', _219 => _219.warp]) && _optionalChain([warpStyle, 'optionalAccess', _220 => _220.type]) === "enum" && warpStyle.value === "warpNone" ? old.warp : null;
|
|
7991
8054
|
return writeTySh({ transform: textMatrix(layer), text: text3, warp, tail: new Uint8Array(16) });
|
|
7992
8055
|
}
|
|
7993
8056
|
|
|
@@ -8187,15 +8250,15 @@ var textV = (value) => ({ type: "TEXT", value });
|
|
|
8187
8250
|
var obj2 = (d) => ({ type: "Objc", value: d });
|
|
8188
8251
|
var text = (d, key) => {
|
|
8189
8252
|
const v = descGet(d, key);
|
|
8190
|
-
return _optionalChain([v, 'optionalAccess',
|
|
8253
|
+
return _optionalChain([v, 'optionalAccess', _221 => _221.type]) === "TEXT" ? v.value : void 0;
|
|
8191
8254
|
};
|
|
8192
8255
|
var enumOf2 = (d, key) => {
|
|
8193
8256
|
const v = descGet(d, key);
|
|
8194
|
-
return _optionalChain([v, 'optionalAccess',
|
|
8257
|
+
return _optionalChain([v, 'optionalAccess', _222 => _222.type]) === "enum" ? v.value : void 0;
|
|
8195
8258
|
};
|
|
8196
8259
|
var numbers = (d, key) => {
|
|
8197
8260
|
const v = descGet(d, key);
|
|
8198
|
-
if (_optionalChain([v, 'optionalAccess',
|
|
8261
|
+
if (_optionalChain([v, 'optionalAccess', _223 => _223.type]) !== "VlLs") return null;
|
|
8199
8262
|
const out = [];
|
|
8200
8263
|
for (const it of v.items) {
|
|
8201
8264
|
if (it.type === "doub" || it.type === "UntF" || it.type === "long") out.push(it.value);
|
|
@@ -8390,8 +8453,8 @@ function filterMaskItem(placed, mask, area) {
|
|
|
8390
8453
|
const painted = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, mask.surface);
|
|
8391
8454
|
let b = _nullishCoalesce(painted, () => ( { x: 0, y: 0, width: 1, height: 1 }));
|
|
8392
8455
|
if (mask.defaultValue !== 255 && area) {
|
|
8393
|
-
const x0 = Math.min(area.x, _nullishCoalesce(_optionalChain([painted, 'optionalAccess',
|
|
8394
|
-
const y0 = Math.min(area.y, _nullishCoalesce(_optionalChain([painted, 'optionalAccess',
|
|
8456
|
+
const x0 = Math.min(area.x, _nullishCoalesce(_optionalChain([painted, 'optionalAccess', _224 => _224.x]), () => ( area.x)));
|
|
8457
|
+
const y0 = Math.min(area.y, _nullishCoalesce(_optionalChain([painted, 'optionalAccess', _225 => _225.y]), () => ( area.y)));
|
|
8395
8458
|
const x1 = Math.max(area.x + area.width, painted ? painted.x + painted.width : 0);
|
|
8396
8459
|
const y1 = Math.max(area.y + area.height, painted ? painted.y + painted.height : 0);
|
|
8397
8460
|
b = { x: x0, y: y0, width: x1 - x0, height: y1 - y0 };
|
|
@@ -8411,7 +8474,7 @@ function filterMaskItem(placed, mask, area) {
|
|
|
8411
8474
|
}
|
|
8412
8475
|
var warpStyleOf = (name) => {
|
|
8413
8476
|
if (!name.startsWith("warp")) return null;
|
|
8414
|
-
const s = _optionalChain([name, 'access',
|
|
8477
|
+
const s = _optionalChain([name, 'access', _226 => _226[4], 'optionalAccess', _227 => _227.toLowerCase, 'call', _228 => _228()]) + name.slice(5);
|
|
8415
8478
|
return _chunk5XXMLBH4cjs.WARP_STYLES.includes(s) ? s : null;
|
|
8416
8479
|
};
|
|
8417
8480
|
function warpFromDescriptor(w, contents) {
|
|
@@ -8433,7 +8496,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
8433
8496
|
if (!arr || arr.type !== "ObAr") return void 0;
|
|
8434
8497
|
const xs = descGet(arr.body, "Hrzn");
|
|
8435
8498
|
const ys = descGet(arr.body, "Vrtc");
|
|
8436
|
-
if (_optionalChain([xs, 'optionalAccess',
|
|
8499
|
+
if (_optionalChain([xs, 'optionalAccess', _229 => _229.type]) !== "UnFl" || _optionalChain([ys, 'optionalAccess', _230 => _230.type]) !== "UnFl" || xs.values.length !== 16 || ys.values.length !== 16) return void 0;
|
|
8437
8500
|
mesh = { us: [0, 1], vs: [0, 1], points: xs.values.map((x, i) => ({ x, y: ys.values[i] })) };
|
|
8438
8501
|
const px2 = mesh.points.map((p) => p.x);
|
|
8439
8502
|
const py = mesh.points.map((p) => p.y);
|
|
@@ -8600,13 +8663,13 @@ function blendOptions(f) {
|
|
|
8600
8663
|
function smartFiltersFromPsd(fx, newId, notes) {
|
|
8601
8664
|
const filters = [];
|
|
8602
8665
|
const list2 = descGet(fx, "filterFXList");
|
|
8603
|
-
for (const v of _optionalChain([list2, 'optionalAccess',
|
|
8666
|
+
for (const v of _optionalChain([list2, 'optionalAccess', _231 => _231.type]) === "VlLs" ? list2.items : []) {
|
|
8604
8667
|
if (v.type !== "Objc" && v.type !== "GlbO") continue;
|
|
8605
8668
|
const item = v.value;
|
|
8606
8669
|
const { blend, opacity } = blendOptionsOf(item);
|
|
8607
8670
|
const enabled = descBool(item, "enab") !== false;
|
|
8608
8671
|
const fltr = descObject(item, "Fltr");
|
|
8609
|
-
const radius = _optionalChain([fltr, 'optionalAccess',
|
|
8672
|
+
const radius = _optionalChain([fltr, 'optionalAccess', _232 => _232.classId]) === BOX_BLUR.classId ? descNumber(fltr, "Rds ") : void 0;
|
|
8610
8673
|
if (radius !== void 0 && radius >= 0 && radius <= 50) {
|
|
8611
8674
|
filters.push({ id: newId(), kind: "blur", enabled, radius, blend, opacity });
|
|
8612
8675
|
continue;
|
|
@@ -8959,7 +9022,7 @@ function readPsd(bytes) {
|
|
|
8959
9022
|
return { header, colorModeData, resources, layers, mergedAlpha, globalBlocks, imageCompression, imageData: r.rest() };
|
|
8960
9023
|
}
|
|
8961
9024
|
function layerBlock(rec, key) {
|
|
8962
|
-
return _optionalChain([rec, 'access',
|
|
9025
|
+
return _optionalChain([rec, 'access', _233 => _233.blocks, 'access', _234 => _234.find, 'call', _235 => _235((b) => b.key === key), 'optionalAccess', _236 => _236.data]);
|
|
8963
9026
|
}
|
|
8964
9027
|
function layerName(rec) {
|
|
8965
9028
|
const luni = layerBlock(rec, "luni");
|
|
@@ -8990,7 +9053,7 @@ function u8Block(rec, key) {
|
|
|
8990
9053
|
function layerTree(file) {
|
|
8991
9054
|
const stack = [[]];
|
|
8992
9055
|
file.layers.forEach((rec, index) => {
|
|
8993
|
-
const kind = _nullishCoalesce(_optionalChain([sectionDivider, 'call',
|
|
9056
|
+
const kind = _nullishCoalesce(_optionalChain([sectionDivider, 'call', _237 => _237(rec), 'optionalAccess', _238 => _238.kind]), () => ( SECTION_OTHER));
|
|
8994
9057
|
if (kind === SECTION_DIVIDER) {
|
|
8995
9058
|
stack.push([]);
|
|
8996
9059
|
} else if (kind === SECTION_OPEN || kind === SECTION_CLOSED) {
|
|
@@ -9008,7 +9071,7 @@ function layerTree(file) {
|
|
|
9008
9071
|
}
|
|
9009
9072
|
function channelRect(rec, id) {
|
|
9010
9073
|
if (id === CHANNEL_USER_MASK && rec.mask) return rec.mask.rect;
|
|
9011
|
-
if (id === CHANNEL_REAL_USER_MASK && rec.mask) return _nullishCoalesce(_optionalChain([rec, 'access',
|
|
9074
|
+
if (id === CHANNEL_REAL_USER_MASK && rec.mask) return _nullishCoalesce(_optionalChain([rec, 'access', _239 => _239.mask, 'access', _240 => _240.real, 'optionalAccess', _241 => _241.rect]), () => ( rec.mask.rect));
|
|
9012
9075
|
return rec.rect;
|
|
9013
9076
|
}
|
|
9014
9077
|
function decodeLayerChannel(file, rec, id) {
|
|
@@ -9026,7 +9089,7 @@ function decodeMergedImage(file) {
|
|
|
9026
9089
|
return decodePlanes(file.imageCompression, file.imageData, { planes: channels, width, height, depth, psb });
|
|
9027
9090
|
}
|
|
9028
9091
|
function resource(file, id) {
|
|
9029
|
-
return _optionalChain([file, 'access',
|
|
9092
|
+
return _optionalChain([file, 'access', _242 => _242.resources, 'access', _243 => _243.find, 'call', _244 => _244((r) => r.id === id), 'optionalAccess', _245 => _245.data]);
|
|
9030
9093
|
}
|
|
9031
9094
|
function resolution(file) {
|
|
9032
9095
|
const d = resource(file, 1005);
|
|
@@ -9799,7 +9862,7 @@ function importNode(ctx, node, depth) {
|
|
|
9799
9862
|
if (node.children) {
|
|
9800
9863
|
const props2 = baseProps(ctx, rec, name, notes);
|
|
9801
9864
|
const divider = sectionDivider(rec);
|
|
9802
|
-
const key = _nullishCoalesce(_optionalChain([divider, 'optionalAccess',
|
|
9865
|
+
const key = _nullishCoalesce(_optionalChain([divider, 'optionalAccess', _246 => _246.blendKey]), () => ( rec.blendKey));
|
|
9803
9866
|
const groupBlend = key === "pass" ? "pass-through" : _nullishCoalesce(PSD_BLEND_KEYS[key], () => ( "normal"));
|
|
9804
9867
|
const children = [];
|
|
9805
9868
|
for (const child of node.children) {
|
|
@@ -9809,7 +9872,7 @@ function importNode(ctx, node, depth) {
|
|
|
9809
9872
|
const group = { type: "group", id: ctx.newId(name), ...props2, blend: groupBlend, children };
|
|
9810
9873
|
const effects2 = recordEffects(ctx, rec, name, notes, true);
|
|
9811
9874
|
if (effects2) group.effects = effects2;
|
|
9812
|
-
if (_optionalChain([divider, 'optionalAccess',
|
|
9875
|
+
if (_optionalChain([divider, 'optionalAccess', _247 => _247.kind]) === SECTION_CLOSED) group.collapsed = true;
|
|
9813
9876
|
const mask2 = recordMask(ctx, rec, name);
|
|
9814
9877
|
if (mask2) group.mask = mask2;
|
|
9815
9878
|
entry.type = "group";
|
|
@@ -10032,7 +10095,7 @@ function importSmart(ctx, rec, name, notes, props) {
|
|
|
10032
10095
|
const file = ctx.linked.get(placed.idnt);
|
|
10033
10096
|
contents = {
|
|
10034
10097
|
id: placed.idnt || ctx.newId(`${name}-contents`),
|
|
10035
|
-
name: _optionalChain([file, 'optionalAccess',
|
|
10098
|
+
name: _optionalChain([file, 'optionalAccess', _248 => _248.name]) || `${name}.png`,
|
|
10036
10099
|
width,
|
|
10037
10100
|
height,
|
|
10038
10101
|
kind: "raster",
|
|
@@ -10187,7 +10250,7 @@ function psdToLayers(file, options = {}) {
|
|
|
10187
10250
|
if (mode !== "rgb" && header.depth > 8 && header.colorMode !== MODE_INDEXED && header.colorMode !== MODE_BITMAP) {
|
|
10188
10251
|
warn.extra.push(`The file is ${header.depth}-bit ${mode}; it was converted to ${header.depth}-bit RGB.`);
|
|
10189
10252
|
} else if (mode !== "rgb" || header.depth !== 8 && header.depth !== 16 && header.depth !== 32) {
|
|
10190
|
-
const how = header.colorMode === MODE_CMYK ? ` through ${_nullishCoalesce(_optionalChain([cmykProfile, 'optionalAccess',
|
|
10253
|
+
const how = header.colorMode === MODE_CMYK ? ` through ${_nullishCoalesce(_optionalChain([cmykProfile, 'optionalAccess', _249 => _249.name]), () => ( "its profile"))}` : "";
|
|
10191
10254
|
warn.extra.push(`The file is ${header.depth}-bit ${mode}; it was converted to 8-bit RGB${how}.`);
|
|
10192
10255
|
}
|
|
10193
10256
|
let layers = [];
|
|
@@ -10293,15 +10356,15 @@ var pct = (d, key, fallback) => num3(d, key, fallback * 100) / 100;
|
|
|
10293
10356
|
var bool = (d, key) => descBool(d, key) === true;
|
|
10294
10357
|
var enumOf3 = (d, key) => {
|
|
10295
10358
|
const v = descGet(d, key);
|
|
10296
|
-
return _optionalChain([v, 'optionalAccess',
|
|
10359
|
+
return _optionalChain([v, 'optionalAccess', _250 => _250.type]) === "enum" ? v.value : void 0;
|
|
10297
10360
|
};
|
|
10298
10361
|
var text2 = (d, key) => {
|
|
10299
10362
|
const v = d ? descGet(d, key) : void 0;
|
|
10300
|
-
return _optionalChain([v, 'optionalAccess',
|
|
10363
|
+
return _optionalChain([v, 'optionalAccess', _251 => _251.type]) === "TEXT" ? v.value : "";
|
|
10301
10364
|
};
|
|
10302
10365
|
var list = (d, key) => {
|
|
10303
10366
|
const v = descGet(d, key);
|
|
10304
|
-
if (_optionalChain([v, 'optionalAccess',
|
|
10367
|
+
if (_optionalChain([v, 'optionalAccess', _252 => _252.type]) !== "VlLs") return [];
|
|
10305
10368
|
return v.items.flatMap((it) => it.type === "Objc" || it.type === "GlbO" ? [it.value] : []);
|
|
10306
10369
|
};
|
|
10307
10370
|
var clamp3 = (v, lo, hi) => Number.isFinite(v) ? Math.min(hi, Math.max(lo, v)) : lo;
|
|
@@ -10371,8 +10434,8 @@ function contourOf(d, key) {
|
|
|
10371
10434
|
return { name, points };
|
|
10372
10435
|
}
|
|
10373
10436
|
function contourDesc(c) {
|
|
10374
|
-
const name = _nullishCoalesce(_optionalChain([c, 'optionalAccess',
|
|
10375
|
-
const points = _nullishCoalesce(_optionalChain([c, 'optionalAccess',
|
|
10437
|
+
const name = _nullishCoalesce(_optionalChain([c, 'optionalAccess', _253 => _253.name]), () => ( "Linear"));
|
|
10438
|
+
const points = _nullishCoalesce(_optionalChain([c, 'optionalAccess', _254 => _254.points]), () => ( [
|
|
10376
10439
|
{ input: 0, output: 0 },
|
|
10377
10440
|
{ input: 1, output: 1 }
|
|
10378
10441
|
]));
|
|
@@ -10407,7 +10470,7 @@ function gradientOf(d, notes) {
|
|
|
10407
10470
|
{ position: 0, color: "#000000" },
|
|
10408
10471
|
{ position: 1, color: "#ffffff" }
|
|
10409
10472
|
],
|
|
10410
|
-
style: _nullishCoalesce(_optionalChain([GRADIENT_STYLES, 'access',
|
|
10473
|
+
style: _nullishCoalesce(_optionalChain([GRADIENT_STYLES, 'access', _255 => _255.find, 'call', _256 => _256(([, id]) => id === enumOf3(d, "Type")), 'optionalAccess', _257 => _257[0]]), () => ( "linear")),
|
|
10411
10474
|
angle: clamp3(num3(d, "Angl", 90), -360, 360),
|
|
10412
10475
|
scale: clamp3(pct(d, "Scl ", 1), 0.1, 1.5),
|
|
10413
10476
|
reverse: bool(d, "Rvrs"),
|
|
@@ -10461,7 +10524,7 @@ function gradientItems(g) {
|
|
|
10461
10524
|
)
|
|
10462
10525
|
)
|
|
10463
10526
|
};
|
|
10464
|
-
const op = _optionalChain([g, 'access',
|
|
10527
|
+
const op = _optionalChain([g, 'access', _258 => _258.opacityStops, 'optionalAccess', _259 => _259.length]) ? g.opacityStops : g.stops.map((s) => ({ position: s.position, opacity: 1 }));
|
|
10465
10528
|
const trns = {
|
|
10466
10529
|
type: "VlLs",
|
|
10467
10530
|
items: op.map(
|
|
@@ -10958,9 +11021,9 @@ function prepareNestedLayers(layers) {
|
|
|
10958
11021
|
if (l.type === "annotation") continue;
|
|
10959
11022
|
let next = l;
|
|
10960
11023
|
if (l.type === "group") next = { ...l, children: prepareNestedLayers(l.children) };
|
|
10961
|
-
else if (l.type === "pixel" && (_optionalChain([l, 'access',
|
|
11024
|
+
else if (l.type === "pixel" && (_optionalChain([l, 'access', _260 => _260.filters, 'optionalAccess', _261 => _261.length]) || l.source === "document")) {
|
|
10962
11025
|
const p = { ...l };
|
|
10963
|
-
if (_optionalChain([l, 'access',
|
|
11026
|
+
if (_optionalChain([l, 'access', _262 => _262.filters, 'optionalAccess', _263 => _263.some, 'call', _264 => _264(isActiveFilter)])) {
|
|
10964
11027
|
const b = l.surface.bounds;
|
|
10965
11028
|
if (b) {
|
|
10966
11029
|
const r = { x: b.x + l.offset.x - 64, y: b.y + l.offset.y - 64, width: b.width + 128, height: b.height + 128 };
|
|
@@ -10977,7 +11040,7 @@ function prepareNestedLayers(layers) {
|
|
|
10977
11040
|
delete p.source;
|
|
10978
11041
|
next = p;
|
|
10979
11042
|
}
|
|
10980
|
-
if (_optionalChain([next, 'access',
|
|
11043
|
+
if (_optionalChain([next, 'access', _265 => _265.mask, 'optionalAccess', _266 => _266.source])) {
|
|
10981
11044
|
next = { ...next };
|
|
10982
11045
|
delete next.mask;
|
|
10983
11046
|
}
|
|
@@ -11074,7 +11137,7 @@ function exportPsd(input) {
|
|
|
11074
11137
|
return {
|
|
11075
11138
|
opacity: Math.round(Math.min(1, Math.max(0, layer.opacity)) * 255),
|
|
11076
11139
|
clipping: layer.clipped ? 1 : 0,
|
|
11077
|
-
flags: (layer.visible ? 0 : LAYER_FLAG_HIDDEN) | (_optionalChain([layer, 'access',
|
|
11140
|
+
flags: (layer.visible ? 0 : LAYER_FLAG_HIDDEN) | (_optionalChain([layer, 'access', _267 => _267.locks, 'optionalAccess', _268 => _268.transparency]) ? LAYER_FLAG_TRANSPARENCY_PROTECTED : 0),
|
|
11078
11141
|
legacyName: name,
|
|
11079
11142
|
blocks
|
|
11080
11143
|
};
|
|
@@ -11131,7 +11194,7 @@ function exportPsd(input) {
|
|
|
11131
11194
|
}
|
|
11132
11195
|
case "pixel": {
|
|
11133
11196
|
if (layer.source === "document") throw new PsdError(`Layer "${layer.name}" reads the document image; resolve its pixels before export.`);
|
|
11134
|
-
if (_optionalChain([layer, 'access',
|
|
11197
|
+
if (_optionalChain([layer, 'access', _269 => _269.filters, 'optionalAccess', _270 => _270.some, 'call', _271 => _271(isActiveFilter)])) throw new PsdError(`Layer "${layer.name}" has live filters; bake them before export.`);
|
|
11135
11198
|
const extra = [];
|
|
11136
11199
|
if (layer.fillOpacity !== void 0 && layer.fillOpacity < 1) {
|
|
11137
11200
|
extra.push({ key: "iOpa", data: Uint8Array.from([Math.round(Math.max(0, layer.fillOpacity) * 255), 0, 0, 0]) });
|
|
@@ -11163,7 +11226,7 @@ function exportPsd(input) {
|
|
|
11163
11226
|
if (c.linked) note("Linked smart objects were embedded (their preview is written as the contents)", layer.name);
|
|
11164
11227
|
linkedFiles.set(idnt, smartContentsFile(c));
|
|
11165
11228
|
}
|
|
11166
|
-
let placedId = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11229
|
+
let placedId = _nullishCoalesce(_optionalChain([layer, 'access', _272 => _272.psd, 'optionalAccess', _273 => _273.placed]), () => ( psdUuid(`${layer.id}:placed`)));
|
|
11167
11230
|
if (placedIds.has(placedId)) placedId = psdUuid(`${layer.id}:placed:${placedIds.size}`);
|
|
11168
11231
|
placedIds.add(placedId);
|
|
11169
11232
|
if (placedUnchanged(layer, idnt, placedId)) {
|
|
@@ -11173,12 +11236,12 @@ function exportPsd(input) {
|
|
|
11173
11236
|
const filterFX = layer.smartFilters ? filterFXDescriptor(layer.smartFilters, dropped) : void 0;
|
|
11174
11237
|
if (dropped.length) note("Develop smart filters have no Photoshop filter and were left out of the filter list (the layer\u2019s pixels still show them)", layer.name);
|
|
11175
11238
|
const raw = layer.psd && layer.psd.key !== "PlLd" ? parsePlaced(layer.psd.key, layer.psd.data) : null;
|
|
11176
|
-
const spec = { idnt, placed: placedId, placement: layer.placement, size: { width: c.width, height: c.height }, filterFX, template: _optionalChain([raw, 'optionalAccess',
|
|
11239
|
+
const spec = { idnt, placed: placedId, placement: layer.placement, size: { width: c.width, height: c.height }, filterFX, template: _optionalChain([raw, 'optionalAccess', _274 => _274.descriptor]) };
|
|
11177
11240
|
const wnotes = [];
|
|
11178
11241
|
extra.push({ key: "PlLd", data: plldBytes(spec) }, { key: "SoLd", data: soldBytes(spec, wnotes) });
|
|
11179
11242
|
for (const n2 of wnotes) note(`A smart object: ${n2}`, layer.name);
|
|
11180
11243
|
}
|
|
11181
|
-
const fm = _optionalChain([layer, 'access',
|
|
11244
|
+
const fm = _optionalChain([layer, 'access', _275 => _275.smartFilters, 'optionalAccess', _276 => _276.mask]);
|
|
11182
11245
|
if (fm && !fm.source) filterItems.push(filterMaskItem(placedId, fm, { x: 0, y: 0, width, height }));
|
|
11183
11246
|
const rec = { ...common2(layer, extra), rect: EMPTY_RECT, channels: [], blendKey: _nullishCoalesce(BLEND_TO_PSD[layer.blend], () => ( "norm")) };
|
|
11184
11247
|
const bounds = _chunkJ5BA3BQ6cjs.contentBounds.call(void 0, layer.surface);
|
|
@@ -11206,8 +11269,8 @@ function exportPsd(input) {
|
|
|
11206
11269
|
const losses = /* @__PURE__ */ new Set();
|
|
11207
11270
|
for (const b of shapeBlocks(layer, width, height, _nullishCoalesce(input.resolution, () => ( 72)), losses)) extra.push({ key: b.key, data: padEven(b.data) });
|
|
11208
11271
|
for (const n2 of losses) note(n2, layer.name);
|
|
11209
|
-
if (_optionalChain([layer, 'access',
|
|
11210
|
-
if (_optionalChain([layer, 'access',
|
|
11272
|
+
if (_optionalChain([layer, 'access', _277 => _277.fill, 'optionalAccess', _278 => _278.type]) === "pattern") patternIds2.add(layer.fill.patternId);
|
|
11273
|
+
if (_optionalChain([layer, 'access', _279 => _279.stroke, 'optionalAccess', _280 => _280.paint, 'access', _281 => _281.type]) === "pattern") patternIds2.add(layer.stroke.paint.patternId);
|
|
11211
11274
|
} else {
|
|
11212
11275
|
extra.push({ key: "TySh", data: padEven(tyShForLayer(layer)) });
|
|
11213
11276
|
}
|
|
@@ -11264,7 +11327,7 @@ function exportPsd(input) {
|
|
|
11264
11327
|
{ id: 1005, name: "", data: rw.result() },
|
|
11265
11328
|
{ id: 1057, name: "", data: version.result() }
|
|
11266
11329
|
];
|
|
11267
|
-
if (_optionalChain([input, 'access',
|
|
11330
|
+
if (_optionalChain([input, 'access', _282 => _282.iccProfile, 'optionalAccess', _283 => _283.length])) resources.push({ id: 1039, name: "", data: input.iccProfile });
|
|
11268
11331
|
if (input.globalLight) {
|
|
11269
11332
|
const i32 = (v) => {
|
|
11270
11333
|
const w = new PsdWriter();
|
|
@@ -11670,5 +11733,7 @@ function exportPsd(input) {
|
|
|
11670
11733
|
|
|
11671
11734
|
|
|
11672
11735
|
|
|
11673
|
-
exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.SELECTION_MODES = SELECTION_MODES; exports.isSelectionMode = isSelectionMode; exports.parseSelectionMode = parseSelectionMode; exports.computeSelectionBounds = computeSelectionBounds; exports.createSelectionMask = createSelectionMask; exports.fullSelection = fullSelection; exports.isSelectionEmpty = isSelectionEmpty; exports.selectionValueAt = selectionValueAt; exports.coverageToByte = coverageToByte; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionToCoverage = selectionToCoverage; exports.selectionArea = selectionArea; exports.combineSelections = combineSelections; exports.invertSelection = invertSelection; exports.resizeSelection = resizeSelection; exports.selectionFromPixels = selectionFromPixels; exports.selectionToPixels = selectionToPixels; exports.encodeSelectionRle = encodeSelectionRle; exports.decodeSelectionRle = decodeSelectionRle; exports.serializeSelection = serializeSelection; exports.deserializeSelection = deserializeSelection; exports.hashMaskContent = hashMaskContent; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.distanceTransform = distanceTransform; exports.expandCoverage = expandCoverage; exports.contractCoverage = contractCoverage; exports.borderCoverage = borderCoverage; exports.smoothCoverage = smoothCoverage; exports.featherCoverage = featherCoverage; exports.greyMorphology = greyMorphology; exports.shiftCoverage = shiftCoverage; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.modifySelection = modifySelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.LayerOperationError = LayerOperationError; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.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.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
|
|
11674
|
-
|
|
11736
|
+
|
|
11737
|
+
|
|
11738
|
+
exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.SELECTION_MODES = SELECTION_MODES; exports.isSelectionMode = isSelectionMode; exports.parseSelectionMode = parseSelectionMode; exports.computeSelectionBounds = computeSelectionBounds; exports.createSelectionMask = createSelectionMask; exports.fullSelection = fullSelection; exports.isSelectionEmpty = isSelectionEmpty; exports.selectionValueAt = selectionValueAt; exports.coverageToByte = coverageToByte; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionToCoverage = selectionToCoverage; exports.selectionArea = selectionArea; exports.combineSelections = combineSelections; exports.invertSelection = invertSelection; exports.resizeSelection = resizeSelection; exports.selectionFromPixels = selectionFromPixels; exports.selectionToPixels = selectionToPixels; exports.encodeSelectionRle = encodeSelectionRle; exports.decodeSelectionRle = decodeSelectionRle; exports.serializeSelection = serializeSelection; exports.deserializeSelection = deserializeSelection; exports.hashMaskContent = hashMaskContent; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.distanceTransform = distanceTransform; exports.expandCoverage = expandCoverage; exports.contractCoverage = contractCoverage; exports.borderCoverage = borderCoverage; exports.smoothCoverage = smoothCoverage; exports.featherCoverage = featherCoverage; exports.greyMorphology = greyMorphology; exports.shiftCoverage = shiftCoverage; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.modifySelection = modifySelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.LayerOperationError = LayerOperationError; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
|
|
11739
|
+
//# sourceMappingURL=chunk-PEHYWUVV.cjs.map
|