@pixerate/editor 0.268.2 → 0.269.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 +27 -27
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/index.cjs +61 -61
- package/dist/animation-editor/index.js +5 -5
- package/dist/brushes/import/abr.d.cts +48 -0
- package/dist/brushes/import/abr.d.ts +48 -0
- package/dist/brushes/import/bplist.d.cts +24 -0
- package/dist/brushes/import/bplist.d.ts +24 -0
- package/dist/brushes/import/pack.d.cts +82 -0
- package/dist/brushes/import/pack.d.ts +82 -0
- package/dist/brushes/import/zip.d.cts +31 -0
- package/dist/brushes/import/zip.d.ts +31 -0
- package/dist/brushes/index.cjs +26 -6
- package/dist/brushes/index.d.cts +2 -0
- package/dist/brushes/index.d.ts +2 -0
- package/dist/brushes/index.js +22 -2
- package/dist/{chunk-SIFAIGB3.js → chunk-3AJCEJNH.js} +2 -162
- package/dist/{chunk-YXP6X3SY.cjs → chunk-3KNQ2W6X.cjs} +697 -10
- package/dist/{chunk-QNY7BDFP.js → chunk-4CPOKP27.js} +1 -1
- package/dist/{chunk-J4GXP53R.cjs → chunk-4NMPUJUK.cjs} +86 -86
- package/dist/{chunk-LDOD7VCT.js → chunk-4YSPQGZW.js} +1 -1
- package/dist/{chunk-JBB3GDBB.cjs → chunk-56RHCIJV.cjs} +2 -2
- package/dist/{chunk-4IMD2TLY.cjs → chunk-AI4F33IV.cjs} +3166 -2966
- package/dist/{chunk-YOVXQHA3.cjs → chunk-BENSE3VX.cjs} +23 -23
- package/dist/{chunk-VDGBHYC7.js → chunk-F7OO3DHP.js} +157 -1
- package/dist/{chunk-UVTO3D4E.js → chunk-FUDP5QBB.js} +1 -1
- package/dist/{chunk-3XDSNIGF.js → chunk-ININNHLM.js} +687 -0
- package/dist/{chunk-WIC7TG73.cjs → chunk-M4UQA2T4.cjs} +18 -18
- package/dist/{chunk-ITURMC2M.js → chunk-N3UMQVKX.js} +176 -176
- package/dist/{chunk-UWEQ55MY.cjs → chunk-N4KP3UQR.cjs} +157 -1
- package/dist/{chunk-D5BXSOSU.js → chunk-QGVTOCNB.js} +3118 -2918
- package/dist/{chunk-M6DNZNVY.js → chunk-RWDSSK2I.js} +4 -2
- package/dist/{chunk-CVFAAZXE.cjs → chunk-SPIO2GJU.cjs} +8 -6
- package/dist/{chunk-RHEMMGCN.cjs → chunk-T4JPGBW3.cjs} +173 -173
- package/dist/{chunk-HFY5LG5J.js → chunk-THBJHPUL.js} +1 -1
- package/dist/{chunk-NPWWSCWT.cjs → chunk-VBRHE4AM.cjs} +35 -35
- package/dist/{chunk-AZC2NDAR.js → chunk-WB22XMW3.js} +6 -6
- package/dist/{chunk-NIBFDFYW.cjs → chunk-YBMUHIOM.cjs} +12 -172
- package/dist/extensions/index.cjs +18 -4
- package/dist/extensions/index.d.cts +1 -0
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.js +17 -3
- package/dist/extensions/prompt-editor.d.cts +109 -0
- package/dist/extensions/prompt-editor.d.ts +109 -0
- package/dist/generation/index.cjs +15 -15
- package/dist/generation/index.js +3 -3
- package/dist/grammar/index.cjs +4 -4
- package/dist/grammar/index.js +7 -7
- package/dist/image-editor/index.cjs +785 -785
- package/dist/image-editor/index.js +6 -6
- package/dist/index.cjs +27 -13
- package/dist/index.js +23 -9
- package/dist/paint-editor/index.cjs +91 -91
- package/dist/paint-editor/index.js +6 -6
- package/dist/vector/index.cjs +1001 -1001
- package/dist/vector/index.js +6 -6
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVectorMorph
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-4CPOKP27.js";
|
|
4
4
|
import {
|
|
5
5
|
MOTION_ISSUE_CODES,
|
|
6
6
|
motionIssue,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
vectorNodeBounds,
|
|
40
40
|
vectorPathWorldBezier,
|
|
41
41
|
vectorTextHasOutlines
|
|
42
|
-
} from "../chunk-
|
|
42
|
+
} from "../chunk-FUDP5QBB.js";
|
|
43
43
|
import "../chunk-KZI3YWKW.js";
|
|
44
44
|
import "../chunk-JL6YH5WD.js";
|
|
45
|
-
import "../chunk-
|
|
45
|
+
import "../chunk-RWDSSK2I.js";
|
|
46
46
|
import {
|
|
47
47
|
bezierPathLength,
|
|
48
48
|
bezierPathPointAtLength,
|
|
@@ -83,11 +83,11 @@ import "../chunk-IRSTHLQQ.js";
|
|
|
83
83
|
import "../chunk-OTTT5N3K.js";
|
|
84
84
|
import "../chunk-HVVR5PZW.js";
|
|
85
85
|
import "../chunk-QGHEDC7B.js";
|
|
86
|
-
import "../chunk-
|
|
86
|
+
import "../chunk-3AJCEJNH.js";
|
|
87
87
|
import {
|
|
88
88
|
readZip
|
|
89
89
|
} from "../chunk-CIQIM2IP.js";
|
|
90
|
-
import "../chunk-
|
|
90
|
+
import "../chunk-F7OO3DHP.js";
|
|
91
91
|
import {
|
|
92
92
|
defineEditorDocument
|
|
93
93
|
} from "../chunk-XBQX76CT.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A defensive reader for Photoshop brush files (`.abr`): the tips, not the presets around them.
|
|
3
|
+
*
|
|
4
|
+
* - Versions 1 and 2: computed tips (diameter, roundness, angle, hardness, spacing) and sampled
|
|
5
|
+
* tips (a grey image, raw or PackBits-compressed, 8 or 16 bits).
|
|
6
|
+
* - Versions 6, 7 and 10: the sampled tips of the `samp` section. Preset names and spacing are
|
|
7
|
+
* read from the `desc` section where they can be found by their keys; everything else in it
|
|
8
|
+
* (dynamics, textures, dual brushes) is reported, not mapped. Patterns (`patt`) are reported.
|
|
9
|
+
*
|
|
10
|
+
* The format is undocumented, so this follows what GIMP and Krita read. Brush files are untrusted:
|
|
11
|
+
* every read is bounds-checked, sizes are limited, and a tip that can't be read is reported and
|
|
12
|
+
* skipped rather than failing the whole file.
|
|
13
|
+
*/
|
|
14
|
+
/** A tip read from a brush file. */
|
|
15
|
+
export type AbrTip = {
|
|
16
|
+
kind: 'sampled';
|
|
17
|
+
/** The preset's name, when the file has one. */
|
|
18
|
+
name?: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
/** One byte per pixel, 255 paints. */
|
|
22
|
+
mask: Uint8Array;
|
|
23
|
+
/** Spacing as a fraction of the diameter, when known. */
|
|
24
|
+
spacing?: number;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'computed';
|
|
27
|
+
name?: string;
|
|
28
|
+
/** px. */
|
|
29
|
+
diameter: number;
|
|
30
|
+
/** 0..1. */
|
|
31
|
+
roundness: number;
|
|
32
|
+
/** Degrees. */
|
|
33
|
+
angle: number;
|
|
34
|
+
/** 0..1. */
|
|
35
|
+
hardness: number;
|
|
36
|
+
spacing: number;
|
|
37
|
+
};
|
|
38
|
+
export interface AbrFile {
|
|
39
|
+
version: number;
|
|
40
|
+
tips: AbrTip[];
|
|
41
|
+
/** What the file has that was not read, in words. */
|
|
42
|
+
unsupported: string[];
|
|
43
|
+
}
|
|
44
|
+
export declare class AbrError extends Error {
|
|
45
|
+
constructor(message: string);
|
|
46
|
+
}
|
|
47
|
+
/** The tips of an `.abr` file (see the module comment). Throws an `AbrError` when the file is not one at all. */
|
|
48
|
+
export declare function readAbr(bytes: Uint8Array): AbrFile;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A defensive reader for Photoshop brush files (`.abr`): the tips, not the presets around them.
|
|
3
|
+
*
|
|
4
|
+
* - Versions 1 and 2: computed tips (diameter, roundness, angle, hardness, spacing) and sampled
|
|
5
|
+
* tips (a grey image, raw or PackBits-compressed, 8 or 16 bits).
|
|
6
|
+
* - Versions 6, 7 and 10: the sampled tips of the `samp` section. Preset names and spacing are
|
|
7
|
+
* read from the `desc` section where they can be found by their keys; everything else in it
|
|
8
|
+
* (dynamics, textures, dual brushes) is reported, not mapped. Patterns (`patt`) are reported.
|
|
9
|
+
*
|
|
10
|
+
* The format is undocumented, so this follows what GIMP and Krita read. Brush files are untrusted:
|
|
11
|
+
* every read is bounds-checked, sizes are limited, and a tip that can't be read is reported and
|
|
12
|
+
* skipped rather than failing the whole file.
|
|
13
|
+
*/
|
|
14
|
+
/** A tip read from a brush file. */
|
|
15
|
+
export type AbrTip = {
|
|
16
|
+
kind: 'sampled';
|
|
17
|
+
/** The preset's name, when the file has one. */
|
|
18
|
+
name?: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
/** One byte per pixel, 255 paints. */
|
|
22
|
+
mask: Uint8Array;
|
|
23
|
+
/** Spacing as a fraction of the diameter, when known. */
|
|
24
|
+
spacing?: number;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'computed';
|
|
27
|
+
name?: string;
|
|
28
|
+
/** px. */
|
|
29
|
+
diameter: number;
|
|
30
|
+
/** 0..1. */
|
|
31
|
+
roundness: number;
|
|
32
|
+
/** Degrees. */
|
|
33
|
+
angle: number;
|
|
34
|
+
/** 0..1. */
|
|
35
|
+
hardness: number;
|
|
36
|
+
spacing: number;
|
|
37
|
+
};
|
|
38
|
+
export interface AbrFile {
|
|
39
|
+
version: number;
|
|
40
|
+
tips: AbrTip[];
|
|
41
|
+
/** What the file has that was not read, in words. */
|
|
42
|
+
unsupported: string[];
|
|
43
|
+
}
|
|
44
|
+
export declare class AbrError extends Error {
|
|
45
|
+
constructor(message: string);
|
|
46
|
+
}
|
|
47
|
+
/** The tips of an `.abr` file (see the module comment). Throws an `AbrError` when the file is not one at all. */
|
|
48
|
+
export declare function readAbr(bytes: Uint8Array): AbrFile;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A defensive reader for binary property lists (`bplist00`), enough for Procreate's
|
|
3
|
+
* `Brush.archive` (an `NSKeyedArchiver` archive): integers, reals, booleans, strings, data, UIDs,
|
|
4
|
+
* arrays and dictionaries. Every offset is checked, the object graph is read without following
|
|
5
|
+
* cycles, and its depth and size are limited, because brush packs are untrusted files.
|
|
6
|
+
*/
|
|
7
|
+
/** A value read from a property list. UIDs (`NSKeyedArchiver` references) are `{ uid }`. */
|
|
8
|
+
export type PlistValue = null | boolean | number | string | Uint8Array | {
|
|
9
|
+
uid: number;
|
|
10
|
+
} | PlistValue[] | {
|
|
11
|
+
[key: string]: PlistValue;
|
|
12
|
+
};
|
|
13
|
+
export declare class PlistError extends Error {
|
|
14
|
+
constructor(message: string);
|
|
15
|
+
}
|
|
16
|
+
/** Whether the bytes are a binary property list. */
|
|
17
|
+
export declare function isBinaryPlist(bytes: Uint8Array): boolean;
|
|
18
|
+
/** The root object of a binary property list. Throws a `PlistError` when it is malformed. */
|
|
19
|
+
export declare function readBinaryPlist(bytes: Uint8Array): PlistValue;
|
|
20
|
+
/**
|
|
21
|
+
* The root object of an `NSKeyedArchiver` archive with its UIDs resolved one level: each key of
|
|
22
|
+
* the root maps to the archived value (strings and numbers as they are; `$null` as null).
|
|
23
|
+
*/
|
|
24
|
+
export declare function keyedArchiveRoot(plist: PlistValue): Record<string, PlistValue> | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A defensive reader for binary property lists (`bplist00`), enough for Procreate's
|
|
3
|
+
* `Brush.archive` (an `NSKeyedArchiver` archive): integers, reals, booleans, strings, data, UIDs,
|
|
4
|
+
* arrays and dictionaries. Every offset is checked, the object graph is read without following
|
|
5
|
+
* cycles, and its depth and size are limited, because brush packs are untrusted files.
|
|
6
|
+
*/
|
|
7
|
+
/** A value read from a property list. UIDs (`NSKeyedArchiver` references) are `{ uid }`. */
|
|
8
|
+
export type PlistValue = null | boolean | number | string | Uint8Array | {
|
|
9
|
+
uid: number;
|
|
10
|
+
} | PlistValue[] | {
|
|
11
|
+
[key: string]: PlistValue;
|
|
12
|
+
};
|
|
13
|
+
export declare class PlistError extends Error {
|
|
14
|
+
constructor(message: string);
|
|
15
|
+
}
|
|
16
|
+
/** Whether the bytes are a binary property list. */
|
|
17
|
+
export declare function isBinaryPlist(bytes: Uint8Array): boolean;
|
|
18
|
+
/** The root object of a binary property list. Throws a `PlistError` when it is malformed. */
|
|
19
|
+
export declare function readBinaryPlist(bytes: Uint8Array): PlistValue;
|
|
20
|
+
/**
|
|
21
|
+
* The root object of an `NSKeyedArchiver` archive with its UIDs resolved one level: each key of
|
|
22
|
+
* the root maps to the archived value (strings and numbers as they are; `$null` as null).
|
|
23
|
+
*/
|
|
24
|
+
export declare function keyedArchiveRoot(plist: PlistValue): Record<string, PlistValue> | null;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brush packs people already own, read into facet brushes and image sources:
|
|
3
|
+
*
|
|
4
|
+
* - Photoshop `.abr`: each sampled tip becomes an image source and a stamp-tip brush (named and
|
|
5
|
+
* spaced as its preset says, where the file says it); each computed tip a round or flat brush.
|
|
6
|
+
* - Procreate `.brush` and `.brushset` (ZIP archives): each brush's `Shape.png` becomes its image
|
|
7
|
+
* tip and `Grain.png` its tip grain (Procreate's sources are white on black), with the name and
|
|
8
|
+
* spacing from `Brush.archive`.
|
|
9
|
+
*
|
|
10
|
+
* What a pack has that the facet model doesn't map (dynamics, pencil curves, patterns, dual
|
|
11
|
+
* brushes, wet mixing) is listed in `unsupported`, and licence or terms files inside the pack are
|
|
12
|
+
* kept as `licence` notes and on every source. Nothing here writes to a library:
|
|
13
|
+
* `BrushLibrary.importFile` does that, with the brushes and sources returned.
|
|
14
|
+
*/
|
|
15
|
+
import { type BrushSource } from '../sources.cjs';
|
|
16
|
+
import type { BrushLibrary, ImportBrushesResult } from '../library.cjs';
|
|
17
|
+
import type { Brush } from '../types.cjs';
|
|
18
|
+
export type BrushPackFormat = 'abr' | 'brush' | 'brushset';
|
|
19
|
+
export declare const BRUSH_PACK_FORMATS: readonly BrushPackFormat[];
|
|
20
|
+
/** Largest pack read, bytes. */
|
|
21
|
+
export declare const MAX_BRUSH_PACK_BYTES: number;
|
|
22
|
+
/** Most brushes taken from one pack. */
|
|
23
|
+
export declare const MAX_PACK_BRUSHES = 300;
|
|
24
|
+
export interface ReadBrushPackOptions {
|
|
25
|
+
/** The pack's file name: names the brushes and ids, and picks the format by its extension. */
|
|
26
|
+
fileName: string;
|
|
27
|
+
/** Default: from the extension, then from the contents. */
|
|
28
|
+
format?: BrushPackFormat;
|
|
29
|
+
/** Id prefix for the brushes and sources (default: from the file name). */
|
|
30
|
+
prefix?: string;
|
|
31
|
+
/** The licence or terms the pack came with (kept with every source, before any found in the pack). */
|
|
32
|
+
licence?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface BrushPack {
|
|
35
|
+
format: BrushPackFormat;
|
|
36
|
+
brushes: Brush[];
|
|
37
|
+
sources: BrushSource[];
|
|
38
|
+
/** What was not imported or not mapped, in words. */
|
|
39
|
+
unsupported: string[];
|
|
40
|
+
/** Licence and terms notes: the one given, then any found in the pack. */
|
|
41
|
+
licence: string[];
|
|
42
|
+
}
|
|
43
|
+
export declare class BrushPackError extends Error {
|
|
44
|
+
constructor(message: string);
|
|
45
|
+
}
|
|
46
|
+
/** The format of a pack: as given, by its extension, or by its contents. */
|
|
47
|
+
export declare function brushPackFormat(bytes: Uint8Array, fileName: string, format?: BrushPackFormat): BrushPackFormat;
|
|
48
|
+
/** The brushes and sources of a pack (see the module comment). Throws a `BrushPackError` when nothing can be read from it. */
|
|
49
|
+
export declare function readBrushPack(bytes: Uint8Array, options: ReadBrushPackOptions): BrushPack;
|
|
50
|
+
export interface ImportBrushPackResult {
|
|
51
|
+
format: BrushPackFormat;
|
|
52
|
+
/** The brushes added or replaced. */
|
|
53
|
+
brushes: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
}>;
|
|
57
|
+
/** The image sources added or replaced. */
|
|
58
|
+
sources: string[];
|
|
59
|
+
/** Brush ids already in the library (or built in), left as they were. */
|
|
60
|
+
skipped: string[];
|
|
61
|
+
unsupported: string[];
|
|
62
|
+
licence: string[];
|
|
63
|
+
/** What normalising the brushes changed. */
|
|
64
|
+
problems: string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Reads a pack (`readBrushPack`) and adds its brushes and sources to `library` in one import.
|
|
68
|
+
* Brush ids already saved are skipped unless `overwrite`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function importBrushPack(library: Pick<BrushLibrary, 'importFile'>, bytes: Uint8Array, options: ReadBrushPackOptions & {
|
|
71
|
+
overwrite?: boolean;
|
|
72
|
+
}): Promise<ImportBrushPackResult>;
|
|
73
|
+
/**
|
|
74
|
+
* Imports a file a person picked into `library`: a brush library file (`.json`) or a brush pack
|
|
75
|
+
* (`.abr`, `.brush`, `.brushset`), by its name. Returns what `importFile` or `importBrushPack` did.
|
|
76
|
+
*/
|
|
77
|
+
export declare function importBrushFile(library: Pick<BrushLibrary, 'importFile'>, file: Blob & {
|
|
78
|
+
name: string;
|
|
79
|
+
}, options?: {
|
|
80
|
+
overwrite?: boolean;
|
|
81
|
+
licence?: string;
|
|
82
|
+
}): Promise<ImportBrushesResult | ImportBrushPackResult>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brush packs people already own, read into facet brushes and image sources:
|
|
3
|
+
*
|
|
4
|
+
* - Photoshop `.abr`: each sampled tip becomes an image source and a stamp-tip brush (named and
|
|
5
|
+
* spaced as its preset says, where the file says it); each computed tip a round or flat brush.
|
|
6
|
+
* - Procreate `.brush` and `.brushset` (ZIP archives): each brush's `Shape.png` becomes its image
|
|
7
|
+
* tip and `Grain.png` its tip grain (Procreate's sources are white on black), with the name and
|
|
8
|
+
* spacing from `Brush.archive`.
|
|
9
|
+
*
|
|
10
|
+
* What a pack has that the facet model doesn't map (dynamics, pencil curves, patterns, dual
|
|
11
|
+
* brushes, wet mixing) is listed in `unsupported`, and licence or terms files inside the pack are
|
|
12
|
+
* kept as `licence` notes and on every source. Nothing here writes to a library:
|
|
13
|
+
* `BrushLibrary.importFile` does that, with the brushes and sources returned.
|
|
14
|
+
*/
|
|
15
|
+
import { type BrushSource } from '../sources.js';
|
|
16
|
+
import type { BrushLibrary, ImportBrushesResult } from '../library.js';
|
|
17
|
+
import type { Brush } from '../types.js';
|
|
18
|
+
export type BrushPackFormat = 'abr' | 'brush' | 'brushset';
|
|
19
|
+
export declare const BRUSH_PACK_FORMATS: readonly BrushPackFormat[];
|
|
20
|
+
/** Largest pack read, bytes. */
|
|
21
|
+
export declare const MAX_BRUSH_PACK_BYTES: number;
|
|
22
|
+
/** Most brushes taken from one pack. */
|
|
23
|
+
export declare const MAX_PACK_BRUSHES = 300;
|
|
24
|
+
export interface ReadBrushPackOptions {
|
|
25
|
+
/** The pack's file name: names the brushes and ids, and picks the format by its extension. */
|
|
26
|
+
fileName: string;
|
|
27
|
+
/** Default: from the extension, then from the contents. */
|
|
28
|
+
format?: BrushPackFormat;
|
|
29
|
+
/** Id prefix for the brushes and sources (default: from the file name). */
|
|
30
|
+
prefix?: string;
|
|
31
|
+
/** The licence or terms the pack came with (kept with every source, before any found in the pack). */
|
|
32
|
+
licence?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface BrushPack {
|
|
35
|
+
format: BrushPackFormat;
|
|
36
|
+
brushes: Brush[];
|
|
37
|
+
sources: BrushSource[];
|
|
38
|
+
/** What was not imported or not mapped, in words. */
|
|
39
|
+
unsupported: string[];
|
|
40
|
+
/** Licence and terms notes: the one given, then any found in the pack. */
|
|
41
|
+
licence: string[];
|
|
42
|
+
}
|
|
43
|
+
export declare class BrushPackError extends Error {
|
|
44
|
+
constructor(message: string);
|
|
45
|
+
}
|
|
46
|
+
/** The format of a pack: as given, by its extension, or by its contents. */
|
|
47
|
+
export declare function brushPackFormat(bytes: Uint8Array, fileName: string, format?: BrushPackFormat): BrushPackFormat;
|
|
48
|
+
/** The brushes and sources of a pack (see the module comment). Throws a `BrushPackError` when nothing can be read from it. */
|
|
49
|
+
export declare function readBrushPack(bytes: Uint8Array, options: ReadBrushPackOptions): BrushPack;
|
|
50
|
+
export interface ImportBrushPackResult {
|
|
51
|
+
format: BrushPackFormat;
|
|
52
|
+
/** The brushes added or replaced. */
|
|
53
|
+
brushes: Array<{
|
|
54
|
+
id: string;
|
|
55
|
+
name: string;
|
|
56
|
+
}>;
|
|
57
|
+
/** The image sources added or replaced. */
|
|
58
|
+
sources: string[];
|
|
59
|
+
/** Brush ids already in the library (or built in), left as they were. */
|
|
60
|
+
skipped: string[];
|
|
61
|
+
unsupported: string[];
|
|
62
|
+
licence: string[];
|
|
63
|
+
/** What normalising the brushes changed. */
|
|
64
|
+
problems: string[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Reads a pack (`readBrushPack`) and adds its brushes and sources to `library` in one import.
|
|
68
|
+
* Brush ids already saved are skipped unless `overwrite`.
|
|
69
|
+
*/
|
|
70
|
+
export declare function importBrushPack(library: Pick<BrushLibrary, 'importFile'>, bytes: Uint8Array, options: ReadBrushPackOptions & {
|
|
71
|
+
overwrite?: boolean;
|
|
72
|
+
}): Promise<ImportBrushPackResult>;
|
|
73
|
+
/**
|
|
74
|
+
* Imports a file a person picked into `library`: a brush library file (`.json`) or a brush pack
|
|
75
|
+
* (`.abr`, `.brush`, `.brushset`), by its name. Returns what `importFile` or `importBrushPack` did.
|
|
76
|
+
*/
|
|
77
|
+
export declare function importBrushFile(library: Pick<BrushLibrary, 'importFile'>, file: Blob & {
|
|
78
|
+
name: string;
|
|
79
|
+
}, options?: {
|
|
80
|
+
overwrite?: boolean;
|
|
81
|
+
licence?: string;
|
|
82
|
+
}): Promise<ImportBrushesResult | ImportBrushPackResult>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small, defensive ZIP reader for brush packs (`.brush`, `.brushset`): the central directory,
|
|
3
|
+
* stored and deflated entries, and nothing else (no encryption, no ZIP64, no multi-disk). Brush
|
|
4
|
+
* packs are untrusted files, so every offset and size is checked against the buffer and against
|
|
5
|
+
* limits before anything is read or inflated.
|
|
6
|
+
*/
|
|
7
|
+
/** One file in the archive. */
|
|
8
|
+
export interface ZipEntry {
|
|
9
|
+
/** Its path in the archive (`/`-separated). */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Uncompressed size, as the directory says. */
|
|
12
|
+
size: number;
|
|
13
|
+
/** The file's bytes (inflated on first read). */
|
|
14
|
+
read(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
/** Limits for an untrusted archive. */
|
|
17
|
+
export interface ZipLimits {
|
|
18
|
+
/** Most entries (default 4096). */
|
|
19
|
+
maxEntries?: number;
|
|
20
|
+
/** Largest uncompressed entry, bytes (default 64 MB). */
|
|
21
|
+
maxEntrySize?: number;
|
|
22
|
+
/** Largest total uncompressed size, bytes (default 512 MB). */
|
|
23
|
+
maxTotalSize?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class ZipError extends Error {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
/** Whether the bytes start like a ZIP archive. */
|
|
29
|
+
export declare function isZip(bytes: Uint8Array): boolean;
|
|
30
|
+
/** The entries of a ZIP archive (directories left out). Throws a `ZipError` on anything malformed or over the limits. */
|
|
31
|
+
export declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipEntry[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A small, defensive ZIP reader for brush packs (`.brush`, `.brushset`): the central directory,
|
|
3
|
+
* stored and deflated entries, and nothing else (no encryption, no ZIP64, no multi-disk). Brush
|
|
4
|
+
* packs are untrusted files, so every offset and size is checked against the buffer and against
|
|
5
|
+
* limits before anything is read or inflated.
|
|
6
|
+
*/
|
|
7
|
+
/** One file in the archive. */
|
|
8
|
+
export interface ZipEntry {
|
|
9
|
+
/** Its path in the archive (`/`-separated). */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Uncompressed size, as the directory says. */
|
|
12
|
+
size: number;
|
|
13
|
+
/** The file's bytes (inflated on first read). */
|
|
14
|
+
read(): Uint8Array;
|
|
15
|
+
}
|
|
16
|
+
/** Limits for an untrusted archive. */
|
|
17
|
+
export interface ZipLimits {
|
|
18
|
+
/** Most entries (default 4096). */
|
|
19
|
+
maxEntries?: number;
|
|
20
|
+
/** Largest uncompressed entry, bytes (default 64 MB). */
|
|
21
|
+
maxEntrySize?: number;
|
|
22
|
+
/** Largest total uncompressed size, bytes (default 512 MB). */
|
|
23
|
+
maxTotalSize?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class ZipError extends Error {
|
|
26
|
+
constructor(message: string);
|
|
27
|
+
}
|
|
28
|
+
/** Whether the bytes start like a ZIP archive. */
|
|
29
|
+
export declare function isZip(bytes: Uint8Array): boolean;
|
|
30
|
+
/** The entries of a ZIP archive (directories left out). Throws a `ZipError` on anything malformed or over the limits. */
|
|
31
|
+
export declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipEntry[];
|
package/dist/brushes/index.cjs
CHANGED
|
@@ -8,7 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
var _chunk3KNQ2W6Xcjs = require('../chunk-3KNQ2W6X.cjs');
|
|
12
22
|
require('../chunk-PFHJS4HE.cjs');
|
|
13
23
|
|
|
14
24
|
|
|
@@ -201,8 +211,8 @@ function brushEditorSections(brush, profile = _chunkEU2ZZA6Lcjs.PAINT_PROFILE, c
|
|
|
201
211
|
!isTool && withNote({ kind: "text", path: "variety", label: "Variety", ariaLabel: "Brush variety", value: _nullishCoalesce(brush.variety, () => ( "")), placeholder: "pencil, oil, highlighter\u2026" }),
|
|
202
212
|
isTool && !!brush.tool && profile.tools.includes(brush.tool) && choice("tool", "Tool", options(profile.tools, TOOL_LABELS))
|
|
203
213
|
]);
|
|
204
|
-
const engineControls =
|
|
205
|
-
const tipSliders =
|
|
214
|
+
const engineControls = _chunk3KNQ2W6Xcjs.brushEngineControls.call(void 0, resolved);
|
|
215
|
+
const tipSliders = _chunk3KNQ2W6Xcjs.BRUSH_SLIDERS.filter((c) => c.path.startsWith("tip.") && c.path !== "tip.smoothing");
|
|
206
216
|
add("shape", "Shape", [
|
|
207
217
|
!refused.has("tip.shape") && choice("tip.shape", "Tip", options(profile.tipShapes.filter((s) => !isTool || s !== "stamp"), SHAPE_LABELS)),
|
|
208
218
|
...tipSliders.map((c) => slider(c)),
|
|
@@ -237,7 +247,7 @@ function brushEditorSections(brush, profile = _chunkEU2ZZA6Lcjs.PAINT_PROFILE, c
|
|
|
237
247
|
...objects.map((c) => slider(c))
|
|
238
248
|
]);
|
|
239
249
|
}
|
|
240
|
-
const feel =
|
|
250
|
+
const feel = _chunk3KNQ2W6Xcjs.BRUSH_SLIDERS.filter((c) => ["tip.smoothing", "pressureSmoothing", "dynamics.minSize", "dynamics.tiltSize", "dynamics.velocitySize"].includes(c.path)).filter((c) => !(c.path === "dynamics.tiltSize" && !full(profile.tilt)) && !(c.path === "dynamics.velocitySize" && !full(profile.velocity)));
|
|
241
251
|
const stampDabs = dabs && shape === "stamp";
|
|
242
252
|
const jitter = (path, label, max = 1, step = 0.01) => withNote({ kind: "slider", path, label, ariaLabel: aria(path, label), min: 0, max, step, value: Number(_nullishCoalesce(value(path), () => ( 0))) });
|
|
243
253
|
add("feel", "Feel", [
|
|
@@ -540,7 +550,7 @@ function editorSectionFixtures() {
|
|
|
540
550
|
}
|
|
541
551
|
function toolDefinitions() {
|
|
542
552
|
const library = _chunkEU2ZZA6Lcjs.createBrushLibrary.call(void 0, );
|
|
543
|
-
const toolsFor = (host) =>
|
|
553
|
+
const toolsFor = (host) => _chunk3KNQ2W6Xcjs.createBrushLibraryTools.call(void 0, library, { profile: _chunkEU2ZZA6Lcjs.BRUSH_HOST_PROFILES[host], renderPreview: () => ({ data: "", mimeType: "image/png" }) });
|
|
544
554
|
return {
|
|
545
555
|
tools: toolsFor("paint").map((t) => ({ name: t.name, title: t.title, description: t.description, inputSchema: t.inputSchema, annotations: t.annotations })),
|
|
546
556
|
hosts: Object.fromEntries(Object.keys(_chunkEU2ZZA6Lcjs.BRUSH_HOST_PROFILES).map((host) => [host, toolsFor(host).map((t) => t.name)]))
|
|
@@ -663,4 +673,14 @@ function brushContracts() {
|
|
|
663
673
|
|
|
664
674
|
|
|
665
675
|
|
|
666
|
-
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
exports.AbrError = _chunk3KNQ2W6Xcjs.AbrError; exports.BRUSH_CONTRACT_FORMAT_VERSION = BRUSH_CONTRACT_FORMAT_VERSION; exports.BRUSH_FACET_SCHEMAS = _chunkEU2ZZA6Lcjs.BRUSH_FACET_SCHEMAS; exports.BRUSH_FLIPS = _chunkEU2ZZA6Lcjs.BRUSH_FLIPS; exports.BRUSH_GRAIN_MODES = _chunkEU2ZZA6Lcjs.BRUSH_GRAIN_MODES; exports.BRUSH_GRAIN_SOURCE_PATTERN = _chunkEU2ZZA6Lcjs.BRUSH_GRAIN_SOURCE_PATTERN; exports.BRUSH_HOST_PROFILES = _chunkEU2ZZA6Lcjs.BRUSH_HOST_PROFILES; exports.BRUSH_JSON_SCHEMA = _chunkEU2ZZA6Lcjs.BRUSH_JSON_SCHEMA; exports.BRUSH_KINDS = _chunkEU2ZZA6Lcjs.BRUSH_KINDS; exports.BRUSH_LIBRARY_FILE_JSON_SCHEMA = BRUSH_LIBRARY_FILE_JSON_SCHEMA; exports.BRUSH_MARKS_KINDS = _chunkEU2ZZA6Lcjs.BRUSH_MARKS_KINDS; exports.BRUSH_MEDIA = _chunkEU2ZZA6Lcjs.BRUSH_MEDIA; exports.BRUSH_PACK_FORMATS = _chunk3KNQ2W6Xcjs.BRUSH_PACK_FORMATS; exports.BRUSH_PATCH_PROPERTIES = _chunk3KNQ2W6Xcjs.BRUSH_PATCH_PROPERTIES; exports.BRUSH_PRESETS = _chunkEU2ZZA6Lcjs.BRUSH_PRESETS; exports.BRUSH_PREVIEW_DARK_PAPER = _chunkBPJSI4NTcjs.BRUSH_PREVIEW_DARK_PAPER; exports.BRUSH_PREVIEW_FALLBACKS = _chunkBPJSI4NTcjs.BRUSH_PREVIEW_FALLBACKS; exports.BRUSH_PREVIEW_MIN_CONTRAST = _chunkBPJSI4NTcjs.BRUSH_PREVIEW_MIN_CONTRAST; exports.BRUSH_PROFILE_JSON_SCHEMA = BRUSH_PROFILE_JSON_SCHEMA; exports.BRUSH_SOURCE_CHANNELS = _chunkEU2ZZA6Lcjs.BRUSH_SOURCE_CHANNELS; exports.BRUSH_SOURCE_PROVIDER = _chunkEU2ZZA6Lcjs.BRUSH_SOURCE_PROVIDER; exports.BRUSH_SURFACES = _chunkEU2ZZA6Lcjs.BRUSH_SURFACES; exports.BRUSH_TIP_SHAPES = _chunkEU2ZZA6Lcjs.BRUSH_TIP_SHAPES; exports.BRUSH_TOOLS = _chunkEU2ZZA6Lcjs.BRUSH_TOOLS; exports.BRUSH_UNSET_PROPERTY = _chunk3KNQ2W6Xcjs.BRUSH_UNSET_PROPERTY; exports.BRUSH_WORD = _chunkEU2ZZA6Lcjs.BRUSH_WORD; exports.BrushLibraryError = _chunkEU2ZZA6Lcjs.BrushLibraryError; exports.BrushPackError = _chunk3KNQ2W6Xcjs.BrushPackError; exports.BrushSourceError = _chunkEU2ZZA6Lcjs.BrushSourceError; exports.CANVAS_PROFILE = _chunkEU2ZZA6Lcjs.CANVAS_PROFILE; exports.IMAGE_PROFILE = _chunkEU2ZZA6Lcjs.IMAGE_PROFILE; exports.MAX_BRUSH_PACK_BYTES = _chunk3KNQ2W6Xcjs.MAX_BRUSH_PACK_BYTES; exports.MAX_BRUSH_PALETTE = _chunkEU2ZZA6Lcjs.MAX_BRUSH_PALETTE; exports.MAX_BRUSH_SOURCES = _chunkEU2ZZA6Lcjs.MAX_BRUSH_SOURCES; exports.MAX_BRUSH_SOURCE_INPUT_PIXELS = _chunkEU2ZZA6Lcjs.MAX_BRUSH_SOURCE_INPUT_PIXELS; exports.MAX_BRUSH_SOURCE_SIZE = _chunkEU2ZZA6Lcjs.MAX_BRUSH_SOURCE_SIZE; exports.MAX_PACK_BRUSHES = _chunk3KNQ2W6Xcjs.MAX_PACK_BRUSHES; exports.PAINT_PROFILE = _chunkEU2ZZA6Lcjs.PAINT_PROFILE; exports.TIP_GRAIN_PATTERNS = _chunkEU2ZZA6Lcjs.TIP_GRAIN_PATTERNS; exports.UNSETTABLE_BRUSH_FACETS = _chunk3KNQ2W6Xcjs.UNSETTABLE_BRUSH_FACETS; exports.VECTOR_PROFILE = _chunkEU2ZZA6Lcjs.VECTOR_PROFILE; exports.WET_BRUSH_TOOLS = _chunkEU2ZZA6Lcjs.WET_BRUSH_TOOLS; exports.addBrushSourceFromFile = addBrushSourceFromFile; exports.brushColourHex = _chunkJBZRVLXVcjs.brushColourHex; exports.brushColourKind = _chunkEU2ZZA6Lcjs.brushColourKind; exports.brushContracts = brushContracts; exports.brushEditorScope = brushEditorScope; exports.brushEditorSections = brushEditorSections; exports.brushIdFromName = brushIdFromName; exports.brushLibraryGroups = brushLibraryGroups; exports.brushPackFormat = _chunk3KNQ2W6Xcjs.brushPackFormat; exports.brushPreviewColours = _chunkBPJSI4NTcjs.brushPreviewColours; exports.brushPreviewStrength = _chunkBPJSI4NTcjs.brushPreviewStrength; exports.brushPreviewsOnDark = _chunkBPJSI4NTcjs.brushPreviewsOnDark; exports.brushSourceFromMask = _chunkEU2ZZA6Lcjs.brushSourceFromMask; exports.brushSourceIdFromName = _chunkEU2ZZA6Lcjs.brushSourceIdFromName; exports.brushSourceIdOf = _chunkEU2ZZA6Lcjs.brushSourceIdOf; exports.brushSourceIds = _chunkEU2ZZA6Lcjs.brushSourceIds; exports.brushSourceRef = _chunkEU2ZZA6Lcjs.brushSourceRef; exports.changedBrushPaths = _chunk3KNQ2W6Xcjs.changedBrushPaths; exports.checkBrush = _chunkEU2ZZA6Lcjs.checkBrush; exports.checkBrushEdit = _chunkEU2ZZA6Lcjs.checkBrushEdit; exports.createBrushLibrary = _chunkEU2ZZA6Lcjs.createBrushLibrary; exports.createBrushLibraryToolProvider = _chunk3KNQ2W6Xcjs.createBrushLibraryToolProvider; exports.createBrushLibraryTools = _chunk3KNQ2W6Xcjs.createBrushLibraryTools; exports.decodeBrushSource = _chunkEU2ZZA6Lcjs.decodeBrushSource; exports.degrade = _chunkEU2ZZA6Lcjs.degrade; exports.imageFileToPngDataUrl = imageFileToPngDataUrl; exports.importBrushFile = _chunk3KNQ2W6Xcjs.importBrushFile; exports.importBrushPack = _chunk3KNQ2W6Xcjs.importBrushPack; exports.isBrushLibrary = _chunkEU2ZZA6Lcjs.isBrushLibrary; exports.isBrushSourceRef = _chunkEU2ZZA6Lcjs.isBrushSourceRef; exports.listPresets = _chunkEU2ZZA6Lcjs.listPresets; exports.makeBrushSource = _chunkEU2ZZA6Lcjs.makeBrushSource; exports.mergeBrushPatch = _chunk3KNQ2W6Xcjs.mergeBrushPatch; exports.migrateBrushV1 = _chunkEU2ZZA6Lcjs.migrateBrushV1; exports.newBrushFor = newBrushFor; exports.normalizeBrushSpec = _chunkEU2ZZA6Lcjs.normalizeBrushSpec; exports.parseBrushLibrary = _chunkEU2ZZA6Lcjs.parseBrushLibrary2; exports.parseBrushLibrarySources = _chunkEU2ZZA6Lcjs.parseBrushLibrarySources; exports.readAbr = _chunk3KNQ2W6Xcjs.readAbr; exports.readBrushPack = _chunk3KNQ2W6Xcjs.readBrushPack; exports.readBrushSource = _chunkEU2ZZA6Lcjs.readBrushSource; exports.resolveBrush = _chunkEU2ZZA6Lcjs.resolveBrush; exports.resolveCategory = _chunkEU2ZZA6Lcjs.resolveCategory; exports.resolveEngine = _chunkEU2ZZA6Lcjs.resolveEngine; exports.resolveWetMedium = _chunkEU2ZZA6Lcjs.resolveWetMedium; exports.saveBrushEdit = saveBrushEdit; exports.setBrushEditorValue = setBrushEditorValue; exports.snapshotBrushLibrary = _chunkEU2ZZA6Lcjs.snapshotBrushLibrary; exports.summarizeBrushSource = _chunkEU2ZZA6Lcjs.summarizeBrushSource; exports.withBrushSource = withBrushSource; exports.withKeptIssues = _chunkEU2ZZA6Lcjs.withKeptIssues;
|
package/dist/brushes/index.d.cts
CHANGED
|
@@ -23,3 +23,5 @@ export { BrushLibraryError, createBrushLibrary, isBrushLibrary, parseBrushLibrar
|
|
|
23
23
|
export { BRUSH_PATCH_PROPERTIES, BRUSH_UNSET_PROPERTY, changedBrushPaths, mergeBrushPatch, UNSETTABLE_BRUSH_FACETS, type BrushPatch, type UnsettableBrushFacet } from './patch.cjs';
|
|
24
24
|
export { addBrushSourceFromFile, brushEditorScope, brushEditorSections, imageFileToPngDataUrl, withBrushSource, brushIdFromName, brushLibraryGroups, newBrushFor, saveBrushEdit, setBrushEditorValue, type BrushEditorHiddenFacet, type BrushEditorScope, type SaveBrushEditOptions, type SaveBrushEditResult, type BrushEditorContext, type BrushEditorControl, type BrushEditorSection, type BrushEditorSectionId, type BrushLibraryGroup, } from './ui.cjs';
|
|
25
25
|
export { createBrushLibraryToolProvider, createBrushLibraryTools, type BrushLibraryToolProviderOptions, type BrushPreviewImage, type BrushPreviewRenderer } from './tools.cjs';
|
|
26
|
+
export { BRUSH_PACK_FORMATS, brushPackFormat, BrushPackError, importBrushFile, importBrushPack, MAX_BRUSH_PACK_BYTES, MAX_PACK_BRUSHES, readBrushPack, type BrushPack, type BrushPackFormat, type ImportBrushPackResult, type ReadBrushPackOptions, } from './import/pack.cjs';
|
|
27
|
+
export { AbrError, readAbr, type AbrFile, type AbrTip } from './import/abr.cjs';
|
package/dist/brushes/index.d.ts
CHANGED
|
@@ -23,3 +23,5 @@ export { BrushLibraryError, createBrushLibrary, isBrushLibrary, parseBrushLibrar
|
|
|
23
23
|
export { BRUSH_PATCH_PROPERTIES, BRUSH_UNSET_PROPERTY, changedBrushPaths, mergeBrushPatch, UNSETTABLE_BRUSH_FACETS, type BrushPatch, type UnsettableBrushFacet } from './patch.js';
|
|
24
24
|
export { addBrushSourceFromFile, brushEditorScope, brushEditorSections, imageFileToPngDataUrl, withBrushSource, brushIdFromName, brushLibraryGroups, newBrushFor, saveBrushEdit, setBrushEditorValue, type BrushEditorHiddenFacet, type BrushEditorScope, type SaveBrushEditOptions, type SaveBrushEditResult, type BrushEditorContext, type BrushEditorControl, type BrushEditorSection, type BrushEditorSectionId, type BrushLibraryGroup, } from './ui.js';
|
|
25
25
|
export { createBrushLibraryToolProvider, createBrushLibraryTools, type BrushLibraryToolProviderOptions, type BrushPreviewImage, type BrushPreviewRenderer } from './tools.js';
|
|
26
|
+
export { BRUSH_PACK_FORMATS, brushPackFormat, BrushPackError, importBrushFile, importBrushPack, MAX_BRUSH_PACK_BYTES, MAX_PACK_BRUSHES, readBrushPack, type BrushPack, type BrushPackFormat, type ImportBrushPackResult, type ReadBrushPackOptions, } from './import/pack.js';
|
|
27
|
+
export { AbrError, readAbr, type AbrFile, type AbrTip } from './import/abr.js';
|
package/dist/brushes/index.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AbrError,
|
|
3
|
+
BRUSH_PACK_FORMATS,
|
|
2
4
|
BRUSH_PATCH_PROPERTIES,
|
|
3
5
|
BRUSH_SLIDERS,
|
|
4
6
|
BRUSH_UNSET_PROPERTY,
|
|
7
|
+
BrushPackError,
|
|
8
|
+
MAX_BRUSH_PACK_BYTES,
|
|
9
|
+
MAX_PACK_BRUSHES,
|
|
5
10
|
UNSETTABLE_BRUSH_FACETS,
|
|
6
11
|
brushEngineControls,
|
|
12
|
+
brushPackFormat,
|
|
7
13
|
changedBrushPaths,
|
|
8
14
|
createBrushLibraryToolProvider,
|
|
9
15
|
createBrushLibraryTools,
|
|
10
|
-
|
|
11
|
-
|
|
16
|
+
importBrushFile,
|
|
17
|
+
importBrushPack,
|
|
18
|
+
mergeBrushPatch,
|
|
19
|
+
readAbr,
|
|
20
|
+
readBrushPack
|
|
21
|
+
} from "../chunk-ININNHLM.js";
|
|
12
22
|
import "../chunk-VE6UKYQ2.js";
|
|
13
23
|
import {
|
|
14
24
|
BRUSH_PREVIEW_DARK_PAPER,
|
|
@@ -580,6 +590,7 @@ function brushContracts() {
|
|
|
580
590
|
return files;
|
|
581
591
|
}
|
|
582
592
|
export {
|
|
593
|
+
AbrError,
|
|
583
594
|
BRUSH_CONTRACT_FORMAT_VERSION,
|
|
584
595
|
BRUSH_FACET_SCHEMAS,
|
|
585
596
|
BRUSH_FLIPS,
|
|
@@ -591,6 +602,7 @@ export {
|
|
|
591
602
|
BRUSH_LIBRARY_FILE_JSON_SCHEMA,
|
|
592
603
|
BRUSH_MARKS_KINDS,
|
|
593
604
|
BRUSH_MEDIA,
|
|
605
|
+
BRUSH_PACK_FORMATS,
|
|
594
606
|
BRUSH_PATCH_PROPERTIES,
|
|
595
607
|
BRUSH_PRESETS,
|
|
596
608
|
BRUSH_PREVIEW_DARK_PAPER,
|
|
@@ -605,13 +617,16 @@ export {
|
|
|
605
617
|
BRUSH_UNSET_PROPERTY,
|
|
606
618
|
BRUSH_WORD,
|
|
607
619
|
BrushLibraryError,
|
|
620
|
+
BrushPackError,
|
|
608
621
|
BrushSourceError,
|
|
609
622
|
CANVAS_PROFILE,
|
|
610
623
|
IMAGE_PROFILE,
|
|
624
|
+
MAX_BRUSH_PACK_BYTES,
|
|
611
625
|
MAX_BRUSH_PALETTE,
|
|
612
626
|
MAX_BRUSH_SOURCES,
|
|
613
627
|
MAX_BRUSH_SOURCE_INPUT_PIXELS,
|
|
614
628
|
MAX_BRUSH_SOURCE_SIZE,
|
|
629
|
+
MAX_PACK_BRUSHES,
|
|
615
630
|
PAINT_PROFILE,
|
|
616
631
|
TIP_GRAIN_PATTERNS,
|
|
617
632
|
UNSETTABLE_BRUSH_FACETS,
|
|
@@ -625,6 +640,7 @@ export {
|
|
|
625
640
|
brushEditorSections,
|
|
626
641
|
brushIdFromName,
|
|
627
642
|
brushLibraryGroups,
|
|
643
|
+
brushPackFormat,
|
|
628
644
|
brushPreviewColours,
|
|
629
645
|
brushPreviewStrength,
|
|
630
646
|
brushPreviewsOnDark,
|
|
@@ -642,6 +658,8 @@ export {
|
|
|
642
658
|
decodeBrushSource,
|
|
643
659
|
degrade,
|
|
644
660
|
imageFileToPngDataUrl,
|
|
661
|
+
importBrushFile,
|
|
662
|
+
importBrushPack,
|
|
645
663
|
isBrushLibrary,
|
|
646
664
|
isBrushSourceRef,
|
|
647
665
|
listPresets,
|
|
@@ -652,6 +670,8 @@ export {
|
|
|
652
670
|
normalizeBrushSpec,
|
|
653
671
|
parseBrushLibrary,
|
|
654
672
|
parseBrushLibrarySources,
|
|
673
|
+
readAbr,
|
|
674
|
+
readBrushPack,
|
|
655
675
|
readBrushSource,
|
|
656
676
|
resolveBrush,
|
|
657
677
|
resolveCategory,
|