@pixerate/editor 0.266.2 → 0.268.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 +175 -108
- package/dist/animation-editor/index.js +94 -27
- package/dist/brushes/index.cjs +201 -75
- package/dist/brushes/index.d.cts +4 -3
- package/dist/brushes/index.d.ts +4 -3
- package/dist/brushes/index.js +138 -12
- package/dist/brushes/library.d.cts +27 -1
- package/dist/brushes/library.d.ts +27 -1
- package/dist/brushes/profiles.d.cts +10 -1
- package/dist/brushes/profiles.d.ts +10 -1
- package/dist/brushes/schema.d.cts +4 -0
- package/dist/brushes/schema.d.ts +4 -0
- package/dist/brushes/sources.d.cts +114 -0
- package/dist/brushes/sources.d.ts +114 -0
- package/dist/brushes/types.d.cts +37 -5
- package/dist/brushes/types.d.ts +37 -5
- package/dist/brushes/ui.d.cts +40 -4
- package/dist/brushes/ui.d.ts +40 -4
- package/dist/{brushstrokeRender-KD453OBX.js → brushstrokeRender-A727TTNQ.js} +7 -7
- package/dist/{brushstrokeRender-FSUWXUZY.cjs → brushstrokeRender-WR2N5HHY.cjs} +23 -23
- 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-TOID45I2.cjs → chunk-2WOGXEDX.cjs} +1 -1
- package/dist/{chunk-XORJ7UZO.cjs → chunk-3VHH6V67.cjs} +13 -12
- package/dist/{chunk-3C33YTNN.js → chunk-3XDSNIGF.js} +73 -6
- package/dist/chunk-62MFUHSI.cjs +802 -0
- package/dist/{chunk-R44Y3EFS.js → chunk-74ODPZLX.js} +17 -345
- package/dist/{chunk-GCVFEPJG.js → chunk-ACTHSQOI.js} +182 -0
- package/dist/chunk-ADMRNWR7.js +340 -0
- package/dist/{chunk-MVUQSK5J.cjs → chunk-B3G7BKUV.cjs} +111 -439
- package/dist/{chunk-DXYHQ2VN.js → chunk-BAZMCFVL.js} +1 -1
- package/dist/{chunk-VRK322ZC.cjs → chunk-BPJSI4NT.cjs} +2 -2
- package/dist/{chunk-RFJZGTHA.cjs → chunk-EU2ZZA6L.cjs} +400 -69
- package/dist/{chunk-XC6DPRYI.js → chunk-GSTSZPSR.js} +154 -949
- package/dist/{chunk-EZOJBP4D.js → chunk-HFY5LG5J.js} +1 -1
- package/dist/chunk-HVO6XCI4.js +802 -0
- package/dist/{chunk-YHDHFJUC.cjs → chunk-J5VQYK7T.cjs} +217 -1012
- package/dist/{chunk-XRXFVRGY.cjs → chunk-JBB3GDBB.cjs} +2483 -208
- package/dist/{chunk-ACFSFUQH.js → chunk-JL6YH5WD.js} +4 -0
- package/dist/{chunk-CIJBSUM5.js → chunk-KZI3YWKW.js} +353 -22
- package/dist/{chunk-4ODRXQRW.js → chunk-LETF75CA.js} +1 -1
- package/dist/{chunk-FQPUF2W2.cjs → chunk-NIBFKXMD.cjs} +217 -35
- package/dist/{chunk-AQZQWXEU.cjs → chunk-NPWWSCWT.cjs} +35 -35
- package/dist/{chunk-DOZ6F2K2.js → chunk-NSETJI74.js} +3 -2
- package/dist/{chunk-PE6YJMQT.cjs → chunk-PFHJS4HE.cjs} +20 -19
- package/dist/{chunk-7KNW3WXZ.cjs → chunk-QEVLRLUN.cjs} +63 -0
- package/dist/{chunk-LK4SXL3V.js → chunk-QNY7BDFP.js} +1 -1
- package/dist/{chunk-OTN6VB5S.cjs → chunk-RDFHWAHL.cjs} +5 -1
- package/dist/{chunk-PXDIAYB6.cjs → chunk-STLTOISW.cjs} +34 -214
- package/dist/{chunk-T2LDTEXK.js → chunk-UVTO3D4E.js} +2333 -58
- package/dist/{chunk-6JL2D5SG.js → chunk-VE6UKYQ2.js} +3 -2
- package/dist/{chunk-TXFWZ5ZJ.js → chunk-W6JDUXP3.js} +4 -184
- package/dist/{chunk-3SBLVGOM.cjs → chunk-YOVXQHA3.cjs} +23 -23
- package/dist/{chunk-WLUVZKVD.cjs → chunk-YXP6X3SY.cjs} +103 -36
- 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 +868 -864
- package/dist/image-editor/index.js +123 -119
- package/dist/paint/index.cjs +8 -6
- package/dist/paint/index.js +56 -54
- package/dist/paint-editor/brush-library-tools.d.cts +12 -2
- package/dist/paint-editor/brush-library-tools.d.ts +12 -2
- package/dist/paint-editor/brush-model.d.cts +29 -1
- package/dist/paint-editor/brush-model.d.ts +29 -1
- package/dist/paint-editor/brush-source-art.d.cts +32 -0
- package/dist/paint-editor/brush-source-art.d.ts +32 -0
- package/dist/paint-editor/controller.d.cts +11 -4
- package/dist/paint-editor/controller.d.ts +11 -4
- package/dist/paint-editor/dab-stroke.d.cts +2 -0
- package/dist/paint-editor/dab-stroke.d.ts +2 -0
- package/dist/paint-editor/engine.d.cts +11 -2
- package/dist/paint-editor/engine.d.ts +11 -2
- package/dist/paint-editor/index.cjs +967 -2335
- package/dist/paint-editor/index.d.cts +3 -1
- package/dist/paint-editor/index.d.ts +3 -1
- package/dist/paint-editor/index.js +394 -1762
- 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/paint-editor/stamp-tip.d.cts +8 -5
- package/dist/paint-editor/stamp-tip.d.ts +8 -5
- package/dist/paint-editor/thumbnails.d.cts +6 -0
- package/dist/paint-editor/thumbnails.d.ts +6 -0
- package/dist/paint-editor/tip-grain.d.cts +34 -0
- package/dist/paint-editor/tip-grain.d.ts +34 -0
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.js +9 -9
- 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 +1850 -1390
- package/dist/vector/index.d.cts +2 -0
- package/dist/vector/index.d.ts +2 -0
- package/dist/vector/index.js +520 -60
- 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 +37 -10
- package/skills/pixerate-brushes-design/SKILL.md +15 -5
- 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 +14 -4
- package/skills/pixerate-paint-editor/references/brush-facets.md +3 -1
- package/skills/pixerate-paint-editor/references/wet-media.md +9 -0
- package/skills/pixerate-paint-sketch-to-finish/SKILL.md +1 -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
|
@@ -29,7 +29,7 @@ import { type VectorSnapGuides, type VectorTrackingPoint } from './snap.js';
|
|
|
29
29
|
import { type VectorBlendMode, type VectorFilterType, type VectorWarpMesh } from './types.js';
|
|
30
30
|
import { EffectsSlot } from '../effects/helpers.js';
|
|
31
31
|
import type { EffectProvider, EffectValue } from '../effects/types.js';
|
|
32
|
-
import type { Vec2, VectorEffectType, VectorAlign, VectorAnchor, VectorAnchorRef, VectorAnchorType, VectorArrange, VectorAverageAxis, VectorBlendOptions, VectorBooleanOperation, VectorBounds, VectorCornerKind, VectorDefaults, VectorDistribute, VectorDocument, VectorGroupNode, VectorProviderEffect, VectorHandleRef, VectorMask, VectorMaskType, VectorModifiers, VectorNode, VectorPathfinderOperation, VectorPathNode, VectorSegmentRef, VectorStyle, VectorSubpath, VectorTool, VectorTransformHandle, VectorViewport, VectorWidthPoint, VectorCharacterStyle, VectorParagraphStyle, VectorTextAlign, VectorTextFrame, VectorTextNode, VectorMatrix, VectorSymbol, VectorPaint, VectorConstraint, VectorConstraintKind, VectorParameter, VectorBrushstroke, VectorBrushstrokePaper } from './types.js';
|
|
32
|
+
import type { Vec2, VectorEffectType, VectorAlign, VectorAnchor, VectorAnchorRef, VectorAnchorType, VectorArrange, VectorAverageAxis, VectorBlendOptions, VectorBooleanOperation, VectorBounds, VectorCornerKind, VectorDefaults, VectorDistribute, VectorDocument, VectorGroupNode, VectorProviderEffect, VectorHandleRef, VectorMask, VectorMaskType, VectorModifiers, VectorNode, VectorPathfinderOperation, VectorPathNode, VectorSegmentRef, VectorStyle, VectorSubpath, VectorTool, VectorTransformHandle, VectorViewport, VectorWidthPoint, VectorCharacterStyle, VectorParagraphStyle, VectorTextAlign, VectorTextFrame, VectorTextNode, VectorMatrix, VectorSymbol, VectorPaint, VectorConstraint, VectorConstraintKind, VectorParameter, VectorBrushstroke, VectorBrushstrokePaint, VectorBrushstrokePaper } from './types.js';
|
|
33
33
|
export interface VectorSnapOptions {
|
|
34
34
|
/** Grid size in document units (0 = off, default 0). Points and boxes that snap to no object snap to it. */
|
|
35
35
|
grid: number;
|
|
@@ -113,6 +113,8 @@ export interface VectorEditorOptions {
|
|
|
113
113
|
brushPreview?: BrushPreviewRenderer;
|
|
114
114
|
/** The app's colour scheme, which picks the side of a brush's light / dark default colour (default light). */
|
|
115
115
|
colorScheme?: 'light' | 'dark';
|
|
116
|
+
/** Start with the colour locked: new and rebrushed brushstrokes keep their colour (see `setColorLocked`). */
|
|
117
|
+
colorLocked?: boolean;
|
|
116
118
|
/** History to record into, e.g. one shared with the rest of the app (default: a new one). */
|
|
117
119
|
history?: HistoryManager;
|
|
118
120
|
/** Starting tool (default `select`). */
|
|
@@ -408,6 +410,10 @@ export interface VectorEditorState {
|
|
|
408
410
|
* a side skews along it (Alt: about the centre).
|
|
409
411
|
*/
|
|
410
412
|
freeDistort: boolean;
|
|
413
|
+
/** The colour scheme that picks the side of a brush's light / dark default colour. */
|
|
414
|
+
colorScheme: 'light' | 'dark';
|
|
415
|
+
/** "Keep my colour": brushstrokes don't take a brush's default colour (`setColorLocked`). */
|
|
416
|
+
colorLocked: boolean;
|
|
411
417
|
/** The text being edited on the canvas, or null. Typing goes to `textInput`, keys to `keyDown`. */
|
|
412
418
|
textEdit: VectorTextEditState | null;
|
|
413
419
|
/** Font and alignment new text gets. */
|
|
@@ -799,6 +805,7 @@ export declare class VectorEditorController {
|
|
|
799
805
|
private revision;
|
|
800
806
|
private state;
|
|
801
807
|
private colorScheme;
|
|
808
|
+
private colorLocked;
|
|
802
809
|
constructor(options?: VectorEditorOptions);
|
|
803
810
|
/** Listens to the history (once; again after `destroy`). */
|
|
804
811
|
private connect;
|
|
@@ -1133,7 +1140,7 @@ export declare class VectorEditorController {
|
|
|
1133
1140
|
* Adds a brushstroke to the selected (or given) paths: a stroke layer that paints the path with
|
|
1134
1141
|
* brush `brushId` (a preset, or a saved brush of the brush library: `listBrushstrokeBrushes`), `size` document
|
|
1135
1142
|
* units across (default the brush's own), an optional `pressure` profile along the length, in
|
|
1136
|
-
* `color` (default the brush's own default colour, unless `keepColour
|
|
1143
|
+
* `color` (default the brush's own default colour, unless `keepColour` or the colour is locked; else the top stroke's
|
|
1137
1144
|
* paint, else black) at `opacity`. At the top of the stroke
|
|
1138
1145
|
* stack or at `index`. A `seed` gives it the brush's character (jitter and the grain of `paper`,
|
|
1139
1146
|
* `null` for none); without one it renders plain. One undo step.
|
|
@@ -1150,7 +1157,7 @@ export declare class VectorEditorController {
|
|
|
1150
1157
|
* given) paths: another brush, size, pressure profile (null removes it), colour or opacity, the
|
|
1151
1158
|
* character `seed` (null removes it: plain dabs) or the `paper` (replaced whole: `null` for no
|
|
1152
1159
|
* grain, `{}` for the default paper). Another brush without a `color` takes that brush's default
|
|
1153
|
-
* colour, if it has one, unless `keepColour
|
|
1160
|
+
* colour, if it has one, unless `keepColour` or the colour is locked. Fails, changing nothing, when that layer is not a
|
|
1154
1161
|
* brushstroke. With `merge`, consecutive edits fold into one undo step.
|
|
1155
1162
|
*/
|
|
1156
1163
|
setBrushstroke(index: number, patch: {
|
|
@@ -1162,12 +1169,19 @@ export declare class VectorEditorController {
|
|
|
1162
1169
|
opacity?: number;
|
|
1163
1170
|
seed?: number | null;
|
|
1164
1171
|
paper?: VectorBrushstrokePaper | null;
|
|
1172
|
+
paint?: VectorBrushstrokePaint | null;
|
|
1165
1173
|
}, options?: {
|
|
1166
1174
|
ids?: readonly string[];
|
|
1167
1175
|
merge?: boolean | string;
|
|
1168
1176
|
}): VectorActionResult;
|
|
1169
1177
|
/** Sets the colour scheme that picks the side of a brush's light / dark default colour. Existing strokes keep their colour. */
|
|
1170
1178
|
setColorScheme(scheme: 'light' | 'dark'): void;
|
|
1179
|
+
/**
|
|
1180
|
+
* Locks the brushstroke colour ("Keep my colour"): `addBrushstroke` and `setBrushstroke` with
|
|
1181
|
+
* another brush keep the colour instead of taking the brush's default; an explicit `color` still
|
|
1182
|
+
* applies. Existing strokes are unchanged. Editor state, not an undo step.
|
|
1183
|
+
*/
|
|
1184
|
+
setColorLocked(locked: boolean): void;
|
|
1171
1185
|
/** Removes layer `index` of the fill or stroke stack of the selected (or given) paths. */
|
|
1172
1186
|
removePaintLayer(kind: 'fill' | 'stroke', index: number, options?: {
|
|
1173
1187
|
ids?: readonly string[];
|