@pixerate/editor 0.263.0 → 0.264.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/brushes/index.cjs +155 -68
- package/dist/brushes/index.d.cts +3 -3
- package/dist/brushes/index.d.ts +3 -3
- package/dist/brushes/index.js +111 -24
- package/dist/brushes/library.d.cts +2 -0
- package/dist/brushes/library.d.ts +2 -0
- package/dist/brushes/profiles.d.cts +21 -2
- package/dist/brushes/profiles.d.ts +21 -2
- package/dist/brushes/ui.d.cts +57 -4
- package/dist/brushes/ui.d.ts +57 -4
- package/dist/{brushstrokeRender-S5DABANG.js → brushstrokeRender-3MOI7PH4.js} +2 -2
- package/dist/{brushstrokeRender-2GBME4XD.cjs → brushstrokeRender-SMMPIJF2.cjs} +12 -12
- package/dist/canvas/index.cjs +13 -13
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-CNLO6E2K.js → chunk-4OJC4MCD.js} +8 -7
- package/dist/{chunk-ZBACQHW3.cjs → chunk-BY5EBP26.cjs} +27 -6
- package/dist/{chunk-JGI4PZWO.js → chunk-CECCP2V7.js} +1 -1
- package/dist/{chunk-P5343XZO.js → chunk-EE7SAYBF.js} +23 -2
- package/dist/{chunk-TILEUVRO.cjs → chunk-F3KKR6DD.cjs} +35 -34
- package/dist/{chunk-TIHW7CUY.cjs → chunk-FQC5TDB6.cjs} +35 -35
- package/dist/{chunk-4E6BGHWN.cjs → chunk-G5ADO47G.cjs} +1 -1
- package/dist/{chunk-QW7LKWKE.js → chunk-HAUDEVMC.js} +1 -1
- package/dist/{chunk-LG6MEEV7.js → chunk-JEML4FSA.js} +1 -1
- package/dist/{chunk-XQW6R7VW.cjs → chunk-KXNZNOEF.cjs} +86 -86
- package/dist/{chunk-6XX7E7O2.js → chunk-ROBSFJ6F.js} +1 -1
- package/dist/{chunk-LWHUU6A6.cjs → chunk-USJX5SW4.cjs} +10 -10
- package/dist/{chunk-73QFSPDG.cjs → chunk-V7MJ4HIN.cjs} +23 -23
- package/dist/{chunk-34HIZXFX.js → chunk-WWI6FLH2.js} +1 -1
- package/dist/image-editor/controller.d.cts +3 -0
- package/dist/image-editor/controller.d.ts +3 -0
- package/dist/image-editor/index.cjs +789 -786
- package/dist/image-editor/index.js +7 -4
- package/dist/image-editor/types.d.cts +7 -0
- package/dist/image-editor/types.d.ts +7 -0
- package/dist/paint-editor/brush-library-tools.d.cts +8 -1
- package/dist/paint-editor/brush-library-tools.d.ts +8 -1
- package/dist/paint-editor/index.cjs +84 -80
- package/dist/paint-editor/index.d.cts +1 -1
- package/dist/paint-editor/index.d.ts +1 -1
- package/dist/paint-editor/index.js +12 -8
- package/dist/vector/controller.d.cts +13 -0
- package/dist/vector/controller.d.ts +13 -0
- package/dist/vector/index.cjs +1215 -1205
- package/dist/vector/index.js +16 -6
- package/package.json +1 -1
- package/skills/pixerate-brushes/SKILL.md +11 -3
- package/skills/pixerate-brushes-design/SKILL.md +1 -0
- package/skills/pixerate-vector/SKILL.md +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkBY5EBP26cjs = require('./chunk-BY5EBP26.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
var _chunkCVFAAZXEcjs = require('./chunk-CVFAAZXE.cjs');
|
|
@@ -2536,11 +2536,11 @@ function vectorExtrudeFaces(path, params) {
|
|
|
2536
2536
|
|
|
2537
2537
|
// src/vector/brushstroke.ts
|
|
2538
2538
|
var VECTOR_BRUSHSTROKE_SCALE = 2;
|
|
2539
|
-
var PRESETS =
|
|
2539
|
+
var PRESETS = _chunkBY5EBP26cjs.listPresets.call(void 0, _chunkBY5EBP26cjs.VECTOR_PROFILE).map((spec) => _chunkBY5EBP26cjs.BUILTIN_BRUSHES.find((b) => b.id === spec.id));
|
|
2540
2540
|
function admitted(spec) {
|
|
2541
2541
|
try {
|
|
2542
|
-
const brush =
|
|
2543
|
-
return
|
|
2542
|
+
const brush = _chunkBY5EBP26cjs.normalizeBrushSpec.call(void 0, spec);
|
|
2543
|
+
return _chunkBY5EBP26cjs.checkBrush.call(void 0, brush, _chunkBY5EBP26cjs.VECTOR_PROFILE).ok && _chunkPXDIAYB6cjs.isBrushstrokeBrush.call(void 0, _chunkBY5EBP26cjs.resolveBrush.call(void 0, brush)) ? brush : null;
|
|
2544
2544
|
} catch (e4) {
|
|
2545
2545
|
return null;
|
|
2546
2546
|
}
|
|
@@ -2549,7 +2549,7 @@ function vectorBrushstrokeBrushes(user = []) {
|
|
|
2549
2549
|
const out = [...PRESETS];
|
|
2550
2550
|
for (const raw of user) {
|
|
2551
2551
|
const brush = admitted(raw);
|
|
2552
|
-
if (brush && !out.some((b) => b.id === brush.id)) out.push(
|
|
2552
|
+
if (brush && !out.some((b) => b.id === brush.id)) out.push(_chunkBY5EBP26cjs.resolveBrush.call(void 0, brush));
|
|
2553
2553
|
}
|
|
2554
2554
|
return out;
|
|
2555
2555
|
}
|
|
@@ -2559,7 +2559,7 @@ function vectorBrushstrokeBrush(id) {
|
|
|
2559
2559
|
function vectorBrushstrokeBrushOf(brush) {
|
|
2560
2560
|
if (brush.spec) {
|
|
2561
2561
|
const saved = admitted(brush.spec);
|
|
2562
|
-
return saved && saved.id === brush.brushId ?
|
|
2562
|
+
return saved && saved.id === brush.brushId ? _chunkBY5EBP26cjs.resolveBrush.call(void 0, saved) : null;
|
|
2563
2563
|
}
|
|
2564
2564
|
return vectorBrushstrokeBrush(brush.brushId);
|
|
2565
2565
|
}
|
|
@@ -2567,14 +2567,14 @@ function vectorBrushstrokeBrushError(id, user = []) {
|
|
|
2567
2567
|
if (vectorBrushstrokeBrush(id)) return null;
|
|
2568
2568
|
const saved = user.find((b) => b.id === id);
|
|
2569
2569
|
const ids = vectorBrushstrokeBrushes(user).map((b) => b.id);
|
|
2570
|
-
const reasons = (b) =>
|
|
2570
|
+
const reasons = (b) => _chunkBY5EBP26cjs.checkBrush.call(void 0, b, _chunkBY5EBP26cjs.VECTOR_PROFILE).issues.filter((i) => i.severity === "error").map((i) => `${i.reason} ${i.fix}`).join(" ") || "it is not a dry dab brush.";
|
|
2571
2571
|
if (saved) return admitted(saved) ? null : `Brush "${id}" (${saved.name}) can't paint a brushstroke: ${reasons(saved)} Use one of: ${ids.join(", ")}.`;
|
|
2572
|
-
const preset =
|
|
2572
|
+
const preset = _chunkBY5EBP26cjs.BRUSH_PRESETS.find((b) => b.id === id);
|
|
2573
2573
|
if (preset) return `Brush "${id}" (${preset.name}) can't paint a brushstroke: ${reasons(preset)} Use one of: ${ids.join(", ")}.`;
|
|
2574
|
-
return `Unknown brush "${id}". ${
|
|
2574
|
+
return `Unknown brush "${id}". ${_chunkBY5EBP26cjs.closest.call(void 0, id, ids)}Use one of: ${ids.join(", ")} (vector.listBrushes lists them).`;
|
|
2575
2575
|
}
|
|
2576
2576
|
function vectorBrushstrokeDefaultColour(id, user = [], scheme = "light") {
|
|
2577
|
-
const brush = _nullishCoalesce(
|
|
2577
|
+
const brush = _nullishCoalesce(_chunkBY5EBP26cjs.BRUSH_PRESETS.find((b) => b.id === id), () => ( user.find((b) => b.id === id)));
|
|
2578
2578
|
return brush ? _chunkLRTR4ASZcjs.brushColourHex.call(void 0, _optionalChain([brush, 'access', _55 => _55.colour, 'optionalAccess', _56 => _56.default]), scheme) : null;
|
|
2579
2579
|
}
|
|
2580
2580
|
function sanitizeVectorBrushstroke(value, user = []) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkUSJX5SW4cjs = require('./chunk-USJX5SW4.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
var _chunkGF2RBSDMcjs = require('./chunk-GF2RBSDM.cjs');
|
|
@@ -1361,12 +1361,12 @@ var unit = (x, y) => {
|
|
|
1361
1361
|
return l > 1e-12 && Number.isFinite(l) ? [x / l, y / l] : null;
|
|
1362
1362
|
};
|
|
1363
1363
|
function cubicOf(sp, i) {
|
|
1364
|
-
const s =
|
|
1364
|
+
const s = _chunkUSJX5SW4cjs.subpathSegment.call(void 0, sp, i);
|
|
1365
1365
|
if (s.length === 4) return s;
|
|
1366
1366
|
const [a, b] = s;
|
|
1367
1367
|
return [a, [a[0] + (b[0] - a[0]) / 3, a[1] + (b[1] - a[1]) / 3], [a[0] + 2 * (b[0] - a[0]) / 3, a[1] + 2 * (b[1] - a[1]) / 3], b];
|
|
1368
1368
|
}
|
|
1369
|
-
var isLine = (sp, i) =>
|
|
1369
|
+
var isLine = (sp, i) => _chunkUSJX5SW4cjs.subpathSegment.call(void 0, sp, i).length === 2;
|
|
1370
1370
|
function startTangent(c) {
|
|
1371
1371
|
for (let k = 1; k < 4; k++) {
|
|
1372
1372
|
const u = unit(c[k][0] - c[0][0], c[k][1] - c[0][1]);
|
|
@@ -1386,10 +1386,10 @@ function sample(c, n, out, withStart) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
var onAnchor = (a, h) => !h || Math.abs(h.x - a.x) < EPS && Math.abs(h.y - a.y) < EPS;
|
|
1388
1388
|
function tidy(a, keepType = true) {
|
|
1389
|
-
const next =
|
|
1389
|
+
const next = _chunkUSJX5SW4cjs.cloneAnchor.call(void 0, a);
|
|
1390
1390
|
if (onAnchor(next, next.in)) delete next.in;
|
|
1391
1391
|
if (onAnchor(next, next.out)) delete next.out;
|
|
1392
|
-
const shown =
|
|
1392
|
+
const shown = _chunkUSJX5SW4cjs.inferAnchorType.call(void 0, next);
|
|
1393
1393
|
const type = keepType && a.type ? a.type === "symmetric" && shown !== "symmetric" ? shown === "corner" ? "corner" : "smooth" : a.type === "smooth" && shown === "corner" ? "corner" : a.type : shown;
|
|
1394
1394
|
if (type === "corner") delete next.type;
|
|
1395
1395
|
else next.type = type;
|
|
@@ -1433,7 +1433,7 @@ function fitAcross(pts, N, t0, t1) {
|
|
|
1433
1433
|
return goldenMin(fit, 0, 1);
|
|
1434
1434
|
}
|
|
1435
1435
|
function removeAnchorKeepingShape(sp, index) {
|
|
1436
|
-
const anchors = sp.anchors.map(
|
|
1436
|
+
const anchors = sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor);
|
|
1437
1437
|
const n = anchors.length;
|
|
1438
1438
|
if (index < 0 || index >= n) return { anchors, closed: sp.closed };
|
|
1439
1439
|
if ((sp.closed || index > 0 && index < n - 1) && n >= 3) {
|
|
@@ -1467,12 +1467,12 @@ function removeAnchorKeepingShape(sp, index) {
|
|
|
1467
1467
|
}
|
|
1468
1468
|
function removeAnchorsKeepingShape(sp, indices) {
|
|
1469
1469
|
const order = [...new Set(indices)].filter((i) => i >= 0 && i < sp.anchors.length).sort((a, b) => b - a);
|
|
1470
|
-
return order.reduce((acc, i) => removeAnchorKeepingShape(acc, i), { anchors: sp.anchors.map(
|
|
1470
|
+
return order.reduce((acc, i) => removeAnchorKeepingShape(acc, i), { anchors: sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor), closed: sp.closed });
|
|
1471
1471
|
}
|
|
1472
1472
|
function bendSegment(sp, segment, t, p) {
|
|
1473
|
-
const anchors = sp.anchors.map(
|
|
1473
|
+
const anchors = sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor);
|
|
1474
1474
|
const n = anchors.length;
|
|
1475
|
-
if (segment < 0 || segment >=
|
|
1475
|
+
if (segment < 0 || segment >= _chunkUSJX5SW4cjs.subpathSegmentCount.call(void 0, sp) || !Number.isFinite(t) || !Number.isFinite(p.x) || !Number.isFinite(p.y)) return { anchors, closed: sp.closed };
|
|
1476
1476
|
const tc = Math.min(0.95, Math.max(0.05, t));
|
|
1477
1477
|
const ia = segment;
|
|
1478
1478
|
const ib = (segment + 1) % n;
|
|
@@ -1483,16 +1483,16 @@ function bendSegment(sp, segment, t, p) {
|
|
|
1483
1483
|
const oy = (p.y - (a.y + (b.y - a.y) * tc)) / k;
|
|
1484
1484
|
const c1 = { x: a.x + (b.x - a.x) / 3 + ox, y: a.y + (b.y - a.y) / 3 + oy };
|
|
1485
1485
|
const c2 = { x: b.x + (a.x - b.x) / 3 + ox, y: b.y + (a.y - b.y) / 3 + oy };
|
|
1486
|
-
anchors[ia] =
|
|
1487
|
-
anchors[ib] =
|
|
1486
|
+
anchors[ia] = _chunkUSJX5SW4cjs.moveAnchorHandle.call(void 0, a, "out", c1);
|
|
1487
|
+
anchors[ib] = _chunkUSJX5SW4cjs.moveAnchorHandle.call(void 0, b, "in", c2);
|
|
1488
1488
|
return { anchors, closed: sp.closed };
|
|
1489
1489
|
}
|
|
1490
1490
|
function subpathPointAt(sp, segment, t) {
|
|
1491
|
-
const [x, y] = _chunkGF2RBSDMcjs.segmentPoint.call(void 0,
|
|
1491
|
+
const [x, y] = _chunkGF2RBSDMcjs.segmentPoint.call(void 0, _chunkUSJX5SW4cjs.subpathSegment.call(void 0, sp, segment), t);
|
|
1492
1492
|
return { x, y };
|
|
1493
1493
|
}
|
|
1494
1494
|
function curvatureMoveAnchor(sp, index, q) {
|
|
1495
|
-
const anchors = sp.anchors.map(
|
|
1495
|
+
const anchors = sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor);
|
|
1496
1496
|
const a = sp.anchors[index];
|
|
1497
1497
|
if (!a) return { anchors, closed: sp.closed };
|
|
1498
1498
|
const own = [
|
|
@@ -1538,7 +1538,7 @@ function curvatureMoveAnchor(sp, index, q) {
|
|
|
1538
1538
|
function cutSubpathAt(sp, at) {
|
|
1539
1539
|
const n = sp.anchors.length;
|
|
1540
1540
|
const cuts = [...new Set(at)].filter((i) => Number.isInteger(i) && i >= 0 && i < n && (sp.closed || i > 0 && i < n - 1)).sort((a, b) => a - b);
|
|
1541
|
-
if (!cuts.length || n < 2) return [{ anchors: sp.anchors.map(
|
|
1541
|
+
if (!cuts.length || n < 2) return [{ anchors: sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor), closed: sp.closed }];
|
|
1542
1542
|
const first = cuts[0];
|
|
1543
1543
|
const run = sp.closed ? Array.from({ length: n + 1 }, (_, i) => sp.anchors[(first + i) % n]) : sp.anchors;
|
|
1544
1544
|
const cutSet = new Set(sp.closed ? [...cuts.map((c) => (c - first + n) % n), n] : cuts);
|
|
@@ -1546,7 +1546,7 @@ function cutSubpathAt(sp, at) {
|
|
|
1546
1546
|
let cur = [];
|
|
1547
1547
|
run.forEach((a, i) => {
|
|
1548
1548
|
if (!cutSet.has(i)) {
|
|
1549
|
-
cur.push(
|
|
1549
|
+
cur.push(_chunkUSJX5SW4cjs.cloneAnchor.call(void 0, a));
|
|
1550
1550
|
return;
|
|
1551
1551
|
}
|
|
1552
1552
|
if (cur.length) {
|
|
@@ -1561,10 +1561,10 @@ function cutSubpathAt(sp, at) {
|
|
|
1561
1561
|
}
|
|
1562
1562
|
function splitSubpathAt(sp, segment, t, endTolerance = 1e-6) {
|
|
1563
1563
|
const n = sp.anchors.length;
|
|
1564
|
-
if (segment < 0 || segment >=
|
|
1564
|
+
if (segment < 0 || segment >= _chunkUSJX5SW4cjs.subpathSegmentCount.call(void 0, sp)) return [{ anchors: sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor), closed: sp.closed }];
|
|
1565
1565
|
if (t <= endTolerance) return cutSubpathAt(sp, [segment]);
|
|
1566
1566
|
if (t >= 1 - endTolerance) return cutSubpathAt(sp, [(segment + 1) % n]);
|
|
1567
|
-
const { subpath, index } =
|
|
1567
|
+
const { subpath, index } = _chunkUSJX5SW4cjs.insertAnchor.call(void 0, sp, segment, t);
|
|
1568
1568
|
return cutSubpathAt(subpath, [index]);
|
|
1569
1569
|
}
|
|
1570
1570
|
var endOf = (sp, last) => sp.anchors[last ? sp.anchors.length - 1 : 0];
|
|
@@ -1587,7 +1587,7 @@ function joinSubpaths(subpaths, tolerance) {
|
|
|
1587
1587
|
const closed = [];
|
|
1588
1588
|
let open = [];
|
|
1589
1589
|
for (const sp of subpaths) {
|
|
1590
|
-
const copy = { anchors: sp.anchors.map(
|
|
1590
|
+
const copy = { anchors: sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor), closed: sp.closed };
|
|
1591
1591
|
if (sp.closed || sp.anchors.length < 2) {
|
|
1592
1592
|
if (sp.anchors.length) closed.push(copy);
|
|
1593
1593
|
} else open.push(copy);
|
|
@@ -1642,7 +1642,7 @@ function smoothSubpath(sp, amount = 1, only) {
|
|
|
1642
1642
|
const t = Math.min(1, Math.max(0, amount));
|
|
1643
1643
|
const orig = sp.anchors;
|
|
1644
1644
|
const n = orig.length;
|
|
1645
|
-
const anchors = orig.map(
|
|
1645
|
+
const anchors = orig.map(_chunkUSJX5SW4cjs.cloneAnchor);
|
|
1646
1646
|
if (n < 3 || t === 0) return { anchors, closed: sp.closed };
|
|
1647
1647
|
for (let i = 0; i < n; i++) {
|
|
1648
1648
|
if (!sp.closed && (i === 0 || i === n - 1)) continue;
|
|
@@ -1671,8 +1671,8 @@ function smoothSubpath(sp, amount = 1, only) {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
function segsOf(sp) {
|
|
1673
1673
|
const out = [];
|
|
1674
|
-
for (let i = 0; i <
|
|
1675
|
-
const s =
|
|
1674
|
+
for (let i = 0; i < _chunkUSJX5SW4cjs.subpathSegmentCount.call(void 0, sp); i++) {
|
|
1675
|
+
const s = _chunkUSJX5SW4cjs.subpathSegment.call(void 0, sp, i);
|
|
1676
1676
|
out.push(s.length === 2 ? { c: s, line: true } : { c: s, line: false });
|
|
1677
1677
|
}
|
|
1678
1678
|
return out;
|
|
@@ -1729,7 +1729,7 @@ function removeRedundantPoints(sp, tolerance) {
|
|
|
1729
1729
|
const tol = Math.max(tolerance, 1e-9);
|
|
1730
1730
|
const types = new Map(sp.anchors.filter((a) => a.type).map((a) => [`${a.x},${a.y}`, a.type]));
|
|
1731
1731
|
const segs = segsOf(sp).filter((s) => !isZeroSeg(s));
|
|
1732
|
-
if (!segs.length) return { anchors: sp.anchors.map(
|
|
1732
|
+
if (!segs.length) return { anchors: sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor), closed: sp.closed };
|
|
1733
1733
|
const minSegs = sp.closed ? 2 : 1;
|
|
1734
1734
|
let changed = true;
|
|
1735
1735
|
while (changed && segs.length > minSegs) {
|
|
@@ -1747,7 +1747,7 @@ function removeRedundantPoints(sp, tolerance) {
|
|
|
1747
1747
|
break;
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
|
-
return _nullishCoalesce(segsToSubpath(segs, sp.closed, types), () => ( { anchors: sp.anchors.map(
|
|
1750
|
+
return _nullishCoalesce(segsToSubpath(segs, sp.closed, types), () => ( { anchors: sp.anchors.map(_chunkUSJX5SW4cjs.cloneAnchor), closed: sp.closed }));
|
|
1751
1751
|
}
|
|
1752
1752
|
|
|
1753
1753
|
|
|
@@ -46,6 +46,7 @@ import { type ProofSetup } from './color-management.cjs';
|
|
|
46
46
|
import type { EffectPattern } from '../raster/effects/patterns.cjs';
|
|
47
47
|
import { type GlobalLight, type LayerEffect, type LayerEffectKind, type LayerEffects } from '../raster/effects/model.cjs';
|
|
48
48
|
import { type BrushLibrary, type BrushLibraryEntry } from '../brushes/library.cjs';
|
|
49
|
+
import type { BrushPreviewRenderer } from '../brushes/tools.cjs';
|
|
49
50
|
import { type ImageBrushPreset } from './brush-presets.cjs';
|
|
50
51
|
/** What `getSmartObject` reports. */
|
|
51
52
|
export interface SmartObjectInfo {
|
|
@@ -1575,6 +1576,8 @@ export declare class ImageEditorController {
|
|
|
1575
1576
|
}): string | null;
|
|
1576
1577
|
/** The brush library the brush presets come from (shared with other editors when the host passes one). */
|
|
1577
1578
|
readonly brushLibrary: BrushLibrary;
|
|
1579
|
+
/** The `brushPreview` option: draws the brush editor's preview stroke, or `null`. */
|
|
1580
|
+
readonly brushPreview: BrushPreviewRenderer | null;
|
|
1578
1581
|
/** The brushes this editor can paint with (`IMAGE_PROFILE`): built-in presets, then saved brushes. */
|
|
1579
1582
|
listBrushPresets(): Promise<BrushLibraryEntry[]>;
|
|
1580
1583
|
/**
|
|
@@ -46,6 +46,7 @@ import { type ProofSetup } from './color-management.js';
|
|
|
46
46
|
import type { EffectPattern } from '../raster/effects/patterns.js';
|
|
47
47
|
import { type GlobalLight, type LayerEffect, type LayerEffectKind, type LayerEffects } from '../raster/effects/model.js';
|
|
48
48
|
import { type BrushLibrary, type BrushLibraryEntry } from '../brushes/library.js';
|
|
49
|
+
import type { BrushPreviewRenderer } from '../brushes/tools.js';
|
|
49
50
|
import { type ImageBrushPreset } from './brush-presets.js';
|
|
50
51
|
/** What `getSmartObject` reports. */
|
|
51
52
|
export interface SmartObjectInfo {
|
|
@@ -1575,6 +1576,8 @@ export declare class ImageEditorController {
|
|
|
1575
1576
|
}): string | null;
|
|
1576
1577
|
/** The brush library the brush presets come from (shared with other editors when the host passes one). */
|
|
1577
1578
|
readonly brushLibrary: BrushLibrary;
|
|
1579
|
+
/** The `brushPreview` option: draws the brush editor's preview stroke, or `null`. */
|
|
1580
|
+
readonly brushPreview: BrushPreviewRenderer | null;
|
|
1578
1581
|
/** The brushes this editor can paint with (`IMAGE_PROFILE`): built-in presets, then saved brushes. */
|
|
1579
1582
|
listBrushPresets(): Promise<BrushLibraryEntry[]>;
|
|
1580
1583
|
/**
|