@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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brush sources: the images a brush is made from, as Procreate's Shape and Grain sources. A
|
|
3
|
+
* source is a grey mask (255 paints, or is a grain peak; 0 is empty) kept as a greyscale PNG
|
|
4
|
+
* `data:` URL, so a library file or a saved painting carries its bytes alongside the brushes
|
|
5
|
+
* that name it.
|
|
6
|
+
*
|
|
7
|
+
* - A stamp tip lays a source with the ref `source:<id>` in `tip.stamps`, the same way it lays a
|
|
8
|
+
* sticker: shaped dabs, sprays and particle dots all take it.
|
|
9
|
+
* - `tip.grain.source` takes `source:<id>` as a grain texture (or one of the built-in grain
|
|
10
|
+
* patterns).
|
|
11
|
+
*
|
|
12
|
+
* `makeBrushSource` reads an uploaded image (PNG, any size up to `MAX_BRUSH_SOURCE_INPUT_PIXELS`),
|
|
13
|
+
* picks the channel that holds the marks and scales it to fit `MAX_BRUSH_SOURCE_SIZE`.
|
|
14
|
+
*/
|
|
15
|
+
import type { Brush } from './types.cjs';
|
|
16
|
+
/** The ref prefix of a brush source: `source:<id>`. The sticker provider id `source` is reserved for it. */
|
|
17
|
+
export declare const BRUSH_SOURCE_PROVIDER = "source";
|
|
18
|
+
/** Longest side a source is kept at (px); larger images are scaled down when added. */
|
|
19
|
+
export declare const MAX_BRUSH_SOURCE_SIZE = 512;
|
|
20
|
+
/** Largest image `makeBrushSource` decodes (pixels). */
|
|
21
|
+
export declare const MAX_BRUSH_SOURCE_INPUT_PIXELS: number;
|
|
22
|
+
/** Most sources one library keeps. */
|
|
23
|
+
export declare const MAX_BRUSH_SOURCES = 500;
|
|
24
|
+
/**
|
|
25
|
+
* Which part of an image holds the marks: `alpha` (art on a transparent background), `darkness`
|
|
26
|
+
* (dark marks on white paper, a scan), `lightness` (white marks on black, as Procreate's shape
|
|
27
|
+
* sources) or `auto`: alpha when the image has any transparency, else darkness.
|
|
28
|
+
*/
|
|
29
|
+
export type BrushSourceChannel = 'auto' | 'alpha' | 'darkness' | 'lightness';
|
|
30
|
+
export declare const BRUSH_SOURCE_CHANNELS: readonly BrushSourceChannel[];
|
|
31
|
+
/** A stored source. */
|
|
32
|
+
export interface BrushSource {
|
|
33
|
+
/** Lowercase letters, digits and dashes, up to 64 characters. */
|
|
34
|
+
id: string;
|
|
35
|
+
/** Display name, up to 80 characters. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** Size of the mask in px (each 1..`MAX_BRUSH_SOURCE_SIZE`). */
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
/** The mask: a greyscale PNG `data:` URL, 255 paints. */
|
|
41
|
+
image: string;
|
|
42
|
+
/** The licence or terms it came with (a brush pack's notes), kept with the source. */
|
|
43
|
+
licence?: string;
|
|
44
|
+
/** Where it came from: a file or brush pack name. */
|
|
45
|
+
origin?: string;
|
|
46
|
+
}
|
|
47
|
+
/** What `makeBrushSource` reads. */
|
|
48
|
+
export interface BrushSourceInput {
|
|
49
|
+
/** Default: from the name. */
|
|
50
|
+
id?: string;
|
|
51
|
+
name: string;
|
|
52
|
+
/** A PNG as a `data:image/png;base64,…` URL, or its bytes. */
|
|
53
|
+
image: string | Uint8Array;
|
|
54
|
+
/** Default `auto`. */
|
|
55
|
+
channel?: BrushSourceChannel;
|
|
56
|
+
/** Swap painted and empty (default false). */
|
|
57
|
+
invert?: boolean;
|
|
58
|
+
licence?: string;
|
|
59
|
+
origin?: string;
|
|
60
|
+
}
|
|
61
|
+
/** A source without its image, for lists. */
|
|
62
|
+
export type BrushSourceSummary = Omit<BrushSource, 'image'> & {
|
|
63
|
+
ref: string;
|
|
64
|
+
};
|
|
65
|
+
/** A refusal; the message says what to do instead. */
|
|
66
|
+
export declare class BrushSourceError extends Error {
|
|
67
|
+
constructor(message: string);
|
|
68
|
+
}
|
|
69
|
+
/** `source:<id>`. */
|
|
70
|
+
export declare function brushSourceRef(id: string): string;
|
|
71
|
+
/** Whether a stamp or grain ref names a brush source. */
|
|
72
|
+
export declare function isBrushSourceRef(ref: unknown): ref is string;
|
|
73
|
+
/** The source id of a `source:<id>` ref, or `null` for any other ref. */
|
|
74
|
+
export declare function brushSourceIdOf(ref: string): string | null;
|
|
75
|
+
/** The ids of the sources a brush lays or textures with (its stamp tip and its grain). */
|
|
76
|
+
export declare function brushSourceIds(brush: Pick<Brush, 'tip'>): string[];
|
|
77
|
+
/** The list form of a source. */
|
|
78
|
+
export declare function summarizeBrushSource(s: BrushSource): BrushSourceSummary;
|
|
79
|
+
/** An id from a name: lowercase words joined by dashes. */
|
|
80
|
+
export declare function brushSourceIdFromName(name: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* A source from a grey mask (255 paints), scaled to fit `MAX_BRUSH_SOURCE_SIZE`. Importers use it
|
|
83
|
+
* for tips they have decoded themselves. Throws when the mask is empty or the wrong size.
|
|
84
|
+
*/
|
|
85
|
+
export declare function brushSourceFromMask(meta: {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
licence?: string;
|
|
89
|
+
origin?: string;
|
|
90
|
+
}, width: number, height: number, mask: Uint8Array | Uint8ClampedArray): BrushSource;
|
|
91
|
+
/**
|
|
92
|
+
* A source from an uploaded image (see the module comment): its marks read from `channel`,
|
|
93
|
+
* inverted when asked, scaled to fit. Throws (a `BrushSourceError`) when the image is not a PNG,
|
|
94
|
+
* too large, or empty in that channel; `problems` hears what was changed (scaling, the channel
|
|
95
|
+
* `auto` picked).
|
|
96
|
+
*/
|
|
97
|
+
export declare function makeBrushSource(input: BrushSourceInput, problems?: string[]): BrushSource;
|
|
98
|
+
/**
|
|
99
|
+
* A stored source read back (from a library file or a saved painting), or `null` with the reason
|
|
100
|
+
* in `problems`. The image is checked for its form, not decoded (`decodeBrushSource` does that
|
|
101
|
+
* when it is first painted with).
|
|
102
|
+
*/
|
|
103
|
+
export declare function readBrushSource(raw: unknown, at: string, problems: string[]): BrushSource | null;
|
|
104
|
+
/** A decoded source: one byte per pixel, 255 paints. */
|
|
105
|
+
export interface DecodedBrushSource {
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
mask: Uint8ClampedArray;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The source's mask, decoded once per image (cached by its data, so a painting's copy and the
|
|
112
|
+
* library's share it). Throws when the image is not a valid PNG.
|
|
113
|
+
*/
|
|
114
|
+
export declare function decodeBrushSource(source: Pick<BrushSource, 'image'>): DecodedBrushSource;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brush sources: the images a brush is made from, as Procreate's Shape and Grain sources. A
|
|
3
|
+
* source is a grey mask (255 paints, or is a grain peak; 0 is empty) kept as a greyscale PNG
|
|
4
|
+
* `data:` URL, so a library file or a saved painting carries its bytes alongside the brushes
|
|
5
|
+
* that name it.
|
|
6
|
+
*
|
|
7
|
+
* - A stamp tip lays a source with the ref `source:<id>` in `tip.stamps`, the same way it lays a
|
|
8
|
+
* sticker: shaped dabs, sprays and particle dots all take it.
|
|
9
|
+
* - `tip.grain.source` takes `source:<id>` as a grain texture (or one of the built-in grain
|
|
10
|
+
* patterns).
|
|
11
|
+
*
|
|
12
|
+
* `makeBrushSource` reads an uploaded image (PNG, any size up to `MAX_BRUSH_SOURCE_INPUT_PIXELS`),
|
|
13
|
+
* picks the channel that holds the marks and scales it to fit `MAX_BRUSH_SOURCE_SIZE`.
|
|
14
|
+
*/
|
|
15
|
+
import type { Brush } from './types.js';
|
|
16
|
+
/** The ref prefix of a brush source: `source:<id>`. The sticker provider id `source` is reserved for it. */
|
|
17
|
+
export declare const BRUSH_SOURCE_PROVIDER = "source";
|
|
18
|
+
/** Longest side a source is kept at (px); larger images are scaled down when added. */
|
|
19
|
+
export declare const MAX_BRUSH_SOURCE_SIZE = 512;
|
|
20
|
+
/** Largest image `makeBrushSource` decodes (pixels). */
|
|
21
|
+
export declare const MAX_BRUSH_SOURCE_INPUT_PIXELS: number;
|
|
22
|
+
/** Most sources one library keeps. */
|
|
23
|
+
export declare const MAX_BRUSH_SOURCES = 500;
|
|
24
|
+
/**
|
|
25
|
+
* Which part of an image holds the marks: `alpha` (art on a transparent background), `darkness`
|
|
26
|
+
* (dark marks on white paper, a scan), `lightness` (white marks on black, as Procreate's shape
|
|
27
|
+
* sources) or `auto`: alpha when the image has any transparency, else darkness.
|
|
28
|
+
*/
|
|
29
|
+
export type BrushSourceChannel = 'auto' | 'alpha' | 'darkness' | 'lightness';
|
|
30
|
+
export declare const BRUSH_SOURCE_CHANNELS: readonly BrushSourceChannel[];
|
|
31
|
+
/** A stored source. */
|
|
32
|
+
export interface BrushSource {
|
|
33
|
+
/** Lowercase letters, digits and dashes, up to 64 characters. */
|
|
34
|
+
id: string;
|
|
35
|
+
/** Display name, up to 80 characters. */
|
|
36
|
+
name: string;
|
|
37
|
+
/** Size of the mask in px (each 1..`MAX_BRUSH_SOURCE_SIZE`). */
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
/** The mask: a greyscale PNG `data:` URL, 255 paints. */
|
|
41
|
+
image: string;
|
|
42
|
+
/** The licence or terms it came with (a brush pack's notes), kept with the source. */
|
|
43
|
+
licence?: string;
|
|
44
|
+
/** Where it came from: a file or brush pack name. */
|
|
45
|
+
origin?: string;
|
|
46
|
+
}
|
|
47
|
+
/** What `makeBrushSource` reads. */
|
|
48
|
+
export interface BrushSourceInput {
|
|
49
|
+
/** Default: from the name. */
|
|
50
|
+
id?: string;
|
|
51
|
+
name: string;
|
|
52
|
+
/** A PNG as a `data:image/png;base64,…` URL, or its bytes. */
|
|
53
|
+
image: string | Uint8Array;
|
|
54
|
+
/** Default `auto`. */
|
|
55
|
+
channel?: BrushSourceChannel;
|
|
56
|
+
/** Swap painted and empty (default false). */
|
|
57
|
+
invert?: boolean;
|
|
58
|
+
licence?: string;
|
|
59
|
+
origin?: string;
|
|
60
|
+
}
|
|
61
|
+
/** A source without its image, for lists. */
|
|
62
|
+
export type BrushSourceSummary = Omit<BrushSource, 'image'> & {
|
|
63
|
+
ref: string;
|
|
64
|
+
};
|
|
65
|
+
/** A refusal; the message says what to do instead. */
|
|
66
|
+
export declare class BrushSourceError extends Error {
|
|
67
|
+
constructor(message: string);
|
|
68
|
+
}
|
|
69
|
+
/** `source:<id>`. */
|
|
70
|
+
export declare function brushSourceRef(id: string): string;
|
|
71
|
+
/** Whether a stamp or grain ref names a brush source. */
|
|
72
|
+
export declare function isBrushSourceRef(ref: unknown): ref is string;
|
|
73
|
+
/** The source id of a `source:<id>` ref, or `null` for any other ref. */
|
|
74
|
+
export declare function brushSourceIdOf(ref: string): string | null;
|
|
75
|
+
/** The ids of the sources a brush lays or textures with (its stamp tip and its grain). */
|
|
76
|
+
export declare function brushSourceIds(brush: Pick<Brush, 'tip'>): string[];
|
|
77
|
+
/** The list form of a source. */
|
|
78
|
+
export declare function summarizeBrushSource(s: BrushSource): BrushSourceSummary;
|
|
79
|
+
/** An id from a name: lowercase words joined by dashes. */
|
|
80
|
+
export declare function brushSourceIdFromName(name: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* A source from a grey mask (255 paints), scaled to fit `MAX_BRUSH_SOURCE_SIZE`. Importers use it
|
|
83
|
+
* for tips they have decoded themselves. Throws when the mask is empty or the wrong size.
|
|
84
|
+
*/
|
|
85
|
+
export declare function brushSourceFromMask(meta: {
|
|
86
|
+
id: string;
|
|
87
|
+
name: string;
|
|
88
|
+
licence?: string;
|
|
89
|
+
origin?: string;
|
|
90
|
+
}, width: number, height: number, mask: Uint8Array | Uint8ClampedArray): BrushSource;
|
|
91
|
+
/**
|
|
92
|
+
* A source from an uploaded image (see the module comment): its marks read from `channel`,
|
|
93
|
+
* inverted when asked, scaled to fit. Throws (a `BrushSourceError`) when the image is not a PNG,
|
|
94
|
+
* too large, or empty in that channel; `problems` hears what was changed (scaling, the channel
|
|
95
|
+
* `auto` picked).
|
|
96
|
+
*/
|
|
97
|
+
export declare function makeBrushSource(input: BrushSourceInput, problems?: string[]): BrushSource;
|
|
98
|
+
/**
|
|
99
|
+
* A stored source read back (from a library file or a saved painting), or `null` with the reason
|
|
100
|
+
* in `problems`. The image is checked for its form, not decoded (`decodeBrushSource` does that
|
|
101
|
+
* when it is first painted with).
|
|
102
|
+
*/
|
|
103
|
+
export declare function readBrushSource(raw: unknown, at: string, problems: string[]): BrushSource | null;
|
|
104
|
+
/** A decoded source: one byte per pixel, 255 paints. */
|
|
105
|
+
export interface DecodedBrushSource {
|
|
106
|
+
width: number;
|
|
107
|
+
height: number;
|
|
108
|
+
mask: Uint8ClampedArray;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The source's mask, decoded once per image (cached by its data, so a painting's copy and the
|
|
112
|
+
* library's share it). Throws when the image is not a valid PNG.
|
|
113
|
+
*/
|
|
114
|
+
export declare function decodeBrushSource(source: Pick<BrushSource, 'image'>): DecodedBrushSource;
|
package/dist/brushes/types.d.cts
CHANGED
|
@@ -29,8 +29,8 @@ export type BrushTool = 'eraser' | 'blender' | 'smudge' | 'water' | 'dryer' | 'b
|
|
|
29
29
|
export declare const BRUSH_TOOLS: readonly BrushTool[];
|
|
30
30
|
/**
|
|
31
31
|
* The tip's shape. `round`, `flat` and `chisel` are ellipses (their `roundness` and `angle` set
|
|
32
|
-
* the ellipse; the name is for people); `bristle` is a tuft of bristles; `stamp` lays
|
|
33
|
-
*
|
|
32
|
+
* the ellipse; the name is for people); `bristle` is a tuft of bristles; `stamp` lays shaped
|
|
33
|
+
* dabs: an editor stamp, a sticker, or an image source (`source:<id>`, see `brushes/sources.ts`).
|
|
34
34
|
*/
|
|
35
35
|
export type BrushTipShape = 'round' | 'flat' | 'chisel' | 'bristle' | 'stamp';
|
|
36
36
|
export declare const BRUSH_TIP_SHAPES: readonly BrushTipShape[];
|
|
@@ -41,10 +41,36 @@ export declare const BRUSH_MARKS_KINDS: readonly BrushMarksKind[];
|
|
|
41
41
|
export type BrushSurface = 'dry' | 'wet' | 'thick';
|
|
42
42
|
export declare const BRUSH_SURFACES: readonly BrushSurface[];
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
* sticker)
|
|
44
|
+
* What a `stamp` tip lays: a sticker ref `provider:id` (`editor:star`, or a host library's
|
|
45
|
+
* sticker) or an image source `source:<id>` from the brush library. Objects marks take only
|
|
46
|
+
* stickers (each mark stays a sticker).
|
|
46
47
|
*/
|
|
47
48
|
export type BrushStamp = StickerRef;
|
|
49
|
+
/**
|
|
50
|
+
* How tip grain sits: `moving` rolls with the tip along the stroke (it turns with the tip, and
|
|
51
|
+
* every stroke shows it the same way); `texturised` stays put on the canvas, like a texture under
|
|
52
|
+
* the paint, so overlapping strokes show the same grain.
|
|
53
|
+
*/
|
|
54
|
+
export type BrushGrainMode = 'moving' | 'texturised';
|
|
55
|
+
export declare const BRUSH_GRAIN_MODES: readonly BrushGrainMode[];
|
|
56
|
+
/** Mirror each dab at random across these axes of the tip. */
|
|
57
|
+
export type BrushFlip = 'none' | 'x' | 'y' | 'xy';
|
|
58
|
+
export declare const BRUSH_FLIPS: readonly BrushFlip[];
|
|
59
|
+
/** Texture inside the tip (Procreate's grain source), separate from the paper grain. */
|
|
60
|
+
export interface BrushTipGrain {
|
|
61
|
+
/** A built-in grain pattern (`rough`, `canvas`, `sanded`…) or an image source `source:<id>` (light parts are peaks). */
|
|
62
|
+
source: string;
|
|
63
|
+
/** Default `texturised`. */
|
|
64
|
+
mode?: BrushGrainMode;
|
|
65
|
+
/** Grain size: 1 is the pattern's or image's own size, 2 twice as coarse; 0.05..20 (default 1). */
|
|
66
|
+
scale?: number;
|
|
67
|
+
/** How much the grain takes out of the mark: 0 none .. 1 only the peaks paint (default 0.6). */
|
|
68
|
+
depth?: number;
|
|
69
|
+
/** Height contrast around the middle, 0..3 (default 1). */
|
|
70
|
+
contrast?: number;
|
|
71
|
+
/** Swap peaks and valleys (default false). */
|
|
72
|
+
invert?: boolean;
|
|
73
|
+
}
|
|
48
74
|
/** The tuft of a `bristle` tip (each 0..1 unless noted). */
|
|
49
75
|
export interface BrushBristles {
|
|
50
76
|
/** Bristles in the tuft, 3..128 (default 32). */
|
|
@@ -81,8 +107,10 @@ export interface BrushTip {
|
|
|
81
107
|
blend?: BlendMode;
|
|
82
108
|
/** `bristle` tips: the tuft. */
|
|
83
109
|
bristle?: BrushBristles;
|
|
84
|
-
/** `stamp` tips: sticker refs (objects: any sticker, one picked at random per mark; particles: up to 4
|
|
110
|
+
/** `stamp` tips: sticker or source refs (objects: any sticker, one picked at random per mark; particles: up to 4, in `marks.stampOrder`; continuous dabs: the first). */
|
|
85
111
|
stamps?: BrushStamp[];
|
|
112
|
+
/** Texture inside each dab (continuous and scatter marks). */
|
|
113
|
+
grain?: BrushTipGrain;
|
|
86
114
|
}
|
|
87
115
|
/** Dabs laid along the path (the default). */
|
|
88
116
|
export interface BrushContinuousMarks {
|
|
@@ -185,6 +213,10 @@ export interface BrushDynamics {
|
|
|
185
213
|
opacityJitter?: number;
|
|
186
214
|
/** Random offset across the stroke in diameters, 0..4 (default 0). */
|
|
187
215
|
scatter?: number;
|
|
216
|
+
/** Dabs laid at each spacing step, 1..16, each with its own jitter (default 1). */
|
|
217
|
+
count?: number;
|
|
218
|
+
/** Mirror each dab at random across these axes (default `none`): variety for image tips. */
|
|
219
|
+
flip?: BrushFlip;
|
|
188
220
|
}
|
|
189
221
|
/** A Mixer Brush's paint reservoir: the brush is loaded with colour and mixes what it picks up into it. */
|
|
190
222
|
export interface BrushReservoir {
|
package/dist/brushes/types.d.ts
CHANGED
|
@@ -29,8 +29,8 @@ export type BrushTool = 'eraser' | 'blender' | 'smudge' | 'water' | 'dryer' | 'b
|
|
|
29
29
|
export declare const BRUSH_TOOLS: readonly BrushTool[];
|
|
30
30
|
/**
|
|
31
31
|
* The tip's shape. `round`, `flat` and `chisel` are ellipses (their `roundness` and `angle` set
|
|
32
|
-
* the ellipse; the name is for people); `bristle` is a tuft of bristles; `stamp` lays
|
|
33
|
-
*
|
|
32
|
+
* the ellipse; the name is for people); `bristle` is a tuft of bristles; `stamp` lays shaped
|
|
33
|
+
* dabs: an editor stamp, a sticker, or an image source (`source:<id>`, see `brushes/sources.ts`).
|
|
34
34
|
*/
|
|
35
35
|
export type BrushTipShape = 'round' | 'flat' | 'chisel' | 'bristle' | 'stamp';
|
|
36
36
|
export declare const BRUSH_TIP_SHAPES: readonly BrushTipShape[];
|
|
@@ -41,10 +41,36 @@ export declare const BRUSH_MARKS_KINDS: readonly BrushMarksKind[];
|
|
|
41
41
|
export type BrushSurface = 'dry' | 'wet' | 'thick';
|
|
42
42
|
export declare const BRUSH_SURFACES: readonly BrushSurface[];
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
45
|
-
* sticker)
|
|
44
|
+
* What a `stamp` tip lays: a sticker ref `provider:id` (`editor:star`, or a host library's
|
|
45
|
+
* sticker) or an image source `source:<id>` from the brush library. Objects marks take only
|
|
46
|
+
* stickers (each mark stays a sticker).
|
|
46
47
|
*/
|
|
47
48
|
export type BrushStamp = StickerRef;
|
|
49
|
+
/**
|
|
50
|
+
* How tip grain sits: `moving` rolls with the tip along the stroke (it turns with the tip, and
|
|
51
|
+
* every stroke shows it the same way); `texturised` stays put on the canvas, like a texture under
|
|
52
|
+
* the paint, so overlapping strokes show the same grain.
|
|
53
|
+
*/
|
|
54
|
+
export type BrushGrainMode = 'moving' | 'texturised';
|
|
55
|
+
export declare const BRUSH_GRAIN_MODES: readonly BrushGrainMode[];
|
|
56
|
+
/** Mirror each dab at random across these axes of the tip. */
|
|
57
|
+
export type BrushFlip = 'none' | 'x' | 'y' | 'xy';
|
|
58
|
+
export declare const BRUSH_FLIPS: readonly BrushFlip[];
|
|
59
|
+
/** Texture inside the tip (Procreate's grain source), separate from the paper grain. */
|
|
60
|
+
export interface BrushTipGrain {
|
|
61
|
+
/** A built-in grain pattern (`rough`, `canvas`, `sanded`…) or an image source `source:<id>` (light parts are peaks). */
|
|
62
|
+
source: string;
|
|
63
|
+
/** Default `texturised`. */
|
|
64
|
+
mode?: BrushGrainMode;
|
|
65
|
+
/** Grain size: 1 is the pattern's or image's own size, 2 twice as coarse; 0.05..20 (default 1). */
|
|
66
|
+
scale?: number;
|
|
67
|
+
/** How much the grain takes out of the mark: 0 none .. 1 only the peaks paint (default 0.6). */
|
|
68
|
+
depth?: number;
|
|
69
|
+
/** Height contrast around the middle, 0..3 (default 1). */
|
|
70
|
+
contrast?: number;
|
|
71
|
+
/** Swap peaks and valleys (default false). */
|
|
72
|
+
invert?: boolean;
|
|
73
|
+
}
|
|
48
74
|
/** The tuft of a `bristle` tip (each 0..1 unless noted). */
|
|
49
75
|
export interface BrushBristles {
|
|
50
76
|
/** Bristles in the tuft, 3..128 (default 32). */
|
|
@@ -81,8 +107,10 @@ export interface BrushTip {
|
|
|
81
107
|
blend?: BlendMode;
|
|
82
108
|
/** `bristle` tips: the tuft. */
|
|
83
109
|
bristle?: BrushBristles;
|
|
84
|
-
/** `stamp` tips: sticker refs (objects: any sticker, one picked at random per mark; particles: up to 4
|
|
110
|
+
/** `stamp` tips: sticker or source refs (objects: any sticker, one picked at random per mark; particles: up to 4, in `marks.stampOrder`; continuous dabs: the first). */
|
|
85
111
|
stamps?: BrushStamp[];
|
|
112
|
+
/** Texture inside each dab (continuous and scatter marks). */
|
|
113
|
+
grain?: BrushTipGrain;
|
|
86
114
|
}
|
|
87
115
|
/** Dabs laid along the path (the default). */
|
|
88
116
|
export interface BrushContinuousMarks {
|
|
@@ -185,6 +213,10 @@ export interface BrushDynamics {
|
|
|
185
213
|
opacityJitter?: number;
|
|
186
214
|
/** Random offset across the stroke in diameters, 0..4 (default 0). */
|
|
187
215
|
scatter?: number;
|
|
216
|
+
/** Dabs laid at each spacing step, 1..16, each with its own jitter (default 1). */
|
|
217
|
+
count?: number;
|
|
218
|
+
/** Mirror each dab at random across these axes (default `none`): variety for image tips. */
|
|
219
|
+
flip?: BrushFlip;
|
|
188
220
|
}
|
|
189
221
|
/** A Mixer Brush's paint reservoir: the brush is loaded with colour and mixes what it picks up into it. */
|
|
190
222
|
export interface BrushReservoir {
|
package/dist/brushes/ui.d.cts
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* Sliders reuse the paint editor's tables (`BRUSH_SLIDERS`, `brushEngineControls`), mapped from
|
|
9
9
|
* engine paths to facet paths through `BRUSH_FIELDS`, so the panels and the editor agree.
|
|
10
10
|
*/
|
|
11
|
-
import { type BrushLibrary, type BrushLibraryEntry, type SaveBrushResult } from './library.cjs';
|
|
11
|
+
import { type AddBrushSourceResult, type BrushLibrary, type BrushLibraryEntry, type SaveBrushResult } from './library.cjs';
|
|
12
12
|
import { type BrushHostProfile, type BrushIssue } from './profiles.cjs';
|
|
13
|
+
import { type BrushSource, type BrushSourceChannel } from './sources.cjs';
|
|
13
14
|
import { type Brush } from './types.cjs';
|
|
14
|
-
export type BrushEditorSectionId = 'medium' | 'shape' | 'marks' | 'feel' | 'behaviour' | 'light' | 'motion' | 'colour';
|
|
15
|
+
export type BrushEditorSectionId = 'medium' | 'shape' | 'grain' | 'marks' | 'feel' | 'behaviour' | 'light' | 'motion' | 'colour';
|
|
15
16
|
interface ControlBase {
|
|
16
17
|
/** Facet path the control sets (`tip.size`, `behaviour.exchange.pickup`…). */
|
|
17
18
|
path: string;
|
|
@@ -62,7 +63,10 @@ export type BrushEditorControl = (ControlBase & {
|
|
|
62
63
|
}>;
|
|
63
64
|
max: number;
|
|
64
65
|
})
|
|
65
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Stamp refs (`editor:star`, `source:<id>`…): `options` are the editor's stamps and the image
|
|
68
|
+
* sources the host passed (`brushEditorSections`' `sources`); hosts may offer more refs.
|
|
69
|
+
*/
|
|
66
70
|
| (ControlBase & {
|
|
67
71
|
kind: 'stamps';
|
|
68
72
|
value: string[];
|
|
@@ -72,6 +76,11 @@ export type BrushEditorControl = (ControlBase & {
|
|
|
72
76
|
label: string;
|
|
73
77
|
}>;
|
|
74
78
|
});
|
|
79
|
+
/** What the host knows beyond the brush: the image sources it can paint with. */
|
|
80
|
+
export interface BrushEditorContext {
|
|
81
|
+
/** The library's image sources (`listSources`), offered as stamps and grain. */
|
|
82
|
+
sources?: ReadonlyArray<Pick<BrushSource, 'id' | 'name'>>;
|
|
83
|
+
}
|
|
75
84
|
export interface BrushEditorSection {
|
|
76
85
|
id: BrushEditorSectionId;
|
|
77
86
|
title: string;
|
|
@@ -84,7 +93,7 @@ export interface BrushEditorSection {
|
|
|
84
93
|
* edit keeps them as they are; `brushEditorScope` names them. Values are the brush's own, else
|
|
85
94
|
* the defaults of the engine it resolves to.
|
|
86
95
|
*/
|
|
87
|
-
export declare function brushEditorSections(brush: Brush, profile?: BrushHostProfile): BrushEditorSection[];
|
|
96
|
+
export declare function brushEditorSections(brush: Brush, profile?: BrushHostProfile, context?: BrushEditorContext): BrushEditorSection[];
|
|
88
97
|
/** What a brush has that the host can't use: one facet, in words. */
|
|
89
98
|
export interface BrushEditorHiddenFacet {
|
|
90
99
|
facet: string;
|
|
@@ -166,4 +175,31 @@ export declare function brushLibraryGroups(entries: readonly BrushLibraryEntry[]
|
|
|
166
175
|
profile?: BrushHostProfile;
|
|
167
176
|
source?: 'builtin' | 'user';
|
|
168
177
|
}): BrushLibraryGroup[];
|
|
178
|
+
/**
|
|
179
|
+
* A PNG `data:` URL of an image file a person picked, for `BrushLibrary.addSource`: a PNG is kept
|
|
180
|
+
* as it is; any other image (JPEG, WebP…) is drawn through the browser's `createImageBitmap` and
|
|
181
|
+
* `OffscreenCanvas`. Rejects, naming PNG, where there is no browser to draw it.
|
|
182
|
+
*/
|
|
183
|
+
export declare function imageFileToPngDataUrl(file: Blob): Promise<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Adds an image file to the library as a source (named after the file unless `name` is given),
|
|
186
|
+
* as the brush editor's "Add image" does. Returns the stored source, its `source:<id>` ref and what
|
|
187
|
+
* reading it changed.
|
|
188
|
+
*/
|
|
189
|
+
export declare function addBrushSourceFromFile(library: Pick<BrushLibrary, 'addSource'>, file: Blob & {
|
|
190
|
+
name?: string;
|
|
191
|
+
}, options?: {
|
|
192
|
+
name?: string;
|
|
193
|
+
channel?: BrushSourceChannel;
|
|
194
|
+
}): Promise<AddBrushSourceResult & {
|
|
195
|
+
ref: string;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* The brush with an image source as its tip (`as: 'tip'`: a stamp tip laying it) or as its grain
|
|
199
|
+
* (`as: 'grain'`), normalised, as `setBrushEditorValue` returns it.
|
|
200
|
+
*/
|
|
201
|
+
export declare function withBrushSource(brush: Brush, ref: string, as: 'tip' | 'grain'): {
|
|
202
|
+
brush: Brush;
|
|
203
|
+
problems: string[];
|
|
204
|
+
};
|
|
169
205
|
export {};
|
package/dist/brushes/ui.d.ts
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* Sliders reuse the paint editor's tables (`BRUSH_SLIDERS`, `brushEngineControls`), mapped from
|
|
9
9
|
* engine paths to facet paths through `BRUSH_FIELDS`, so the panels and the editor agree.
|
|
10
10
|
*/
|
|
11
|
-
import { type BrushLibrary, type BrushLibraryEntry, type SaveBrushResult } from './library.js';
|
|
11
|
+
import { type AddBrushSourceResult, type BrushLibrary, type BrushLibraryEntry, type SaveBrushResult } from './library.js';
|
|
12
12
|
import { type BrushHostProfile, type BrushIssue } from './profiles.js';
|
|
13
|
+
import { type BrushSource, type BrushSourceChannel } from './sources.js';
|
|
13
14
|
import { type Brush } from './types.js';
|
|
14
|
-
export type BrushEditorSectionId = 'medium' | 'shape' | 'marks' | 'feel' | 'behaviour' | 'light' | 'motion' | 'colour';
|
|
15
|
+
export type BrushEditorSectionId = 'medium' | 'shape' | 'grain' | 'marks' | 'feel' | 'behaviour' | 'light' | 'motion' | 'colour';
|
|
15
16
|
interface ControlBase {
|
|
16
17
|
/** Facet path the control sets (`tip.size`, `behaviour.exchange.pickup`…). */
|
|
17
18
|
path: string;
|
|
@@ -62,7 +63,10 @@ export type BrushEditorControl = (ControlBase & {
|
|
|
62
63
|
}>;
|
|
63
64
|
max: number;
|
|
64
65
|
})
|
|
65
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Stamp refs (`editor:star`, `source:<id>`…): `options` are the editor's stamps and the image
|
|
68
|
+
* sources the host passed (`brushEditorSections`' `sources`); hosts may offer more refs.
|
|
69
|
+
*/
|
|
66
70
|
| (ControlBase & {
|
|
67
71
|
kind: 'stamps';
|
|
68
72
|
value: string[];
|
|
@@ -72,6 +76,11 @@ export type BrushEditorControl = (ControlBase & {
|
|
|
72
76
|
label: string;
|
|
73
77
|
}>;
|
|
74
78
|
});
|
|
79
|
+
/** What the host knows beyond the brush: the image sources it can paint with. */
|
|
80
|
+
export interface BrushEditorContext {
|
|
81
|
+
/** The library's image sources (`listSources`), offered as stamps and grain. */
|
|
82
|
+
sources?: ReadonlyArray<Pick<BrushSource, 'id' | 'name'>>;
|
|
83
|
+
}
|
|
75
84
|
export interface BrushEditorSection {
|
|
76
85
|
id: BrushEditorSectionId;
|
|
77
86
|
title: string;
|
|
@@ -84,7 +93,7 @@ export interface BrushEditorSection {
|
|
|
84
93
|
* edit keeps them as they are; `brushEditorScope` names them. Values are the brush's own, else
|
|
85
94
|
* the defaults of the engine it resolves to.
|
|
86
95
|
*/
|
|
87
|
-
export declare function brushEditorSections(brush: Brush, profile?: BrushHostProfile): BrushEditorSection[];
|
|
96
|
+
export declare function brushEditorSections(brush: Brush, profile?: BrushHostProfile, context?: BrushEditorContext): BrushEditorSection[];
|
|
88
97
|
/** What a brush has that the host can't use: one facet, in words. */
|
|
89
98
|
export interface BrushEditorHiddenFacet {
|
|
90
99
|
facet: string;
|
|
@@ -166,4 +175,31 @@ export declare function brushLibraryGroups(entries: readonly BrushLibraryEntry[]
|
|
|
166
175
|
profile?: BrushHostProfile;
|
|
167
176
|
source?: 'builtin' | 'user';
|
|
168
177
|
}): BrushLibraryGroup[];
|
|
178
|
+
/**
|
|
179
|
+
* A PNG `data:` URL of an image file a person picked, for `BrushLibrary.addSource`: a PNG is kept
|
|
180
|
+
* as it is; any other image (JPEG, WebP…) is drawn through the browser's `createImageBitmap` and
|
|
181
|
+
* `OffscreenCanvas`. Rejects, naming PNG, where there is no browser to draw it.
|
|
182
|
+
*/
|
|
183
|
+
export declare function imageFileToPngDataUrl(file: Blob): Promise<string>;
|
|
184
|
+
/**
|
|
185
|
+
* Adds an image file to the library as a source (named after the file unless `name` is given),
|
|
186
|
+
* as the brush editor's "Add image" does. Returns the stored source, its `source:<id>` ref and what
|
|
187
|
+
* reading it changed.
|
|
188
|
+
*/
|
|
189
|
+
export declare function addBrushSourceFromFile(library: Pick<BrushLibrary, 'addSource'>, file: Blob & {
|
|
190
|
+
name?: string;
|
|
191
|
+
}, options?: {
|
|
192
|
+
name?: string;
|
|
193
|
+
channel?: BrushSourceChannel;
|
|
194
|
+
}): Promise<AddBrushSourceResult & {
|
|
195
|
+
ref: string;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* The brush with an image source as its tip (`as: 'tip'`: a stamp tip laying it) or as its grain
|
|
199
|
+
* (`as: 'grain'`), normalised, as `setBrushEditorValue` returns it.
|
|
200
|
+
*/
|
|
201
|
+
export declare function withBrushSource(brush: Brush, ref: string, as: 'tip' | 'grain'): {
|
|
202
|
+
brush: Brush;
|
|
203
|
+
problems: string[];
|
|
204
|
+
};
|
|
169
205
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
brushPreviewColours
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LETF75CA.js";
|
|
4
4
|
import {
|
|
5
5
|
pathDataToPolyline
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BAZMCFVL.js";
|
|
7
7
|
import {
|
|
8
8
|
BRUSH_PRESETS,
|
|
9
9
|
BUILTIN_BRUSHES,
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
normalizeBrushSpec,
|
|
15
15
|
resolveBrush,
|
|
16
16
|
resolveCategory
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-KZI3YWKW.js";
|
|
18
|
+
import "./chunk-JL6YH5WD.js";
|
|
19
19
|
import {
|
|
20
20
|
formatNumber,
|
|
21
21
|
getShapeSvg,
|
|
@@ -30,14 +30,14 @@ import {
|
|
|
30
30
|
BrushstrokeCache,
|
|
31
31
|
brushstrokeDataUrl,
|
|
32
32
|
isBrushstrokeBrush
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-W6JDUXP3.js";
|
|
34
34
|
import {
|
|
35
35
|
parsePaintSource
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ACTHSQOI.js";
|
|
37
37
|
import "./chunk-4D6KP5BV.js";
|
|
38
38
|
import "./chunk-ODBT55Q7.js";
|
|
39
|
-
import "./chunk-OTTT5N3K.js";
|
|
40
39
|
import "./chunk-IRSTHLQQ.js";
|
|
40
|
+
import "./chunk-OTTT5N3K.js";
|
|
41
41
|
import "./chunk-HVVR5PZW.js";
|
|
42
42
|
import "./chunk-QGHEDC7B.js";
|
|
43
43
|
import {
|