@pixerate/editor 0.249.0 → 0.251.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 +40 -41
- package/dist/agent/index.js +9 -10
- package/dist/animation/index.cjs +6 -7
- package/dist/animation/index.js +5 -6
- package/dist/animation-editor/index.cjs +124 -123
- package/dist/animation-editor/index.js +15 -14
- package/dist/brushes/index.cjs +1406 -0
- package/dist/brushes/index.d.cts +12 -0
- package/dist/brushes/index.d.ts +12 -0
- package/dist/brushes/index.js +1406 -0
- package/dist/brushes/migrate.d.cts +17 -0
- package/dist/brushes/migrate.d.ts +17 -0
- package/dist/brushes/normalize.d.cts +15 -0
- package/dist/brushes/normalize.d.ts +15 -0
- package/dist/brushes/presets.d.cts +12 -0
- package/dist/brushes/presets.d.ts +12 -0
- package/dist/brushes/resolve.d.cts +56 -0
- package/dist/brushes/resolve.d.ts +56 -0
- package/dist/brushes/schema.d.cts +29 -0
- package/dist/brushes/schema.d.ts +29 -0
- package/dist/brushes/types.d.cts +323 -0
- package/dist/brushes/types.d.ts +323 -0
- package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
- package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
- package/dist/canvas/index.cjs +120 -65
- package/dist/canvas/index.d.cts +1 -0
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.js +88 -33
- package/dist/canvas/stickers.d.cts +35 -0
- package/dist/canvas/stickers.d.ts +35 -0
- package/dist/chart/index.cjs +159 -160
- package/dist/chart/index.js +9 -10
- package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
- package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
- package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
- package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
- package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
- package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
- package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
- package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
- package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
- package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
- package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
- package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
- package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
- package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
- package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
- package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
- package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
- package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
- package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
- package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
- package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
- package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
- package/dist/chunk-HS6QDWDF.cjs +1029 -0
- package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
- package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
- package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
- package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
- package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
- package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
- package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
- package/dist/chunk-JSDND7DF.cjs +173 -0
- package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
- package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
- package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
- package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
- package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
- package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
- package/dist/chunk-MTKY6K3Q.js +1029 -0
- package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
- package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
- package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
- package/dist/chunk-PXDIAYB6.cjs +594 -0
- package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
- package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
- package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
- package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
- package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
- package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
- package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
- package/dist/chunk-SZTI6EER.js +13 -0
- package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
- package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
- package/dist/chunk-TXFWZ5ZJ.js +594 -0
- package/dist/chunk-U67EN7GG.cjs +13 -0
- package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
- package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
- package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
- package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
- package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
- package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
- package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
- package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
- package/dist/color/index.cjs +4 -6
- package/dist/color/index.js +7 -9
- package/dist/effects/helpers.d.cts +6 -0
- package/dist/effects/helpers.d.ts +6 -0
- package/dist/effects/index.cjs +62 -60
- package/dist/effects/index.js +5 -3
- package/dist/effects/tools.d.cts +6 -0
- package/dist/effects/tools.d.ts +6 -0
- package/dist/export/index.cjs +7 -8
- package/dist/export/index.js +6 -7
- package/dist/extensions/index.cjs +10 -11
- package/dist/extensions/index.js +9 -10
- package/dist/gradient/index.cjs +33 -34
- package/dist/gradient/index.js +4 -5
- package/dist/image-editor/effects.d.cts +1 -1
- package/dist/image-editor/effects.d.ts +1 -1
- package/dist/image-editor/index.cjs +887 -863
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +69 -45
- package/dist/image-editor/stickers.d.cts +9 -0
- package/dist/image-editor/stickers.d.ts +9 -0
- package/dist/index.cjs +16 -17
- package/dist/index.js +10 -11
- package/dist/paint/index.cjs +6 -4
- package/dist/paint/index.js +21 -19
- package/dist/paint-editor/brushes.d.cts +1 -2
- package/dist/paint-editor/brushes.d.ts +1 -2
- package/dist/paint-editor/index.cjs +2199 -699
- package/dist/paint-editor/index.js +1577 -77
- package/dist/paint-editor/mark-settings.d.cts +104 -0
- package/dist/paint-editor/mark-settings.d.ts +104 -0
- package/dist/paint-editor/procedural.d.cts +2 -75
- package/dist/paint-editor/procedural.d.ts +2 -75
- package/dist/paint-editor/stickers.d.cts +1 -22
- package/dist/paint-editor/stickers.d.ts +1 -22
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.js +9 -9
- package/dist/stickers/index.cjs +22 -16
- package/dist/stickers/index.d.cts +1 -1
- package/dist/stickers/index.d.ts +1 -1
- package/dist/stickers/index.js +14 -8
- package/dist/stickers/tools.d.cts +57 -1
- package/dist/stickers/tools.d.ts +57 -1
- package/dist/tokens/index.cjs +3 -4
- package/dist/tokens/index.js +2 -3
- package/dist/typography/index.cjs +7 -8
- package/dist/typography/index.js +2 -3
- package/dist/vector/index.cjs +1011 -977
- package/dist/vector/index.d.cts +1 -0
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.js +47 -13
- package/dist/vector/stickers.d.cts +11 -0
- package/dist/vector/stickers.d.ts +11 -0
- package/dist/video-editor/index.cjs +349 -350
- package/dist/video-editor/index.js +9 -10
- package/package.json +11 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -1
- package/skills/pixerate-stickers/SKILL.md +13 -1
- package/dist/chunk-7AHBW2CQ.cjs +0 -200
- package/dist/chunk-F67XMVDI.js +0 -200
- package/dist/chunk-H4AOUUBE.cjs +0 -2635
- package/dist/chunk-J7T5QZ45.js +0 -2635
- package/dist/chunk-ZEYMKDYS.cjs +0 -269
package/dist/vector/index.d.cts
CHANGED
package/dist/vector/index.d.ts
CHANGED
package/dist/vector/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
traceField,
|
|
27
27
|
traceVectorImage,
|
|
28
28
|
vectorTraceContours
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-2ZJ4DT3M.js";
|
|
30
30
|
import {
|
|
31
31
|
applyHomography,
|
|
32
32
|
homographyFromPoints,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
reverseMorphContour,
|
|
54
54
|
subpathToMorphContour,
|
|
55
55
|
turnMorphContour
|
|
56
|
-
} from "../chunk-
|
|
56
|
+
} from "../chunk-7P6VF3FG.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_VECTOR_FONT,
|
|
59
59
|
IDENTITY_MATRIX,
|
|
@@ -526,9 +526,9 @@ import {
|
|
|
526
526
|
withVectorStrokes,
|
|
527
527
|
withVectorTargetPaint,
|
|
528
528
|
zigzagPaths
|
|
529
|
-
} from "../chunk-
|
|
530
|
-
import "../chunk-
|
|
531
|
-
import "../chunk-
|
|
529
|
+
} from "../chunk-GYMMNCFT.js";
|
|
530
|
+
import "../chunk-MTKY6K3Q.js";
|
|
531
|
+
import "../chunk-APX63ILU.js";
|
|
532
532
|
import {
|
|
533
533
|
createProvenance
|
|
534
534
|
} from "../chunk-M6DNZNVY.js";
|
|
@@ -554,25 +554,29 @@ import {
|
|
|
554
554
|
fitCubics,
|
|
555
555
|
parseSvgPath
|
|
556
556
|
} from "../chunk-PWBZH3FK.js";
|
|
557
|
+
import {
|
|
558
|
+
StickerError
|
|
559
|
+
} from "../chunk-SZTI6EER.js";
|
|
557
560
|
import {
|
|
558
561
|
EffectUnsupportedError,
|
|
559
562
|
EffectsSlot,
|
|
560
563
|
createEffectToolProvider,
|
|
561
564
|
resolveEffectValues
|
|
562
|
-
} from "../chunk-
|
|
565
|
+
} from "../chunk-JA57JIT5.js";
|
|
563
566
|
import "../chunk-V2ZCJRDM.js";
|
|
564
567
|
import {
|
|
565
568
|
GRAIN_PATTERNS
|
|
566
|
-
} from "../chunk-
|
|
569
|
+
} from "../chunk-TXFWZ5ZJ.js";
|
|
570
|
+
import "../chunk-GCVFEPJG.js";
|
|
567
571
|
import "../chunk-4D6KP5BV.js";
|
|
568
572
|
import "../chunk-ODBT55Q7.js";
|
|
569
|
-
import "../chunk-IRSTHLQQ.js";
|
|
570
573
|
import {
|
|
571
574
|
bytesToBase64,
|
|
572
575
|
decodePng,
|
|
573
576
|
isPng,
|
|
574
577
|
parseDataUrl
|
|
575
578
|
} from "../chunk-OTTT5N3K.js";
|
|
579
|
+
import "../chunk-IRSTHLQQ.js";
|
|
576
580
|
import "../chunk-HVVR5PZW.js";
|
|
577
581
|
import {
|
|
578
582
|
deflate
|
|
@@ -587,14 +591,13 @@ import {
|
|
|
587
591
|
HistoryManager
|
|
588
592
|
} from "../chunk-NS62CQ2B.js";
|
|
589
593
|
import "../chunk-5UJHB3BW.js";
|
|
590
|
-
import "../chunk-
|
|
594
|
+
import "../chunk-M2TPMYJE.js";
|
|
591
595
|
import {
|
|
592
596
|
hexToRgba
|
|
593
597
|
} from "../chunk-2WPNAGHI.js";
|
|
594
|
-
import "../chunk-
|
|
595
|
-
import "../chunk-
|
|
596
|
-
import "../chunk-
|
|
597
|
-
import "../chunk-F67XMVDI.js";
|
|
598
|
+
import "../chunk-7272D3K2.js";
|
|
599
|
+
import "../chunk-YBAPT7NL.js";
|
|
600
|
+
import "../chunk-MHLU6GRJ.js";
|
|
598
601
|
import "../chunk-6ONMQ6WF.js";
|
|
599
602
|
|
|
600
603
|
// src/vector/stylize.ts
|
|
@@ -18317,6 +18320,35 @@ function vectorLayerRows(nodes, expanded = () => false) {
|
|
|
18317
18320
|
visit(nodes, 0, null);
|
|
18318
18321
|
return rows;
|
|
18319
18322
|
}
|
|
18323
|
+
|
|
18324
|
+
// src/vector/stickers.ts
|
|
18325
|
+
function stickerVectorGroup(placement, id = "sticker") {
|
|
18326
|
+
const { asset, description } = placement;
|
|
18327
|
+
if (asset.kind !== "svg") throw new StickerError("unsupported_format", `"${placement.ref}" has only raster art; the vector editor takes stickers with SVG art (find_stickers lists formats).`);
|
|
18328
|
+
let n2 = 0;
|
|
18329
|
+
const parsed = parseVectorSvg(asset.svg, { createId: () => `${id}-${++n2}` });
|
|
18330
|
+
if (!parsed.nodes.length) throw new StickerError("load_failed", `"${placement.ref}" has no shapes the vector editor can read.`);
|
|
18331
|
+
const group = { type: "group", id, name: description.name, children: parsed.nodes };
|
|
18332
|
+
const b = vectorNodeBounds(group);
|
|
18333
|
+
if (!b || !(b.width > 0) || !(b.height > 0)) throw new StickerError("load_failed", `"${placement.ref}" has no visible shapes.`);
|
|
18334
|
+
const box = { width: parsed.width || b.width, height: parsed.height || b.height };
|
|
18335
|
+
const s = placement.width / box.width;
|
|
18336
|
+
return transformVectorNode(group, [s, 0, 0, s, placement.x - box.width * s / 2, placement.y - box.height * s / 2]);
|
|
18337
|
+
}
|
|
18338
|
+
function createVectorStickerHost(controller) {
|
|
18339
|
+
return {
|
|
18340
|
+
noun: "group of editable paths",
|
|
18341
|
+
format: "svg",
|
|
18342
|
+
defaultCentre: () => {
|
|
18343
|
+
const d = controller.getDocument();
|
|
18344
|
+
return { x: d.width / 2, y: d.height / 2 };
|
|
18345
|
+
},
|
|
18346
|
+
insert(placement) {
|
|
18347
|
+
const id = controller.addNode(stickerVectorGroup(placement), { label: `Insert ${placement.description.name}` });
|
|
18348
|
+
return { id };
|
|
18349
|
+
}
|
|
18350
|
+
};
|
|
18351
|
+
}
|
|
18320
18352
|
export {
|
|
18321
18353
|
DEFAULT_VECTOR_BLEND_DISTANCE,
|
|
18322
18354
|
DEFAULT_VECTOR_BLEND_STEPS,
|
|
@@ -18496,6 +18528,7 @@ export {
|
|
|
18496
18528
|
createVectorMeshGradient,
|
|
18497
18529
|
createVectorMorph,
|
|
18498
18530
|
createVectorPlaybackLocator,
|
|
18531
|
+
createVectorStickerHost,
|
|
18499
18532
|
cssFontFamily,
|
|
18500
18533
|
curvatureMoveAnchor,
|
|
18501
18534
|
cutSubpathAt,
|
|
@@ -18756,6 +18789,7 @@ export {
|
|
|
18756
18789
|
splitWarpMeshU as splitVectorMeshU,
|
|
18757
18790
|
splitWarpMeshV as splitVectorMeshV,
|
|
18758
18791
|
starSubpath,
|
|
18792
|
+
stickerVectorGroup,
|
|
18759
18793
|
stripVectorLensViews,
|
|
18760
18794
|
stripVectorMasterArt,
|
|
18761
18795
|
stripVectorSymbolArt,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stickers in the vector editor: `insert_sticker` (see `@pixerate/editor/stickers`) puts a
|
|
3
|
+
* sticker's SVG in as a group of editable paths, scaled to its width and centred where asked.
|
|
4
|
+
*/
|
|
5
|
+
import type { StickerInsertHost, StickerPlacement } from '../stickers/tools.cjs';
|
|
6
|
+
import type { VectorEditorController } from './controller.cjs';
|
|
7
|
+
import type { VectorGroupNode } from './types.cjs';
|
|
8
|
+
/** A group of the sticker's paths, `placement.width` wide and centred on (`x`, `y`). */
|
|
9
|
+
export declare function stickerVectorGroup(placement: StickerPlacement, id?: string): VectorGroupNode;
|
|
10
|
+
/** `insert_sticker` for a vector editor: a group of editable paths, one undo step, selected. */
|
|
11
|
+
export declare function createVectorStickerHost(controller: VectorEditorController): StickerInsertHost;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stickers in the vector editor: `insert_sticker` (see `@pixerate/editor/stickers`) puts a
|
|
3
|
+
* sticker's SVG in as a group of editable paths, scaled to its width and centred where asked.
|
|
4
|
+
*/
|
|
5
|
+
import type { StickerInsertHost, StickerPlacement } from '../stickers/tools.js';
|
|
6
|
+
import type { VectorEditorController } from './controller.js';
|
|
7
|
+
import type { VectorGroupNode } from './types.js';
|
|
8
|
+
/** A group of the sticker's paths, `placement.width` wide and centred on (`x`, `y`). */
|
|
9
|
+
export declare function stickerVectorGroup(placement: StickerPlacement, id?: string): VectorGroupNode;
|
|
10
|
+
/** `insert_sticker` for a vector editor: a group of editable paths, one undo step, selected. */
|
|
11
|
+
export declare function createVectorStickerHost(controller: VectorEditorController): StickerInsertHost;
|