@pixerate/editor 0.266.2 → 0.267.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/agent/index.cjs +2 -2
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/controller.d.cts +8 -0
- package/dist/animation-editor/controller.d.ts +8 -0
- package/dist/animation-editor/effect-tools.d.cts +1 -1
- package/dist/animation-editor/effect-tools.d.ts +1 -1
- package/dist/animation-editor/index.cjs +172 -105
- package/dist/animation-editor/index.js +91 -24
- package/dist/brushes/index.cjs +59 -59
- package/dist/brushes/index.js +5 -5
- package/dist/brushes/profiles.d.cts +6 -1
- package/dist/brushes/profiles.d.ts +6 -1
- package/dist/{brushstrokeRender-FSUWXUZY.cjs → brushstrokeRender-L7JYRR2R.cjs} +16 -16
- package/dist/{brushstrokeRender-KD453OBX.js → brushstrokeRender-NLFPEBGI.js} +4 -4
- package/dist/canvas/brushTypes.d.cts +12 -0
- package/dist/canvas/brushTypes.d.ts +12 -0
- package/dist/canvas/brushstroke.d.cts +1 -1
- package/dist/canvas/brushstroke.d.ts +1 -1
- package/dist/canvas/drawController.d.cts +19 -4
- package/dist/canvas/drawController.d.ts +19 -4
- package/dist/canvas/index.cjs +144 -105
- package/dist/canvas/index.js +46 -7
- package/dist/{chunk-XORJ7UZO.cjs → chunk-3VHH6V67.cjs} +13 -12
- package/dist/{chunk-T2LDTEXK.js → chunk-4IDUYB45.js} +2217 -56
- package/dist/chunk-7UKFXXWL.js +802 -0
- package/dist/chunk-ADMRNWR7.js +340 -0
- package/dist/{chunk-CIJBSUM5.js → chunk-AGNUD5BI.js} +2 -2
- package/dist/{chunk-WLUVZKVD.cjs → chunk-DT4YQUGT.cjs} +32 -32
- package/dist/{chunk-DXYHQ2VN.js → chunk-EF7LZAXQ.js} +1 -1
- package/dist/chunk-EXB2EGBE.cjs +802 -0
- package/dist/{chunk-4ODRXQRW.js → chunk-EYSHTYLG.js} +1 -1
- package/dist/{chunk-R44Y3EFS.js → chunk-FGJHJIMN.js} +8 -336
- package/dist/{chunk-AQZQWXEU.cjs → chunk-G7NHE2VD.cjs} +35 -35
- package/dist/{chunk-XC6DPRYI.js → chunk-GSTSZPSR.js} +154 -949
- package/dist/{chunk-VRK322ZC.cjs → chunk-HIO6E7LC.cjs} +2 -2
- package/dist/{chunk-TOID45I2.cjs → chunk-J2TNIZ55.cjs} +1 -1
- package/dist/{chunk-YHDHFJUC.cjs → chunk-J5VQYK7T.cjs} +217 -1012
- package/dist/{chunk-3C33YTNN.js → chunk-JGWVZPT6.js} +2 -2
- package/dist/{chunk-ACFSFUQH.js → chunk-JL6YH5WD.js} +4 -0
- package/dist/{chunk-3SBLVGOM.cjs → chunk-LA5Y4ETA.cjs} +23 -23
- package/dist/{chunk-MVUQSK5J.cjs → chunk-LHPEG5AU.cjs} +107 -435
- package/dist/{chunk-DOZ6F2K2.js → chunk-NSETJI74.js} +3 -2
- package/dist/{chunk-XRXFVRGY.cjs → chunk-OKHKA43L.cjs} +2364 -203
- package/dist/{chunk-LK4SXL3V.js → chunk-OSEXT7JL.js} +1 -1
- package/dist/{chunk-PE6YJMQT.cjs → chunk-PFHJS4HE.cjs} +20 -19
- package/dist/{chunk-7KNW3WXZ.cjs → chunk-QEVLRLUN.cjs} +63 -0
- package/dist/{chunk-OTN6VB5S.cjs → chunk-RDFHWAHL.cjs} +5 -1
- package/dist/{chunk-6JL2D5SG.js → chunk-VE6UKYQ2.js} +3 -2
- package/dist/{chunk-RFJZGTHA.cjs → chunk-XVOP3CGQ.cjs} +9 -9
- package/dist/{chunk-EZOJBP4D.js → chunk-YIC6MAJ2.js} +1 -1
- package/dist/chunk-YZWM6ZIP.cjs +340 -0
- package/dist/{chunk-472INMWH.js → chunk-ZA7L5YJB.js} +63 -0
- package/dist/commands/builtins.d.cts +12 -1
- package/dist/commands/builtins.d.ts +12 -1
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.js +1 -1
- package/dist/image-editor/controller.d.cts +1 -1
- package/dist/image-editor/controller.d.ts +1 -1
- package/dist/image-editor/index.cjs +837 -833
- package/dist/image-editor/index.js +105 -101
- package/dist/paint/index.cjs +5 -3
- package/dist/paint/index.js +46 -44
- package/dist/paint-editor/controller.d.cts +5 -3
- package/dist/paint-editor/controller.d.ts +5 -3
- package/dist/paint-editor/index.cjs +832 -2295
- package/dist/paint-editor/index.js +285 -1748
- package/dist/paint-editor/path-samples.d.cts +2 -0
- package/dist/paint-editor/path-samples.d.ts +2 -0
- package/dist/paint-editor/presence.d.cts +20 -1
- package/dist/paint-editor/presence.d.ts +20 -1
- package/dist/stickers/helpers.d.cts +2 -0
- package/dist/stickers/helpers.d.ts +2 -0
- package/dist/stickers/index.cjs +41 -35
- package/dist/stickers/index.js +22 -16
- package/dist/stickers/types.d.cts +4 -2
- package/dist/stickers/types.d.ts +4 -2
- package/dist/vector/backdrop.d.cts +13 -0
- package/dist/vector/backdrop.d.ts +13 -0
- package/dist/vector/brushstroke.d.cts +54 -7
- package/dist/vector/brushstroke.d.ts +54 -7
- package/dist/vector/brushstrokeMedia.d.cts +96 -0
- package/dist/vector/brushstrokeMedia.d.ts +96 -0
- package/dist/vector/controller.d.cts +17 -3
- package/dist/vector/controller.d.ts +17 -3
- package/dist/vector/index.cjs +1846 -1386
- package/dist/vector/index.d.cts +2 -0
- package/dist/vector/index.d.ts +2 -0
- package/dist/vector/index.js +517 -57
- package/dist/vector/render.d.cts +6 -0
- package/dist/vector/render.d.ts +6 -0
- package/dist/vector/types.d.cts +14 -0
- package/dist/vector/types.d.ts +14 -0
- package/package.json +1 -1
- package/skills/pixerate-animation-editor/SKILL.md +1 -0
- package/skills/pixerate-brushes/SKILL.md +2 -2
- package/skills/pixerate-brushes-design/SKILL.md +7 -4
- package/skills/pixerate-brushes-design/evals/port-to-vector.json +8 -8
- package/skills/pixerate-canvas/SKILL.md +11 -1
- package/skills/pixerate-image-editor/SKILL.md +19 -64
- package/skills/pixerate-image-editor/references/color-management.md +2 -1
- package/skills/pixerate-image-editor/references/free-transform.md +12 -0
- package/skills/pixerate-image-editor/references/layer-effects.md +10 -0
- package/skills/pixerate-image-editor/references/painting.md +17 -0
- package/skills/pixerate-image-editor/references/photoshop-files.md +1 -1
- package/skills/pixerate-image-editor/references/shapes-and-type.md +14 -0
- package/skills/pixerate-image-editor/references/smart-objects.md +10 -0
- package/skills/pixerate-paint-editor/SKILL.md +8 -4
- package/skills/pixerate-paint-editor/references/wet-media.md +9 -0
- package/skills/pixerate-vector/SKILL.md +16 -6
- package/skills/pixerate-vector/references/best-practices.md +1 -0
- package/skills/pixerate-vector/references/commands.md +19 -0
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkYZWM6ZIPcjs = require('./chunk-YZWM6ZIP.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
7
14
|
|
|
8
15
|
|
|
9
16
|
|
|
@@ -108,7 +115,7 @@ var _chunkBROJYMWUcjs = require('./chunk-BROJYMWU.cjs');
|
|
|
108
115
|
|
|
109
116
|
|
|
110
117
|
|
|
111
|
-
var
|
|
118
|
+
var _chunkOKHKA43Lcjs = require('./chunk-OKHKA43L.cjs');
|
|
112
119
|
|
|
113
120
|
|
|
114
121
|
|
|
@@ -1912,339 +1919,6 @@ function removeAlpha(imageData) {
|
|
|
1912
1919
|
}
|
|
1913
1920
|
}
|
|
1914
1921
|
|
|
1915
|
-
// src/image-editor/layers/vector-raster.ts
|
|
1916
|
-
var FLATNESS = 0.01;
|
|
1917
|
-
function flattenPath(path, tolerance = FLATNESS) {
|
|
1918
|
-
const out = [];
|
|
1919
|
-
let pts = [];
|
|
1920
|
-
let cx = 0;
|
|
1921
|
-
let cy = 0;
|
|
1922
|
-
let sx = 0;
|
|
1923
|
-
let sy = 0;
|
|
1924
|
-
const flush = () => {
|
|
1925
|
-
if (pts.length >= 6) out.push(Float64Array.from(pts));
|
|
1926
|
-
pts = [];
|
|
1927
|
-
};
|
|
1928
|
-
const steps = (dd, degree) => Math.max(1, Math.min(1024, Math.ceil(Math.sqrt(degree * (degree - 1) * dd / (8 * tolerance)))));
|
|
1929
|
-
for (const c of path) {
|
|
1930
|
-
switch (c.type) {
|
|
1931
|
-
case "M":
|
|
1932
|
-
flush();
|
|
1933
|
-
cx = sx = c.x;
|
|
1934
|
-
cy = sy = c.y;
|
|
1935
|
-
pts.push(cx, cy);
|
|
1936
|
-
break;
|
|
1937
|
-
case "L":
|
|
1938
|
-
if (!pts.length) pts.push(cx, cy);
|
|
1939
|
-
cx = c.x;
|
|
1940
|
-
cy = c.y;
|
|
1941
|
-
pts.push(cx, cy);
|
|
1942
|
-
break;
|
|
1943
|
-
case "Q": {
|
|
1944
|
-
if (!pts.length) pts.push(cx, cy);
|
|
1945
|
-
const n = steps(Math.hypot(cx - 2 * c.x1 + c.x, cy - 2 * c.y1 + c.y), 2);
|
|
1946
|
-
for (let k = 1; k <= n; k++) {
|
|
1947
|
-
const t = k / n;
|
|
1948
|
-
const u = 1 - t;
|
|
1949
|
-
pts.push(u * u * cx + 2 * u * t * c.x1 + t * t * c.x, u * u * cy + 2 * u * t * c.y1 + t * t * c.y);
|
|
1950
|
-
}
|
|
1951
|
-
cx = c.x;
|
|
1952
|
-
cy = c.y;
|
|
1953
|
-
break;
|
|
1954
|
-
}
|
|
1955
|
-
case "C": {
|
|
1956
|
-
if (!pts.length) pts.push(cx, cy);
|
|
1957
|
-
const dd = Math.max(Math.hypot(cx - 2 * c.x1 + c.x2, cy - 2 * c.y1 + c.y2), Math.hypot(c.x1 - 2 * c.x2 + c.x, c.y1 - 2 * c.y2 + c.y));
|
|
1958
|
-
const n = steps(dd, 3);
|
|
1959
|
-
for (let k = 1; k <= n; k++) {
|
|
1960
|
-
const t = k / n;
|
|
1961
|
-
const u = 1 - t;
|
|
1962
|
-
const a = u * u * u;
|
|
1963
|
-
const b = 3 * u * u * t;
|
|
1964
|
-
const d = 3 * u * t * t;
|
|
1965
|
-
const e = t * t * t;
|
|
1966
|
-
pts.push(a * cx + b * c.x1 + d * c.x2 + e * c.x, a * cy + b * c.y1 + d * c.y2 + e * c.y);
|
|
1967
|
-
}
|
|
1968
|
-
cx = c.x;
|
|
1969
|
-
cy = c.y;
|
|
1970
|
-
break;
|
|
1971
|
-
}
|
|
1972
|
-
case "Z":
|
|
1973
|
-
flush();
|
|
1974
|
-
cx = sx;
|
|
1975
|
-
cy = sy;
|
|
1976
|
-
break;
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
flush();
|
|
1980
|
-
return out.filter((p) => p.every(Number.isFinite));
|
|
1981
|
-
}
|
|
1982
|
-
function flatBounds(flat) {
|
|
1983
|
-
let x0 = Infinity;
|
|
1984
|
-
let y0 = Infinity;
|
|
1985
|
-
let x1 = -Infinity;
|
|
1986
|
-
let y1 = -Infinity;
|
|
1987
|
-
for (const p of flat) {
|
|
1988
|
-
for (let i = 0; i < p.length; i += 2) {
|
|
1989
|
-
if (p[i] < x0) x0 = p[i];
|
|
1990
|
-
if (p[i] > x1) x1 = p[i];
|
|
1991
|
-
if (p[i + 1] < y0) y0 = p[i + 1];
|
|
1992
|
-
if (p[i + 1] > y1) y1 = p[i + 1];
|
|
1993
|
-
}
|
|
1994
|
-
}
|
|
1995
|
-
if (x0 === Infinity) return null;
|
|
1996
|
-
const x = Math.floor(x0);
|
|
1997
|
-
const y = Math.floor(y0);
|
|
1998
|
-
return { x, y, width: Math.ceil(x1) - x, height: Math.ceil(y1) - y };
|
|
1999
|
-
}
|
|
2000
|
-
function drawLine(a, w, h, x0, y0, x1, y1) {
|
|
2001
|
-
if (y0 === y1) return;
|
|
2002
|
-
let dir = 1;
|
|
2003
|
-
if (y0 > y1) {
|
|
2004
|
-
dir = -1;
|
|
2005
|
-
let t = x0;
|
|
2006
|
-
x0 = x1;
|
|
2007
|
-
x1 = t;
|
|
2008
|
-
t = y0;
|
|
2009
|
-
y0 = y1;
|
|
2010
|
-
y1 = t;
|
|
2011
|
-
}
|
|
2012
|
-
if (y1 <= 0 || y0 >= h) return;
|
|
2013
|
-
const dxdy = (x1 - x0) / (y1 - y0);
|
|
2014
|
-
let x = x0;
|
|
2015
|
-
if (y0 < 0) x -= y0 * dxdy;
|
|
2016
|
-
const rowStart = Math.max(0, Math.floor(y0));
|
|
2017
|
-
const rowEnd = Math.min(h, Math.ceil(y1));
|
|
2018
|
-
for (let y = rowStart; y < rowEnd; y++) {
|
|
2019
|
-
const line = y * w;
|
|
2020
|
-
const dy = Math.min(y + 1, y1) - Math.max(y, y0);
|
|
2021
|
-
const xnext = x + dxdy * dy;
|
|
2022
|
-
const d = dy * dir;
|
|
2023
|
-
const xa = x < xnext ? x : xnext;
|
|
2024
|
-
const xb = x < xnext ? xnext : x;
|
|
2025
|
-
const xaFloor = Math.floor(xa);
|
|
2026
|
-
const xai = xaFloor;
|
|
2027
|
-
const xbCeil = Math.ceil(xb);
|
|
2028
|
-
const xbi = xbCeil;
|
|
2029
|
-
if (xbi <= xai + 1) {
|
|
2030
|
-
const xmf = 0.5 * (x + xnext) - xaFloor;
|
|
2031
|
-
a[line + xai] += d - d * xmf;
|
|
2032
|
-
a[line + xai + 1] += d * xmf;
|
|
2033
|
-
} else {
|
|
2034
|
-
const s = 1 / (xb - xa);
|
|
2035
|
-
const xaf = xa - xaFloor;
|
|
2036
|
-
const a0 = 0.5 * s * (1 - xaf) * (1 - xaf);
|
|
2037
|
-
const xbf = xb - xbCeil + 1;
|
|
2038
|
-
const am = 0.5 * s * xbf * xbf;
|
|
2039
|
-
a[line + xai] += d * a0;
|
|
2040
|
-
if (xbi === xai + 2) a[line + xai + 1] += d * (1 - a0 - am);
|
|
2041
|
-
else {
|
|
2042
|
-
const a1 = s * (1.5 - xaf);
|
|
2043
|
-
a[line + xai + 1] += d * (a1 - a0);
|
|
2044
|
-
for (let xi = xai + 2; xi < xbi - 1; xi++) a[line + xi] += d * s;
|
|
2045
|
-
const a2 = a1 + (xbi - xai - 3) * s;
|
|
2046
|
-
a[line + xbi - 1] += d * (1 - a2 - am);
|
|
2047
|
-
}
|
|
2048
|
-
a[line + xbi] += d * am;
|
|
2049
|
-
}
|
|
2050
|
-
x = xnext;
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
function drawClippedLine(a, w, h, x0, y0, x1, y1) {
|
|
2054
|
-
if (y0 === y1) return;
|
|
2055
|
-
if (y0 <= 0 && y1 <= 0 || y0 >= h && y1 >= h) return;
|
|
2056
|
-
if (x0 >= 0 && x0 <= w && x1 >= 0 && x1 <= w) return drawLine(a, w, h, x0, y0, x1, y1);
|
|
2057
|
-
const ts = [0, 1];
|
|
2058
|
-
const dx = x1 - x0;
|
|
2059
|
-
if (dx !== 0) {
|
|
2060
|
-
for (const edge of [0, w]) {
|
|
2061
|
-
const t = (edge - x0) / dx;
|
|
2062
|
-
if (t > 0 && t < 1) ts.push(t);
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
ts.sort((p, q2) => p - q2);
|
|
2066
|
-
const clamp4 = (v) => v < 0 ? 0 : v > w ? w : v;
|
|
2067
|
-
for (let i = 0; i + 1 < ts.length; i++) {
|
|
2068
|
-
const ta = ts[i];
|
|
2069
|
-
const tb = ts[i + 1];
|
|
2070
|
-
drawLine(a, w, h, clamp4(x0 + dx * ta), y0 + (y1 - y0) * ta, clamp4(x0 + dx * tb), y0 + (y1 - y0) * tb);
|
|
2071
|
-
}
|
|
2072
|
-
}
|
|
2073
|
-
function ruleCoverage(v, rule) {
|
|
2074
|
-
const m = v < 0 ? -v : v;
|
|
2075
|
-
if (rule === "nonzero") return m >= 1 ? 1 : m;
|
|
2076
|
-
const f = m % 2;
|
|
2077
|
-
return f > 1 ? 2 - f : f;
|
|
2078
|
-
}
|
|
2079
|
-
function rasterizeCoverage(flat, rect, rule = "nonzero") {
|
|
2080
|
-
const w = rect.width;
|
|
2081
|
-
const h = rect.height;
|
|
2082
|
-
if (w <= 0 || h <= 0 || !flat.length) return null;
|
|
2083
|
-
const a = new Float64Array(w * h + w + 4);
|
|
2084
|
-
const ox = rect.x;
|
|
2085
|
-
const oy = rect.y;
|
|
2086
|
-
let touched = false;
|
|
2087
|
-
for (const p of flat) {
|
|
2088
|
-
const n = p.length;
|
|
2089
|
-
for (let i = 0; i < n; i += 2) {
|
|
2090
|
-
const j = i + 2 < n ? i + 2 : 0;
|
|
2091
|
-
const ya = p[i + 1] - oy;
|
|
2092
|
-
const yb = p[j + 1] - oy;
|
|
2093
|
-
if (ya <= 0 && yb <= 0 || ya >= h && yb >= h || ya === yb) continue;
|
|
2094
|
-
drawClippedLine(a, w, h, p[i] - ox, ya, p[j] - ox, yb);
|
|
2095
|
-
touched = true;
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
if (!touched) return null;
|
|
2099
|
-
const out = new Float32Array(w * h);
|
|
2100
|
-
let acc = 0;
|
|
2101
|
-
let any = false;
|
|
2102
|
-
for (let i = 0; i < out.length; i++) {
|
|
2103
|
-
acc += a[i];
|
|
2104
|
-
const c = ruleCoverage(acc, rule);
|
|
2105
|
-
if (c > 1e-6) {
|
|
2106
|
-
out[i] = c;
|
|
2107
|
-
any = true;
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
return any ? out : null;
|
|
2111
|
-
}
|
|
2112
|
-
var SUB_ROWS = 16;
|
|
2113
|
-
function rasterizeCoverageSampled(flat, rect, rule = "nonzero") {
|
|
2114
|
-
const w = rect.width;
|
|
2115
|
-
const h = rect.height;
|
|
2116
|
-
if (w <= 0 || h <= 0 || !flat.length) return null;
|
|
2117
|
-
let n = 0;
|
|
2118
|
-
for (const p of flat) n += p.length >> 1;
|
|
2119
|
-
const ey0 = new Float64Array(n);
|
|
2120
|
-
const ey1 = new Float64Array(n);
|
|
2121
|
-
const ex0 = new Float64Array(n);
|
|
2122
|
-
const eslope = new Float64Array(n);
|
|
2123
|
-
const edir = new Int8Array(n);
|
|
2124
|
-
let count = 0;
|
|
2125
|
-
for (const p of flat) {
|
|
2126
|
-
const len = p.length;
|
|
2127
|
-
for (let i = 0; i < len; i += 2) {
|
|
2128
|
-
const j = i + 2 < len ? i + 2 : 0;
|
|
2129
|
-
let xa = p[i] - rect.x;
|
|
2130
|
-
let ya = p[i + 1] - rect.y;
|
|
2131
|
-
let xb = p[j] - rect.x;
|
|
2132
|
-
let yb = p[j + 1] - rect.y;
|
|
2133
|
-
if (ya === yb) continue;
|
|
2134
|
-
let dir = 1;
|
|
2135
|
-
if (ya > yb) {
|
|
2136
|
-
dir = -1;
|
|
2137
|
-
let t = xa;
|
|
2138
|
-
xa = xb;
|
|
2139
|
-
xb = t;
|
|
2140
|
-
t = ya;
|
|
2141
|
-
ya = yb;
|
|
2142
|
-
yb = t;
|
|
2143
|
-
}
|
|
2144
|
-
if (yb <= 0 || ya >= h) continue;
|
|
2145
|
-
ey0[count] = ya;
|
|
2146
|
-
ey1[count] = yb;
|
|
2147
|
-
ex0[count] = xa;
|
|
2148
|
-
eslope[count] = (xb - xa) / (yb - ya);
|
|
2149
|
-
edir[count] = dir;
|
|
2150
|
-
count++;
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
if (!count) return null;
|
|
2154
|
-
const order = Array.from({ length: count }, (_, i) => i).sort((a, b) => ey0[a] - ey0[b]);
|
|
2155
|
-
const out = new Float32Array(w * h);
|
|
2156
|
-
const diff = new Float32Array(w + 1);
|
|
2157
|
-
let active = [];
|
|
2158
|
-
let next = 0;
|
|
2159
|
-
const xs = [];
|
|
2160
|
-
const ds = [];
|
|
2161
|
-
const idx = [];
|
|
2162
|
-
const f = 1 / SUB_ROWS;
|
|
2163
|
-
let any = false;
|
|
2164
|
-
const firstRow = Math.max(0, Math.floor(ey0[order[0]]));
|
|
2165
|
-
for (let y = firstRow; y < h; y++) {
|
|
2166
|
-
if (next >= count && !active.length) break;
|
|
2167
|
-
const row = y * w;
|
|
2168
|
-
let rowTouched = false;
|
|
2169
|
-
for (let s = 0; s < SUB_ROWS; s++) {
|
|
2170
|
-
const sy = y + (s + 0.5) * f;
|
|
2171
|
-
while (next < count && ey0[order[next]] <= sy) active.push(order[next++]);
|
|
2172
|
-
if (!active.length) continue;
|
|
2173
|
-
active = active.filter((e) => ey1[e] > sy);
|
|
2174
|
-
xs.length = 0;
|
|
2175
|
-
ds.length = 0;
|
|
2176
|
-
idx.length = 0;
|
|
2177
|
-
for (const e of active) {
|
|
2178
|
-
if (ey0[e] > sy) continue;
|
|
2179
|
-
idx.push(xs.length);
|
|
2180
|
-
xs.push(ex0[e] + (sy - ey0[e]) * eslope[e]);
|
|
2181
|
-
ds.push(edir[e]);
|
|
2182
|
-
}
|
|
2183
|
-
if (xs.length < 2) continue;
|
|
2184
|
-
idx.sort((a, b) => xs[a] - xs[b]);
|
|
2185
|
-
let wind = 0;
|
|
2186
|
-
for (let k = 0; k + 1 < idx.length; k++) {
|
|
2187
|
-
wind += ds[idx[k]];
|
|
2188
|
-
const inside = rule === "nonzero" ? wind !== 0 : (wind & 1) !== 0;
|
|
2189
|
-
if (!inside) continue;
|
|
2190
|
-
let xa = xs[idx[k]];
|
|
2191
|
-
let xb = xs[idx[k + 1]];
|
|
2192
|
-
if (xb <= 0 || xa >= w || xb <= xa) continue;
|
|
2193
|
-
if (xa < 0) xa = 0;
|
|
2194
|
-
if (xb > w) xb = w;
|
|
2195
|
-
const ia = Math.floor(xa);
|
|
2196
|
-
const ib = Math.floor(xb);
|
|
2197
|
-
rowTouched = true;
|
|
2198
|
-
if (ia === ib) {
|
|
2199
|
-
out[row + ia] += (xb - xa) * f;
|
|
2200
|
-
continue;
|
|
2201
|
-
}
|
|
2202
|
-
out[row + ia] += (ia + 1 - xa) * f;
|
|
2203
|
-
diff[ia + 1] += f;
|
|
2204
|
-
diff[ib] -= f;
|
|
2205
|
-
if (ib < w) out[row + ib] += (xb - ib) * f;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
if (!rowTouched) continue;
|
|
2209
|
-
let run = 0;
|
|
2210
|
-
for (let x = 0; x < w; x++) {
|
|
2211
|
-
run += diff[x];
|
|
2212
|
-
diff[x] = 0;
|
|
2213
|
-
const v = out[row + x] + run;
|
|
2214
|
-
out[row + x] = v > 1 ? 1 : v < 1e-6 ? 0 : v;
|
|
2215
|
-
if (out[row + x] > 0) any = true;
|
|
2216
|
-
}
|
|
2217
|
-
diff[w] = 0;
|
|
2218
|
-
}
|
|
2219
|
-
return any ? out : null;
|
|
2220
|
-
}
|
|
2221
|
-
function combineCoverage(a, b, op, n) {
|
|
2222
|
-
if (op === "combine") {
|
|
2223
|
-
if (!a) return b;
|
|
2224
|
-
if (!b) return a;
|
|
2225
|
-
const out2 = new Float32Array(n);
|
|
2226
|
-
for (let i = 0; i < n; i++) out2[i] = a[i] + b[i] - a[i] * b[i];
|
|
2227
|
-
return out2;
|
|
2228
|
-
}
|
|
2229
|
-
if (op === "subtract") {
|
|
2230
|
-
if (!a || !b) return a;
|
|
2231
|
-
const out2 = new Float32Array(n);
|
|
2232
|
-
for (let i = 0; i < n; i++) out2[i] = a[i] * (1 - b[i]);
|
|
2233
|
-
return out2;
|
|
2234
|
-
}
|
|
2235
|
-
if (op === "intersect") {
|
|
2236
|
-
if (!a || !b) return null;
|
|
2237
|
-
const out2 = new Float32Array(n);
|
|
2238
|
-
for (let i = 0; i < n; i++) out2[i] = a[i] * b[i];
|
|
2239
|
-
return out2;
|
|
2240
|
-
}
|
|
2241
|
-
if (!a) return b;
|
|
2242
|
-
if (!b) return a;
|
|
2243
|
-
const out = new Float32Array(n);
|
|
2244
|
-
for (let i = 0; i < n; i++) out[i] = a[i] + b[i] - 2 * a[i] * b[i];
|
|
2245
|
-
return out;
|
|
2246
|
-
}
|
|
2247
|
-
|
|
2248
1922
|
// src/text/types.ts
|
|
2249
1923
|
var TEXT_ORIENTATIONS = ["horizontal", "vertical"];
|
|
2250
1924
|
var TEXT_ALIGNS = ["left", "center", "right", "justify"];
|
|
@@ -2336,7 +2010,7 @@ function mapAnchor(a, f) {
|
|
|
2336
2010
|
return out;
|
|
2337
2011
|
}
|
|
2338
2012
|
function mapSubpaths(subpaths, f) {
|
|
2339
|
-
return
|
|
2013
|
+
return _chunkOKHKA43Lcjs.expandVectorCorners.call(void 0, subpaths).map((sp) => ({ closed: sp.closed, anchors: sp.anchors.map((a) => mapAnchor(a, f)) }));
|
|
2340
2014
|
}
|
|
2341
2015
|
function liveShapeSubpaths(live) {
|
|
2342
2016
|
let out;
|
|
@@ -2344,19 +2018,19 @@ function liveShapeSubpaths(live) {
|
|
|
2344
2018
|
case "rect": {
|
|
2345
2019
|
const x = Math.min(live.x, live.x + live.width);
|
|
2346
2020
|
const y = Math.min(live.y, live.y + live.height);
|
|
2347
|
-
const sp =
|
|
2021
|
+
const sp = _chunkOKHKA43Lcjs.rectSubpath.call(void 0, { x, y, width: Math.abs(live.width), height: Math.abs(live.height) });
|
|
2348
2022
|
const r = _nullishCoalesce(live.radii, () => ( [0, 0, 0, 0]));
|
|
2349
|
-
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ?
|
|
2023
|
+
out = [{ closed: true, anchors: sp.anchors.map((a, i) => r[i] > 0 ? _chunkOKHKA43Lcjs.setAnchorCorner.call(void 0, a, r[i]) : a) }];
|
|
2350
2024
|
break;
|
|
2351
2025
|
}
|
|
2352
2026
|
case "ellipse":
|
|
2353
|
-
out = [
|
|
2027
|
+
out = [_chunkOKHKA43Lcjs.ellipseSubpath.call(void 0, normBox(live))];
|
|
2354
2028
|
break;
|
|
2355
2029
|
case "polygon":
|
|
2356
|
-
out = [
|
|
2030
|
+
out = [_chunkOKHKA43Lcjs.polygonSubpath.call(void 0, normBox(live), live.sides)];
|
|
2357
2031
|
break;
|
|
2358
2032
|
case "star":
|
|
2359
|
-
out = [
|
|
2033
|
+
out = [_chunkOKHKA43Lcjs.starSubpath.call(void 0, normBox(live), live.points, Math.max(0, Math.min(1, live.innerRatio)))];
|
|
2360
2034
|
break;
|
|
2361
2035
|
case "line": {
|
|
2362
2036
|
const a = { x: live.x1, y: live.y1 };
|
|
@@ -2379,7 +2053,7 @@ function liveShapeSubpaths(live) {
|
|
|
2379
2053
|
}
|
|
2380
2054
|
}
|
|
2381
2055
|
const m = live.transform;
|
|
2382
|
-
return m && !
|
|
2056
|
+
return m && !_chunkOKHKA43Lcjs.isIdentityMatrix.call(void 0, m) ? mapSubpaths(out, (p) => _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, p)) : out;
|
|
2383
2057
|
}
|
|
2384
2058
|
function normBox(b) {
|
|
2385
2059
|
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) };
|
|
@@ -2391,7 +2065,7 @@ var pathCache = /* @__PURE__ */ new WeakMap();
|
|
|
2391
2065
|
function componentPath(c) {
|
|
2392
2066
|
let p = pathCache.get(c.subpaths);
|
|
2393
2067
|
if (!p) {
|
|
2394
|
-
p =
|
|
2068
|
+
p = _chunkOKHKA43Lcjs.subpathsToBezier.call(void 0, c.subpaths);
|
|
2395
2069
|
pathCache.set(c.subpaths, p);
|
|
2396
2070
|
}
|
|
2397
2071
|
return p;
|
|
@@ -2461,7 +2135,7 @@ var geometryCache = /* @__PURE__ */ new WeakMap();
|
|
|
2461
2135
|
function shapeGeometry(layer) {
|
|
2462
2136
|
const hit = geometryCache.get(layer);
|
|
2463
2137
|
if (hit) return hit;
|
|
2464
|
-
const fills = layer.components.map((c) => ({ op: c.op, flat: flattenPath(componentPath(c)) }));
|
|
2138
|
+
const fills = layer.components.map((c) => ({ op: c.op, flat: _chunkYZWM6ZIPcjs.flattenPath.call(void 0, componentPath(c)) }));
|
|
2465
2139
|
let stroke = null;
|
|
2466
2140
|
let align = "center";
|
|
2467
2141
|
const s = layer.stroke;
|
|
@@ -2473,7 +2147,7 @@ function shapeGeometry(layer) {
|
|
|
2473
2147
|
outline = layer.components.flatMap((c) => componentPath(c));
|
|
2474
2148
|
}
|
|
2475
2149
|
align = s.align && s.align !== "center" && closedOutline(outline) ? s.align : "center";
|
|
2476
|
-
stroke = flattenPath(strokeArea(outline, s, align !== "center"));
|
|
2150
|
+
stroke = _chunkYZWM6ZIPcjs.flattenPath.call(void 0, strokeArea(outline, s, align !== "center"));
|
|
2477
2151
|
}
|
|
2478
2152
|
let bounds = null;
|
|
2479
2153
|
const add = (b) => {
|
|
@@ -2486,8 +2160,8 @@ function shapeGeometry(layer) {
|
|
|
2486
2160
|
}
|
|
2487
2161
|
};
|
|
2488
2162
|
if (layer.fill && layer.inverted) add({ x: -1e7, y: -1e7, width: 2e7, height: 2e7 });
|
|
2489
|
-
else if (layer.fill) for (const f of fills) add(flatBounds(f.flat));
|
|
2490
|
-
if (stroke) add(flatBounds(stroke));
|
|
2163
|
+
else if (layer.fill) for (const f of fills) add(_chunkYZWM6ZIPcjs.flatBounds.call(void 0, f.flat));
|
|
2164
|
+
if (stroke) add(_chunkYZWM6ZIPcjs.flatBounds.call(void 0, stroke));
|
|
2491
2165
|
const g = _nullishCoalesce(shapeGeometryBounds(layer), () => ( { x: 0, y: 0, width: 0, height: 0 }));
|
|
2492
2166
|
const frame = { x: Math.floor(g.x), y: Math.floor(g.y), width: Math.max(1, Math.ceil(g.x + g.width) - Math.floor(g.x)), height: Math.max(1, Math.ceil(g.y + g.height) - Math.floor(g.y)) };
|
|
2493
2167
|
const geo = { fills, stroke, align, bounds, frame };
|
|
@@ -2504,13 +2178,13 @@ function fillCoverage(geo, rect, rule, inverted = false) {
|
|
|
2504
2178
|
}
|
|
2505
2179
|
let acc = null;
|
|
2506
2180
|
geo.fills.forEach((f, i) => {
|
|
2507
|
-
const cov = f.flat.length > 1 ? rasterizeCoverageSampled(f.flat, rect, rule) : rasterizeCoverage(f.flat, rect, rule);
|
|
2508
|
-
acc = i === 0 ? cov : combineCoverage(acc, cov, f.op, n);
|
|
2181
|
+
const cov = f.flat.length > 1 ? _chunkYZWM6ZIPcjs.rasterizeCoverageSampled.call(void 0, f.flat, rect, rule) : _chunkYZWM6ZIPcjs.rasterizeCoverage.call(void 0, f.flat, rect, rule);
|
|
2182
|
+
acc = i === 0 ? cov : _chunkYZWM6ZIPcjs.combineCoverage.call(void 0, acc, cov, f.op, n);
|
|
2509
2183
|
});
|
|
2510
2184
|
return acc;
|
|
2511
2185
|
}
|
|
2512
2186
|
function componentsCoverage(components, rect, rule = "nonzero", inverted = false) {
|
|
2513
|
-
const geo = { fills: components.map((c) => ({ op: c.op, flat: flattenPath(componentPath(c)) })) };
|
|
2187
|
+
const geo = { fills: components.map((c) => ({ op: c.op, flat: _chunkYZWM6ZIPcjs.flattenPath.call(void 0, componentPath(c)) })) };
|
|
2514
2188
|
return _nullishCoalesce(fillCoverage(geo, rect, rule, inverted), () => ( new Float32Array(rect.width * rect.height)));
|
|
2515
2189
|
}
|
|
2516
2190
|
function paintContext(env) {
|
|
@@ -2544,9 +2218,9 @@ function renderShapeRect(layer, rect, env, ctx = paintContext(env)) {
|
|
|
2544
2218
|
const rule = _nullishCoalesce(layer.fillRule, () => ( "nonzero"));
|
|
2545
2219
|
const needArea = Boolean(layer.fill) || geo.stroke !== null && geo.align !== "center";
|
|
2546
2220
|
const area = needArea ? fillCoverage(geo, rect, rule, Boolean(layer.inverted && layer.fill)) : null;
|
|
2547
|
-
let sCov = geo.stroke ? rasterizeCoverageSampled(geo.stroke, rect, "nonzero") : null;
|
|
2548
|
-
if (sCov && geo.align === "inside") sCov = area ? combineCoverage(sCov, area, "intersect", n) : null;
|
|
2549
|
-
else if (sCov && geo.align === "outside" && area) sCov = combineCoverage(sCov, area, "subtract", n);
|
|
2221
|
+
let sCov = geo.stroke ? _chunkYZWM6ZIPcjs.rasterizeCoverageSampled.call(void 0, geo.stroke, rect, "nonzero") : null;
|
|
2222
|
+
if (sCov && geo.align === "inside") sCov = area ? _chunkYZWM6ZIPcjs.combineCoverage.call(void 0, sCov, area, "intersect", n) : null;
|
|
2223
|
+
else if (sCov && geo.align === "outside" && area) sCov = _chunkYZWM6ZIPcjs.combineCoverage.call(void 0, sCov, area, "subtract", n);
|
|
2550
2224
|
const fCov = layer.fill ? area : null;
|
|
2551
2225
|
if (!fCov && !sCov) return null;
|
|
2552
2226
|
const canvas = { x: 0, y: 0, width: env.width, height: env.height };
|
|
@@ -2718,7 +2392,7 @@ function matrixArg(v, path) {
|
|
|
2718
2392
|
if (!Array.isArray(v) || v.length !== 6 || !v.every(isNum)) fail(`${path} must be six numbers [a, b, c, d, e, f].`);
|
|
2719
2393
|
const m = v;
|
|
2720
2394
|
if (Math.abs(m[0] * m[3] - m[1] * m[2]) < 1e-12) fail(`${path} is singular.`);
|
|
2721
|
-
return
|
|
2395
|
+
return _chunkOKHKA43Lcjs.isIdentityMatrix.call(void 0, m) ? void 0 : [...m];
|
|
2722
2396
|
}
|
|
2723
2397
|
function normalizeLiveShape(v, path = "shape") {
|
|
2724
2398
|
if (!v || typeof v !== "object") return fail(`${path} must be an object with kind ${LIVE_SHAPE_KINDS.join(", ")}.`);
|
|
@@ -2779,7 +2453,7 @@ function normalizeSubpaths(v, path = "subpaths") {
|
|
|
2779
2453
|
if (typeof v === "string") {
|
|
2780
2454
|
let subs;
|
|
2781
2455
|
try {
|
|
2782
|
-
subs =
|
|
2456
|
+
subs = _chunkOKHKA43Lcjs.bezierToSubpaths.call(void 0, v);
|
|
2783
2457
|
} catch (e5) {
|
|
2784
2458
|
return fail(`${path}: could not read the SVG path data.`);
|
|
2785
2459
|
}
|
|
@@ -2865,15 +2539,15 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
|
|
|
2865
2539
|
function transformShapeComponents(components, f, affine) {
|
|
2866
2540
|
return components.map((c) => {
|
|
2867
2541
|
if (affine && c.live) {
|
|
2868
|
-
const live = { ...c.live, transform:
|
|
2869
|
-
if (
|
|
2542
|
+
const live = { ...c.live, transform: _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, _nullishCoalesce(c.live.transform, () => ( _chunkOKHKA43Lcjs.IDENTITY_MATRIX)), affine) };
|
|
2543
|
+
if (_chunkOKHKA43Lcjs.isIdentityMatrix.call(void 0, live.transform)) delete live.transform;
|
|
2870
2544
|
return { op: c.op, subpaths: liveShapeSubpaths(live), live };
|
|
2871
2545
|
}
|
|
2872
2546
|
return { op: c.op, subpaths: mapSubpaths(c.subpaths, f) };
|
|
2873
2547
|
});
|
|
2874
2548
|
}
|
|
2875
2549
|
function offsetShape(layer, dx, dy, env) {
|
|
2876
|
-
const m =
|
|
2550
|
+
const m = _chunkOKHKA43Lcjs.translateMatrix.call(void 0, dx, dy);
|
|
2877
2551
|
const next = { ...layer, components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), m) };
|
|
2878
2552
|
delete next.annotation;
|
|
2879
2553
|
return rerenderShape(next, env);
|
|
@@ -2881,7 +2555,7 @@ function offsetShape(layer, dx, dy, env) {
|
|
|
2881
2555
|
function mergeShapeComponents(components, fillRule = "nonzero") {
|
|
2882
2556
|
if (components.length < 2) return [...components];
|
|
2883
2557
|
const path = shapeOutline(components, fillRule);
|
|
2884
|
-
const subpaths =
|
|
2558
|
+
const subpaths = _chunkOKHKA43Lcjs.bezierToSubpaths.call(void 0, path);
|
|
2885
2559
|
if (!subpaths.length) fail("The components combine to nothing (the operations remove every area), so there is nothing to merge into.");
|
|
2886
2560
|
return [{ op: "combine", subpaths }];
|
|
2887
2561
|
}
|
|
@@ -2898,7 +2572,7 @@ function annotationPaint(color, opacity) {
|
|
|
2898
2572
|
function shapeFromAnnotation(a) {
|
|
2899
2573
|
const opacity = _nullishCoalesce(a.opacity, () => ( 1));
|
|
2900
2574
|
const lineWidth = "strokeWidth" in a && a.strokeWidth > 0 ? a.strokeWidth : 1;
|
|
2901
|
-
const rotation = a.rotation ?
|
|
2575
|
+
const rotation = a.rotation ? _chunkOKHKA43Lcjs.rotateMatrix.call(void 0, a.rotation, { x: a.x, y: a.y }) : void 0;
|
|
2902
2576
|
const t = rotation ? { transform: rotation } : {};
|
|
2903
2577
|
const live = (l) => liveComponent(l);
|
|
2904
2578
|
switch (a.type) {
|
|
@@ -2941,7 +2615,7 @@ function shapeFromAnnotation(a) {
|
|
|
2941
2615
|
case "pen": {
|
|
2942
2616
|
const paint = annotationPaint(a.strokeColor, opacity);
|
|
2943
2617
|
if (!paint) return null;
|
|
2944
|
-
const pts = rotation ? a.points.map((p) =>
|
|
2618
|
+
const pts = rotation ? a.points.map((p) => _chunkOKHKA43Lcjs.applyMatrix.call(void 0, rotation, p)) : a.points;
|
|
2945
2619
|
const subpaths = pts.length > 1 ? [{ closed: false, anchors: pts.map((p) => ({ x: p.x, y: p.y })) }] : [];
|
|
2946
2620
|
return {
|
|
2947
2621
|
components: [{ op: "combine", subpaths }],
|
|
@@ -2974,7 +2648,7 @@ var JOIN_SIGMA = 2;
|
|
|
2974
2648
|
function vectorMaskSegments(components) {
|
|
2975
2649
|
const out = [];
|
|
2976
2650
|
components.forEach((c, ci) => c.subpaths.forEach((sp, si) => {
|
|
2977
|
-
for (let k = 0; k <
|
|
2651
|
+
for (let k = 0; k < _chunkOKHKA43Lcjs.subpathSegmentCount.call(void 0, sp); k++) out.push({ component: ci, subpath: si, segment: k });
|
|
2978
2652
|
}));
|
|
2979
2653
|
return out;
|
|
2980
2654
|
}
|
|
@@ -2982,7 +2656,7 @@ function validVectorMaskEdges(edges, components) {
|
|
|
2982
2656
|
if (!_optionalChain([edges, 'optionalAccess', _34 => _34.length])) return [];
|
|
2983
2657
|
return edges.filter((e) => {
|
|
2984
2658
|
const sp = _optionalChain([components, 'access', _35 => _35[e.component], 'optionalAccess', _36 => _36.subpaths, 'access', _37 => _37[e.subpath]]);
|
|
2985
|
-
return Boolean(sp) && e.segment >= 0 && e.segment <
|
|
2659
|
+
return Boolean(sp) && e.segment >= 0 && e.segment < _chunkOKHKA43Lcjs.subpathSegmentCount.call(void 0, sp);
|
|
2986
2660
|
});
|
|
2987
2661
|
}
|
|
2988
2662
|
function reach(e) {
|
|
@@ -3005,8 +2679,8 @@ function hybridVectorMaskCoverage(vm, hard, width, height, guide) {
|
|
|
3005
2679
|
const seedClass = [];
|
|
3006
2680
|
vm.components.forEach(
|
|
3007
2681
|
(c, ci) => c.subpaths.forEach((sp, si) => {
|
|
3008
|
-
for (let k = 0; k <
|
|
3009
|
-
const seg =
|
|
2682
|
+
for (let k = 0; k < _chunkOKHKA43Lcjs.subpathSegmentCount.call(void 0, sp); k++) {
|
|
2683
|
+
const seg = _chunkOKHKA43Lcjs.subpathSegment.call(void 0, sp, k);
|
|
3010
2684
|
let len = 0;
|
|
3011
2685
|
for (let i = 1; i < seg.length; i++) len += Math.hypot(seg[i][0] - seg[i - 1][0], seg[i][1] - seg[i - 1][1]);
|
|
3012
2686
|
const steps = Math.max(2, Math.ceil(len * 2));
|
|
@@ -3284,7 +2958,7 @@ function vectorMaskBounds(vm) {
|
|
|
3284
2958
|
let x1 = -Infinity;
|
|
3285
2959
|
let y1 = -Infinity;
|
|
3286
2960
|
for (const c of vm.components) {
|
|
3287
|
-
for (const ring of flattenPath(componentPath(c))) {
|
|
2961
|
+
for (const ring of _chunkYZWM6ZIPcjs.flattenPath.call(void 0, componentPath(c))) {
|
|
3288
2962
|
for (let k = 0; k + 1 < ring.length; k += 2) {
|
|
3289
2963
|
x0 = Math.min(x0, ring[k]);
|
|
3290
2964
|
x1 = Math.max(x1, ring[k]);
|
|
@@ -3906,7 +3580,7 @@ var fail3 = (message) => {
|
|
|
3906
3580
|
};
|
|
3907
3581
|
var TEXT_RENDER_MARGIN = _chunkPVJMTLPJcjs.MAX_EFFECT_REACH;
|
|
3908
3582
|
function textMatrix(layer) {
|
|
3909
|
-
return _nullishCoalesce(layer.transform, () => (
|
|
3583
|
+
return _nullishCoalesce(layer.transform, () => ( _chunkOKHKA43Lcjs.IDENTITY_MATRIX));
|
|
3910
3584
|
}
|
|
3911
3585
|
function rectCorners(r) {
|
|
3912
3586
|
return [
|
|
@@ -3917,7 +3591,7 @@ function rectCorners(r) {
|
|
|
3917
3591
|
];
|
|
3918
3592
|
}
|
|
3919
3593
|
function docRect(r, m) {
|
|
3920
|
-
const pts = rectCorners(r).map((p) =>
|
|
3594
|
+
const pts = rectCorners(r).map((p) => _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, p));
|
|
3921
3595
|
const x0 = Math.floor(Math.min(...pts.map((p) => p.x)));
|
|
3922
3596
|
const y0 = Math.floor(Math.min(...pts.map((p) => p.y)));
|
|
3923
3597
|
const x1 = Math.ceil(Math.max(...pts.map((p) => p.x)));
|
|
@@ -3937,7 +3611,7 @@ function inkBounds(layout) {
|
|
|
3937
3611
|
for (const f of l.fragments) {
|
|
3938
3612
|
const pad = f.style.fontSize * (l.matrix ? 1 : 0.5);
|
|
3939
3613
|
const w = f.carets[f.carets.length - 1];
|
|
3940
|
-
const r =
|
|
3614
|
+
const r = _chunkOKHKA43Lcjs.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) });
|
|
3941
3615
|
if (!b) b = r;
|
|
3942
3616
|
else {
|
|
3943
3617
|
const x0 = Math.min(b.x, r.x);
|
|
@@ -3950,14 +3624,14 @@ function inkBounds(layout) {
|
|
|
3950
3624
|
}
|
|
3951
3625
|
function textOutlines(layer, shaper) {
|
|
3952
3626
|
if (!shaper.outline) fail3(`The text shaper "${shaper.id}" cannot give glyph outlines; plug in an outline shaper (createOutlineTextShaper) to convert text to shapes.`);
|
|
3953
|
-
const layout =
|
|
3627
|
+
const layout = _chunkOKHKA43Lcjs.layoutText.call(void 0, layer, shaper);
|
|
3954
3628
|
const m = textMatrix(layer);
|
|
3955
3629
|
const out = [];
|
|
3956
3630
|
for (const l of layout.lines) {
|
|
3957
3631
|
for (const f of l.fragments) {
|
|
3958
|
-
let path =
|
|
3959
|
-
for (const r of
|
|
3960
|
-
out.push({ fragment: f, path:
|
|
3632
|
+
let path = _chunkOKHKA43Lcjs.textFragmentOutline.call(void 0, shaper, layer.text, f);
|
|
3633
|
+
for (const r of _chunkOKHKA43Lcjs.textDecorations.call(void 0, f, l)) path = [...path, ..._chunkOKHKA43Lcjs.textRectPath.call(void 0, r)];
|
|
3634
|
+
out.push({ fragment: f, path: _chunkOKHKA43Lcjs.isIdentityMatrix.call(void 0, m) ? path : _chunkGF2RBSDMcjs.transformBezierPath.call(void 0, path, m) });
|
|
3961
3635
|
}
|
|
3962
3636
|
}
|
|
3963
3637
|
return out;
|
|
@@ -3968,7 +3642,7 @@ var rgbOf = (hex) => {
|
|
|
3968
3642
|
return [parseInt(h.slice(0, 2), 16), parseInt(h.slice(2, 4), 16), parseInt(h.slice(4, 6), 16)];
|
|
3969
3643
|
};
|
|
3970
3644
|
function renderOutlines(layer, shaper, region) {
|
|
3971
|
-
const parts = textOutlines(layer, shaper).map(({ fragment, path }) => ({ style: fragment.style, flat: flattenPath(path) }));
|
|
3645
|
+
const parts = textOutlines(layer, shaper).map(({ fragment, path }) => ({ style: fragment.style, flat: _chunkYZWM6ZIPcjs.flattenPath.call(void 0, path) }));
|
|
3972
3646
|
const tiles = /* @__PURE__ */ new Map();
|
|
3973
3647
|
for (const { tx, ty } of _chunk474IQG74cjs.tilesInRect.call(void 0, region)) {
|
|
3974
3648
|
const rect = { x: tx * _chunk474IQG74cjs.TILE, y: ty * _chunk474IQG74cjs.TILE, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE };
|
|
@@ -3976,7 +3650,7 @@ function renderOutlines(layer, shaper, region) {
|
|
|
3976
3650
|
const acc = new Float32Array(n * 4);
|
|
3977
3651
|
let any = false;
|
|
3978
3652
|
for (const p of parts) {
|
|
3979
|
-
const cov = rasterizeCoverageSampled(p.flat, rect, "nonzero");
|
|
3653
|
+
const cov = _chunkYZWM6ZIPcjs.rasterizeCoverageSampled.call(void 0, p.flat, rect, "nonzero");
|
|
3980
3654
|
if (!cov) continue;
|
|
3981
3655
|
const [r, g, b] = rgbOf(p.style.color);
|
|
3982
3656
|
const op = _nullishCoalesce(p.style.opacity, () => ( 1));
|
|
@@ -4013,7 +3687,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4013
3687
|
const canvas = env.createCanvas(region.width, region.height);
|
|
4014
3688
|
const ctx = canvas.getContext("2d");
|
|
4015
3689
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
4016
|
-
const layout =
|
|
3690
|
+
const layout = _chunkOKHKA43Lcjs.layoutText.call(void 0, layer, shaper);
|
|
4017
3691
|
const m = textMatrix(layer);
|
|
4018
3692
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
4019
3693
|
ctx.clearRect(0, 0, region.width, region.height);
|
|
@@ -4023,8 +3697,8 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4023
3697
|
const [r, g, b] = rgbOf(f.style.color);
|
|
4024
3698
|
ctx.fillStyle = `rgb(${r}, ${g}, ${b})`;
|
|
4025
3699
|
ctx.globalAlpha = _nullishCoalesce(f.style.opacity, () => ( 1));
|
|
4026
|
-
|
|
4027
|
-
for (const d of
|
|
3700
|
+
_chunkOKHKA43Lcjs.drawTextFragment.call(void 0, ctx, shaper, layer.text, f);
|
|
3701
|
+
for (const d of _chunkOKHKA43Lcjs.textDecorations.call(void 0, f, l)) ctx.fillRect(d.x, d.y, d.width, d.height);
|
|
4028
3702
|
}
|
|
4029
3703
|
}
|
|
4030
3704
|
ctx.globalAlpha = 1;
|
|
@@ -4035,7 +3709,7 @@ function renderOnCanvas(layer, shaper, region, env) {
|
|
|
4035
3709
|
function renderText(layer, env) {
|
|
4036
3710
|
const shaper = env.shaper;
|
|
4037
3711
|
if (!shaper || !shaper.outline && !shaper.draw) return null;
|
|
4038
|
-
const layout =
|
|
3712
|
+
const layout = _chunkOKHKA43Lcjs.layoutText.call(void 0, layer, shaper);
|
|
4039
3713
|
const ink = inkBounds(layout);
|
|
4040
3714
|
const clip = { x: -TEXT_RENDER_MARGIN, y: -TEXT_RENDER_MARGIN, width: env.width + 2 * TEXT_RENDER_MARGIN, height: env.height + 2 * TEXT_RENDER_MARGIN };
|
|
4041
3715
|
const region = ink ? intersect2(docRect(ink, textMatrix(layer)), clip) : null;
|
|
@@ -4136,7 +3810,7 @@ function patchParagraphStyle(base, patch, path = "paragraph") {
|
|
|
4136
3810
|
continue;
|
|
4137
3811
|
}
|
|
4138
3812
|
const value = k === "autoLeading" ? num(v, `${path}.${k}`, 0.1, 10) : num(v, `${path}.${k}`, -1e4, 1e4);
|
|
4139
|
-
if (k === "autoLeading" && value ===
|
|
3813
|
+
if (k === "autoLeading" && value === _chunkOKHKA43Lcjs.DEFAULT_AUTO_LEADING || k !== "autoLeading" && value === 0) delete o[k];
|
|
4140
3814
|
else o[k] = value;
|
|
4141
3815
|
} else fail3(`${path}.${k} is not a paragraph style field; use ${PARAGRAPH_STYLE_FIELDS.join(", ")}.`);
|
|
4142
3816
|
}
|
|
@@ -4177,15 +3851,15 @@ function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
|
|
|
4177
3851
|
opacity: 1,
|
|
4178
3852
|
blend: "normal",
|
|
4179
3853
|
text: text3,
|
|
4180
|
-
runs:
|
|
4181
|
-
paragraphs:
|
|
3854
|
+
runs: _chunkOKHKA43Lcjs.fitRuns.call(void 0, init.runs, text3.length, _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE),
|
|
3855
|
+
paragraphs: _chunkOKHKA43Lcjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
|
|
4182
3856
|
frame: init.frame,
|
|
4183
3857
|
...init.orientation === "vertical" ? { orientation: "vertical" } : {},
|
|
4184
3858
|
surface: _chunk474IQG74cjs.emptySurface.call(void 0, 4),
|
|
4185
3859
|
offset: { x: 0, y: 0 }
|
|
4186
3860
|
};
|
|
4187
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _79 => _79.runs, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.style]), () => (
|
|
4188
|
-
if (init.transform && !
|
|
3861
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _79 => _79.runs, 'access', _80 => _80[0], 'optionalAccess', _81 => _81.style]), () => ( _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE)) }];
|
|
3862
|
+
if (init.transform && !_chunkOKHKA43Lcjs.isIdentityMatrix.call(void 0, init.transform)) layer.transform = init.transform;
|
|
4189
3863
|
if (lenient && !renderText(layer, env)) return { ...layer, rendering: "stored" };
|
|
4190
3864
|
return rerenderText(layer, env);
|
|
4191
3865
|
}
|
|
@@ -4196,24 +3870,24 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
|
|
|
4196
3870
|
const next = { ...current, ...patch };
|
|
4197
3871
|
if (!("annotation" in patch)) delete next.annotation;
|
|
4198
3872
|
if (next.orientation !== "vertical") delete next.orientation;
|
|
4199
|
-
if ("text" in patch || "runs" in patch) next.runs =
|
|
4200
|
-
if (!next.runs.length) next.runs = [{ length: 0, style:
|
|
4201
|
-
if ("text" in patch || "paragraphs" in patch) next.paragraphs =
|
|
3873
|
+
if ("text" in patch || "runs" in patch) next.runs = _chunkOKHKA43Lcjs.fitRuns.call(void 0, next.runs, next.text.length, _nullishCoalesce(_optionalChain([current, 'access', _82 => _82.runs, 'access', _83 => _83[0], 'optionalAccess', _84 => _84.style]), () => ( _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE)));
|
|
3874
|
+
if (!next.runs.length) next.runs = [{ length: 0, style: _chunkOKHKA43Lcjs.styleAt.call(void 0, current.runs, 0, _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE) }];
|
|
3875
|
+
if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkOKHKA43Lcjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
|
|
4202
3876
|
const rendered = rerenderText(next, env);
|
|
4203
3877
|
return { layers: _chunkPVJMTLPJcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
|
|
4204
3878
|
}
|
|
4205
3879
|
function replaceTextRange(layer, start, end, insert) {
|
|
4206
3880
|
const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
|
|
4207
|
-
const style =
|
|
4208
|
-
const runs =
|
|
4209
|
-
const pstyle =
|
|
4210
|
-
const paragraphs =
|
|
4211
|
-
return { text: text3, runs, paragraphs:
|
|
3881
|
+
const style = _chunkOKHKA43Lcjs.styleAt.call(void 0, layer.runs, start > 0 && start === layer.text.length ? start - 1 : start, _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE);
|
|
3882
|
+
const runs = _chunkOKHKA43Lcjs.spliceRuns.call(void 0, layer.runs, start, end, insert.length, style);
|
|
3883
|
+
const pstyle = _chunkOKHKA43Lcjs.styleAt.call(void 0, layer.paragraphs, start, {});
|
|
3884
|
+
const paragraphs = _chunkOKHKA43Lcjs.spliceRuns.call(void 0, layer.paragraphs, start, end, insert.length, pstyle);
|
|
3885
|
+
return { text: text3, runs, paragraphs: _chunkOKHKA43Lcjs.fitParagraphRuns.call(void 0, paragraphs, text3) };
|
|
4212
3886
|
}
|
|
4213
3887
|
function transformTypeLayer(layer, m) {
|
|
4214
|
-
const t =
|
|
3888
|
+
const t = _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, textMatrix(layer), m);
|
|
4215
3889
|
const next = { ...layer };
|
|
4216
|
-
if (
|
|
3890
|
+
if (_chunkOKHKA43Lcjs.isIdentityMatrix.call(void 0, t)) delete next.transform;
|
|
4217
3891
|
else next.transform = t;
|
|
4218
3892
|
delete next.annotation;
|
|
4219
3893
|
return next;
|
|
@@ -4221,7 +3895,7 @@ function transformTypeLayer(layer, m) {
|
|
|
4221
3895
|
function typeFrame(layer, shaper) {
|
|
4222
3896
|
if (layer.frame.kind === "box") return { x: 0, y: 0, width: layer.frame.width, height: layer.frame.height };
|
|
4223
3897
|
if (!shaper) return fail3("Type layers need a text shaper to be measured; none is set here.");
|
|
4224
|
-
const b =
|
|
3898
|
+
const b = _chunkOKHKA43Lcjs.layoutText.call(void 0, layer, shaper).bounds;
|
|
4225
3899
|
return { x: b.x, y: b.y, width: Math.max(b.width, 1), height: Math.max(b.height, 1) };
|
|
4226
3900
|
}
|
|
4227
3901
|
function typeAsPixelLayer(layer) {
|
|
@@ -4229,7 +3903,7 @@ function typeAsPixelLayer(layer) {
|
|
|
4229
3903
|
return { ...rest, type: "pixel", surface: layer.surface, offset: { x: 0, y: 0 } };
|
|
4230
3904
|
}
|
|
4231
3905
|
function toTextSpace(layer, p) {
|
|
4232
|
-
return
|
|
3906
|
+
return _chunkOKHKA43Lcjs.applyMatrix.call(void 0, _chunkOKHKA43Lcjs.invertMatrix.call(void 0, textMatrix(layer)), p);
|
|
4233
3907
|
}
|
|
4234
3908
|
function typeFromAnnotation(a) {
|
|
4235
3909
|
if (a.type !== "text") return null;
|
|
@@ -4243,7 +3917,7 @@ function typeFromAnnotation(a) {
|
|
|
4243
3917
|
if (op !== 1) style.opacity = op;
|
|
4244
3918
|
const text3 = t.text.replace(/\r?\n|\r/g, " ");
|
|
4245
3919
|
const translate = [1, 0, 0, 1, t.x, t.y];
|
|
4246
|
-
const transform = t.rotation ?
|
|
3920
|
+
const transform = t.rotation ? _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, translate, _chunkOKHKA43Lcjs.rotateMatrix.call(void 0, t.rotation, { x: t.x, y: t.y })) : translate;
|
|
4247
3921
|
return { text: text3, runs: [{ length: text3.length, style }], frame: { kind: "point", origin: "top" }, transform };
|
|
4248
3922
|
}
|
|
4249
3923
|
function annotationOfType(layer) {
|
|
@@ -4883,7 +4557,7 @@ function identityTransform(box2) {
|
|
|
4883
4557
|
}
|
|
4884
4558
|
function cornersFromMatrix(box2, m) {
|
|
4885
4559
|
const q2 = _chunkQT26RHKKcjs.boxQuad.call(void 0, box2);
|
|
4886
|
-
return [
|
|
4560
|
+
return [_chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[0]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[1]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[2]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
4887
4561
|
}
|
|
4888
4562
|
function matrixFromCorners(box2, corners, eps = 1e-6) {
|
|
4889
4563
|
const [tl, tr, br, bl] = corners;
|
|
@@ -4900,7 +4574,7 @@ function transformHomography(geometry) {
|
|
|
4900
4574
|
function hasWarp(geometry) {
|
|
4901
4575
|
const w = geometry.warp;
|
|
4902
4576
|
if (!w) return false;
|
|
4903
|
-
const id =
|
|
4577
|
+
const id = _chunkOKHKA43Lcjs.identityWarpMesh.call(void 0, geometry.box, w.us.length - 1, w.vs.length - 1);
|
|
4904
4578
|
if (id.points.length !== w.points.length || id.us.some((u, i) => Math.abs(u - w.us[i]) > 1e-12) || id.vs.some((v, i) => Math.abs(v - w.vs[i]) > 1e-12)) return true;
|
|
4905
4579
|
return w.points.some((p, i) => Math.abs(p.x - id.points[i].x) > 1e-6 || Math.abs(p.y - id.points[i].y) > 1e-6);
|
|
4906
4580
|
}
|
|
@@ -4915,7 +4589,7 @@ function transformMap(geometry) {
|
|
|
4915
4589
|
const { box: box2 } = geometry;
|
|
4916
4590
|
const warp = hasWarp(geometry) ? geometry.warp : null;
|
|
4917
4591
|
if (!warp) return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h, p);
|
|
4918
|
-
return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h,
|
|
4592
|
+
return (p) => _chunkQT26RHKKcjs.applyHomography.call(void 0, h, _chunkOKHKA43Lcjs.evalWarpMesh.call(void 0, warp, (p.x - box2.x) / box2.width, (p.y - box2.y) / box2.height));
|
|
4919
4593
|
}
|
|
4920
4594
|
function transformedPoint(geometry, fx, fy) {
|
|
4921
4595
|
const f = transformMap(geometry);
|
|
@@ -4959,8 +4633,8 @@ function matrixFromParams(box2, params) {
|
|
|
4959
4633
|
const tx = Math.tan((_nullishCoalesce(params.skewX, () => ( 0))) * Math.PI / 180);
|
|
4960
4634
|
const ty = Math.tan((_nullishCoalesce(params.skewY, () => ( 0))) * Math.PI / 180);
|
|
4961
4635
|
const ref = referencePoint(box2, params.reference);
|
|
4962
|
-
const linear =
|
|
4963
|
-
return
|
|
4636
|
+
const linear = _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, [1, ty, tx, 1, 0, 0], [sx, 0, 0, sy, 0, 0]), _chunkOKHKA43Lcjs.rotateMatrix.call(void 0, _nullishCoalesce(params.rotate, () => ( 0))));
|
|
4637
|
+
return _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, _chunkOKHKA43Lcjs.matrixAbout.call(void 0, linear, ref), _chunkOKHKA43Lcjs.translateMatrix.call(void 0, _nullishCoalesce(params.dx, () => ( 0)), _nullishCoalesce(params.dy, () => ( 0))));
|
|
4964
4638
|
}
|
|
4965
4639
|
function describeTransform(geometry, reference = "center") {
|
|
4966
4640
|
const m = hasWarp(geometry) ? null : matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -4977,7 +4651,7 @@ function describeTransform(geometry, reference = "center") {
|
|
|
4977
4651
|
const shear = sxAbs ? (a * c + b * d) / sxAbs : 0;
|
|
4978
4652
|
const sy = sxAbs ? (a * d - b * c) / sxAbs : 0;
|
|
4979
4653
|
const skew = sxAbs ? Math.atan(shear / sxAbs) * 180 / Math.PI : 0;
|
|
4980
|
-
const at =
|
|
4654
|
+
const at = _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, ref);
|
|
4981
4655
|
const clean = (v) => Math.abs(v) < 1e-9 ? 0 : v;
|
|
4982
4656
|
return {
|
|
4983
4657
|
affine: true,
|
|
@@ -4995,24 +4669,24 @@ function applyParams(geometry, params) {
|
|
|
4995
4669
|
const ref = params.reference && typeof params.reference === "object" ? params.reference : anchorPoint(geometry, _nullishCoalesce(params.reference, () => ( "center")));
|
|
4996
4670
|
const m = matrixFromParams({ x: ref.x, y: ref.y, width: 0, height: 0 }, { ...params, reference: ref });
|
|
4997
4671
|
const c = geometry.corners;
|
|
4998
|
-
return [
|
|
4672
|
+
return [_chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, c[0]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, c[1]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, c[2]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, c[3])];
|
|
4999
4673
|
}
|
|
5000
4674
|
function flipCorners(geometry, axis) {
|
|
5001
4675
|
const c = anchorPoint(geometry, "center");
|
|
5002
4676
|
const m = axis === "horizontal" ? [-1, 0, 0, 1, 2 * c.x, 0] : [1, 0, 0, -1, 0, 2 * c.y];
|
|
5003
4677
|
const q2 = geometry.corners;
|
|
5004
|
-
return [
|
|
4678
|
+
return [_chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[0]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[1]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[2]), _chunkOKHKA43Lcjs.applyMatrix.call(void 0, m, q2[3])];
|
|
5005
4679
|
}
|
|
5006
4680
|
function boxPointOf(geometry, p) {
|
|
5007
4681
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
5008
|
-
if (m) return
|
|
4682
|
+
if (m) return _chunkOKHKA43Lcjs.applyMatrix.call(void 0, _chunkOKHKA43Lcjs.invertMatrix.call(void 0, m), p);
|
|
5009
4683
|
return null;
|
|
5010
4684
|
}
|
|
5011
4685
|
function presetWarp(box2, preset) {
|
|
5012
|
-
return
|
|
4686
|
+
return _chunkOKHKA43Lcjs.warpPresetMesh.call(void 0, preset, box2);
|
|
5013
4687
|
}
|
|
5014
4688
|
function isValidWarp(mesh) {
|
|
5015
|
-
return
|
|
4689
|
+
return _chunkOKHKA43Lcjs.isValidWarpMesh.call(void 0, mesh);
|
|
5016
4690
|
}
|
|
5017
4691
|
function geometryHomography(geometry) {
|
|
5018
4692
|
const m = matrixFromCorners(geometry.box, geometry.corners);
|
|
@@ -5291,7 +4965,7 @@ function normalizePlacement(raw, contents) {
|
|
|
5291
4965
|
}
|
|
5292
4966
|
const out = { corners: c.map((p) => ({ x: p.x, y: p.y })) };
|
|
5293
4967
|
if (raw.warp) {
|
|
5294
|
-
if (!
|
|
4968
|
+
if (!_chunkOKHKA43Lcjs.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.");
|
|
5295
4969
|
out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
|
|
5296
4970
|
}
|
|
5297
4971
|
if (raw.interpolation !== void 0) {
|
|
@@ -5395,7 +5069,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5395
5069
|
case "shape": {
|
|
5396
5070
|
const next = {
|
|
5397
5071
|
...layer,
|
|
5398
|
-
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }),
|
|
5072
|
+
components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkOKHKA43Lcjs.translateMatrix.call(void 0, dx, dy)),
|
|
5399
5073
|
surface: _chunk474IQG74cjs.translateSurface.call(void 0, layer.surface, dx, dy),
|
|
5400
5074
|
mask: moveMask(layer.mask)
|
|
5401
5075
|
};
|
|
@@ -5404,7 +5078,7 @@ function translateLayer(layer, dx, dy) {
|
|
|
5404
5078
|
return next;
|
|
5405
5079
|
}
|
|
5406
5080
|
case "type": {
|
|
5407
|
-
const next = { ...transformTypeLayer(layer,
|
|
5081
|
+
const next = { ...transformTypeLayer(layer, _chunkOKHKA43Lcjs.translateMatrix.call(void 0, dx, dy)), surface: _chunk474IQG74cjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
|
|
5408
5082
|
if (!next.mask) delete next.mask;
|
|
5409
5083
|
return next;
|
|
5410
5084
|
}
|
|
@@ -5590,7 +5264,7 @@ function refitPlacement(layer, contents) {
|
|
|
5590
5264
|
});
|
|
5591
5265
|
const out = { corners: pts };
|
|
5592
5266
|
if (layer.placement.interpolation) out.interpolation = layer.placement.interpolation;
|
|
5593
|
-
if (layer.placement.warp) out.warp =
|
|
5267
|
+
if (layer.placement.warp) out.warp = _chunkOKHKA43Lcjs.mapWarpMeshPoints.call(void 0, layer.placement.warp, (p) => ({ x: p.x * W1 / W0, y: p.y * H1 / H0 }));
|
|
5594
5268
|
return out;
|
|
5595
5269
|
}
|
|
5596
5270
|
function normalizeSmartFilter(raw, id = newLayerId("flt")) {
|
|
@@ -5967,7 +5641,7 @@ function readType(r, base, ctx) {
|
|
|
5967
5641
|
const text3 = normalizeText(_nullishCoalesce(r.text, () => ( "")));
|
|
5968
5642
|
const runs = (Array.isArray(r.runs) ? r.runs : []).map((run, i) => ({
|
|
5969
5643
|
length: Math.max(0, Math.floor(num2(_optionalChain([run, 'optionalAccess', _166 => _166.length]), 0, 1e9, 0))),
|
|
5970
|
-
style: patchTextStyle(
|
|
5644
|
+
style: patchTextStyle(_chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE, _optionalChain([run, 'optionalAccess', _167 => _167.style]) && typeof run.style === "object" ? run.style : {}, `runs[${i}].style`)
|
|
5971
5645
|
}));
|
|
5972
5646
|
const paragraphs = (Array.isArray(r.paragraphs) ? r.paragraphs : []).map((p, i) => ({
|
|
5973
5647
|
length: Math.max(0, Math.floor(num2(_optionalChain([p, 'optionalAccess', _168 => _168.length]), 0, 1e9, 0))),
|
|
@@ -5980,13 +5654,13 @@ function readType(r, base, ctx) {
|
|
|
5980
5654
|
...base,
|
|
5981
5655
|
type: "type",
|
|
5982
5656
|
text: text3,
|
|
5983
|
-
runs:
|
|
5984
|
-
paragraphs:
|
|
5657
|
+
runs: _chunkOKHKA43Lcjs.fitRuns.call(void 0, runs, text3.length, _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE),
|
|
5658
|
+
paragraphs: _chunkOKHKA43Lcjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
|
|
5985
5659
|
frame,
|
|
5986
5660
|
surface: _chunk474IQG74cjs.emptySurface.call(void 0, 4),
|
|
5987
5661
|
offset: { x: 0, y: 0 }
|
|
5988
5662
|
};
|
|
5989
|
-
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _172 => _172[0], 'optionalAccess', _173 => _173.style]), () => (
|
|
5663
|
+
if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _172 => _172[0], 'optionalAccess', _173 => _173.style]), () => ( _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE)) }];
|
|
5990
5664
|
if (m) layer.transform = m;
|
|
5991
5665
|
if (r.orientation === "vertical") layer.orientation = "vertical";
|
|
5992
5666
|
if (r.antiAlias === false) layer.antiAlias = false;
|
|
@@ -6456,7 +6130,7 @@ function readSmartObject(r, base, ctx) {
|
|
|
6456
6130
|
let placement;
|
|
6457
6131
|
try {
|
|
6458
6132
|
const raw = { corners: p.corners };
|
|
6459
|
-
if (p.warp &&
|
|
6133
|
+
if (p.warp && _chunkOKHKA43Lcjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
|
|
6460
6134
|
if (_chunkPVJMTLPJcjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
|
|
6461
6135
|
placement = normalizePlacement(raw, contents);
|
|
6462
6136
|
} catch (e) {
|
|
@@ -7627,7 +7301,7 @@ function vectorBlockForComponents(components, inverted, width, height, flags = 0
|
|
|
7627
7301
|
const fr = (p) => ({ x: p.x / w, y: p.y / h });
|
|
7628
7302
|
const subpaths = [];
|
|
7629
7303
|
components.forEach((c, ci) => {
|
|
7630
|
-
|
|
7304
|
+
_chunkOKHKA43Lcjs.expandVectorCorners.call(void 0, c.subpaths).forEach((sp, si) => {
|
|
7631
7305
|
if (!sp.anchors.length) return;
|
|
7632
7306
|
subpaths.push({
|
|
7633
7307
|
closed: sp.closed,
|
|
@@ -8453,7 +8127,7 @@ function merged(levels) {
|
|
|
8453
8127
|
function charStyle(d, fonts, notes, vertical = false) {
|
|
8454
8128
|
const n = (k) => eNum(eGet(d, k));
|
|
8455
8129
|
const flag = (k) => eBool(eGet(d, k));
|
|
8456
|
-
const s = { ...
|
|
8130
|
+
const s = { ..._chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE };
|
|
8457
8131
|
const fi = n("Font");
|
|
8458
8132
|
const ps = fi !== void 0 ? fonts[fi] : void 0;
|
|
8459
8133
|
if (ps) {
|
|
@@ -8538,7 +8212,7 @@ function typeFromTySh(data, notes) {
|
|
|
8538
8212
|
}
|
|
8539
8213
|
const edText = _nullishCoalesce(eStr(ePath(_nullishCoalesce(engine, () => ( void 0)), ["EngineDict", "Editor", "Text"])), () => ( ""));
|
|
8540
8214
|
const text3 = (_nullishCoalesce(txt, () => ( edText.replace(/\r$/, "")))).replace(/\r\n?/g, "\n");
|
|
8541
|
-
let runs = [{ length: text3.length, style: { ...
|
|
8215
|
+
let runs = [{ length: text3.length, style: { ..._chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE } }];
|
|
8542
8216
|
let paragraphs = [{ length: text3.length, style: {} }];
|
|
8543
8217
|
let frame = { kind: "point" };
|
|
8544
8218
|
let transform = t.transform;
|
|
@@ -8594,14 +8268,14 @@ function typeFromTySh(data, notes) {
|
|
|
8594
8268
|
const b = eArray(ePath(shape, ["Cookie", "Photoshop", "BoxBounds"])).map((v) => _nullishCoalesce(eNum(v), () => ( 0)));
|
|
8595
8269
|
if (b.length === 4 && b[2] > b[0] && b[3] > b[1]) {
|
|
8596
8270
|
frame = { kind: "box", width: b[2] - b[0], height: b[3] - b[1] };
|
|
8597
|
-
transform =
|
|
8271
|
+
transform = _chunkOKHKA43Lcjs.multiplyMatrices.call(void 0, [1, 0, 0, 1, b[0], b[1]], t.transform);
|
|
8598
8272
|
}
|
|
8599
8273
|
}
|
|
8600
8274
|
}
|
|
8601
8275
|
return {
|
|
8602
8276
|
text: text3,
|
|
8603
|
-
runs:
|
|
8604
|
-
paragraphs:
|
|
8277
|
+
runs: _chunkOKHKA43Lcjs.fitRuns.call(void 0, runs, text3.length, _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE),
|
|
8278
|
+
paragraphs: _chunkOKHKA43Lcjs.fitParagraphRuns.call(void 0, paragraphs, text3),
|
|
8605
8279
|
frame,
|
|
8606
8280
|
orientation: vertical ? "vertical" : "horizontal",
|
|
8607
8281
|
transform,
|
|
@@ -8677,7 +8351,7 @@ function buildEngineData(layer, template) {
|
|
|
8677
8351
|
fonts.push(ps);
|
|
8678
8352
|
return fonts.length - 1;
|
|
8679
8353
|
};
|
|
8680
|
-
const runs =
|
|
8354
|
+
const runs = _chunkOKHKA43Lcjs.fitRuns.call(void 0, layer.runs, layer.text.length, _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE);
|
|
8681
8355
|
const vertical = layer.orientation === "vertical";
|
|
8682
8356
|
const sruns = [];
|
|
8683
8357
|
const slens = [];
|
|
@@ -8686,10 +8360,10 @@ function buildEngineData(layer, template) {
|
|
|
8686
8360
|
slens.push(E.int(r.length + (i === runs.length - 1 ? 1 : 0)));
|
|
8687
8361
|
});
|
|
8688
8362
|
if (!runs.length) {
|
|
8689
|
-
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(
|
|
8363
|
+
sruns.push(E.dict([["StyleSheet", E.dict([["StyleSheetData", styleSheetData(_chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE, fontIndex(postScriptFor(_chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE)))]])]]));
|
|
8690
8364
|
slens.push(E.int(1));
|
|
8691
8365
|
}
|
|
8692
|
-
const paras =
|
|
8366
|
+
const paras = _chunkOKHKA43Lcjs.fitParagraphRuns.call(void 0, layer.paragraphs, layer.text);
|
|
8693
8367
|
const pruns = [];
|
|
8694
8368
|
const plens = [];
|
|
8695
8369
|
paras.forEach((p, i) => {
|
|
@@ -8745,7 +8419,7 @@ function buildEngineData(layer, template) {
|
|
|
8745
8419
|
eSet(e, key, rd);
|
|
8746
8420
|
}
|
|
8747
8421
|
eSet(rd, "FontSet", fontSet);
|
|
8748
|
-
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _248 => _248[0], 'optionalAccess', _249 => _249.style]), () => (
|
|
8422
|
+
if (!eGet(rd, "StyleSheetSet")) eSet(rd, "StyleSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["StyleSheetData", styleSheetData(_nullishCoalesce(_optionalChain([runs, 'access', _248 => _248[0], 'optionalAccess', _249 => _249.style]), () => ( _chunkOKHKA43Lcjs.DEFAULT_TEXT_STYLE)), 0)]])]));
|
|
8749
8423
|
if (!eGet(rd, "ParagraphSheetSet")) eSet(rd, "ParagraphSheetSet", E.array([E.dict([["Name", E.str("Normal RGB")], ["DefaultStyleSheet", E.int(0)], ["Properties", paragraphProperties({})]])]));
|
|
8750
8424
|
if (!eGet(rd, "TheNormalStyleSheet")) eSet(rd, "TheNormalStyleSheet", E.int(0));
|
|
8751
8425
|
if (!eGet(rd, "TheNormalParagraphSheet")) eSet(rd, "TheNormalParagraphSheet", E.int(0));
|
|
@@ -8756,13 +8430,13 @@ function inkBounds2(layer) {
|
|
|
8756
8430
|
if (layer.frame.kind === "box") return [0, 0, layer.frame.width, layer.frame.height];
|
|
8757
8431
|
const b = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
|
|
8758
8432
|
if (!b) return [0, 0, 0, 0];
|
|
8759
|
-
const inv =
|
|
8433
|
+
const inv = _chunkOKHKA43Lcjs.invertMatrix.call(void 0, textMatrix(layer));
|
|
8760
8434
|
const pts = [
|
|
8761
8435
|
{ x: b.x, y: b.y },
|
|
8762
8436
|
{ x: b.x + b.width, y: b.y },
|
|
8763
8437
|
{ x: b.x + b.width, y: b.y + b.height },
|
|
8764
8438
|
{ x: b.x, y: b.y + b.height }
|
|
8765
|
-
].map((p) =>
|
|
8439
|
+
].map((p) => _chunkOKHKA43Lcjs.applyMatrix.call(void 0, inv, p));
|
|
8766
8440
|
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))];
|
|
8767
8441
|
}
|
|
8768
8442
|
function tyShForLayer(layer) {
|
|
@@ -9043,7 +8717,7 @@ function filterMaskItem(placed, mask, area) {
|
|
|
9043
8717
|
var warpStyleOf = (name) => {
|
|
9044
8718
|
if (!name.startsWith("warp")) return null;
|
|
9045
8719
|
const s = _optionalChain([name, 'access', _263 => _263[4], 'optionalAccess', _264 => _264.toLowerCase, 'call', _265 => _265()]) + name.slice(5);
|
|
9046
|
-
return
|
|
8720
|
+
return _chunkOKHKA43Lcjs.WARP_STYLES.includes(s) ? s : null;
|
|
9047
8721
|
};
|
|
9048
8722
|
function warpFromDescriptor(w, contents) {
|
|
9049
8723
|
const full = { x: 0, y: 0, width: contents.width, height: contents.height };
|
|
@@ -9073,7 +8747,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
9073
8747
|
} else {
|
|
9074
8748
|
const style = warpStyleOf(styleName);
|
|
9075
8749
|
if (!style) return void 0;
|
|
9076
|
-
mesh =
|
|
8750
|
+
mesh = _chunkOKHKA43Lcjs.warpPresetMesh.call(void 0,
|
|
9077
8751
|
{
|
|
9078
8752
|
style,
|
|
9079
8753
|
bend: _nullishCoalesce(descNumber(w, "warpValue"), () => ( 0)),
|
|
@@ -9088,7 +8762,7 @@ function warpFromDescriptor(w, contents) {
|
|
|
9088
8762
|
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;
|
|
9089
8763
|
if (!same) {
|
|
9090
8764
|
const m = mesh;
|
|
9091
|
-
mesh =
|
|
8765
|
+
mesh = _chunkOKHKA43Lcjs.fitWarpMesh.call(void 0, (s, t) => _chunkOKHKA43Lcjs.evalWarpMesh.call(void 0, m, (s * contents.width - bounds.x) / bounds.width, (t * contents.height - bounds.y) / bounds.height), [0, 1], [0, 1]);
|
|
9092
8766
|
}
|
|
9093
8767
|
return { mesh, frame };
|
|
9094
8768
|
}
|
|
@@ -10680,7 +10354,7 @@ function importSmart(ctx, rec, name, notes, props) {
|
|
|
10680
10354
|
if (placement && (size.width !== contents.width || size.height !== contents.height)) {
|
|
10681
10355
|
const kx = contents.width / size.width;
|
|
10682
10356
|
const ky = contents.height / size.height;
|
|
10683
|
-
if (placement.warp) placement = { ...placement, warp:
|
|
10357
|
+
if (placement.warp) placement = { ...placement, warp: _chunkOKHKA43Lcjs.mapWarpMeshPoints.call(void 0, placement.warp, (p) => ({ x: p.x * kx, y: p.y * ky })) };
|
|
10684
10358
|
}
|
|
10685
10359
|
}
|
|
10686
10360
|
if (!contents || !placement) {
|
|
@@ -13613,6 +13287,4 @@ var PaintGesture = (_class6 = class {
|
|
|
13613
13287
|
|
|
13614
13288
|
|
|
13615
13289
|
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.MARGIN_FIT_MIN_GUTTER = MARGIN_FIT_MIN_GUTTER; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.layerMaskSelection = layerMaskSelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyLegacyFloat = applyLegacyFloat; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.TEXT_ORIENTATIONS = TEXT_ORIENTATIONS; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.MAX_EFFECT_ANIMATION_MS = MAX_EFFECT_ANIMATION_MS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.LayerOperationError = LayerOperationError; exports.userErrorMessage = userErrorMessage; exports.isPaintableLayer = isPaintableLayer; exports.defaultActiveLayerId = defaultActiveLayerId; exports.activeLayerAfterRemoval = activeLayerAfterRemoval; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.componentsCoverage = componentsCoverage; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.VECTOR_MASK_EDGE_DEFAULTS = VECTOR_MASK_EDGE_DEFAULTS; exports.vectorMaskSegments = vectorMaskSegments; exports.validVectorMaskEdges = validVectorMaskEdges; exports.hybridVectorMaskCoverage = hybridVectorMaskCoverage; exports.isActiveVectorMask = isActiveVectorMask; exports.vectorMaskCoverage = vectorMaskCoverage; exports.layerGuide = layerGuide; exports.effectiveLayerMask = effectiveLayerMask; exports.resolveVectorMasks = resolveVectorMasks; exports.offsetVectorMask = offsetVectorMask; exports.transformVectorMask = transformVectorMask; exports.followLayerMove = followLayerMove; exports.vectorMaskBounds = vectorMaskBounds; exports.vectorMaskThumbnail = vectorMaskThumbnail; exports.EDGE_COLOR_RADIUS = EDGE_COLOR_RADIUS; exports.hasEdgeUnmix = hasEdgeUnmix; exports.maskCoverageOverCanvas = maskCoverageOverCanvas; exports.hasSoftBand = hasSoftBand; exports.despillEdge = despillEdge; exports.applyEdgeUnmix = applyEdgeUnmix; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.textOrientation = textOrientation; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.EdgeMap = EdgeMap; exports.snapToEdge = snapToEdge; exports.liveWire = liveWire; exports.simplifyPixelPath = simplifyPixelPath; exports.snapPolygonToEdges = snapPolygonToEdges; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.ANCHOR_FRACTION = ANCHOR_FRACTION; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.translateLayer = translateLayer; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.readEdgeColor = readEdgeColor; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.readShapeComponents = readShapeComponents; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.describeSelection = describeSelection; exports.describeLayerEffects = describeLayerEffects; exports.createImageEffectTools = createImageEffectTools; exports.createLayerEffectTools = createLayerEffectTools; exports.snapTo45 = snapTo45; exports.SelectionGesture = SelectionGesture; exports.handleSelectionShortcut = handleSelectionShortcut; exports.handleMaskViewKey = handleMaskViewKey; exports.handleQuickMaskKey = handleQuickMaskKey; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.PAINT_TOOLS = PAINT_TOOLS; exports.isPaintTool = isPaintTool; exports.isRetouchPaintTool = isRetouchPaintTool; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.cloneTransformView = cloneTransformView; exports.setCloneTransformValue = setCloneTransformValue; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.setRetouchChoice = setRetouchChoice; exports.cloneSourceLabel = cloneSourceLabel; exports.rgbUnitToHex = rgbUnitToHex; exports.handlePaintShortcut = handlePaintShortcut; exports.PaintGesture = PaintGesture;
|
|
13290
|
+
exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.MARGIN_FIT_MIN_GUTTER = MARGIN_FIT_MIN_GUTTER; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.layerMaskSelection = layerMaskSelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyLegacyFloat = applyLegacyFloat; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyProcess2Float = applyProcess2Float; exports.applyBoxBlurFloat = applyBoxBlurFloat; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.TEXT_ORIENTATIONS = TEXT_ORIENTATIONS; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.MAX_EFFECT_ANIMATION_MS = MAX_EFFECT_ANIMATION_MS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.LayerOperationError = LayerOperationError; exports.userErrorMessage = userErrorMessage; exports.isPaintableLayer = isPaintableLayer; exports.defaultActiveLayerId = defaultActiveLayerId; exports.activeLayerAfterRemoval = activeLayerAfterRemoval; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.componentsCoverage = componentsCoverage; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.VECTOR_MASK_EDGE_DEFAULTS = VECTOR_MASK_EDGE_DEFAULTS; exports.vectorMaskSegments = vectorMaskSegments; exports.validVectorMaskEdges = validVectorMaskEdges; exports.hybridVectorMaskCoverage = hybridVectorMaskCoverage; exports.isActiveVectorMask = isActiveVectorMask; exports.vectorMaskCoverage = vectorMaskCoverage; exports.layerGuide = layerGuide; exports.effectiveLayerMask = effectiveLayerMask; exports.resolveVectorMasks = resolveVectorMasks; exports.offsetVectorMask = offsetVectorMask; exports.transformVectorMask = transformVectorMask; exports.followLayerMove = followLayerMove; exports.vectorMaskBounds = vectorMaskBounds; exports.vectorMaskThumbnail = vectorMaskThumbnail; exports.EDGE_COLOR_RADIUS = EDGE_COLOR_RADIUS; exports.hasEdgeUnmix = hasEdgeUnmix; exports.maskCoverageOverCanvas = maskCoverageOverCanvas; exports.hasSoftBand = hasSoftBand; exports.despillEdge = despillEdge; exports.applyEdgeUnmix = applyEdgeUnmix; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.runLayerFiltersFloat = runLayerFiltersFloat; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.textOrientation = textOrientation; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.EdgeMap = EdgeMap; exports.snapToEdge = snapToEdge; exports.liveWire = liveWire; exports.simplifyPixelPath = simplifyPixelPath; exports.snapPolygonToEdges = snapPolygonToEdges; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.ANCHOR_FRACTION = ANCHOR_FRACTION; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.isSmartSurfaceIncomplete = isSmartSurfaceIncomplete; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.activeEffectSmartFilters = activeEffectSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.translateLayer = translateLayer; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.readEdgeColor = readEdgeColor; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.readShapeComponents = readShapeComponents; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.describeSelection = describeSelection; exports.describeLayerEffects = describeLayerEffects; exports.createImageEffectTools = createImageEffectTools; exports.createLayerEffectTools = createLayerEffectTools; exports.snapTo45 = snapTo45; exports.SelectionGesture = SelectionGesture; exports.handleSelectionShortcut = handleSelectionShortcut; exports.handleMaskViewKey = handleMaskViewKey; exports.handleQuickMaskKey = handleQuickMaskKey; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.PAINT_TOOLS = PAINT_TOOLS; exports.isPaintTool = isPaintTool; exports.isRetouchPaintTool = isRetouchPaintTool; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.cloneTransformView = cloneTransformView; exports.setCloneTransformValue = setCloneTransformValue; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.setRetouchChoice = setRetouchChoice; exports.cloneSourceLabel = cloneSourceLabel; exports.rgbUnitToHex = rgbUnitToHex; exports.handlePaintShortcut = handlePaintShortcut; exports.PaintGesture = PaintGesture;
|