@pixerate/editor 0.192.0 → 0.193.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/index.cjs +56 -56
- package/dist/animation-editor/index.js +2 -2
- package/dist/{chunk-ZQGZWFPU.cjs → chunk-3T5VCDIV.cjs} +97 -5
- package/dist/{chunk-RQ2EM5TY.js → chunk-5OC22IEO.js} +97 -5
- package/dist/{chunk-EGZM52EO.cjs → chunk-BRKVNXDZ.cjs} +354 -125
- package/dist/{chunk-XCDGM7TD.cjs → chunk-FR2Q2LVF.cjs} +35 -35
- package/dist/{chunk-LPIKXPBM.js → chunk-GHCXLQ47.js} +262 -33
- package/dist/{chunk-VRXXAXUT.js → chunk-MLC7HUHO.js} +1 -1
- package/dist/{chunk-2UR4OX3B.cjs → chunk-UYXL6ZWQ.cjs} +114 -97
- package/dist/{chunk-TXYXF32N.js → chunk-ZIDUPSP4.js} +35 -18
- package/dist/image-editor/controller.d.cts +16 -6
- package/dist/image-editor/controller.d.ts +16 -6
- package/dist/image-editor/index.cjs +867 -831
- package/dist/image-editor/index.js +103 -67
- package/dist/image-editor/layers/model.d.cts +7 -2
- package/dist/image-editor/layers/model.d.ts +7 -2
- package/dist/image-editor/layers/serialize.d.cts +2 -0
- package/dist/image-editor/layers/serialize.d.ts +2 -0
- package/dist/image-editor/layers/shape-type-ui.d.cts +8 -2
- package/dist/image-editor/layers/shape-type-ui.d.ts +8 -2
- package/dist/image-editor/layers/text.d.cts +6 -2
- package/dist/image-editor/layers/text.d.ts +6 -2
- package/dist/image-editor/psd/type.d.cts +2 -1
- package/dist/image-editor/psd/type.d.ts +2 -1
- package/dist/image-editor/tools.d.cts +1 -1
- package/dist/image-editor/tools.d.ts +1 -1
- package/dist/image-editor/type-tools.d.cts +2 -2
- package/dist/image-editor/type-tools.d.ts +2 -2
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.js +2 -2
- package/dist/text/layout.d.cts +93 -12
- package/dist/text/layout.d.ts +93 -12
- package/dist/text/opentype.d.cts +13 -3
- package/dist/text/opentype.d.ts +13 -3
- package/dist/text/shapers.d.cts +12 -0
- package/dist/text/shapers.d.ts +12 -0
- package/dist/text/types.d.cts +36 -2
- package/dist/text/types.d.ts +36 -2
- package/dist/vector/controller.d.cts +8 -0
- package/dist/vector/controller.d.ts +8 -0
- package/dist/vector/index.cjs +1039 -967
- package/dist/vector/index.js +90 -18
- package/dist/vector/text.d.cts +5 -3
- package/dist/vector/text.d.ts +5 -3
- package/dist/vector/textPanel.d.cts +6 -0
- package/dist/vector/textPanel.d.ts +6 -0
- package/dist/vector/types.d.cts +9 -0
- package/dist/vector/types.d.ts +9 -0
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +4 -3
- package/skills/pixerate-image-editor/references/shapes-and-type.md +17 -5
- package/skills/pixerate-vector/SKILL.md +9 -3
|
@@ -89,7 +89,8 @@ var _chunkBROJYMWUcjs = require('./chunk-BROJYMWU.cjs');
|
|
|
89
89
|
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
|
|
93
|
+
var _chunkBRKVNXDZcjs = require('./chunk-BRKVNXDZ.cjs');
|
|
93
94
|
|
|
94
95
|
|
|
95
96
|
|
|
@@ -2923,6 +2924,7 @@ function combineCoverage(a, b, op, n) {
|
|
|
2923
2924
|
}
|
|
2924
2925
|
|
|
2925
2926
|
// src/text/types.ts
|
|
2927
|
+
var TEXT_ORIENTATIONS = ["horizontal", "vertical"];
|
|
2926
2928
|
var TEXT_ALIGNS = ["left", "center", "right", "justify"];
|
|
2927
2929
|
|
|
2928
2930
|
// src/image-editor/layers/model.ts
|
|
@@ -3012,7 +3014,7 @@ function mapAnchor(a, f) {
|
|
|
3012
3014
|
return out;
|
|
3013
3015
|
}
|
|
3014
3016
|
function mapSubpaths(subpaths, f) {
|
|
3015
|
-
return
|
|
3017
|
+
return _chunkBRKVNXDZcjs.expandVectorCorners.call(void 0, subpaths).map((sp) => ({ closed: sp.closed, anchors: sp.anchors.map((a) => mapAnchor(a, f)) }));
|
|
3016
3018
|
}
|
|
3017
3019
|
function liveShapeSubpaths(live) {
|
|
3018
3020
|
let out;
|
|
@@ -3020,19 +3022,19 @@ function liveShapeSubpaths(live) {
|
|
|
3020
3022
|
case "rect": {
|
|
3021
3023
|
const x = Math.min(live.x, live.x + live.width);
|
|
3022
3024
|
const y = Math.min(live.y, live.y + live.height);
|
|
3023
|
-
const sp =
|
|
3025
|
+
const sp = _chunkBRKVNXDZcjs.rectSubpath.call(void 0, { x, y, width: Math.abs(live.width), height: Math.abs(live.height) });
|
|
3024
3026
|
const r = _nullishCoalesce(live.radii, () => ( [0, 0, 0, 0]));
|
|
3025
|
-
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ?
|
|
3027
|
+
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ? _chunkBRKVNXDZcjs.setAnchorCorner.call(void 0, a, r[i]) : a) }];
|
|
3026
3028
|
break;
|
|
3027
3029
|
}
|
|
3028
3030
|
case "ellipse":
|
|
3029
|
-
out = [
|
|
3031
|
+
out = [_chunkBRKVNXDZcjs.ellipseSubpath.call(void 0, normBox(live))];
|
|
3030
3032
|
break;
|
|
3031
3033
|
case "polygon":
|
|
3032
|
-
out = [
|
|
3034
|
+
out = [_chunkBRKVNXDZcjs.polygonSubpath.call(void 0, normBox(live), live.sides)];
|
|
3033
3035
|
break;
|
|
3034
3036
|
case "star":
|
|
3035
|
-
out = [
|
|
3037
|
+
out = [_chunkBRKVNXDZcjs.starSubpath.call(void 0, normBox(live), live.points, Math.max(0, Math.min(1, live.innerRatio)))];
|
|
3036
3038
|
break;
|
|
3037
3039
|
case "line": {
|
|
3038
3040
|
const a = { x: live.x1, y: live.y1 };
|
|
@@ -3055,7 +3057,7 @@ function liveShapeSubpaths(live) {
|
|
|
3055
3057
|
}
|
|
3056
3058
|
}
|
|
3057
3059
|
const m = live.transform;
|
|
3058
|
-
return m && !
|
|
3060
|
+
return m && !_chunkBRKVNXDZcjs.isIdentityMatrix.call(void 0, m) ? mapSubpaths(out, (p) => _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, p)) : out;
|
|
3059
3061
|
}
|
|
3060
3062
|
function normBox(b) {
|
|
3061
3063
|
return { x: Math.min(b.x, b.x + b.width), y: Math.min(b.y, b.y + b.height), width: Math.abs(b.width), height: Math.abs(b.height) };
|
|
@@ -3067,7 +3069,7 @@ var pathCache = /* @__PURE__ */ new WeakMap();
|
|
|
3067
3069
|
function componentPath(c) {
|
|
3068
3070
|
let p = pathCache.get(c.subpaths);
|
|
3069
3071
|
if (!p) {
|
|
3070
|
-
p =
|
|
3072
|
+
p = _chunkBRKVNXDZcjs.subpathsToBezier.call(void 0, c.subpaths);
|
|
3071
3073
|
pathCache.set(c.subpaths, p);
|
|
3072
3074
|
}
|
|
3073
3075
|
return p;
|
|
@@ -3394,7 +3396,7 @@ function matrixArg(v, path) {
|
|
|
3394
3396
|
if (!Array.isArray(v) || v.length !== 6 || !v.every(isNum)) fail(`${path} must be six numbers [a, b, c, d, e, f].`);
|
|
3395
3397
|
const m = v;
|
|
3396
3398
|
if (Math.abs(m[0] * m[3] - m[1] * m[2]) < 1e-12) fail(`${path} is singular.`);
|
|
3397
|
-
return
|
|
3399
|
+
return _chunkBRKVNXDZcjs.isIdentityMatrix.call(void 0, m) ? void 0 : [...m];
|
|
3398
3400
|
}
|
|
3399
3401
|
function normalizeLiveShape(v, path = "shape") {
|
|
3400
3402
|
if (!v || typeof v !== "object") return fail(`${path} must be an object with kind ${LIVE_SHAPE_KINDS.join(", ")}.`);
|
|
@@ -3455,7 +3457,7 @@ function normalizeSubpaths(v, path = "subpaths") {
|
|
|
3455
3457
|
if (typeof v === "string") {
|
|
3456
3458
|
let subs;
|
|
3457
3459
|
try {
|
|
3458
|
-
subs =
|
|
3460
|
+
subs = _chunkBRKVNXDZcjs.bezierToSubpaths.call(void 0, v);
|
|
3459
3461
|
} catch (e5) {
|
|
3460
3462
|
return fail(`${path}: could not read the SVG path data.`);
|
|
3461
3463
|
}
|
|
@@ -3541,15 +3543,15 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
|
|
|
3541
3543
|
function transformShapeComponents(components, f, affine) {
|
|
3542
3544
|
return components.map((c) => {
|
|
3543
3545
|
if (affine && c.live) {
|
|
3544
|
-
const live = { ...c.live, transform:
|
|
3545
|
-
if (
|
|
3546
|
+
const live = { ...c.live, transform: _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, _nullishCoalesce(c.live.transform, () => ( _chunkBRKVNXDZcjs.IDENTITY_MATRIX)), affine) };
|
|
3547
|
+
if (_chunkBRKVNXDZcjs.isIdentityMatrix.call(void 0, live.transform)) delete live.transform;
|
|
3546
3548
|
return { op: c.op, subpaths: liveShapeSubpaths(live), live };
|
|
3547
3549
|
}
|
|
3548
3550
|
return { op: c.op, subpaths: mapSubpaths(c.subpaths, f) };
|
|
3549
3551
|
});
|
|
3550
3552
|
}
|
|
3551
3553
|
function offsetShape(layer, dx, dy, env) {
|
|
3552
|
-
const m =
|
|
3554
|
+
const m = _chunkBRKVNXDZcjs.translateMatrix.call(void 0, dx, dy);
|
|
3553
3555
|
const next = { ...layer, components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), m) };
|
|
3554
3556
|
delete next.annotation;
|
|
3555
3557
|
return rerenderShape(next, env);
|
|
@@ -3557,7 +3559,7 @@ function offsetShape(layer, dx, dy, env) {
|
|
|
3557
3559
|
function mergeShapeComponents(components, fillRule = "nonzero") {
|
|
3558
3560
|
if (components.length < 2) return [...components];
|
|
3559
3561
|
const path = shapeOutline(components, fillRule);
|
|
3560
|
-
const subpaths =
|
|
3562
|
+
const subpaths = _chunkBRKVNXDZcjs.bezierToSubpaths.call(void 0, path);
|
|
3561
3563
|
if (!subpaths.length) fail("The components combine to nothing (the operations remove every area), so there is nothing to merge into.");
|
|
3562
3564
|
return [{ op: "combine", subpaths }];
|
|
3563
3565
|
}
|
|
@@ -3574,7 +3576,7 @@ function annotationPaint(color, opacity) {
|
|
|
3574
3576
|
function shapeFromAnnotation(a) {
|
|
3575
3577
|
const opacity = _nullishCoalesce(a.opacity, () => ( 1));
|
|
3576
3578
|
const lineWidth = "strokeWidth" in a && a.strokeWidth > 0 ? a.strokeWidth : 1;
|
|
3577
|
-
const rotation = a.rotation ?
|
|
3579
|
+
const rotation = a.rotation ? _chunkBRKVNXDZcjs.rotateMatrix.call(void 0, a.rotation, { x: a.x, y: a.y }) : void 0;
|
|
3578
3580
|
const t = rotation ? { transform: rotation } : {};
|
|
3579
3581
|
const live = (l) => liveComponent(l);
|
|
3580
3582
|
switch (a.type) {
|
|
@@ -3617,7 +3619,7 @@ function shapeFromAnnotation(a) {
|
|
|
3617
3619
|
case "pen": {
|
|
3618
3620
|
const paint = annotationPaint(a.strokeColor, opacity);
|
|
3619
3621
|
if (!paint) return null;
|
|
3620
|
-
const pts = rotation ? a.points.map((p) =>
|
|
3622
|
+
const pts = rotation ? a.points.map((p) => _chunkBRKVNXDZcjs.applyMatrix.call(void 0, rotation, p)) : a.points;
|
|
3621
3623
|
const subpaths = pts.length > 1 ? [{ closed: false, anchors: pts.map((p) => ({ x: p.x, y: p.y })) }] : [];
|
|
3622
3624
|
return {
|
|
3623
3625
|
components: [{ op: "combine", subpaths }],
|
|
@@ -4272,7 +4274,7 @@ var fail3 = (message) => {
|
|
|
4272
4274
|
};
|
|
4273
4275
|
var TEXT_RENDER_MARGIN = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH;
|
|
4274
4276
|
function textMatrix(layer) {
|
|
4275
|
-
return _nullishCoalesce(layer.transform, () => (
|
|
4277
|
+
return _nullishCoalesce(layer.transform, () => ( _chunkBRKVNXDZcjs.IDENTITY_MATRIX));
|
|
4276
4278
|
}
|
|
4277
4279
|
function rectCorners(r) {
|
|
4278
4280
|
return [
|
|
@@ -4283,7 +4285,7 @@ function rectCorners(r) {
|
|
|
4283
4285
|
];
|
|
4284
4286
|
}
|
|
4285
4287
|
function docRect(r, m) {
|
|
4286
|
-
const pts = rectCorners(r).map((p) =>
|
|
4288
|
+
const pts = rectCorners(r).map((p) => _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, p));
|
|
4287
4289
|
const x0 = Math.floor(Math.min(...pts.map((p) => p.x)));
|
|
4288
4290
|
const y0 = Math.floor(Math.min(...pts.map((p) => p.y)));
|
|
4289
4291
|
const x1 = Math.ceil(Math.max(...pts.map((p) => p.x)));
|
|
@@ -4301,9 +4303,9 @@ function inkBounds(layout) {
|
|
|
4301
4303
|
let b = null;
|
|
4302
4304
|
for (const l of layout.lines) {
|
|
4303
4305
|
for (const f of l.fragments) {
|
|
4304
|
-
const pad = f.style.fontSize * 0.5;
|
|
4306
|
+
const pad = f.style.fontSize * (l.matrix ? 1 : 0.5);
|
|
4305
4307
|
const w = f.carets[f.carets.length - 1];
|
|
4306
|
-
const r = { x: f.x - pad, y:
|
|
4308
|
+
const r = _chunkBRKVNXDZcjs.transformTextRect.call(void 0, l.matrix, { x: f.x - pad, y: l.baseline - l.ascent - pad + Math.min(0, f.y - l.baseline), width: w + 2 * pad, height: l.ascent + l.descent + 2 * pad + Math.abs(f.y - l.baseline) });
|
|
4307
4309
|
if (!b) b = r;
|
|
4308
4310
|
else {
|
|
4309
4311
|
const x0 = Math.min(b.x, r.x);
|
|
@@ -4316,14 +4318,14 @@ function inkBounds(layout) {
|
|
|
4316
4318
|
}
|
|
4317
4319
|
function textOutlines(layer, shaper) {
|
|
4318
4320
|
if (!shaper.outline) fail3(`The text shaper "${shaper.id}" cannot give glyph outlines; plug in an outline shaper (createOutlineTextShaper) to convert text to shapes.`);
|
|
4319
|
-
const layout =
|
|
4321
|
+
const layout = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper);
|
|
4320
4322
|
const m = textMatrix(layer);
|
|
4321
4323
|
const out = [];
|
|
4322
4324
|
for (const l of layout.lines) {
|
|
4323
4325
|
for (const f of l.fragments) {
|
|
4324
|
-
let path =
|
|
4325
|
-
for (const r of
|
|
4326
|
-
out.push({ fragment: f, path:
|
|
4326
|
+
let path = _chunkBRKVNXDZcjs.textFragmentOutline.call(void 0, shaper, layer.text, f);
|
|
4327
|
+
for (const r of _chunkBRKVNXDZcjs.textDecorations.call(void 0, f, l)) path = [...path, ..._chunkBRKVNXDZcjs.textRectPath.call(void 0, r)];
|
|
4328
|
+
out.push({ fragment: f, path: _chunkBRKVNXDZcjs.isIdentityMatrix.call(void 0, m) ? path : _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, path, m) });
|
|
4327
4329
|
}
|
|
4328
4330
|
}
|
|
4329
4331
|
return out;
|
|
@@ -4379,7 +4381,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4379
4381
|
const canvas = env.createCanvas(region.width, region.height);
|
|
4380
4382
|
const ctx = canvas.getContext("2d");
|
|
4381
4383
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
4382
|
-
const layout =
|
|
4384
|
+
const layout = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper);
|
|
4383
4385
|
const m = textMatrix(layer);
|
|
4384
4386
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
4385
4387
|
ctx.clearRect(0, 0, region.width, region.height);
|
|
@@ -4389,10 +4391,8 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4389
4391
|
const [r, g, b] = rgbOf(f.style.color);
|
|
4390
4392
|
ctx.fillStyle = `rgb(${r}, ${g}, ${b})`;
|
|
4391
4393
|
ctx.globalAlpha = _nullishCoalesce(f.style.opacity, () => ( 1));
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
else for (let k = 0; k < s.length; k++) if (!_chunkEGZM52EOcjs.isTextSpace.call(void 0, s[k])) shaper.draw(ctx, s[k], f.font, f.x + f.carets[k], f.y);
|
|
4395
|
-
for (const d of _chunkEGZM52EOcjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
|
|
4394
|
+
_chunkBRKVNXDZcjs.drawTextFragment.call(void 0, ctx, shaper, layer.text, f);
|
|
4395
|
+
for (const d of _chunkBRKVNXDZcjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
|
|
4396
4396
|
}
|
|
4397
4397
|
}
|
|
4398
4398
|
ctx.globalAlpha = 1;
|
|
@@ -4403,7 +4403,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4403
4403
|
function renderText(layer, env) {
|
|
4404
4404
|
const shaper = env.shaper;
|
|
4405
4405
|
if (!shaper || !shaper.outline && !shaper.draw) return null;
|
|
4406
|
-
const layout =
|
|
4406
|
+
const layout = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper);
|
|
4407
4407
|
const ink = inkBounds(layout);
|
|
4408
4408
|
const clip = { x: -TEXT_RENDER_MARGIN, y: -TEXT_RENDER_MARGIN, width: env.width + 2 * TEXT_RENDER_MARGIN, height: env.height + 2 * TEXT_RENDER_MARGIN };
|
|
4409
4409
|
const region = ink ? intersect2(docRect(ink, textMatrix(layer)), clip) : null;
|
|
@@ -4426,7 +4426,7 @@ function num(v, path, min, max) {
|
|
|
4426
4426
|
if (!isNum2(v) || v < min || v > max) fail3(`${path} must be a number from ${min} to ${max}, got ${JSON.stringify(v)}.`);
|
|
4427
4427
|
return v;
|
|
4428
4428
|
}
|
|
4429
|
-
var TEXT_STYLE_FIELDS = ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough", "postScriptName"];
|
|
4429
|
+
var TEXT_STYLE_FIELDS = ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough", "upright", "postScriptName"];
|
|
4430
4430
|
function patchTextStyle(base, patch, path = "style") {
|
|
4431
4431
|
const out = { ...base };
|
|
4432
4432
|
const o = out;
|
|
@@ -4452,6 +4452,7 @@ function patchTextStyle(base, patch, path = "style") {
|
|
|
4452
4452
|
case "italic":
|
|
4453
4453
|
case "underline":
|
|
4454
4454
|
case "strikethrough":
|
|
4455
|
+
case "upright":
|
|
4455
4456
|
if (typeof v !== "boolean" && v !== null) fail3(`${path}.${k} must be true or false.`);
|
|
4456
4457
|
if (v) o[k] = true;
|
|
4457
4458
|
else delete o[k];
|
|
@@ -4503,7 +4504,7 @@ function patchParagraphStyle(base, patch, path = "paragraph") {
|
|
|
4503
4504
|
continue;
|
|
4504
4505
|
}
|
|
4505
4506
|
const value = k === "autoLeading" ? num(v, `${path}.${k}`, 0.1, 10) : num(v, `${path}.${k}`, -1e4, 1e4);
|
|
4506
|
-
if (k === "autoLeading" && value ===
|
|
4507
|
+
if (k === "autoLeading" && value === _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING || k !== "autoLeading" && value === 0) delete o[k];
|
|
4507
4508
|
else o[k] = value;
|
|
4508
4509
|
} else fail3(`${path}.${k} is not a paragraph style field; use ${PARAGRAPH_STYLE_FIELDS.join(", ")}.`);
|
|
4509
4510
|
}
|
|
@@ -4530,6 +4531,10 @@ function typeLayerName(text3) {
|
|
|
4530
4531
|
const line = _nullishCoalesce(text3.split("\n").find((l) => l.trim()), () => ( ""));
|
|
4531
4532
|
return line.trim().slice(0, 32) || "Text";
|
|
4532
4533
|
}
|
|
4534
|
+
function textOrientation(v, path = "orientation") {
|
|
4535
|
+
if (!TEXT_ORIENTATIONS.includes(v)) fail3(`${path} must be ${TEXT_ORIENTATIONS.join(" or ")}, got ${JSON.stringify(v)}.`);
|
|
4536
|
+
return v;
|
|
4537
|
+
}
|
|
4533
4538
|
function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
|
|
4534
4539
|
const text3 = normalizeText(init.text);
|
|
4535
4540
|
const layer = {
|
|
@@ -4540,14 +4545,15 @@ function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
|
|
|
4540
4545
|
opacity: 1,
|
|
4541
4546
|
blend: "normal",
|
|
4542
4547
|
text: text3,
|
|
4543
|
-
runs:
|
|
4544
|
-
paragraphs:
|
|
4548
|
+
runs: _chunkBRKVNXDZcjs.fitRuns.call(void 0, init.runs, text3.length, _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE),
|
|
4549
|
+
paragraphs: _chunkBRKVNXDZcjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
|
|
4545
4550
|
frame: init.frame,
|
|
4551
|
+
...init.orientation === "vertical" ? { orientation: "vertical" } : {},
|
|
4546
4552
|
surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 4),
|
|
4547
4553
|
offset: { x: 0, y: 0 }
|
|
4548
4554
|
};
|
|
4549
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _71 => _71.runs, 'access', _72 => _72[0], 'optionalAccess', _73 => _73.style]), () => (
|
|
4550
|
-
if (init.transform && !
|
|
4555
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _71 => _71.runs, 'access', _72 => _72[0], 'optionalAccess', _73 => _73.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE)) }];
|
|
4556
|
+
if (init.transform && !_chunkBRKVNXDZcjs.isIdentityMatrix.call(void 0, init.transform)) layer.transform = init.transform;
|
|
4551
4557
|
if (lenient && !renderText(layer, env)) return { ...layer, rendering: "stored" };
|
|
4552
4558
|
return rerenderText(layer, env);
|
|
4553
4559
|
}
|
|
@@ -4557,24 +4563,25 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
|
|
|
4557
4563
|
const patch = change(current);
|
|
4558
4564
|
const next = { ...current, ...patch };
|
|
4559
4565
|
if (!("annotation" in patch)) delete next.annotation;
|
|
4560
|
-
if (
|
|
4561
|
-
if (
|
|
4562
|
-
if (
|
|
4566
|
+
if (next.orientation !== "vertical") delete next.orientation;
|
|
4567
|
+
if ("text" in patch || "runs" in patch) next.runs = _chunkBRKVNXDZcjs.fitRuns.call(void 0, next.runs, next.text.length, _nullishCoalesce(_optionalChain([current, 'access', _74 => _74.runs, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE)));
|
|
4568
|
+
if (!next.runs.length) next.runs = [{ length: 0, style: _chunkBRKVNXDZcjs.styleAt.call(void 0, current.runs, 0, _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE) }];
|
|
4569
|
+
if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkBRKVNXDZcjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
|
|
4563
4570
|
const rendered = rerenderText(next, env);
|
|
4564
4571
|
return { layers: _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
|
|
4565
4572
|
}
|
|
4566
4573
|
function replaceTextRange(layer, start, end, insert) {
|
|
4567
4574
|
const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
|
|
4568
|
-
const style =
|
|
4569
|
-
const runs =
|
|
4570
|
-
const pstyle =
|
|
4571
|
-
const paragraphs =
|
|
4572
|
-
return { text: text3, runs, paragraphs:
|
|
4575
|
+
const style = _chunkBRKVNXDZcjs.styleAt.call(void 0, layer.runs, start > 0 && start === layer.text.length ? start - 1 : start, _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE);
|
|
4576
|
+
const runs = _chunkBRKVNXDZcjs.spliceRuns.call(void 0, layer.runs, start, end, insert.length, style);
|
|
4577
|
+
const pstyle = _chunkBRKVNXDZcjs.styleAt.call(void 0, layer.paragraphs, start, {});
|
|
4578
|
+
const paragraphs = _chunkBRKVNXDZcjs.spliceRuns.call(void 0, layer.paragraphs, start, end, insert.length, pstyle);
|
|
4579
|
+
return { text: text3, runs, paragraphs: _chunkBRKVNXDZcjs.fitParagraphRuns.call(void 0, paragraphs, text3) };
|
|
4573
4580
|
}
|
|
4574
4581
|
function transformTypeLayer(layer, m) {
|
|
4575
|
-
const t =
|
|
4582
|
+
const t = _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, textMatrix(layer), m);
|
|
4576
4583
|
const next = { ...layer };
|
|
4577
|
-
if (
|
|
4584
|
+
if (_chunkBRKVNXDZcjs.isIdentityMatrix.call(void 0, t)) delete next.transform;
|
|
4578
4585
|
else next.transform = t;
|
|
4579
4586
|
delete next.annotation;
|
|
4580
4587
|
return next;
|
|
@@ -4582,15 +4589,15 @@ function transformTypeLayer(layer, m) {
|
|
|
4582
4589
|
function typeFrame(layer, shaper) {
|
|
4583
4590
|
if (layer.frame.kind === "box") return { x: 0, y: 0, width: layer.frame.width, height: layer.frame.height };
|
|
4584
4591
|
if (!shaper) return fail3("Type layers need a text shaper to be measured; none is set here.");
|
|
4585
|
-
const b =
|
|
4592
|
+
const b = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).bounds;
|
|
4586
4593
|
return { x: b.x, y: b.y, width: Math.max(b.width, 1), height: Math.max(b.height, 1) };
|
|
4587
4594
|
}
|
|
4588
4595
|
function typeAsPixelLayer(layer) {
|
|
4589
|
-
const { text: _t, runs: _r, paragraphs: _p, frame: _f, transform: _m, antiAlias: _a, rendering: _g, missingFonts: _mf, annotation: _an, psd: _psd, type: _ty, ...rest } = layer;
|
|
4596
|
+
const { text: _t, runs: _r, paragraphs: _p, frame: _f, orientation: _o, transform: _m, antiAlias: _a, rendering: _g, missingFonts: _mf, annotation: _an, psd: _psd, type: _ty, ...rest } = layer;
|
|
4590
4597
|
return { ...rest, type: "pixel", surface: layer.surface, offset: { x: 0, y: 0 } };
|
|
4591
4598
|
}
|
|
4592
4599
|
function toTextSpace(layer, p) {
|
|
4593
|
-
return
|
|
4600
|
+
return _chunkBRKVNXDZcjs.applyMatrix.call(void 0, _chunkBRKVNXDZcjs.invertMatrix.call(void 0, textMatrix(layer)), p);
|
|
4594
4601
|
}
|
|
4595
4602
|
function typeFromAnnotation(a) {
|
|
4596
4603
|
if (a.type !== "text") return null;
|
|
@@ -4604,7 +4611,7 @@ function typeFromAnnotation(a) {
|
|
|
4604
4611
|
if (op !== 1) style.opacity = op;
|
|
4605
4612
|
const text3 = t.text.replace(/\r?\n|\r/g, " ");
|
|
4606
4613
|
const translate = [1, 0, 0, 1, t.x, t.y];
|
|
4607
|
-
const transform = t.rotation ?
|
|
4614
|
+
const transform = t.rotation ? _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, translate, _chunkBRKVNXDZcjs.rotateMatrix.call(void 0, t.rotation, { x: t.x, y: t.y })) : translate;
|
|
4608
4615
|
return { text: text3, runs: [{ length: text3.length, style }], frame: { kind: "point", origin: "top" }, transform };
|
|
4609
4616
|
}
|
|
4610
4617
|
function annotationOfType(layer) {
|
|
@@ -4938,7 +4945,7 @@ function identityTransform(box2) {
|
|
|
4938
4945
|
}
|
|
4939
4946
|
function cornersFromMatrix(box2, m) {
|
|
4940
4947
|
const q2 = _chunkQT26RHKKcjs.boxQuad.call(void 0, box2);
|
|
4941
|
-
return [
|
|
4948
|
+
return [_chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[0]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[1]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[2]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
4942
4949
|
}
|
|
4943
4950
|
function matrixFromCorners(box2, corners, eps = 1e-6) {
|
|
4944
4951
|
const [tl, tr, br, bl] = corners;
|
|
@@ -4955,7 +4962,7 @@ function transformHomography(geometry) {
|
|
|
4955
4962
|
function hasWarp(geometry) {
|
|
4956
4963
|
const w = geometry.warp;
|
|
4957
4964
|
if (!w) return false;
|
|
4958
|
-
const id =
|
|
4965
|
+
const id = _chunkBRKVNXDZcjs.identityWarpMesh.call(void 0, geometry.box, w.us.length - 1, w.vs.length - 1);
|
|
4959
4966
|
if (id.points.length !== w.points.length || id.us.some((u, i) => Math.abs(u - w.us[i]) > 1e-12) || id.vs.some((v, i) => Math.abs(v - w.vs[i]) > 1e-12)) return true;
|
|
4960
4967
|
return w.points.some((p, i) => Math.abs(p.x - id.points[i].x) > 1e-6 || Math.abs(p.y - id.points[i].y) > 1e-6);
|
|
4961
4968
|
}
|
|
@@ -4970,7 +4977,7 @@ function transformMap(geometry) {
|
|
|
4970
4977
|
const { box: box2 } = geometry;
|
|
4971
4978
|
const warp = hasWarp(geometry) ? geometry.warp : null;
|
|
4972
4979
|
if (!warp) return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h, p);
|
|
4973
|
-
return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h,
|
|
4980
|
+
return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h, _chunkBRKVNXDZcjs.evalWarpMesh.call(void 0, warp, (p.x - box2.x) / box2.width, (p.y - box2.y) / box2.height));
|
|
4974
4981
|
}
|
|
4975
4982
|
function transformedPoint(geometry, fx, fy) {
|
|
4976
4983
|
const f = transformMap(geometry);
|
|
@@ -5014,8 +5021,8 @@ function matrixFromParams(box2, params) {
|
|
|
5014
5021
|
const tx = Math.tan((_nullishCoalesce(params.skewX, () => ( 0))) * Math.PI / 180);
|
|
5015
5022
|
const ty = Math.tan((_nullishCoalesce(params.skewY, () => ( 0))) * Math.PI / 180);
|
|
5016
5023
|
const ref = referencePoint(box2, params.reference);
|
|
5017
|
-
const linear =
|
|
5018
|
-
return
|
|
5024
|
+
const linear = _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, [1, ty, tx, 1, 0, 0], [sx, 0, 0, sy, 0, 0]), _chunkBRKVNXDZcjs.rotateMatrix.call(void 0, _nullishCoalesce(params.rotate, () => ( 0))));
|
|
5025
|
+
return _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, _chunkBRKVNXDZcjs.matrixAbout.call(void 0, linear, ref), _chunkBRKVNXDZcjs.translateMatrix.call(void 0, _nullishCoalesce(params.dx, () => ( 0)), _nullishCoalesce(params.dy, () => ( 0))));
|
|
5019
5026
|
}
|
|
5020
5027
|
function describeTransform(geometry, reference = "center") {
|
|
5021
5028
|
const m = hasWarp(geometry) ? null : matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -5032,7 +5039,7 @@ function describeTransform(geometry, reference = "center") {
|
|
|
5032
5039
|
const shear = sxAbs ? (a * c + b * d) / sxAbs : 0;
|
|
5033
5040
|
const sy = sxAbs ? (a * d - b * c) / sxAbs : 0;
|
|
5034
5041
|
const skew = sxAbs ? Math.atan(shear / sxAbs) * 180 / Math.PI : 0;
|
|
5035
|
-
const at =
|
|
5042
|
+
const at = _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, ref);
|
|
5036
5043
|
const clean = (v) => Math.abs(v) < 1e-9 ? 0 : v;
|
|
5037
5044
|
return {
|
|
5038
5045
|
affine: true,
|
|
@@ -5050,24 +5057,24 @@ function applyParams(geometry, params) {
|
|
|
5050
5057
|
const ref = params.reference && typeof params.reference === "object" ? params.reference : anchorPoint(geometry, _nullishCoalesce(params.reference, () => ( "center")));
|
|
5051
5058
|
const m = matrixFromParams({ x: ref.x, y: ref.y, width: 0, height: 0 }, { ...params, reference: ref });
|
|
5052
5059
|
const c = geometry.corners;
|
|
5053
|
-
return [
|
|
5060
|
+
return [_chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, c[0]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, c[1]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, c[2]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, c[3])];
|
|
5054
5061
|
}
|
|
5055
5062
|
function flipCorners(geometry, axis) {
|
|
5056
5063
|
const c = anchorPoint(geometry, "center");
|
|
5057
5064
|
const m = axis === "horizontal" ? [-1, 0, 0, 1, 2 * c.x, 0] : [1, 0, 0, -1, 0, 2 * c.y];
|
|
5058
5065
|
const q2 = geometry.corners;
|
|
5059
|
-
return [
|
|
5066
|
+
return [_chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[0]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[1]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[2]), _chunkBRKVNXDZcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
5060
5067
|
}
|
|
5061
5068
|
function boxPointOf(geometry, p) {
|
|
5062
5069
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
5063
|
-
if (m) return
|
|
5070
|
+
if (m) return _chunkBRKVNXDZcjs.applyMatrix.call(void 0, _chunkBRKVNXDZcjs.invertMatrix.call(void 0, m), p);
|
|
5064
5071
|
return null;
|
|
5065
5072
|
}
|
|
5066
5073
|
function presetWarp(box2, preset) {
|
|
5067
|
-
return
|
|
5074
|
+
return _chunkBRKVNXDZcjs.warpPresetMesh.call(void 0, preset, box2);
|
|
5068
5075
|
}
|
|
5069
5076
|
function isValidWarp(mesh) {
|
|
5070
|
-
return
|
|
5077
|
+
return _chunkBRKVNXDZcjs.isValidWarpMesh.call(void 0, mesh);
|
|
5071
5078
|
}
|
|
5072
5079
|
function geometryHomography(geometry) {
|
|
5073
5080
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -5333,7 +5340,7 @@ function normalizePlacement(raw, contents) {
|
|
|
5333
5340
|
}
|
|
5334
5341
|
const out = { corners: c.map((p) => ({ x: p.x, y: p.y })) };
|
|
5335
5342
|
if (raw.warp) {
|
|
5336
|
-
if (!
|
|
5343
|
+
if (!_chunkBRKVNXDZcjs.isValidWarpMesh.call(void 0, raw.warp)) fail4("warp must be a mesh with us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels.");
|
|
5337
5344
|
out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
5338
5345
|
}
|
|
5339
5346
|
if (raw.interpolation !== void 0) {
|
|
@@ -5437,7 +5444,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5437
5444
|
case "shape": {
|
|
5438
5445
|
const next = {
|
|
5439
5446
|
...layer,
|
|
5440
|
-
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }),
|
|
5447
|
+
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkBRKVNXDZcjs.translateMatrix.call(void 0, dx, dy)),
|
|
5441
5448
|
surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, dx, dy),
|
|
5442
5449
|
mask: moveMask(layer.mask)
|
|
5443
5450
|
};
|
|
@@ -5446,7 +5453,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5446
5453
|
return next;
|
|
5447
5454
|
}
|
|
5448
5455
|
case "type": {
|
|
5449
|
-
const next = { ...transformTypeLayer(layer,
|
|
5456
|
+
const next = { ...transformTypeLayer(layer, _chunkBRKVNXDZcjs.translateMatrix.call(void 0, dx, dy)), surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
|
|
5450
5457
|
if (!next.mask) delete next.mask;
|
|
5451
5458
|
return next;
|
|
5452
5459
|
}
|
|
@@ -5632,7 +5639,7 @@ function refitPlacement(layer, contents) {
|
|
|
5632
5639
|
});
|
|
5633
5640
|
const out = { corners: pts };
|
|
5634
5641
|
if (layer.placement.interpolation) out.interpolation = layer.placement.interpolation;
|
|
5635
|
-
if (layer.placement.warp) out.warp =
|
|
5642
|
+
if (layer.placement.warp) out.warp = _chunkBRKVNXDZcjs.mapWarpMeshPoints.call(void 0, layer.placement.warp, (p) => ({ x: p.x * W1 / W0, y: p.y * H1 / H0 }));
|
|
5636
5643
|
return out;
|
|
5637
5644
|
}
|
|
5638
5645
|
function normalizeSmartFilter(raw, id = newLayerId("flt")) {
|
|
@@ -5952,6 +5959,7 @@ function serializeType(layer, base, ctx) {
|
|
|
5952
5959
|
paragraphs: JSON.parse(JSON.stringify(layer.paragraphs)),
|
|
5953
5960
|
frame: { ...layer.frame }
|
|
5954
5961
|
};
|
|
5962
|
+
if (layer.orientation === "vertical") out.orientation = "vertical";
|
|
5955
5963
|
if (layer.transform) out.transform = [...layer.transform];
|
|
5956
5964
|
if (layer.antiAlias === false) out.antiAlias = false;
|
|
5957
5965
|
if (layer.fillOpacity !== void 0 && layer.fillOpacity !== 1) out.fillOpacity = layer.fillOpacity;
|
|
@@ -5977,7 +5985,7 @@ function readType(r, base, ctx) {
|
|
|
5977
5985
|
const text3 = normalizeText(_nullishCoalesce(r.text, () => ( "")));
|
|
5978
5986
|
const runs = (Array.isArray(r.runs) ? r.runs : []).map((run, i) => ({
|
|
5979
5987
|
length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess', _153 => _153.length]), 0, 1e9, 0))),
|
|
5980
|
-
style: patchTextStyle(
|
|
5988
|
+
style: patchTextStyle(_chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _154 => _154.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
|
|
5981
5989
|
}));
|
|
5982
5990
|
const paragraphs = (Array.isArray(r.paragraphs) ? r.paragraphs : []).map((p, i) => ({
|
|
5983
5991
|
length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess', _155 => _155.length]), 0, 1e9, 0))),
|
|
@@ -5990,14 +5998,15 @@ function readType(r, base, ctx) {
|
|
|
5990
5998
|
...base,
|
|
5991
5999
|
type: "type",
|
|
5992
6000
|
text: text3,
|
|
5993
|
-
runs:
|
|
5994
|
-
paragraphs:
|
|
6001
|
+
runs: _chunkBRKVNXDZcjs.fitRuns.call(void 0, runs, text3.length, _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE),
|
|
6002
|
+
paragraphs: _chunkBRKVNXDZcjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
|
|
5995
6003
|
frame,
|
|
5996
6004
|
surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 4),
|
|
5997
6005
|
offset: { x: 0, y: 0 }
|
|
5998
6006
|
};
|
|
5999
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.style]), () => (
|
|
6007
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _159 => _159[0], 'optionalAccess', _160 => _160.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE)) }];
|
|
6000
6008
|
if (m) layer.transform = m;
|
|
6009
|
+
if (r.orientation === "vertical") layer.orientation = "vertical";
|
|
6001
6010
|
if (r.antiAlias === false) layer.antiAlias = false;
|
|
6002
6011
|
if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num2(r.fillOpacity, 0, 1, 1);
|
|
6003
6012
|
if (Array.isArray(r.missingFonts)) layer.missingFonts = r.missingFonts.filter((x) => typeof x === "string");
|
|
@@ -6463,7 +6472,7 @@ function readSmartObject(r, base, ctx) {
|
|
|
6463
6472
|
let placement;
|
|
6464
6473
|
try {
|
|
6465
6474
|
const raw = { corners: p.corners };
|
|
6466
|
-
if (p.warp &&
|
|
6475
|
+
if (p.warp && _chunkBRKVNXDZcjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
|
|
6467
6476
|
if (_chunkHGTDMKNEcjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
|
|
6468
6477
|
placement = normalizePlacement(raw, contents);
|
|
6469
6478
|
} catch (e) {
|
|
@@ -7634,7 +7643,7 @@ function vectorBlockForComponents(components, inverted, width, height, flags = 0
|
|
|
7634
7643
|
const fr = (p) => ({ x: p.x / w, y: p.y / h });
|
|
7635
7644
|
const subpaths = [];
|
|
7636
7645
|
components.forEach((c, ci) => {
|
|
7637
|
-
|
|
7646
|
+
_chunkBRKVNXDZcjs.expandVectorCorners.call(void 0, c.subpaths).forEach((sp, si) => {
|
|
7638
7647
|
if (!sp.anchors.length) return;
|
|
7639
7648
|
subpaths.push({
|
|
7640
7649
|
closed: sp.closed,
|
|
@@ -8444,10 +8453,10 @@ function merged(levels) {
|
|
|
8444
8453
|
}
|
|
8445
8454
|
return E.dict(items);
|
|
8446
8455
|
}
|
|
8447
|
-
function charStyle(d, fonts, notes) {
|
|
8456
|
+
function charStyle(d, fonts, notes, vertical = false) {
|
|
8448
8457
|
const n = (k) => eNum(eGet(d, k));
|
|
8449
8458
|
const flag = (k) => eBool(eGet(d, k));
|
|
8450
|
-
const s = { ...
|
|
8459
|
+
const s = { ..._chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE };
|
|
8451
8460
|
const fi = n("Font");
|
|
8452
8461
|
const ps = fi !== void 0 ? fonts[fi] : void 0;
|
|
8453
8462
|
if (ps) {
|
|
@@ -8469,6 +8478,8 @@ function charStyle(d, fonts, notes) {
|
|
|
8469
8478
|
if (shift) s.baselineShift = shift;
|
|
8470
8479
|
if (flag("Underline")) s.underline = true;
|
|
8471
8480
|
if (flag("Strikethrough")) s.strikethrough = true;
|
|
8481
|
+
if (vertical && n("BaselineDirection") === 1) s.upright = true;
|
|
8482
|
+
if (vertical && n("BaselineDirection") === 3) notes.add("tate-chu-yoko (horizontal-in-vertical) text is set as the rest of the column");
|
|
8472
8483
|
if (flag("FauxBold")) notes.add("faux bold is drawn as the regular weight");
|
|
8473
8484
|
if (flag("FauxItalic")) notes.add("faux italic is drawn upright");
|
|
8474
8485
|
if ((_nullishCoalesce(n("HorizontalScale"), () => ( 1))) !== 1 || (_nullishCoalesce(n("VerticalScale"), () => ( 1))) !== 1) notes.add("horizontal and vertical character scaling is drawn at 100 %");
|
|
@@ -8523,14 +8534,14 @@ function typeFromTySh(data, notes) {
|
|
|
8523
8534
|
const anti = descGet(t.text, "AntA");
|
|
8524
8535
|
const antiAlias = !(_optionalChain([anti, 'optionalAccess', _227 => _227.type]) === "enum" && (anti.value === "Anno" || anti.value === "antiAliasNone"));
|
|
8525
8536
|
const ornt = descGet(t.text, "Ornt");
|
|
8526
|
-
|
|
8537
|
+
const vertical = _optionalChain([ornt, 'optionalAccess', _228 => _228.type]) === "enum" && ornt.value === "Vrtc";
|
|
8527
8538
|
if (t.warp) {
|
|
8528
8539
|
const style = descGet(t.warp, "warpStyle");
|
|
8529
8540
|
if (_optionalChain([style, 'optionalAccess', _229 => _229.type]) === "enum" && style.value !== "warpNone") notes.add("warped text is drawn without its warp when edited");
|
|
8530
8541
|
}
|
|
8531
8542
|
const edText = _nullishCoalesce(eStr(ePath(_nullishCoalesce(engine, () => ( void 0)), ["EngineDict", "Editor", "Text"])), () => ( ""));
|
|
8532
8543
|
const text3 = (_nullishCoalesce(txt, () => ( edText.replace(/\r$/, "")))).replace(/\r\n?/g, "\n");
|
|
8533
|
-
let runs = [{ length: text3.length, style: { ...
|
|
8544
|
+
let runs = [{ length: text3.length, style: { ..._chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE } }];
|
|
8534
8545
|
let paragraphs = [{ length: text3.length, style: {} }];
|
|
8535
8546
|
let frame = { kind: "point" };
|
|
8536
8547
|
let transform = t.transform;
|
|
@@ -8578,7 +8589,7 @@ function typeFromTySh(data, notes) {
|
|
|
8578
8589
|
const paraDefault = _optionalChain([paraBases, 'access', _230 => _230[paraAt(at)], 'optionalAccess', _231 => _231.charDefault]);
|
|
8579
8590
|
at += _nullishCoalesce(slens[i], () => ( 0));
|
|
8580
8591
|
const d = merged([eGet(sheet, "StyleSheetData"), eGet(own, "StyleSheetData"), eGet(paraDefault, "StyleSheetData"), eGet(normalStyle, "StyleSheetData")]);
|
|
8581
|
-
return { length: _nullishCoalesce(slens[i], () => ( 0)), style: charStyle(d, fonts, notes) };
|
|
8592
|
+
return { length: _nullishCoalesce(slens[i], () => ( 0)), style: charStyle(d, fonts, notes, vertical) };
|
|
8582
8593
|
});
|
|
8583
8594
|
}
|
|
8584
8595
|
const shape = eArray(ePath(engine, ["EngineDict", "Rendered", "Shapes", "Children"]))[0];
|
|
@@ -8586,24 +8597,25 @@ function typeFromTySh(data, notes) {
|
|
|
8586
8597
|
const b = eArray(ePath(shape, ["Cookie", "Photoshop", "BoxBounds"])).map((v) => _nullishCoalesce(eNum(v), () => ( 0)));
|
|
8587
8598
|
if (b.length === 4 && b[2] > b[0] && b[3] > b[1]) {
|
|
8588
8599
|
frame = { kind: "box", width: b[2] - b[0], height: b[3] - b[1] };
|
|
8589
|
-
transform =
|
|
8600
|
+
transform = _chunkBRKVNXDZcjs.multiplyMatrices.call(void 0, [1, 0, 0, 1, b[0], b[1]], t.transform);
|
|
8590
8601
|
}
|
|
8591
8602
|
}
|
|
8592
8603
|
}
|
|
8593
8604
|
return {
|
|
8594
8605
|
text: text3,
|
|
8595
|
-
runs:
|
|
8596
|
-
paragraphs:
|
|
8606
|
+
runs: _chunkBRKVNXDZcjs.fitRuns.call(void 0, runs, text3.length, _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE),
|
|
8607
|
+
paragraphs: _chunkBRKVNXDZcjs.fitParagraphRuns.call(void 0, paragraphs, text3),
|
|
8597
8608
|
frame,
|
|
8609
|
+
orientation: vertical ? "vertical" : "horizontal",
|
|
8598
8610
|
transform,
|
|
8599
8611
|
antiAlias,
|
|
8600
8612
|
fonts: [...new Set(fonts.filter(Boolean))]
|
|
8601
8613
|
};
|
|
8602
8614
|
}
|
|
8603
8615
|
function typeSignature(layer) {
|
|
8604
|
-
return JSON.stringify([layer.text, layer.runs, layer.paragraphs, layer.frame, _nullishCoalesce(layer.transform, () => ( null)), _nullishCoalesce(layer.antiAlias, () => ( true))]);
|
|
8616
|
+
return JSON.stringify([layer.text, layer.runs, layer.paragraphs, layer.frame, _nullishCoalesce(layer.transform, () => ( null)), _nullishCoalesce(layer.antiAlias, () => ( true)), ...layer.orientation === "vertical" ? ["vertical"] : []]);
|
|
8605
8617
|
}
|
|
8606
|
-
function styleSheetData(s, font) {
|
|
8618
|
+
function styleSheetData(s, font, vertical = false) {
|
|
8607
8619
|
const [r, g, b] = [1, 3, 5].map((i) => parseInt(s.color.slice(i, i + 2), 16) / 255);
|
|
8608
8620
|
return E.dict([
|
|
8609
8621
|
["Font", E.int(font)],
|
|
@@ -8621,6 +8633,7 @@ function styleSheetData(s, font) {
|
|
|
8621
8633
|
["FontCaps", E.int(0)],
|
|
8622
8634
|
["Underline", E.bool(Boolean(s.underline))],
|
|
8623
8635
|
["Strikethrough", E.bool(Boolean(s.strikethrough))],
|
|
8636
|
+
["BaselineDirection", E.int(vertical && s.upright ? 1 : 2)],
|
|
8624
8637
|
["Ligatures", E.bool(true)],
|
|
8625
8638
|
["DLigatures", E.bool(false)],
|
|
8626
8639
|
["FillFlag", E.bool(true)],
|
|
@@ -8667,18 +8680,19 @@ function buildEngineData(layer, template) {
|
|
|
8667
8680
|
fonts.push(ps);
|
|
8668
8681
|
return fonts.length - 1;
|
|
8669
8682
|
};
|
|
8670
|
-
const runs =
|
|
8683
|
+
const runs = _chunkBRKVNXDZcjs.fitRuns.call(void 0, layer.runs, layer.text.length, _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE);
|
|
8684
|
+
const vertical = layer.orientation === "vertical";
|
|
8671
8685
|
const sruns = [];
|
|
8672
8686
|
const slens = [];
|
|
8673
8687
|
runs.forEach((r, i) => {
|
|
8674
|
-
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(r.style, fontIndex(postScriptFor(r.style)))]])]]));
|
|
8688
|
+
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(r.style, fontIndex(postScriptFor(r.style)), vertical)]])]]));
|
|
8675
8689
|
slens.push(E.int(r.length + (i === runs.length - 1 ? 1 : 0)));
|
|
8676
8690
|
});
|
|
8677
8691
|
if (!runs.length) {
|
|
8678
|
-
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(
|
|
8692
|
+
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(_chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE, fontIndex(postScriptFor(_chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE)))]])]]));
|
|
8679
8693
|
slens.push(E.int(1));
|
|
8680
8694
|
}
|
|
8681
|
-
const paras =
|
|
8695
|
+
const paras = _chunkBRKVNXDZcjs.fitParagraphRuns.call(void 0, layer.paragraphs, layer.text);
|
|
8682
8696
|
const pruns = [];
|
|
8683
8697
|
const plens = [];
|
|
8684
8698
|
paras.forEach((p, i) => {
|
|
@@ -8718,10 +8732,10 @@ function buildEngineData(layer, template) {
|
|
|
8718
8732
|
const child = E.dict([
|
|
8719
8733
|
["ShapeType", E.int(shapeType)],
|
|
8720
8734
|
["Procession", E.int(0)],
|
|
8721
|
-
["Lines", E.dict([["WritingDirection", E.int(0)], ["Children", E.array([])]])],
|
|
8735
|
+
["Lines", E.dict([["WritingDirection", E.int(vertical ? 2 : 0)], ["Children", E.array([])]])],
|
|
8722
8736
|
["Cookie", E.dict([["Photoshop", photoshop]])]
|
|
8723
8737
|
]);
|
|
8724
|
-
eSet(dict, "Rendered", E.dict([["Version", E.int(1)], ["Shapes", E.dict([["WritingDirection", E.int(0)], ["Children", E.array([child])]])]]));
|
|
8738
|
+
eSet(dict, "Rendered", E.dict([["Version", E.int(1)], ["Shapes", E.dict([["WritingDirection", E.int(vertical ? 2 : 0)], ["Children", E.array([child])]])]]));
|
|
8725
8739
|
const fontSet = E.array(fonts.map(fontEntry));
|
|
8726
8740
|
for (const key of ["ResourceDict", "DocumentResources"]) {
|
|
8727
8741
|
let rd = eGet(e, key);
|
|
@@ -8734,7 +8748,7 @@ function buildEngineData(layer, template) {
|
|
|
8734
8748
|
eSet(e, key, rd);
|
|
8735
8749
|
}
|
|
8736
8750
|
eSet(rd, "FontSet", fontSet);
|
|
8737
|
-
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _235 => _235[0], 'optionalAccess', _236 => _236.style]), () => (
|
|
8751
|
+
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _235 => _235[0], 'optionalAccess', _236 => _236.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE)), 0)]])]));
|
|
8738
8752
|
if (!eGet(rd, "ParagraphSheetSet")) eSet(rd, "ParagraphSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["DefaultStyleSheet", E.int(0)], ["Properties", paragraphProperties({})]])]));
|
|
8739
8753
|
if (!eGet(rd, "TheNormalStyleSheet")) eSet(rd, "TheNormalStyleSheet", E.int(0));
|
|
8740
8754
|
if (!eGet(rd, "TheNormalParagraphSheet")) eSet(rd, "TheNormalParagraphSheet", E.int(0));
|
|
@@ -8745,13 +8759,13 @@ function inkBounds2(layer) {
|
|
|
8745
8759
|
if (layer.frame.kind === "box") return [0, 0, layer.frame.width, layer.frame.height];
|
|
8746
8760
|
const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
|
|
8747
8761
|
if (!b) return [0, 0, 0, 0];
|
|
8748
|
-
const inv =
|
|
8762
|
+
const inv = _chunkBRKVNXDZcjs.invertMatrix.call(void 0, textMatrix(layer));
|
|
8749
8763
|
const pts = [
|
|
8750
8764
|
{ x: b.x, y: b.y },
|
|
8751
8765
|
{ x: b.x + b.width, y: b.y },
|
|
8752
8766
|
{ x: b.x + b.width, y: b.y + b.height },
|
|
8753
8767
|
{ x: b.x, y: b.y + b.height }
|
|
8754
|
-
].map((p) =>
|
|
8768
|
+
].map((p) => _chunkBRKVNXDZcjs.applyMatrix.call(void 0, inv, p));
|
|
8755
8769
|
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))];
|
|
8756
8770
|
}
|
|
8757
8771
|
function tyShForLayer(layer) {
|
|
@@ -8776,7 +8790,7 @@ function tyShForLayer(layer) {
|
|
|
8776
8790
|
};
|
|
8777
8791
|
set("Txt ", { type: "TEXT", value: layer.text.replace(/\n/g, "\r") });
|
|
8778
8792
|
if (!descGet(text3, "textGridding")) set("textGridding", { type: "enum", typeId: "textGridding", value: "None" });
|
|
8779
|
-
set("Ornt", { type: "enum", typeId: "Ornt", value: "Hrzn" });
|
|
8793
|
+
set("Ornt", { type: "enum", typeId: "Ornt", value: layer.orientation === "vertical" ? "Vrtc" : "Hrzn" });
|
|
8780
8794
|
set("AntA", { type: "enum", typeId: "Annt", value: layer.antiAlias === false ? "Anno" : "AnSm" });
|
|
8781
8795
|
const [l, t, r, b] = inkBounds2(layer);
|
|
8782
8796
|
const rect = (cls) => ({
|
|
@@ -9032,7 +9046,7 @@ function filterMaskItem(placed, mask, area) {
|
|
|
9032
9046
|
var warpStyleOf = (name) => {
|
|
9033
9047
|
if (!name.startsWith("warp")) return null;
|
|
9034
9048
|
const s = _optionalChain([name, 'access', _250 => _250[4], 'optionalAccess', _251 => _251.toLowerCase, 'call', _252 => _252()]) + name.slice(5);
|
|
9035
|
-
return
|
|
9049
|
+
return _chunkBRKVNXDZcjs.WARP_STYLES.includes(s) ? s : null;
|
|
9036
9050
|
};
|
|
9037
9051
|
function warpFromDescriptor(w, contents) {
|
|
9038
9052
|
const full = { x: 0, y: 0, width: contents.width, height: contents.height };
|
|
@@ -9062,7 +9076,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
9062
9076
|
} else {
|
|
9063
9077
|
const style = warpStyleOf(styleName);
|
|
9064
9078
|
if (!style) return void 0;
|
|
9065
|
-
mesh =
|
|
9079
|
+
mesh = _chunkBRKVNXDZcjs.warpPresetMesh.call(void 0,
|
|
9066
9080
|
{
|
|
9067
9081
|
style,
|
|
9068
9082
|
bend: _nullishCoalesce(descNumber(w, "warpValue"), () => ( 0)),
|
|
@@ -9077,7 +9091,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
9077
9091
|
const same = Math.abs(bounds.x) < 1e-6 && Math.abs(bounds.y) < 1e-6 && Math.abs(bounds.width - contents.width) < 1e-6 && Math.abs(bounds.height - contents.height) < 1e-6;
|
|
9078
9092
|
if (!same) {
|
|
9079
9093
|
const m = mesh;
|
|
9080
|
-
mesh =
|
|
9094
|
+
mesh = _chunkBRKVNXDZcjs.fitWarpMesh.call(void 0, (s, t) => _chunkBRKVNXDZcjs.evalWarpMesh.call(void 0, m, (s * contents.width - bounds.x) / bounds.width, (t * contents.height - bounds.y) / bounds.height), [0, 1], [0, 1]);
|
|
9081
9095
|
}
|
|
9082
9096
|
return { mesh, frame };
|
|
9083
9097
|
}
|
|
@@ -10594,6 +10608,7 @@ function importType(ctx, rec, name, notes, props) {
|
|
|
10594
10608
|
rendering: "stored"
|
|
10595
10609
|
};
|
|
10596
10610
|
if (!data.antiAlias) layer.antiAlias = false;
|
|
10611
|
+
if (data.orientation === "vertical") layer.orientation = "vertical";
|
|
10597
10612
|
layer.psd = { tySh: block.data.slice(), signature: typeSignature(layer) };
|
|
10598
10613
|
const fill = u8Block(rec, "iOpa");
|
|
10599
10614
|
if (fill !== void 0 && fill < 255) layer.fillOpacity = percent(fill);
|
|
@@ -10666,7 +10681,7 @@ function importSmart(ctx, rec, name, notes, props) {
|
|
|
10666
10681
|
if (placement && (size.width !== contents.width || size.height !== contents.height)) {
|
|
10667
10682
|
const kx = contents.width / size.width;
|
|
10668
10683
|
const ky = contents.height / size.height;
|
|
10669
|
-
if (placement.warp) placement = { ...placement, warp:
|
|
10684
|
+
if (placement.warp) placement = { ...placement, warp: _chunkBRKVNXDZcjs.mapWarpMeshPoints.call(void 0, placement.warp, (p) => ({ x: p.x * kx, y: p.y * ky })) };
|
|
10670
10685
|
}
|
|
10671
10686
|
}
|
|
10672
10687
|
if (!contents || !placement) {
|
|
@@ -12378,4 +12393,6 @@ function exportPsd(input) {
|
|
|
12378
12393
|
|
|
12379
12394
|
|
|
12380
12395
|
|
|
12381
|
-
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.selectionFromTiles = selectionFromTiles; exports.createSelectionMask = createSelectionMask; exports.selectionFromRegion = selectionFromRegion; 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.layerMaskSelection = layerMaskSelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyLegacyFloat = applyLegacyFloat; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.MAX_EFFECT_ANIMATION_MS = MAX_EFFECT_ANIMATION_MS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.LayerOperationError = LayerOperationError; exports.userErrorMessage = userErrorMessage; exports.isPaintableLayer = isPaintableLayer; exports.defaultActiveLayerId = defaultActiveLayerId; exports.activeLayerAfterRemoval = activeLayerAfterRemoval; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.componentsCoverage = componentsCoverage; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.isActiveVectorMask = isActiveVectorMask; exports.vectorMaskCoverage = vectorMaskCoverage; exports.effectiveLayerMask = effectiveLayerMask; exports.resolveVectorMasks = resolveVectorMasks; exports.offsetVectorMask = offsetVectorMask; exports.transformVectorMask = transformVectorMask; exports.followLayerMove = followLayerMove; exports.vectorMaskBounds = vectorMaskBounds; exports.vectorMaskThumbnail = vectorMaskThumbnail; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.ANCHOR_FRACTION = ANCHOR_FRACTION; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.translateLayer = translateLayer; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.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.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
|
|
12396
|
+
|
|
12397
|
+
|
|
12398
|
+
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.selectionFromTiles = selectionFromTiles; exports.createSelectionMask = createSelectionMask; exports.selectionFromRegion = selectionFromRegion; 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.layerMaskSelection = layerMaskSelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyLegacyFloat = applyLegacyFloat; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.TEXT_ORIENTATIONS = TEXT_ORIENTATIONS; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.MAX_EFFECT_ANIMATION_MS = MAX_EFFECT_ANIMATION_MS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.LayerOperationError = LayerOperationError; exports.userErrorMessage = userErrorMessage; exports.isPaintableLayer = isPaintableLayer; exports.defaultActiveLayerId = defaultActiveLayerId; exports.activeLayerAfterRemoval = activeLayerAfterRemoval; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.componentsCoverage = componentsCoverage; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.isActiveVectorMask = isActiveVectorMask; exports.vectorMaskCoverage = vectorMaskCoverage; exports.effectiveLayerMask = effectiveLayerMask; exports.resolveVectorMasks = resolveVectorMasks; exports.offsetVectorMask = offsetVectorMask; exports.transformVectorMask = transformVectorMask; exports.followLayerMove = followLayerMove; exports.vectorMaskBounds = vectorMaskBounds; exports.vectorMaskThumbnail = vectorMaskThumbnail; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.textOrientation = textOrientation; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.ANCHOR_FRACTION = ANCHOR_FRACTION; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.translateLayer = translateLayer; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.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.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
|