@pixerate/editor 0.121.0 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/{chunk-GLOOH65Y.cjs → chunk-4PUPGALM.cjs} +196 -103
- package/dist/chunk-4PUPGALM.cjs.map +1 -0
- package/dist/{chunk-4I54JSJ6.js → chunk-CLTTLLWA.js} +1089 -981
- package/dist/chunk-CLTTLLWA.js.map +1 -0
- package/dist/{chunk-LL3RAN55.cjs → chunk-DFFBJV3U.cjs} +1839 -1731
- package/dist/chunk-DFFBJV3U.cjs.map +1 -0
- package/dist/{chunk-E6N5KLMA.js → chunk-IX3YKUVK.js} +96 -3
- package/dist/chunk-IX3YKUVK.js.map +1 -0
- package/dist/{render-B05K68_h.d.ts → deep-DLwKZDFr.d.ts} +143 -134
- package/dist/{render-DnAbIKcs.d.cts → deep-QS3ppbMX.d.cts} +143 -134
- package/dist/{export-D2D8hb_u.d.ts → export-VmTofKIk.d.ts} +11 -4
- package/dist/{export-fP2hZYjm.d.cts → export-jKKj8Fg8.d.cts} +11 -4
- package/dist/image-editor/index.cjs +678 -672
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +17 -5
- package/dist/image-editor/index.d.ts +17 -5
- package/dist/image-editor/index.js +8 -2
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +68 -68
- package/dist/paint-editor/index.d.cts +2 -2
- package/dist/paint-editor/index.d.ts +2 -2
- package/dist/paint-editor/index.js +2 -2
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.d.cts +29 -7
- package/dist/raster/index.d.ts +29 -7
- package/dist/raster/index.js +1 -1
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +23 -1
- package/skills/pixerate-image-editor/SKILL.md +7 -1
- package/skills/pixerate-image-editor/references/photoshop-files.md +4 -3
- package/skills/pixerate-paint-editor/SKILL.md +32 -7
- package/dist/chunk-4I54JSJ6.js.map +0 -1
- package/dist/chunk-E6N5KLMA.js.map +0 -1
- package/dist/chunk-GLOOH65Y.cjs.map +0 -1
- package/dist/chunk-LL3RAN55.cjs.map +0 -1
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _chunkDFFBJV3Ucjs = require('./chunk-DFFBJV3U.cjs');
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
@@ -63,6 +63,8 @@ var _chunkMUUXNRU4cjs = require('./chunk-MUUXNRU4.cjs');
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
|
|
67
|
+
|
|
66
68
|
|
|
67
69
|
|
|
68
70
|
var _chunk7ISPWEJAcjs = require('./chunk-7ISPWEJA.cjs');
|
|
@@ -1139,7 +1141,7 @@ function smoothCoverage(m, w, h, r) {
|
|
|
1139
1141
|
return src;
|
|
1140
1142
|
}
|
|
1141
1143
|
function featherCoverage(m, w, h, radius) {
|
|
1142
|
-
const out =
|
|
1144
|
+
const out = _chunkDFFBJV3Ucjs.gaussianBlur.call(void 0, m, w, h, Number.isFinite(radius) ? Math.max(0, radius) : 0, "zero");
|
|
1143
1145
|
for (let i = 0; i < out.length; i++) if (Math.abs(out[i]) < 1e-7) out[i] = 0;
|
|
1144
1146
|
return out;
|
|
1145
1147
|
}
|
|
@@ -1287,7 +1289,7 @@ function layerMaskCoverage(mask) {
|
|
|
1287
1289
|
let v = new Float32Array(sel.data.length);
|
|
1288
1290
|
for (let i = 0; i < v.length; i++) v[i] = sel.data[i] / 255;
|
|
1289
1291
|
const feather = _nullishCoalesce(mask.feather, () => ( 0));
|
|
1290
|
-
if (feather > 0) v =
|
|
1292
|
+
if (feather > 0) v = _chunkDFFBJV3Ucjs.gaussianBlur.call(void 0, v, mask.width, mask.height, feather, "clamp");
|
|
1291
1293
|
const density = _nullishCoalesce(mask.density, () => ( 1));
|
|
1292
1294
|
if (density !== 1) for (let i = 0; i < v.length; i++) v[i] = 1 - density * (1 - v[i]);
|
|
1293
1295
|
return v;
|
|
@@ -1530,7 +1532,7 @@ function normalizeAdjustmentLayers(raw) {
|
|
|
1530
1532
|
return out;
|
|
1531
1533
|
}
|
|
1532
1534
|
function curveLutFromLevels(points) {
|
|
1533
|
-
return
|
|
1535
|
+
return _chunkDFFBJV3Ucjs.curveLut.call(void 0, points.map((p) => ({ input: p.input / 255, output: p.output / 255 })));
|
|
1534
1536
|
}
|
|
1535
1537
|
var toUnitLevels = (c) => ({
|
|
1536
1538
|
inBlack: c.inBlack / 255,
|
|
@@ -2183,6 +2185,67 @@ function applyProcess2Adjustments(imageData, adjustments) {
|
|
|
2183
2185
|
if (hasOpacity) data[i + 3] = clamp(data[i + 3] * opacity);
|
|
2184
2186
|
}
|
|
2185
2187
|
}
|
|
2188
|
+
function applyProcess2Float(data, adjustments, linear) {
|
|
2189
|
+
const hasColor = !!adjustments.brightness || !!adjustments.contrast || !!adjustments.saturation || !!adjustments.exposure || !!adjustments.temperature || !!adjustments.tint;
|
|
2190
|
+
if (!hasColor) return;
|
|
2191
|
+
const { m, luts, scale, saturation } = getProcess2Plan(adjustments);
|
|
2192
|
+
const N = TONE_LUT_SIZE;
|
|
2193
|
+
const wr = LUMA_709[0], wg = LUMA_709[1], wb = LUMA_709[2];
|
|
2194
|
+
const c = [0, 0, 0];
|
|
2195
|
+
const dec = (v) => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
|
|
2196
|
+
const enc = (v) => v <= 0 ? 0 : v >= 1 ? 1 : v <= 31308e-7 ? v * 12.92 : 1.055 * Math.pow(v, 1 / 2.4) - 0.055;
|
|
2197
|
+
for (let i = 0; i < data.length; i += 4) {
|
|
2198
|
+
if (!(data[i + 3] > 0)) continue;
|
|
2199
|
+
const r0 = linear ? data[i] : dec(data[i]);
|
|
2200
|
+
const g0 = linear ? data[i + 1] : dec(data[i + 1]);
|
|
2201
|
+
const b0 = linear ? data[i + 2] : dec(data[i + 2]);
|
|
2202
|
+
c[0] = m[0] * r0 + m[1] * g0 + m[2] * b0;
|
|
2203
|
+
c[1] = m[3] * r0 + m[4] * g0 + m[5] * b0;
|
|
2204
|
+
c[2] = m[6] * r0 + m[7] * g0 + m[8] * b0;
|
|
2205
|
+
for (let ch = 0; ch < 3; ch++) {
|
|
2206
|
+
const lut = luts[ch];
|
|
2207
|
+
const v = c[ch];
|
|
2208
|
+
let f;
|
|
2209
|
+
if (v <= 0) c[ch] = lut[0];
|
|
2210
|
+
else if ((f = v * scale[ch]) >= N) c[ch] = linear ? lut[N] + (lut[N] - lut[N - 1]) * (f - N) : lut[N];
|
|
2211
|
+
else {
|
|
2212
|
+
const k = f | 0;
|
|
2213
|
+
c[ch] = lut[k] + (lut[k + 1] - lut[k]) * (f - k);
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
if (saturation !== 1) {
|
|
2217
|
+
const y = wr * c[0] + wg * c[1] + wb * c[2];
|
|
2218
|
+
for (let ch = 0; ch < 3; ch++) c[ch] = y + (c[ch] - y) * saturation;
|
|
2219
|
+
}
|
|
2220
|
+
for (let ch = 0; ch < 3; ch++) data[i + ch] = linear ? Math.max(0, c[ch]) : enc(c[ch]);
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2223
|
+
function applyBoxBlurFloat(imageData, radius) {
|
|
2224
|
+
if (radius < 1) return;
|
|
2225
|
+
const { width: w, height: h, data: src } = imageData;
|
|
2226
|
+
const temp = new Float32Array(src.length);
|
|
2227
|
+
const n = 2 * radius + 1;
|
|
2228
|
+
for (let y = 0; y < h; y++) {
|
|
2229
|
+
for (let x = 0; x < w; x++) {
|
|
2230
|
+
const d = (y * w + x) * 4;
|
|
2231
|
+
for (let c = 0; c < 4; c++) {
|
|
2232
|
+
let s = 0;
|
|
2233
|
+
for (let k = -radius; k <= radius; k++) s += src[(y * w + Math.min(w - 1, Math.max(0, x + k))) * 4 + c];
|
|
2234
|
+
temp[d + c] = s / n;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
for (let x = 0; x < w; x++) {
|
|
2239
|
+
for (let y = 0; y < h; y++) {
|
|
2240
|
+
const d = (y * w + x) * 4;
|
|
2241
|
+
for (let c = 0; c < 4; c++) {
|
|
2242
|
+
let s = 0;
|
|
2243
|
+
for (let k = -radius; k <= radius; k++) s += temp[(Math.min(h - 1, Math.max(0, y + k)) * w + x) * 4 + c];
|
|
2244
|
+
src[d + c] = s / n;
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2186
2249
|
function applyBoxBlur(imageData, radius) {
|
|
2187
2250
|
applyFastBoxBlur(imageData, radius);
|
|
2188
2251
|
}
|
|
@@ -2284,7 +2347,7 @@ function newLayerId(prefix = "layer") {
|
|
|
2284
2347
|
return `${prefix}_${Date.now().toString(36)}_${(++idCounter).toString(36)}`;
|
|
2285
2348
|
}
|
|
2286
2349
|
function pixelLayers(layers) {
|
|
2287
|
-
return
|
|
2350
|
+
return _chunkDFFBJV3Ucjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "pixel");
|
|
2288
2351
|
}
|
|
2289
2352
|
function developFilter(layer) {
|
|
2290
2353
|
return _optionalChain([layer, 'access', _10 => _10.filters, 'optionalAccess', _11 => _11.find, 'call', _12 => _12((f) => f.kind === "develop")]);
|
|
@@ -2315,10 +2378,10 @@ function isRenderedLayer(layer) {
|
|
|
2315
2378
|
return layer.type === "smart" || layer.type === "shape" || layer.type === "type";
|
|
2316
2379
|
}
|
|
2317
2380
|
function shapeLayers(layers) {
|
|
2318
|
-
return
|
|
2381
|
+
return _chunkDFFBJV3Ucjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "shape");
|
|
2319
2382
|
}
|
|
2320
2383
|
function smartObjectLayers(layers) {
|
|
2321
|
-
return
|
|
2384
|
+
return _chunkDFFBJV3Ucjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart");
|
|
2322
2385
|
}
|
|
2323
2386
|
|
|
2324
2387
|
// src/image-editor/layers/compositor.ts
|
|
@@ -2381,6 +2444,27 @@ function runLayerFilters(data, width, height, filters) {
|
|
|
2381
2444
|
else if (f.kind === "blur") applyBoxBlur({ width, height, data }, Math.min(Math.round(f.radius), 40));
|
|
2382
2445
|
}
|
|
2383
2446
|
}
|
|
2447
|
+
function runLayerFiltersFloat(data, width, height, filters, linear) {
|
|
2448
|
+
for (const f of filters) {
|
|
2449
|
+
if (!isActiveFilter(f)) continue;
|
|
2450
|
+
if (f.kind === "blur") applyBoxBlurFloat({ width, height, data }, Math.min(Math.round(f.radius), 40));
|
|
2451
|
+
else if (f.kind === "develop") {
|
|
2452
|
+
const adj = developAdjustments(f);
|
|
2453
|
+
if (normalizeProcessVersion(adj.process) === LATEST_PROCESS_VERSION) applyProcess2Float(data, adj, linear);
|
|
2454
|
+
else {
|
|
2455
|
+
const bytes = linear ? _chunk7ISPWEJAcjs.to8From32.call(void 0, data, 4) : Uint8ClampedArray.from(data, (v) => v * 255);
|
|
2456
|
+
applyLegacyAdjustments({ data: bytes }, adj);
|
|
2457
|
+
if (linear) data.set(_chunk7ISPWEJAcjs.to32From8.call(void 0, bytes, 4));
|
|
2458
|
+
else for (let i = 0; i < data.length; i++) data[i] = bytes[i] / 255;
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
function filterReach(filters) {
|
|
2464
|
+
let r = 0;
|
|
2465
|
+
for (const f of filters) if (isActiveFilter(f) && f.kind === "blur") r += Math.min(Math.round(f.radius), 40);
|
|
2466
|
+
return r;
|
|
2467
|
+
}
|
|
2384
2468
|
var filterSpecCache = /* @__PURE__ */ new WeakMap();
|
|
2385
2469
|
function pixelFilterSpec(layer) {
|
|
2386
2470
|
const list2 = layer.filters;
|
|
@@ -2424,14 +2508,20 @@ var PHOTO_PROFILE = {
|
|
|
2424
2508
|
return v;
|
|
2425
2509
|
}
|
|
2426
2510
|
};
|
|
2427
|
-
var LayerCompositor = class extends
|
|
2511
|
+
var LayerCompositor = class extends _chunkDFFBJV3Ucjs.RasterCompositor {
|
|
2428
2512
|
constructor(options = {}) {
|
|
2429
2513
|
super(PHOTO_PROFILE, options);
|
|
2430
2514
|
}
|
|
2431
2515
|
};
|
|
2432
2516
|
function compositeDeep(layers, rect, sources, depth) {
|
|
2433
|
-
const deep = new (0,
|
|
2434
|
-
applyFilterRunDeep: (run, acc, _r, masks) => applyAdjustmentLayersFloat(acc, run.map(adjustmentNodeAsLayer), masks)
|
|
2517
|
+
const deep = new (0, _chunkDFFBJV3Ucjs.DeepCompositor)(new LayerCompositor(), PHOTO_PROFILE, {
|
|
2518
|
+
applyFilterRunDeep: (run, acc, _r, masks) => applyAdjustmentLayersFloat(acc, run.map(adjustmentNodeAsLayer), masks),
|
|
2519
|
+
pixelFiltersDeep: (l) => {
|
|
2520
|
+
if (l.type !== "pixel") return null;
|
|
2521
|
+
const filters = (_nullishCoalesce(l.filters, () => ( []))).filter(isActiveFilter);
|
|
2522
|
+
if (!filters.length) return null;
|
|
2523
|
+
return { reach: filterReach(filters), apply: (data, width, height, linear) => runLayerFiltersFloat(data, width, height, filters, linear) };
|
|
2524
|
+
}
|
|
2435
2525
|
}, depth);
|
|
2436
2526
|
return deep.composite(layers, rect, sources);
|
|
2437
2527
|
}
|
|
@@ -2976,47 +3066,47 @@ var fail = (message) => {
|
|
|
2976
3066
|
throw new LayerOperationError(message);
|
|
2977
3067
|
};
|
|
2978
3068
|
function requireLayer(layers, id) {
|
|
2979
|
-
const loc =
|
|
3069
|
+
const loc = _chunkDFFBJV3Ucjs.findLayer.call(void 0, layers, id);
|
|
2980
3070
|
if (!loc) {
|
|
2981
|
-
const ids =
|
|
3071
|
+
const ids = _chunkDFFBJV3Ucjs.flattenLayers.call(void 0, layers).map((l) => l.id);
|
|
2982
3072
|
fail(`Unknown layer "${id}". ${ids.length ? `Layers: ${ids.join(", ")}.` : "The document has no layers."} Call list_layers for ids.`);
|
|
2983
3073
|
}
|
|
2984
3074
|
return loc;
|
|
2985
3075
|
}
|
|
2986
3076
|
function requireUnlocked(layer, what, action) {
|
|
2987
|
-
if (
|
|
2988
|
-
if (what !== "all" &&
|
|
3077
|
+
if (_chunkDFFBJV3Ucjs.isLayerLocked.call(void 0, layer, "all")) fail(`Layer "${layer.name || layer.id}" is locked (all); unlock it before you ${action}.`);
|
|
3078
|
+
if (what !== "all" && _chunkDFFBJV3Ucjs.isLayerLocked.call(void 0, layer, what)) fail(`Layer "${layer.name || layer.id}" has its ${what} locked; unlock it before you ${action}.`);
|
|
2989
3079
|
}
|
|
2990
3080
|
function placeLayer(layers, layer, placement = {}, defaultIndex) {
|
|
2991
3081
|
const given = [placement.aboveId, placement.belowId, placement.parentId].filter((v) => v !== void 0).length;
|
|
2992
3082
|
if (given > 1) fail("Give only one of aboveId, belowId and parentId.");
|
|
2993
3083
|
if (placement.aboveId || placement.belowId) {
|
|
2994
3084
|
const ref = requireLayer(layers, _nullishCoalesce(placement.aboveId, () => ( placement.belowId)));
|
|
2995
|
-
return
|
|
3085
|
+
return _chunkDFFBJV3Ucjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access', _21 => _21.parent, 'optionalAccess', _22 => _22.id]), () => ( null)), ref.index + (placement.aboveId ? 1 : 0));
|
|
2996
3086
|
}
|
|
2997
3087
|
if (placement.parentId) {
|
|
2998
3088
|
const ref = requireLayer(layers, placement.parentId);
|
|
2999
3089
|
if (ref.layer.type !== "group") fail(`Layer "${placement.parentId}" is not a group; parentId must be a group id.`);
|
|
3000
|
-
return
|
|
3090
|
+
return _chunkDFFBJV3Ucjs.insertLayer.call(void 0, layers, layer, ref.layer.id, placement.index);
|
|
3001
3091
|
}
|
|
3002
|
-
return
|
|
3092
|
+
return _chunkDFFBJV3Ucjs.insertLayer.call(void 0, layers, layer, null, _nullishCoalesce(placement.index, () => ( defaultIndex)));
|
|
3003
3093
|
}
|
|
3004
3094
|
function removeLayer(layers, id) {
|
|
3005
3095
|
const loc = requireLayer(layers, id);
|
|
3006
3096
|
requireUnlocked(loc.layer, "all", "delete it");
|
|
3007
|
-
return
|
|
3097
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => null);
|
|
3008
3098
|
}
|
|
3009
3099
|
function moveLayer(layers, id, placement) {
|
|
3010
3100
|
const loc = requireLayer(layers, id);
|
|
3011
3101
|
requireUnlocked(loc.layer, "all", "move it");
|
|
3012
3102
|
const target = _nullishCoalesce(_nullishCoalesce(placement.aboveId, () => ( placement.belowId)), () => ( placement.parentId));
|
|
3013
3103
|
if (target === id) fail("A layer cannot be placed relative to itself.");
|
|
3014
|
-
if (target && loc.layer.type === "group" &&
|
|
3104
|
+
if (target && loc.layer.type === "group" && _chunkDFFBJV3Ucjs.flattenLayers.call(void 0, loc.layer.children).some((l) => l.id === target)) {
|
|
3015
3105
|
fail(`Group "${id}" cannot be moved into its own child "${target}".`);
|
|
3016
3106
|
}
|
|
3017
3107
|
if (target) requireLayer(layers, target);
|
|
3018
3108
|
if (!target && placement.index === void 0) fail("Give aboveId, belowId, parentId or index.");
|
|
3019
|
-
const without =
|
|
3109
|
+
const without = _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => null);
|
|
3020
3110
|
return placeLayer(without, loc.layer, placement);
|
|
3021
3111
|
}
|
|
3022
3112
|
function withNewIds(layer) {
|
|
@@ -3035,7 +3125,7 @@ function duplicateLayer(layers, id, name) {
|
|
|
3035
3125
|
const copy = withNewIds(loc.layer);
|
|
3036
3126
|
copy.name = _nullishCoalesce(name, () => ( `${loc.layer.name || "Layer"} copy`));
|
|
3037
3127
|
delete copy.locks;
|
|
3038
|
-
return { layers:
|
|
3128
|
+
return { layers: _chunkDFFBJV3Ucjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _25 => _25.parent, 'optionalAccess', _26 => _26.id]), () => ( null)), loc.index + 1), id: copy.id };
|
|
3039
3129
|
}
|
|
3040
3130
|
function setLayerProperties(layers, id, props) {
|
|
3041
3131
|
const loc = requireLayer(layers, id);
|
|
@@ -3082,7 +3172,7 @@ function setLayerProperties(layers, id, props) {
|
|
|
3082
3172
|
if (props.collapsed) g.collapsed = true;
|
|
3083
3173
|
else delete g.collapsed;
|
|
3084
3174
|
}
|
|
3085
|
-
return
|
|
3175
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next);
|
|
3086
3176
|
}
|
|
3087
3177
|
function groupLayers(layers, ids, name = "Group") {
|
|
3088
3178
|
if (!ids.length) fail("Give at least one layer id to group.");
|
|
@@ -3111,17 +3201,17 @@ function groupLayers(layers, ids, name = "Group") {
|
|
|
3111
3201
|
group.children[0] = c;
|
|
3112
3202
|
}
|
|
3113
3203
|
let out = layers;
|
|
3114
|
-
for (const l of ordered) out =
|
|
3115
|
-
return { layers:
|
|
3204
|
+
for (const l of ordered) out = _chunkDFFBJV3Ucjs.mapLayer.call(void 0, out, l.layer.id, () => null);
|
|
3205
|
+
return { layers: _chunkDFFBJV3Ucjs.insertLayer.call(void 0, out, group, parent, top - below), id: group.id };
|
|
3116
3206
|
}
|
|
3117
3207
|
function ungroupLayer(layers, id) {
|
|
3118
3208
|
const loc = requireLayer(layers, id);
|
|
3119
3209
|
if (loc.layer.type !== "group") fail(`Layer "${id}" is not a group.`);
|
|
3120
3210
|
requireUnlocked(loc.layer, "all", "ungroup it");
|
|
3121
3211
|
const group = loc.layer;
|
|
3122
|
-
let out =
|
|
3212
|
+
let out = _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => null);
|
|
3123
3213
|
group.children.forEach((c, i) => {
|
|
3124
|
-
out =
|
|
3214
|
+
out = _chunkDFFBJV3Ucjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access', _35 => _35.parent, 'optionalAccess', _36 => _36.id]), () => ( null)), loc.index + i);
|
|
3125
3215
|
});
|
|
3126
3216
|
return { layers: out, ids: group.children.map((c) => c.id) };
|
|
3127
3217
|
}
|
|
@@ -3136,12 +3226,12 @@ function offsetLayer(layers, id, offset) {
|
|
|
3136
3226
|
if (mask && mask.linked === false && !mask.source) {
|
|
3137
3227
|
next.mask = { ...mask, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, mask.surface, layer.offset.x - next.offset.x, layer.offset.y - next.offset.y) };
|
|
3138
3228
|
}
|
|
3139
|
-
return
|
|
3229
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next);
|
|
3140
3230
|
}
|
|
3141
3231
|
function setLayerMask(layers, id, mask) {
|
|
3142
3232
|
const loc = requireLayer(layers, id);
|
|
3143
3233
|
requireUnlocked(loc.layer, "all", "change its mask");
|
|
3144
|
-
return
|
|
3234
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, (l) => {
|
|
3145
3235
|
const next = { ...l };
|
|
3146
3236
|
if (mask) next.mask = mask;
|
|
3147
3237
|
else delete next.mask;
|
|
@@ -3180,7 +3270,7 @@ function requirePixelLayer(layers, id) {
|
|
|
3180
3270
|
function addLayerFilter(layers, id, filter) {
|
|
3181
3271
|
const layer = requirePixelLayer(layers, id);
|
|
3182
3272
|
if (_optionalChain([layer, 'access', _37 => _37.filters, 'optionalAccess', _38 => _38.some, 'call', _39 => _39((f) => f.kind === filter.kind)])) fail(`Layer "${id}" already has a ${filter.kind} filter; change it with update_layer_filter.`);
|
|
3183
|
-
return
|
|
3273
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters: [..._nullishCoalesce(layer.filters, () => ( [])), filter] }));
|
|
3184
3274
|
}
|
|
3185
3275
|
function updateLayerFilter(layers, id, filterId, changes) {
|
|
3186
3276
|
const layer = requirePixelLayer(layers, id);
|
|
@@ -3191,7 +3281,7 @@ function updateLayerFilter(layers, id, filterId, changes) {
|
|
|
3191
3281
|
const merged2 = normalizeFilter({ ...current, ...changes, kind: current.kind }, current.id);
|
|
3192
3282
|
const filters = [...layer.filters];
|
|
3193
3283
|
filters[i] = merged2;
|
|
3194
|
-
return
|
|
3284
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters }));
|
|
3195
3285
|
}
|
|
3196
3286
|
function removeLayerFilter(layers, id, filterId) {
|
|
3197
3287
|
const layer = requirePixelLayer(layers, id);
|
|
@@ -3200,7 +3290,7 @@ function removeLayerFilter(layers, id, filterId) {
|
|
|
3200
3290
|
const next = { ...layer };
|
|
3201
3291
|
if (filters.length) next.filters = filters;
|
|
3202
3292
|
else delete next.filters;
|
|
3203
|
-
return
|
|
3293
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next);
|
|
3204
3294
|
}
|
|
3205
3295
|
function requireEffectLayer(layers, id, action) {
|
|
3206
3296
|
const layer = requireLayer(layers, id).layer;
|
|
@@ -3215,7 +3305,7 @@ function guard(fn) {
|
|
|
3215
3305
|
try {
|
|
3216
3306
|
return fn();
|
|
3217
3307
|
} catch (e) {
|
|
3218
|
-
if (e instanceof
|
|
3308
|
+
if (e instanceof _chunkDFFBJV3Ucjs.LayerEffectError) fail(e.message);
|
|
3219
3309
|
throw e;
|
|
3220
3310
|
}
|
|
3221
3311
|
}
|
|
@@ -3223,20 +3313,20 @@ function setLayerEffects(layers, id, effects) {
|
|
|
3223
3313
|
const layer = requireEffectLayer(layers, id, "change its effects");
|
|
3224
3314
|
const next = { ...layer };
|
|
3225
3315
|
if (effects && (effects.items.length || effects.psd || effects.scale !== void 0 || !effects.enabled)) {
|
|
3226
|
-
guard(() =>
|
|
3316
|
+
guard(() => _chunkDFFBJV3Ucjs.validateLayerEffects.call(void 0, effects));
|
|
3227
3317
|
next.effects = effects;
|
|
3228
3318
|
} else delete next.effects;
|
|
3229
|
-
return
|
|
3319
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next);
|
|
3230
3320
|
}
|
|
3231
3321
|
function addLayerEffect(layers, id, kind, params = {}, index) {
|
|
3232
|
-
if (!
|
|
3322
|
+
if (!_chunkDFFBJV3Ucjs.isLayerEffectKind.call(void 0, kind)) fail(`Unknown effect kind "${String(kind)}". Kinds: ${_chunkDFFBJV3Ucjs.LAYER_EFFECT_KINDS.join(", ")}.`);
|
|
3233
3323
|
const layer = requireEffectLayer(layers, id, "add effects");
|
|
3234
3324
|
const current = layerEffectsOf(layer);
|
|
3235
3325
|
const ids = new Set(current.items.map((e) => e.id));
|
|
3236
|
-
let effectId =
|
|
3237
|
-
while (ids.has(effectId)) effectId =
|
|
3326
|
+
let effectId = _chunkDFFBJV3Ucjs.newEffectId.call(void 0, );
|
|
3327
|
+
while (ids.has(effectId)) effectId = _chunkDFFBJV3Ucjs.newEffectId.call(void 0, );
|
|
3238
3328
|
const { id: _ignored, kind: _kind, ...rest } = params;
|
|
3239
|
-
const effect = guard(() =>
|
|
3329
|
+
const effect = guard(() => _chunkDFFBJV3Ucjs.mergeLayerEffect.call(void 0, _chunkDFFBJV3Ucjs.defaultLayerEffect.call(void 0, kind, effectId), rest));
|
|
3240
3330
|
const items = [...current.items];
|
|
3241
3331
|
const at = index === void 0 ? items.length : Math.max(0, Math.min(items.length, Math.floor(index)));
|
|
3242
3332
|
items.splice(at, 0, effect);
|
|
@@ -3253,7 +3343,7 @@ function updateLayerEffect(layers, id, effectId, changes) {
|
|
|
3253
3343
|
const i = requireEffect(layer, effectId);
|
|
3254
3344
|
const current = layer.effects;
|
|
3255
3345
|
const items = [...current.items];
|
|
3256
|
-
items[i] = guard(() =>
|
|
3346
|
+
items[i] = guard(() => _chunkDFFBJV3Ucjs.mergeLayerEffect.call(void 0, items[i], changes));
|
|
3257
3347
|
return setLayerEffects(layers, id, { ...current, items });
|
|
3258
3348
|
}
|
|
3259
3349
|
function removeLayerEffect(layers, id, effectId) {
|
|
@@ -3288,7 +3378,7 @@ function unionRect(a, b) {
|
|
|
3288
3378
|
}
|
|
3289
3379
|
|
|
3290
3380
|
// src/image-editor/layers/shape.ts
|
|
3291
|
-
var SHAPE_RENDER_MARGIN =
|
|
3381
|
+
var SHAPE_RENDER_MARGIN = _chunkDFFBJV3Ucjs.MAX_EFFECT_REACH;
|
|
3292
3382
|
var DEFAULT_MITER_LIMIT = 100;
|
|
3293
3383
|
var fail2 = (message) => {
|
|
3294
3384
|
throw new LayerOperationError(message);
|
|
@@ -3504,11 +3594,11 @@ function fillCoverage(geo, rect, rule, inverted = false) {
|
|
|
3504
3594
|
function paintContext(env) {
|
|
3505
3595
|
const tiles = /* @__PURE__ */ new Map();
|
|
3506
3596
|
return {
|
|
3507
|
-
light:
|
|
3597
|
+
light: _chunkDFFBJV3Ucjs.DEFAULT_GLOBAL_LIGHT,
|
|
3508
3598
|
pattern: (id) => {
|
|
3509
3599
|
if (tiles.has(id)) return tiles.get(id);
|
|
3510
|
-
const p = _nullishCoalesce(_optionalChain([env, 'access', _44 => _44.pattern, 'optionalCall', _45 => _45(id)]), () => (
|
|
3511
|
-
const t = p && p.width > 0 && p.height > 0 && p.data.length >= p.width * p.height * 4 ? new (0,
|
|
3600
|
+
const p = _nullishCoalesce(_optionalChain([env, 'access', _44 => _44.pattern, 'optionalCall', _45 => _45(id)]), () => ( _chunkDFFBJV3Ucjs.builtinPattern.call(void 0, id)));
|
|
3601
|
+
const t = p && p.width > 0 && p.height > 0 && p.data.length >= p.width * p.height * 4 ? new (0, _chunkDFFBJV3Ucjs.PatternTile)(p) : null;
|
|
3512
3602
|
tiles.set(id, t);
|
|
3513
3603
|
return t;
|
|
3514
3604
|
}
|
|
@@ -3539,9 +3629,9 @@ function renderShapeRect(layer, rect, env, ctx = paintContext(env)) {
|
|
|
3539
3629
|
if (!fCov && !sCov) return null;
|
|
3540
3630
|
const canvas = { x: 0, y: 0, width: env.width, height: env.height };
|
|
3541
3631
|
const anchor = { x: geo.frame.x, y: geo.frame.y };
|
|
3542
|
-
const fc = fCov ?
|
|
3632
|
+
const fc = fCov ? _chunkDFFBJV3Ucjs.effectFillColors.call(void 0, layer.fill, rect, geo.frame, canvas, anchor, ctx) : null;
|
|
3543
3633
|
const fo = _nullishCoalesce(_optionalChain([layer, 'access', _46 => _46.fill, 'optionalAccess', _47 => _47.opacity]), () => ( 1));
|
|
3544
|
-
const sc = sCov ?
|
|
3634
|
+
const sc = sCov ? _chunkDFFBJV3Ucjs.effectFillColors.call(void 0, layer.stroke.paint, rect, geo.frame, canvas, anchor, ctx) : null;
|
|
3545
3635
|
const so = _nullishCoalesce(_optionalChain([layer, 'access', _48 => _48.stroke, 'optionalAccess', _49 => _49.paint, 'access', _50 => _50.opacity]), () => ( 1));
|
|
3546
3636
|
const out = new Uint8ClampedArray(n * 4);
|
|
3547
3637
|
let any = false;
|
|
@@ -3634,9 +3724,9 @@ function normalizeShapePaint(v, path = "paint") {
|
|
|
3634
3724
|
offset: _nullishCoalesce(g.offset, () => ( { x: 0, y: 0 }))
|
|
3635
3725
|
};
|
|
3636
3726
|
try {
|
|
3637
|
-
|
|
3727
|
+
_chunkDFFBJV3Ucjs.validateEffectGradient.call(void 0, gradient, `${path}.gradient`);
|
|
3638
3728
|
} catch (e) {
|
|
3639
|
-
if (e instanceof
|
|
3729
|
+
if (e instanceof _chunkDFFBJV3Ucjs.LayerEffectError) fail2(e.message);
|
|
3640
3730
|
throw e;
|
|
3641
3731
|
}
|
|
3642
3732
|
if (gradient.stops.length < 1) fail2(`${path}.gradient.stops needs at least one { position, color }.`);
|
|
@@ -3848,7 +3938,7 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
|
|
|
3848
3938
|
if (!("annotation" in patch)) delete next.annotation;
|
|
3849
3939
|
if (!next.components.length) fail2("A shape needs at least one component; delete the layer instead.");
|
|
3850
3940
|
const rendered = rerenderShape(next, env);
|
|
3851
|
-
return { layers:
|
|
3941
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
|
|
3852
3942
|
}
|
|
3853
3943
|
function transformShapeComponents(components, f, affine) {
|
|
3854
3944
|
return components.map((c) => {
|
|
@@ -3879,7 +3969,7 @@ function shapeAsPixelLayer(layer) {
|
|
|
3879
3969
|
}
|
|
3880
3970
|
function annotationPaint(color, opacity) {
|
|
3881
3971
|
const c = parseCssColor(color);
|
|
3882
|
-
if (!c || !
|
|
3972
|
+
if (!c || !_chunkDFFBJV3Ucjs.parseEffectColor.call(void 0, c.hex)) return void 0;
|
|
3883
3973
|
const a = c.alpha * opacity;
|
|
3884
3974
|
return a !== 1 ? { type: "color", color: c.hex, opacity: a } : { type: "color", color: c.hex };
|
|
3885
3975
|
}
|
|
@@ -3960,7 +4050,7 @@ function annotationOfShape(layer) {
|
|
|
3960
4050
|
var fail3 = (message) => {
|
|
3961
4051
|
throw new LayerOperationError(message);
|
|
3962
4052
|
};
|
|
3963
|
-
var TEXT_RENDER_MARGIN =
|
|
4053
|
+
var TEXT_RENDER_MARGIN = _chunkDFFBJV3Ucjs.MAX_EFFECT_REACH;
|
|
3964
4054
|
function textMatrix(layer) {
|
|
3965
4055
|
return _nullishCoalesce(layer.transform, () => ( _chunkVYW7JBTMcjs.IDENTITY_MATRIX));
|
|
3966
4056
|
}
|
|
@@ -4246,7 +4336,7 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
|
|
|
4246
4336
|
if (!next.runs.length) next.runs = [{ length: 0, style: _chunkVYW7JBTMcjs.styleAt.call(void 0, current.runs, 0, _chunkVYW7JBTMcjs.DEFAULT_TEXT_STYLE) }];
|
|
4247
4337
|
if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkVYW7JBTMcjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
|
|
4248
4338
|
const rendered = rerenderText(next, env);
|
|
4249
|
-
return { layers:
|
|
4339
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
|
|
4250
4340
|
}
|
|
4251
4341
|
function replaceTextRange(layer, start, end, insert) {
|
|
4252
4342
|
const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
|
|
@@ -4763,7 +4853,7 @@ function geometryHomography(geometry) {
|
|
|
4763
4853
|
var fail4 = (message) => {
|
|
4764
4854
|
throw new LayerOperationError(message);
|
|
4765
4855
|
};
|
|
4766
|
-
var SMART_RENDER_MARGIN =
|
|
4856
|
+
var SMART_RENDER_MARGIN = _chunkDFFBJV3Ucjs.MAX_EFFECT_REACH;
|
|
4767
4857
|
function newContentsId() {
|
|
4768
4858
|
return newLayerId("so");
|
|
4769
4859
|
}
|
|
@@ -4870,7 +4960,7 @@ function placeContents(layer, canvas, options = {}) {
|
|
|
4870
4960
|
k = step;
|
|
4871
4961
|
let r = _optionalChain([options, 'access', _84 => _84.reduced, 'optionalAccess', _85 => _85.get, 'call', _86 => _86(k)]);
|
|
4872
4962
|
if (!r) {
|
|
4873
|
-
r =
|
|
4963
|
+
r = _chunkDFFBJV3Ucjs.reduceSurface.call(void 0, src, k);
|
|
4874
4964
|
_optionalChain([options, 'access', _87 => _87.reduced, 'optionalAccess', _88 => _88.set, 'call', _89 => _89(k, r)]);
|
|
4875
4965
|
}
|
|
4876
4966
|
source = r;
|
|
@@ -4880,15 +4970,15 @@ function placeContents(layer, canvas, options = {}) {
|
|
|
4880
4970
|
if (hasWarp(g)) {
|
|
4881
4971
|
const f = transformMap(g);
|
|
4882
4972
|
if (!f) fail4("The placement folds the contents over itself or through the horizon; keep the corners a convex quad.");
|
|
4883
|
-
out =
|
|
4973
|
+
out = _chunkDFFBJV3Ucjs.warpSurface.call(void 0, source, (p) => f({ x: p.x * k, y: p.y * k }), { interpolation, source: box2, clip, step: step > 1 ? step : void 0 });
|
|
4884
4974
|
} else {
|
|
4885
4975
|
const h = transformHomography(g);
|
|
4886
4976
|
if (!h) fail4("The placement folds the contents over itself or through the horizon; keep the corners a convex quad.");
|
|
4887
4977
|
const hk = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, [k, 0, 0, 0, k, 0, 0, 0, 1], h);
|
|
4888
|
-
out =
|
|
4978
|
+
out = _chunkDFFBJV3Ucjs.transformSurface.call(void 0, source, hk, { interpolation, source: box2, clip, step: step > 1 ? step : void 0 });
|
|
4889
4979
|
}
|
|
4890
4980
|
} catch (e) {
|
|
4891
|
-
if (e instanceof
|
|
4981
|
+
if (e instanceof _chunkDFFBJV3Ucjs.TransformTooLargeError) fail4(e.message);
|
|
4892
4982
|
throw e;
|
|
4893
4983
|
}
|
|
4894
4984
|
}
|
|
@@ -4920,7 +5010,7 @@ function filterMaskCoverage(mask, canvas) {
|
|
|
4920
5010
|
}
|
|
4921
5011
|
const feather = _nullishCoalesce(mask.feather, () => ( 0));
|
|
4922
5012
|
if (all && !(feather > 0)) return null;
|
|
4923
|
-
if (feather > 0) v =
|
|
5013
|
+
if (feather > 0) v = _chunkDFFBJV3Ucjs.gaussianBlur.call(void 0, v, W, H, feather, "clamp");
|
|
4924
5014
|
const density = _nullishCoalesce(mask.density, () => ( 1));
|
|
4925
5015
|
if (density !== 1) for (let i = 0; i < v.length; i++) v[i] = 1 - density * (1 - v[i]);
|
|
4926
5016
|
return v;
|
|
@@ -4942,7 +5032,7 @@ function applySmartFilters(placed, stack, canvas) {
|
|
|
4942
5032
|
if (f.opacity >= 1) acc = out;
|
|
4943
5033
|
else lerpInto(acc, out, f.opacity, null);
|
|
4944
5034
|
} else {
|
|
4945
|
-
|
|
5035
|
+
_chunkDFFBJV3Ucjs.blendTile.call(void 0, acc, out, f.blend, f.opacity, null);
|
|
4946
5036
|
}
|
|
4947
5037
|
}
|
|
4948
5038
|
entry = { key, base, filtered: acc };
|
|
@@ -4989,7 +5079,7 @@ function normalizePlacement(raw, contents) {
|
|
|
4989
5079
|
out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
4990
5080
|
}
|
|
4991
5081
|
if (raw.interpolation !== void 0) {
|
|
4992
|
-
if (!
|
|
5082
|
+
if (!_chunkDFFBJV3Ucjs.isInterpolation.call(void 0, raw.interpolation)) fail4(`Unknown interpolation "${String(raw.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
4993
5083
|
if (raw.interpolation !== "bicubic") out.interpolation = raw.interpolation;
|
|
4994
5084
|
}
|
|
4995
5085
|
const g = { box: { x: 0, y: 0, width: contents.width, height: contents.height }, corners: out.corners, warp: _nullishCoalesce(out.warp, () => ( null)) };
|
|
@@ -5009,7 +5099,7 @@ function followMask(mask, before, after) {
|
|
|
5009
5099
|
const inv = _chunkMUUXNRU4cjs.invertHomography.call(void 0, h0);
|
|
5010
5100
|
if (!inv) return mask;
|
|
5011
5101
|
const delta = _chunkMUUXNRU4cjs.multiplyHomographies.call(void 0, inv, h1);
|
|
5012
|
-
const surface =
|
|
5102
|
+
const surface = _chunkDFFBJV3Ucjs.transformSurface.call(void 0, mask.surface, delta, { interpolation: "bilinear" });
|
|
5013
5103
|
return { ...mask, surface };
|
|
5014
5104
|
}
|
|
5015
5105
|
function setSmartPlacement(layers, id, placement, canvas) {
|
|
@@ -5030,7 +5120,7 @@ function setSmartPlacement(layers, id, placement, canvas) {
|
|
|
5030
5120
|
next.smartFilters = { ...next.smartFilters, mask: m };
|
|
5031
5121
|
}
|
|
5032
5122
|
next = rerender(next, canvas, "be transformed");
|
|
5033
|
-
return { layers:
|
|
5123
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next, masksMoved };
|
|
5034
5124
|
}
|
|
5035
5125
|
function offsetSmartObject(layers, id, dx, dy, canvas) {
|
|
5036
5126
|
const layer = requireSmartObject(layers, id);
|
|
@@ -5052,7 +5142,7 @@ function offsetSmartObject(layers, id, dx, dy, canvas) {
|
|
|
5052
5142
|
} else {
|
|
5053
5143
|
next = rerender(next, canvas, "move");
|
|
5054
5144
|
}
|
|
5055
|
-
return
|
|
5145
|
+
return _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next);
|
|
5056
5146
|
}
|
|
5057
5147
|
function translateLayer(layer, dx, dy) {
|
|
5058
5148
|
if (!dx && !dy) return layer;
|
|
@@ -5120,7 +5210,7 @@ function layerExtent(layer, surfaceOf, canvas) {
|
|
|
5120
5210
|
} else {
|
|
5121
5211
|
b = full;
|
|
5122
5212
|
}
|
|
5123
|
-
const m =
|
|
5213
|
+
const m = _chunkDFFBJV3Ucjs.effectsMargin.call(void 0, layer.effects);
|
|
5124
5214
|
if (b && m > 0) b = { x: b.x - Math.ceil(m), y: b.y - Math.ceil(m), width: b.width + 2 * Math.ceil(m), height: b.height + 2 * Math.ceil(m) };
|
|
5125
5215
|
return b;
|
|
5126
5216
|
}
|
|
@@ -5189,7 +5279,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
|
|
|
5189
5279
|
delete resolved.source;
|
|
5190
5280
|
layer = resolved;
|
|
5191
5281
|
}
|
|
5192
|
-
if (
|
|
5282
|
+
if (_chunkDFFBJV3Ucjs.flattenLayers.call(void 0, [layer]).some((x) => x.type === "pixel" && x.source === "document")) fail4(`Layer "${layer.name || layer.id}" holds the document image inside a group; convert the Background on its own.`);
|
|
5193
5283
|
return translateLayer(layer, -b.x, -b.y);
|
|
5194
5284
|
});
|
|
5195
5285
|
if (nested[0].clipped) {
|
|
@@ -5216,8 +5306,8 @@ function convertToSmartObject(layers, ids, canvas, options) {
|
|
|
5216
5306
|
smart = { ...smart, surface: renderSmartObject(smart, canvas) };
|
|
5217
5307
|
const below = ordered.filter((l) => l.index < top.index).length;
|
|
5218
5308
|
let out = layers;
|
|
5219
|
-
for (const l of ordered) out =
|
|
5220
|
-
return { layers:
|
|
5309
|
+
for (const l of ordered) out = _chunkDFFBJV3Ucjs.mapLayer.call(void 0, out, l.layer.id, () => null);
|
|
5310
|
+
return { layers: _chunkDFFBJV3Ucjs.insertLayer.call(void 0, out, smart, parent, top.index - below), layer: smart };
|
|
5221
5311
|
}
|
|
5222
5312
|
function rasterizeSmartObject(layers, id) {
|
|
5223
5313
|
const layer = requireSmartObject(layers, id);
|
|
@@ -5237,7 +5327,7 @@ function rasterizeSmartObject(layers, id) {
|
|
|
5237
5327
|
if (layer.locks) out.locks = layer.locks;
|
|
5238
5328
|
if (layer.effects) out.effects = layer.effects;
|
|
5239
5329
|
if (layer.fillOpacity !== void 0) out.fillOpacity = layer.fillOpacity;
|
|
5240
|
-
return { layers:
|
|
5330
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => out), layer: out };
|
|
5241
5331
|
}
|
|
5242
5332
|
function copySmartObject(layers, id, linked, name) {
|
|
5243
5333
|
const loc = requireLayer(layers, id);
|
|
@@ -5247,19 +5337,19 @@ function copySmartObject(layers, id, linked, name) {
|
|
|
5247
5337
|
delete copy.psd;
|
|
5248
5338
|
if (!linked) copy.contents = { ...layer.contents, id: newContentsId() };
|
|
5249
5339
|
if (copy.smartFilters) copy.smartFilters = { ...copy.smartFilters, filters: copy.smartFilters.filters.map((f) => ({ ...f, id: newLayerId("flt") })) };
|
|
5250
|
-
return { layers:
|
|
5340
|
+
return { layers: _chunkDFFBJV3Ucjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _114 => _114.parent, 'optionalAccess', _115 => _115.id]), () => ( null)), loc.index + 1), layer: copy };
|
|
5251
5341
|
}
|
|
5252
5342
|
function instancesOf(layers, contentsId) {
|
|
5253
|
-
return
|
|
5343
|
+
return _chunkDFFBJV3Ucjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart" && l.contents.id === contentsId).map((l) => l.id);
|
|
5254
5344
|
}
|
|
5255
5345
|
function replaceContents(layers, contentsId, contents, canvas) {
|
|
5256
5346
|
const ids = instancesOf(layers, contentsId);
|
|
5257
5347
|
if (!ids.length) fail4(`No smart object uses contents "${contentsId}".`);
|
|
5258
|
-
for (const id of ids) requireUnlocked(
|
|
5348
|
+
for (const id of ids) requireUnlocked(_chunkDFFBJV3Ucjs.findLayer.call(void 0, layers, id).layer, "all", "replace its contents");
|
|
5259
5349
|
const next = { ...contents, id: contentsId };
|
|
5260
5350
|
let out = layers;
|
|
5261
5351
|
for (const id of ids) {
|
|
5262
|
-
out =
|
|
5352
|
+
out = _chunkDFFBJV3Ucjs.mapLayer.call(void 0, out, id, (l) => {
|
|
5263
5353
|
const layer = l;
|
|
5264
5354
|
return rerender({ ...layer, contents: next, placement: refitPlacement(layer, next) }, canvas, "take the new contents");
|
|
5265
5355
|
});
|
|
@@ -5322,7 +5412,7 @@ function addSmartFilter(layers, id, filter, canvas, index) {
|
|
|
5322
5412
|
const at = index === void 0 ? filters.length : Math.max(0, Math.min(filters.length, Math.floor(index)));
|
|
5323
5413
|
filters.splice(at, 0, filter);
|
|
5324
5414
|
const next = withStack(layer, { ...stack, filters }, canvas);
|
|
5325
|
-
return { layers:
|
|
5415
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next, filter };
|
|
5326
5416
|
}
|
|
5327
5417
|
function updateSmartFilter(layers, id, filterId, changes, canvas) {
|
|
5328
5418
|
const layer = editableSmart(layers, id);
|
|
@@ -5344,7 +5434,7 @@ function updateSmartFilter(layers, id, filterId, changes, canvas) {
|
|
|
5344
5434
|
const filters = [...layer.smartFilters.filters];
|
|
5345
5435
|
filters[i] = merged2;
|
|
5346
5436
|
const next = withStack(layer, { ...layer.smartFilters, filters }, canvas);
|
|
5347
|
-
return { layers:
|
|
5437
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next, filter: merged2 };
|
|
5348
5438
|
}
|
|
5349
5439
|
function removeSmartFilter(layers, id, filterId, canvas) {
|
|
5350
5440
|
const layer = editableSmart(layers, id);
|
|
@@ -5352,7 +5442,7 @@ function removeSmartFilter(layers, id, filterId, canvas) {
|
|
|
5352
5442
|
const stack = layer.smartFilters;
|
|
5353
5443
|
const filters = stack.filters.filter((f) => f.id !== filterId);
|
|
5354
5444
|
const next = withStack(layer, filters.length ? { ...stack, filters } : stack.enabled ? void 0 : { enabled: false, filters }, canvas);
|
|
5355
|
-
return { layers:
|
|
5445
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
|
|
5356
5446
|
}
|
|
5357
5447
|
function moveSmartFilter(layers, id, filterId, index, canvas) {
|
|
5358
5448
|
const layer = editableSmart(layers, id);
|
|
@@ -5363,12 +5453,12 @@ function moveSmartFilter(layers, id, filterId, index, canvas) {
|
|
|
5363
5453
|
const [f] = filters.splice(i, 1);
|
|
5364
5454
|
filters.splice(index, 0, f);
|
|
5365
5455
|
const next = withStack(layer, { ...layer.smartFilters, filters }, canvas);
|
|
5366
|
-
return { layers:
|
|
5456
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
|
|
5367
5457
|
}
|
|
5368
5458
|
function setSmartFiltersEnabled(layers, id, enabled, canvas) {
|
|
5369
5459
|
const layer = editableSmart(layers, id);
|
|
5370
5460
|
const next = withStack(layer, { ...stackOf(layer), enabled: Boolean(enabled) }, canvas);
|
|
5371
|
-
return { layers:
|
|
5461
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
|
|
5372
5462
|
}
|
|
5373
5463
|
function setSmartFilterMask(layers, id, mask, canvas) {
|
|
5374
5464
|
const layer = editableSmart(layers, id);
|
|
@@ -5377,7 +5467,7 @@ function setSmartFilterMask(layers, id, mask, canvas) {
|
|
|
5377
5467
|
if (mask) stack.mask = mask;
|
|
5378
5468
|
else delete stack.mask;
|
|
5379
5469
|
const next = withStack(layer, stack, canvas);
|
|
5380
|
-
return { layers:
|
|
5470
|
+
return { layers: _chunkDFFBJV3Ucjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
|
|
5381
5471
|
}
|
|
5382
5472
|
function withFilterMaskSurface(layer, surface, canvas) {
|
|
5383
5473
|
const stack = stackOf(layer);
|
|
@@ -5487,7 +5577,7 @@ function deserializeEffects(raw) {
|
|
|
5487
5577
|
psd = void 0;
|
|
5488
5578
|
}
|
|
5489
5579
|
}
|
|
5490
|
-
return
|
|
5580
|
+
return _chunkDFFBJV3Ucjs.normalizeLayerEffects.call(void 0, { ...r, psd });
|
|
5491
5581
|
}
|
|
5492
5582
|
function serializeMask(mask, hint, ctx) {
|
|
5493
5583
|
const out = { defaultValue: mask.defaultValue };
|
|
@@ -6040,7 +6130,7 @@ function readSmartObject(r, base, ctx) {
|
|
|
6040
6130
|
try {
|
|
6041
6131
|
const raw = { corners: p.corners };
|
|
6042
6132
|
if (p.warp && _chunkVYW7JBTMcjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
|
|
6043
|
-
if (
|
|
6133
|
+
if (_chunkDFFBJV3Ucjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
|
|
6044
6134
|
placement = normalizePlacement(raw, contents);
|
|
6045
6135
|
} catch (e) {
|
|
6046
6136
|
ctx.problems.push(`${what}: its placement is invalid (${e instanceof Error ? e.message : String(e)}); it was placed at the top left`);
|
|
@@ -9873,7 +9963,7 @@ function recordEffects(ctx, rec, name, notes, group) {
|
|
|
9873
9963
|
}
|
|
9874
9964
|
for (const e of parsed.effects.items) {
|
|
9875
9965
|
for (const id of patternIds(e)) {
|
|
9876
|
-
if (ctx.patterns.has(id) ||
|
|
9966
|
+
if (ctx.patterns.has(id) || _chunkDFFBJV3Ucjs.builtinPattern.call(void 0, id)) continue;
|
|
9877
9967
|
ctx.warn.add("A pattern effect uses a pattern the file does not contain, and paints nothing", name);
|
|
9878
9968
|
notes.push(`pattern "${id}" is not in the file`);
|
|
9879
9969
|
}
|
|
@@ -10426,34 +10516,34 @@ function blendOf(d, key, fallback, notes) {
|
|
|
10426
10516
|
function colorOf(d, fallback = "#000000") {
|
|
10427
10517
|
if (!d) return fallback;
|
|
10428
10518
|
const g = (k) => descNumber(d, k);
|
|
10429
|
-
if (g("redFloat") !== void 0) return
|
|
10519
|
+
if (g("redFloat") !== void 0) return _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, [g("redFloat"), _nullishCoalesce(g("greenFloat"), () => ( 0)), _nullishCoalesce(g("blueFloat"), () => ( 0))]);
|
|
10430
10520
|
switch (d.classId) {
|
|
10431
10521
|
case "HSBC": {
|
|
10432
10522
|
const rgb = decodePsdColor(1, [(_nullishCoalesce(g("H "), () => ( 0))) / 360 * 65535, (_nullishCoalesce(g("Strt"), () => ( 0))) / 100 * 65535, (_nullishCoalesce(g("Brgh"), () => ( 0))) / 100 * 65535]);
|
|
10433
|
-
return rgb ?
|
|
10523
|
+
return rgb ? _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, rgb) : fallback;
|
|
10434
10524
|
}
|
|
10435
10525
|
case "CMYC": {
|
|
10436
10526
|
const inv = (k) => (1 - (_nullishCoalesce(g(k), () => ( 0))) / 100) * 65535;
|
|
10437
10527
|
const rgb = decodePsdColor(2, [inv("Cyn "), inv("Mgnt"), inv("Ylw "), inv("Blck")]);
|
|
10438
|
-
return rgb ?
|
|
10528
|
+
return rgb ? _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, rgb) : fallback;
|
|
10439
10529
|
}
|
|
10440
10530
|
case "LbCl": {
|
|
10441
10531
|
const rgb = decodePsdColor(7, [(_nullishCoalesce(g("Lmnc"), () => ( 0))) * 100, Math.round((_nullishCoalesce(g("A "), () => ( 0))) * 100) & 65535, Math.round((_nullishCoalesce(g("B "), () => ( 0))) * 100) & 65535]);
|
|
10442
|
-
return rgb ?
|
|
10532
|
+
return rgb ? _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, rgb) : fallback;
|
|
10443
10533
|
}
|
|
10444
10534
|
case "Grsc": {
|
|
10445
10535
|
const v = 1 - (_nullishCoalesce(g("Gry "), () => ( 0))) / 100;
|
|
10446
|
-
return
|
|
10536
|
+
return _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, [v, v, v]);
|
|
10447
10537
|
}
|
|
10448
10538
|
}
|
|
10449
10539
|
const r = g("Rd ");
|
|
10450
10540
|
const gr = g("Grn ");
|
|
10451
10541
|
const b = g("Bl ");
|
|
10452
10542
|
if (r === void 0 || gr === void 0 || b === void 0) return fallback;
|
|
10453
|
-
return
|
|
10543
|
+
return _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, [r / 255, gr / 255, b / 255]);
|
|
10454
10544
|
}
|
|
10455
10545
|
function colorDesc(hex) {
|
|
10456
|
-
const [r, g, b] = _nullishCoalesce(
|
|
10546
|
+
const [r, g, b] = _nullishCoalesce(_chunkDFFBJV3Ucjs.parseEffectColor.call(void 0, hex), () => ( [0, 0, 0]));
|
|
10457
10547
|
return descriptor("RGBC", [
|
|
10458
10548
|
["Rd ", dbl3(r * 255)],
|
|
10459
10549
|
["Grn ", dbl3(g * 255)],
|
|
@@ -10536,9 +10626,9 @@ function gradientOf(d, notes) {
|
|
|
10536
10626
|
raw.forEach((s, i) => {
|
|
10537
10627
|
if (i > 0 && Math.abs(s.mid - 0.5) > 1e-3) {
|
|
10538
10628
|
const a = raw[i - 1];
|
|
10539
|
-
const ca =
|
|
10540
|
-
const cb =
|
|
10541
|
-
stops.push({ position: a.position + (s.position - a.position) * s.mid, color:
|
|
10629
|
+
const ca = _chunkDFFBJV3Ucjs.parseEffectColor.call(void 0, a.color);
|
|
10630
|
+
const cb = _chunkDFFBJV3Ucjs.parseEffectColor.call(void 0, s.color);
|
|
10631
|
+
stops.push({ position: a.position + (s.position - a.position) * s.mid, color: _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, ca.map((v, k) => (v + cb[k]) / 2)) });
|
|
10542
10632
|
notes.add("gradient midpoints are drawn as straight segments");
|
|
10543
10633
|
}
|
|
10544
10634
|
stops.push({ position: s.position, color: s.color });
|
|
@@ -10650,8 +10740,8 @@ var KINDS = [
|
|
|
10650
10740
|
["FrFX", "frameFXMulti", "stroke"]
|
|
10651
10741
|
];
|
|
10652
10742
|
function common(d, kind, notes) {
|
|
10653
|
-
const def =
|
|
10654
|
-
return { id:
|
|
10743
|
+
const def = _chunkDFFBJV3Ucjs.defaultLayerEffect.call(void 0, kind, "x");
|
|
10744
|
+
return { id: _chunkDFFBJV3Ucjs.newEffectId.call(void 0, ), enabled: descBool(d, "enab") !== false, blend: blendOf(d, "Md ", def.blend, notes), opacity: clamp3(pct(d, "Opct", def.opacity), 0, 1) };
|
|
10655
10745
|
}
|
|
10656
10746
|
function readOne(kind, d, notes) {
|
|
10657
10747
|
const size = (key, fallback) => clamp3(num3(d, key, fallback), 0, 250);
|
|
@@ -10694,7 +10784,7 @@ function readOne(kind, d, notes) {
|
|
|
10694
10784
|
case "bevel-emboss": {
|
|
10695
10785
|
const styles = { OtrB: "outer-bevel", InrB: "inner-bevel", Embs: "emboss", PlEb: "pillow-emboss", strokeEmboss: "stroke-emboss" };
|
|
10696
10786
|
const out = {
|
|
10697
|
-
id:
|
|
10787
|
+
id: _chunkDFFBJV3Ucjs.newEffectId.call(void 0, ),
|
|
10698
10788
|
enabled: descBool(d, "enab") !== false,
|
|
10699
10789
|
kind,
|
|
10700
10790
|
style: _nullishCoalesce(styles[_nullishCoalesce(enumOf3(d, "bvlS"), () => ( ""))], () => ( "inner-bevel")),
|
|
@@ -10905,10 +10995,10 @@ function writeLfx2(effects) {
|
|
|
10905
10995
|
["Scl ", unit3("#Prc", 100)],
|
|
10906
10996
|
["masterFXSwitch", boolV3(effects.enabled)]
|
|
10907
10997
|
];
|
|
10908
|
-
const scale =
|
|
10998
|
+
const scale = _chunkDFFBJV3Ucjs.effectsScale.call(void 0, effects);
|
|
10909
10999
|
let dropped = 0;
|
|
10910
11000
|
for (const [single, multi, kind] of KINDS) {
|
|
10911
|
-
const of = effects.items.filter((e) => e.kind === kind).map((e) => writeOne(
|
|
11001
|
+
const of = effects.items.filter((e) => e.kind === kind).map((e) => writeOne(_chunkDFFBJV3Ucjs.scaleLayerEffect.call(void 0, e, scale)));
|
|
10912
11002
|
if (!of.length) continue;
|
|
10913
11003
|
if (of.length === 1) items.push([single, obj3(of[0])]);
|
|
10914
11004
|
else if (multi) items.push([multi, { type: "VlLs", items: of.map(obj3) }]);
|
|
@@ -10940,7 +11030,7 @@ function parseLrfx(data) {
|
|
|
10940
11030
|
const colorAt = (rd) => {
|
|
10941
11031
|
rd.u16();
|
|
10942
11032
|
const c = [rd.u16(), rd.u16(), rd.u16(), rd.u16()];
|
|
10943
|
-
return
|
|
11033
|
+
return _chunkDFFBJV3Ucjs.effectColorHex.call(void 0, [c[0] >> 8, c[1] >> 8, c[2] >> 8].map((v) => v / 255));
|
|
10944
11034
|
};
|
|
10945
11035
|
const blendAt = (rd) => {
|
|
10946
11036
|
rd.skip(4);
|
|
@@ -10959,7 +11049,7 @@ function parseLrfx(data) {
|
|
|
10959
11049
|
const enabled = b.u8() !== 0;
|
|
10960
11050
|
const useGlobalLight = b.u8() !== 0;
|
|
10961
11051
|
const opacity = b.u8() / 255;
|
|
10962
|
-
const base = { id:
|
|
11052
|
+
const base = { id: _chunkDFFBJV3Ucjs.newEffectId.call(void 0, ), enabled, blend, opacity, color, angle, useGlobalLight, distance: clamp3(distance, 0, 3e4), size: clamp3(blur, 0, 250), antiAlias: false, noise: 0 };
|
|
10963
11053
|
items.push(key === "dsdw" ? { ...base, kind: "drop-shadow", spread: 0, knocksOut: true } : { ...base, kind: "inner-shadow", choke: 0 });
|
|
10964
11054
|
} else if (key === "oglw" || key === "iglw") {
|
|
10965
11055
|
b.u32();
|
|
@@ -10969,7 +11059,7 @@ function parseLrfx(data) {
|
|
|
10969
11059
|
const blend = blendAt(b);
|
|
10970
11060
|
const enabled = b.u8() !== 0;
|
|
10971
11061
|
const opacity = b.u8() / 255;
|
|
10972
|
-
const base = { id:
|
|
11062
|
+
const base = { id: _chunkDFFBJV3Ucjs.newEffectId.call(void 0, ), enabled, blend, opacity, fill: { type: "color", color }, technique: "softer", size: clamp3(blur, 0, 250), antiAlias: false, range: 0.5, jitter: 0, noise: 0 };
|
|
10973
11063
|
items.push(key === "oglw" ? { ...base, kind: "outer-glow", spread: 0 } : { ...base, kind: "inner-glow", choke: 0, source: "edge" });
|
|
10974
11064
|
} else if (key === "sofi") {
|
|
10975
11065
|
b.u32();
|
|
@@ -10977,7 +11067,7 @@ function parseLrfx(data) {
|
|
|
10977
11067
|
const color = colorAt(b);
|
|
10978
11068
|
const opacity = b.u8() / 255;
|
|
10979
11069
|
const enabled = b.u8() !== 0;
|
|
10980
|
-
items.push({ id:
|
|
11070
|
+
items.push({ id: _chunkDFFBJV3Ucjs.newEffectId.call(void 0, ), kind: "color-overlay", enabled, blend, opacity, color });
|
|
10981
11071
|
} else if (key === "bevl") notes.add("legacy bevels are not read");
|
|
10982
11072
|
}
|
|
10983
11073
|
return { effects: { enabled: true, items }, notes: [...notes] };
|
|
@@ -11160,7 +11250,7 @@ function exportPsd(input) {
|
|
|
11160
11250
|
const key = layer.type === "group" ? "lfxs" : "lfx2";
|
|
11161
11251
|
if (fx.psd) {
|
|
11162
11252
|
const original = parseLfx2(fx.psd.data);
|
|
11163
|
-
if (original ?
|
|
11253
|
+
if (original ? _chunkDFFBJV3Ucjs.effectsFingerprint.call(void 0, original.effects) === _chunkDFFBJV3Ucjs.effectsFingerprint.call(void 0, fx) : !fx.items.length) return { key, data: padEven(fx.psd.data) };
|
|
11164
11254
|
}
|
|
11165
11255
|
if (!fx.items.length && fx.enabled && (_nullishCoalesce(fx.scale, () => ( 1))) === 1) return null;
|
|
11166
11256
|
const { data, dropped } = writeLfx2(fx);
|
|
@@ -11381,7 +11471,7 @@ function exportPsd(input) {
|
|
|
11381
11471
|
const byId = new Map((_nullishCoalesce(input.patterns, () => ( []))).map((p) => [p.id, p]));
|
|
11382
11472
|
const embed = [];
|
|
11383
11473
|
for (const id of patternIds2) {
|
|
11384
|
-
const p = _nullishCoalesce(byId.get(id), () => (
|
|
11474
|
+
const p = _nullishCoalesce(byId.get(id), () => ( _chunkDFFBJV3Ucjs.builtinPattern.call(void 0, id)));
|
|
11385
11475
|
if (p) embed.push(p);
|
|
11386
11476
|
else note(`Pattern "${id}" is not in the document and was not embedded`, id);
|
|
11387
11477
|
}
|
|
@@ -11771,5 +11861,8 @@ function exportPsd(input) {
|
|
|
11771
11861
|
|
|
11772
11862
|
|
|
11773
11863
|
|
|
11774
|
-
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.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.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.parseCssColor = parseCssColor; 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;
|
|
11775
|
-
|
|
11864
|
+
|
|
11865
|
+
|
|
11866
|
+
|
|
11867
|
+
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.parseCssColor = parseCssColor; 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;
|
|
11868
|
+
//# sourceMappingURL=chunk-4PUPGALM.cjs.map
|