@pixerate/editor 0.263.0 → 0.264.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/brushes/index.cjs +155 -68
- package/dist/brushes/index.d.cts +3 -3
- package/dist/brushes/index.d.ts +3 -3
- package/dist/brushes/index.js +111 -24
- package/dist/brushes/library.d.cts +2 -0
- package/dist/brushes/library.d.ts +2 -0
- package/dist/brushes/profiles.d.cts +21 -2
- package/dist/brushes/profiles.d.ts +21 -2
- package/dist/brushes/ui.d.cts +57 -4
- package/dist/brushes/ui.d.ts +57 -4
- package/dist/{brushstrokeRender-S5DABANG.js → brushstrokeRender-3MOI7PH4.js} +2 -2
- package/dist/{brushstrokeRender-2GBME4XD.cjs → brushstrokeRender-SMMPIJF2.cjs} +12 -12
- package/dist/canvas/index.cjs +13 -13
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-CNLO6E2K.js → chunk-4OJC4MCD.js} +8 -7
- package/dist/{chunk-ZBACQHW3.cjs → chunk-BY5EBP26.cjs} +27 -6
- package/dist/{chunk-JGI4PZWO.js → chunk-CECCP2V7.js} +1 -1
- package/dist/{chunk-P5343XZO.js → chunk-EE7SAYBF.js} +23 -2
- package/dist/{chunk-TILEUVRO.cjs → chunk-F3KKR6DD.cjs} +35 -34
- package/dist/{chunk-TIHW7CUY.cjs → chunk-FQC5TDB6.cjs} +35 -35
- package/dist/{chunk-4E6BGHWN.cjs → chunk-G5ADO47G.cjs} +1 -1
- package/dist/{chunk-QW7LKWKE.js → chunk-HAUDEVMC.js} +1 -1
- package/dist/{chunk-LG6MEEV7.js → chunk-JEML4FSA.js} +1 -1
- package/dist/{chunk-XQW6R7VW.cjs → chunk-KXNZNOEF.cjs} +86 -86
- package/dist/{chunk-6XX7E7O2.js → chunk-ROBSFJ6F.js} +1 -1
- package/dist/{chunk-LWHUU6A6.cjs → chunk-USJX5SW4.cjs} +10 -10
- package/dist/{chunk-73QFSPDG.cjs → chunk-V7MJ4HIN.cjs} +23 -23
- package/dist/{chunk-34HIZXFX.js → chunk-WWI6FLH2.js} +1 -1
- package/dist/image-editor/controller.d.cts +3 -0
- package/dist/image-editor/controller.d.ts +3 -0
- package/dist/image-editor/index.cjs +789 -786
- package/dist/image-editor/index.js +7 -4
- package/dist/image-editor/types.d.cts +7 -0
- package/dist/image-editor/types.d.ts +7 -0
- package/dist/paint-editor/brush-library-tools.d.cts +8 -1
- package/dist/paint-editor/brush-library-tools.d.ts +8 -1
- package/dist/paint-editor/controller.d.cts +1 -1
- package/dist/paint-editor/controller.d.ts +1 -1
- package/dist/paint-editor/index.cjs +88 -83
- package/dist/paint-editor/index.d.cts +1 -1
- package/dist/paint-editor/index.d.ts +1 -1
- package/dist/paint-editor/index.js +16 -11
- package/dist/vector/controller.d.cts +13 -0
- package/dist/vector/controller.d.ts +13 -0
- package/dist/vector/index.cjs +1215 -1205
- package/dist/vector/index.js +16 -6
- package/package.json +1 -1
- package/skills/pixerate-brushes/SKILL.md +11 -3
- package/skills/pixerate-brushes-design/SKILL.md +1 -0
- package/skills/pixerate-vector/SKILL.md +1 -1
package/dist/brushes/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkF3KKR6DDcjs = require('../chunk-F3KKR6DD.cjs');
|
|
12
12
|
require('../chunk-PE6YJMQT.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
@@ -58,7 +58,10 @@ require('../chunk-PE6YJMQT.cjs');
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
var _chunkBY5EBP26cjs = require('../chunk-BY5EBP26.cjs');
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
var _chunkOTN6VB5Scjs = require('../chunk-OTN6VB5S.cjs');
|
|
@@ -112,20 +115,24 @@ var ARIA = {
|
|
|
112
115
|
"light.pressure": "Light follows pressure"
|
|
113
116
|
};
|
|
114
117
|
var aria = (path, label) => _nullishCoalesce(ARIA[path], () => ( `Brush ${label.toLowerCase()}`));
|
|
115
|
-
function brushEditorSections(brush, profile =
|
|
116
|
-
const resolved =
|
|
117
|
-
const engine =
|
|
118
|
-
const fieldOf = (facet) =>
|
|
119
|
-
const facetOf = (enginePath) => _optionalChain([(_nullishCoalesce(
|
|
118
|
+
function brushEditorSections(brush, profile = _chunkBY5EBP26cjs.PAINT_PROFILE) {
|
|
119
|
+
const resolved = _chunkBY5EBP26cjs.resolveBrush.call(void 0, brush);
|
|
120
|
+
const engine = _chunkBY5EBP26cjs.resolveEngine.call(void 0, brush);
|
|
121
|
+
const fieldOf = (facet) => _chunkBY5EBP26cjs.BRUSH_FIELDS.find((f) => f.facet === facet && f.engines.includes(engine));
|
|
122
|
+
const facetOf = (enginePath) => _optionalChain([(_nullishCoalesce(_chunkBY5EBP26cjs.BRUSH_FIELDS.find((f) => f.engine === enginePath && f.engines.includes(engine)), () => ( _chunkBY5EBP26cjs.BRUSH_FIELDS.find((f) => f.engine === enginePath)))), 'optionalAccess', _ => _.facet]);
|
|
120
123
|
const value = (path) => {
|
|
121
|
-
const own =
|
|
124
|
+
const own = _chunkBY5EBP26cjs.getPath.call(void 0, brush, path);
|
|
122
125
|
if (own !== void 0) return own;
|
|
123
126
|
const field = fieldOf(path);
|
|
124
127
|
if (!field) return void 0;
|
|
125
|
-
const v =
|
|
128
|
+
const v = _chunkBY5EBP26cjs.getPath.call(void 0, resolved, field.engine);
|
|
126
129
|
return field.map ? field.map.toFacet(v) : v;
|
|
127
130
|
};
|
|
128
|
-
const
|
|
131
|
+
const issues = _chunkBY5EBP26cjs.checkBrush.call(void 0, brush, profile).issues;
|
|
132
|
+
const warned = new Map(issues.filter((i) => i.severity === "warning").map((i) => [i.facet, i.reason]));
|
|
133
|
+
const refused = new Set(issues.filter((i) => i.severity === "error").map((i) => i.facet));
|
|
134
|
+
const full = (s) => s === "full";
|
|
135
|
+
const engineOk = !["kind", "tool", "tip.shape", "marks", "behaviour.surface"].some((f) => refused.has(f));
|
|
129
136
|
const noteFor = (path) => _optionalChain([[...warned], 'access', _2 => _2.find, 'call', _3 => _3(([facet]) => path === facet || path.startsWith(`${facet}.`)), 'optionalAccess', _4 => _4[1]]);
|
|
130
137
|
const withNote = (c) => {
|
|
131
138
|
const note = noteFor(c.path);
|
|
@@ -147,85 +154,158 @@ function brushEditorSections(brush, profile = _chunkZBACQHW3cjs.PAINT_PROFILE) {
|
|
|
147
154
|
const isTool = brush.kind === "tool";
|
|
148
155
|
const shape = brush.tip.shape;
|
|
149
156
|
const marks = _nullishCoalesce(_optionalChain([brush, 'access', _7 => _7.marks, 'optionalAccess', _8 => _8.kind]), () => ( "continuous"));
|
|
157
|
+
const exchangeFull = full(_optionalChain([brush, 'access', _9 => _9.behaviour, 'optionalAccess', _10 => _10.exchange, 'optionalAccess', _11 => _11.reservoir]) ? profile.reservoir : profile.exchange);
|
|
150
158
|
add("medium", "Medium", [
|
|
151
|
-
profile.kinds.length > 1 && choice("kind", "Kind", options(profile.kinds, { mark: "Lays a material", tool: "Works on paint" })),
|
|
152
|
-
!isTool && choice("medium", "Medium", [{ value: "", label: "Any" }, ...options(
|
|
159
|
+
profile.kinds.length > 1 && profile.kinds.includes(brush.kind) && choice("kind", "Kind", options(profile.kinds, { mark: "Lays a material", tool: "Works on paint" })),
|
|
160
|
+
!isTool && choice("medium", "Medium", [{ value: "", label: "Any" }, ...options(_chunkBY5EBP26cjs.BRUSH_MEDIA, MEDIUM_LABELS)], ""),
|
|
153
161
|
!isTool && withNote({ kind: "text", path: "variety", label: "Variety", ariaLabel: "Brush variety", value: _nullishCoalesce(brush.variety, () => ( "")), placeholder: "pencil, oil, highlighter\u2026" }),
|
|
154
|
-
isTool && profile.tools.
|
|
162
|
+
isTool && !!brush.tool && profile.tools.includes(brush.tool) && choice("tool", "Tool", options(profile.tools, TOOL_LABELS))
|
|
155
163
|
]);
|
|
156
|
-
const engineControls =
|
|
157
|
-
const tipSliders =
|
|
164
|
+
const engineControls = _chunkF3KKR6DDcjs.brushEngineControls.call(void 0, resolved);
|
|
165
|
+
const tipSliders = _chunkF3KKR6DDcjs.BRUSH_SLIDERS.filter((c) => c.path.startsWith("tip.") && c.path !== "tip.smoothing");
|
|
158
166
|
add("shape", "Shape", [
|
|
159
|
-
choice("tip.shape", "Tip", options(profile.tipShapes.filter((s) => !isTool || s !== "stamp"), SHAPE_LABELS)),
|
|
167
|
+
!refused.has("tip.shape") && choice("tip.shape", "Tip", options(profile.tipShapes.filter((s) => !isTool || s !== "stamp"), SHAPE_LABELS)),
|
|
160
168
|
...tipSliders.map((c) => slider(c)),
|
|
161
169
|
engine === "dab" && choice("tip.blend", "Blend", _chunk2VX55NFMcjs.BLEND_MODES.map((m) => ({ value: m.id, label: m.label })), "normal"),
|
|
162
|
-
...shape === "bristle" && engineControls ? engineControls.sliders.filter((c) => c.path.startsWith("bristle.")).map((c) => slider(c)) : [],
|
|
163
|
-
shape === "stamp" && withNote({ kind: "stamps", path: "tip.stamps", label: "Stamps", ariaLabel: "Brush stamps", value: [..._nullishCoalesce(value("tip.stamps"), () => ( []))], max: marks === "particles" ?
|
|
170
|
+
...shape === "bristle" && engineOk && engineControls ? engineControls.sliders.filter((c) => c.path.startsWith("bristle.")).map((c) => slider(c)) : [],
|
|
171
|
+
shape === "stamp" && engineOk && withNote({ kind: "stamps", path: "tip.stamps", label: "Stamps", ariaLabel: "Brush stamps", value: [..._nullishCoalesce(value("tip.stamps"), () => ( []))], max: marks === "particles" ? _chunkBY5EBP26cjs.MAX_DOT_TEXTURES : _chunkBY5EBP26cjs.MAX_STICKER_STAMPS, options: STAMP_OPTIONS })
|
|
164
172
|
]);
|
|
165
|
-
if (!isTool && profile.marks.length > 1) {
|
|
173
|
+
if (!isTool && profile.marks.length > 1 && engineOk) {
|
|
166
174
|
const particles = marks === "particles" && engineControls ? engineControls.sliders.filter((c) => c.path.startsWith("particle.") && c.path !== "particle.waveSpeed") : [];
|
|
167
175
|
const objects = marks === "objects" && engineControls ? engineControls.sliders.filter((c) => c.path.startsWith("sticker.")) : [];
|
|
168
176
|
const render = value("marks.render");
|
|
169
177
|
add("marks", "Marks", [
|
|
170
178
|
choice("marks.kind", "Laid as", options(profile.marks, MARKS_LABELS), "continuous"),
|
|
171
|
-
marks === "particles" && choice("marks.physics", "Particles", options(
|
|
172
|
-
marks === "particles" && choice("marks.render", "Drawn as", options(
|
|
173
|
-
marks === "particles" && render === "ribbon" && choice("marks.ribbonPairs", "Ribbon joins", options(
|
|
174
|
-
marks === "particles" && shape === "stamp" && choice("marks.stampOrder", "Texture order", options(
|
|
175
|
-
marks === "particles" && shape === "stamp" && choice("marks.stampRotation", "Texture turn", options(
|
|
179
|
+
marks === "particles" && choice("marks.physics", "Particles", options(_chunkBY5EBP26cjs.PARTICLE_KINDS, PHYSICS_LABELS)),
|
|
180
|
+
marks === "particles" && choice("marks.render", "Drawn as", options(_chunkBY5EBP26cjs.PARTICLE_RENDERS, RENDER_LABELS)),
|
|
181
|
+
marks === "particles" && render === "ribbon" && choice("marks.ribbonPairs", "Ribbon joins", options(_chunkBY5EBP26cjs.RIBBON_PAIRS, { adjacent: "Neighbours", "first-last": "Outermost" })),
|
|
182
|
+
marks === "particles" && shape === "stamp" && choice("marks.stampOrder", "Texture order", options(_chunkBY5EBP26cjs.DOT_TEXTURE_ORDERS, { sequence: "In turn", random: "Random" })),
|
|
183
|
+
marks === "particles" && shape === "stamp" && choice("marks.stampRotation", "Texture turn", options(_chunkBY5EBP26cjs.DOT_ROTATIONS, { follow: "Follow motion", random: "Random", fixed: "Tip angle" })),
|
|
176
184
|
...particles.map((c) => slider(c)),
|
|
177
185
|
...objects.map((c) => slider(c))
|
|
178
186
|
]);
|
|
179
187
|
}
|
|
180
|
-
const feel =
|
|
188
|
+
const feel = _chunkF3KKR6DDcjs.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)));
|
|
181
189
|
add("feel", "Feel", [
|
|
182
190
|
...feel.map((c) => slider(c)),
|
|
183
191
|
toggle("dynamics.pressureSize", "Pressure \u2192 size"),
|
|
184
192
|
toggle("dynamics.pressureOpacity", "Pressure \u2192 opacity"),
|
|
185
|
-
choice("dynamics.rotation", "Rotation", options(
|
|
193
|
+
choice("dynamics.rotation", "Rotation", options(_chunkBY5EBP26cjs.BRUSH_ROTATIONS, ROTATION_LABELS))
|
|
186
194
|
]);
|
|
187
195
|
const surfaces = profile.surfaces;
|
|
188
|
-
const engineSliders = (_nullishCoalesce(_optionalChain([engineControls, 'optionalAccess',
|
|
189
|
-
const exchangeOk = (path) => !_optionalChain([path, 'optionalAccess',
|
|
190
|
-
add("behaviour", _nullishCoalesce(_optionalChain([engineControls, 'optionalAccess',
|
|
191
|
-
!isTool && surfaces.length > 1 && choice("behaviour.surface", "Surface", options(surfaces, SURFACE_LABELS), "dry"),
|
|
192
|
-
profile.grain
|
|
193
|
-
engine === "wet" && !isTool && choice("behaviour.wet.medium", "Medium", options(
|
|
194
|
-
engine === "impasto" && choice("behaviour.thick.applicator", "Tool", options(
|
|
196
|
+
const engineSliders = (engineOk ? _nullishCoalesce(_optionalChain([engineControls, 'optionalAccess', _12 => _12.sliders]), () => ( [])) : []).filter((c) => !/^(bristle|particle|sticker)\./.test(c.path) && c.path !== "light.amount" && c.path !== "impasto.rim" && c.path !== "impasto.clarity");
|
|
197
|
+
const exchangeOk = (path) => !_optionalChain([path, 'optionalAccess', _13 => _13.startsWith, 'call', _14 => _14("behaviour.exchange")]) || (path.startsWith("behaviour.exchange.reservoir") ? full(profile.reservoir) : exchangeFull);
|
|
198
|
+
add("behaviour", _nullishCoalesce(_optionalChain([engineControls, 'optionalAccess', _15 => _15.title]), () => ( "Behaviour")), [
|
|
199
|
+
!isTool && surfaces.length > 1 && !refused.has("behaviour.surface") && choice("behaviour.surface", "Surface", options(surfaces, SURFACE_LABELS), "dry"),
|
|
200
|
+
full(profile.grain) && slider({ path: "grain", label: "Grain", min: 0, max: 1, step: 0.01 }, "behaviour.grain"),
|
|
201
|
+
engine === "wet" && engineOk && !isTool && choice("behaviour.wet.medium", "Medium", options(_chunkBY5EBP26cjs.WET_MEDIA, WET_MEDIUM_LABELS), "watercolor"),
|
|
202
|
+
engine === "impasto" && engineOk && choice("behaviour.thick.applicator", "Tool", options(_chunkBY5EBP26cjs.IMPASTO_TOOLS, APPLICATOR_LABELS), "brush"),
|
|
195
203
|
...engineSliders.map((c) => exchangeOk(facetOf(c.path)) ? slider(c) : null),
|
|
196
|
-
_optionalChain([engineControls, 'optionalAccess',
|
|
197
|
-
_optionalChain([engineControls, 'optionalAccess',
|
|
198
|
-
engine === "mixer" && toggle("behaviour.exchange.reservoir.refill", "Load each stroke")
|
|
204
|
+
engineOk && _optionalChain([engineControls, 'optionalAccess', _16 => _16.mixingPath]) && (engine === "wet" || exchangeFull) && fieldOf("behaviour.mixing") && choice("behaviour.mixing", "Mixing", options(["pigment", "rgb"], { pigment: "Pigment", rgb: "RGB" })),
|
|
205
|
+
engineOk && _optionalChain([engineControls, 'optionalAccess', _17 => _17.dirty]) && exchangeFull && fieldOf("behaviour.exchange.dirty") && toggle("behaviour.exchange.dirty", "Dirty brush"),
|
|
206
|
+
engine === "mixer" && engineOk && full(profile.reservoir) && toggle("behaviour.exchange.reservoir.refill", "Load each stroke")
|
|
199
207
|
]);
|
|
200
|
-
if (!isTool && profile.light
|
|
208
|
+
if (!isTool && full(profile.light) && engineOk && _optionalChain([engineControls, 'optionalAccess', _18 => _18.light])) {
|
|
201
209
|
add("light", "Light", [
|
|
202
210
|
slider({ path: "light.amount", label: "Light", min: 0, max: 1, step: 0.01 }),
|
|
203
211
|
toggle("light.pressure", "Light follows pressure"),
|
|
204
212
|
...engine === "impasto" ? [slider({ path: "impasto.rim", label: "Rim", min: 0, max: 1, step: 0.01 }), slider({ path: "impasto.clarity", label: "Clarity", min: 0, max: 1, step: 0.01 })] : [],
|
|
205
|
-
withNote({ kind: "slider", path: "light.spill.radius", label: "Spill", ariaLabel: "Brush light spill", min: 0, max: 128, step: 1, value: _nullishCoalesce(_optionalChain([brush, 'access',
|
|
213
|
+
withNote({ kind: "slider", path: "light.spill.radius", label: "Spill", ariaLabel: "Brush light spill", min: 0, max: 128, step: 1, value: _nullishCoalesce(_optionalChain([brush, 'access', _19 => _19.light, 'optionalAccess', _20 => _20.spill, 'optionalAccess', _21 => _21.radius]), () => ( 24)) }),
|
|
206
214
|
toggle("light.glow", "Suggest a glow")
|
|
207
215
|
]);
|
|
208
216
|
}
|
|
209
|
-
if (profile.motion
|
|
217
|
+
if (full(profile.motion) && engineOk && marks === "particles") add("motion", "Motion", [slider({ path: "particle.waveSpeed", label: "Wave speed", min: 0, max: 1, step: 0.01 })]);
|
|
210
218
|
if (!isTool) {
|
|
211
|
-
const own = _optionalChain([brush, 'access',
|
|
219
|
+
const own = _optionalChain([brush, 'access', _22 => _22.colour, 'optionalAccess', _23 => _23.default]);
|
|
212
220
|
const hex = (c) => typeof c === "string" ? _nullishCoalesce(_chunkLRTR4ASZcjs.brushColourHex.call(void 0, c, "light"), () => ( null)) : null;
|
|
213
221
|
const pair = _chunkMLLTWAXHcjs.isDualColor.call(void 0, own) ? own : null;
|
|
214
222
|
add("colour", "Colour", [
|
|
215
|
-
withNote({ kind: "colour", path: "colour.default", label: "Default colour", ariaLabel: "Brush default colour", value: pair ? _nullishCoalesce(_chunkLRTR4ASZcjs.brushColourHex.call(void 0, pair, "light"), () => ( null)) : hex(own), dark: pair ? _nullishCoalesce(_chunkLRTR4ASZcjs.brushColourHex.call(void 0, pair, "dark"), () => ( null)) : null, gradient: own !== void 0 && typeof own === "object" && !pair }),
|
|
223
|
+
!refused.has("colour.default") && withNote({ kind: "colour", path: "colour.default", label: "Default colour", ariaLabel: "Brush default colour", value: pair ? _nullishCoalesce(_chunkLRTR4ASZcjs.brushColourHex.call(void 0, pair, "light"), () => ( null)) : hex(own), dark: pair ? _nullishCoalesce(_chunkLRTR4ASZcjs.brushColourHex.call(void 0, pair, "dark"), () => ( null)) : null, gradient: own !== void 0 && typeof own === "object" && !pair }),
|
|
216
224
|
withNote({
|
|
217
225
|
kind: "palette",
|
|
218
226
|
path: "colour.palette",
|
|
219
227
|
label: "Palette",
|
|
220
228
|
ariaLabel: "Brush palette",
|
|
221
|
-
value: (_nullishCoalesce(_optionalChain([brush, 'access',
|
|
222
|
-
max:
|
|
229
|
+
value: (_nullishCoalesce(_optionalChain([brush, 'access', _24 => _24.colour, 'optionalAccess', _25 => _25.palette]), () => ( []))).flatMap((c) => _chunkMLLTWAXHcjs.isDualColor.call(void 0, c) ? [{ light: _chunkLRTR4ASZcjs.brushColourHex.call(void 0, c, "light"), dark: _chunkLRTR4ASZcjs.brushColourHex.call(void 0, c, "dark") }] : hex(c) ? [hex(c)] : []),
|
|
230
|
+
max: _chunkBY5EBP26cjs.MAX_BRUSH_PALETTE
|
|
223
231
|
}),
|
|
224
232
|
toggle("colour.own", "Always its own colour")
|
|
225
233
|
]);
|
|
226
234
|
}
|
|
227
235
|
return sections;
|
|
228
236
|
}
|
|
237
|
+
var MARKS_WORDS = { particles: "particle marks", objects: "sticker marks", continuous: "continuous marks" };
|
|
238
|
+
function hiddenLabel(issue, b) {
|
|
239
|
+
switch (issue.facet) {
|
|
240
|
+
case "kind":
|
|
241
|
+
case "tool":
|
|
242
|
+
return b.kind === "tool" ? `the ${(_nullishCoalesce(_nullishCoalesce(TOOL_LABELS[b.tool], () => ( b.tool)), () => ( "tool"))).toLowerCase()} tool` : "its marks";
|
|
243
|
+
case "tip.shape":
|
|
244
|
+
return `a ${b.tip.shape} tip`;
|
|
245
|
+
case "marks":
|
|
246
|
+
return _nullishCoalesce(MARKS_WORDS[_nullishCoalesce(_optionalChain([b, 'access', _26 => _26.marks, 'optionalAccess', _27 => _27.kind]), () => ( "continuous"))], () => ( "its marks"));
|
|
247
|
+
case "behaviour.surface":
|
|
248
|
+
return `${_nullishCoalesce(_optionalChain([b, 'access', _28 => _28.behaviour, 'optionalAccess', _29 => _29.surface]), () => ( "dry"))} behaviour`;
|
|
249
|
+
case "behaviour.exchange.reservoir":
|
|
250
|
+
return "a Mixer Brush reservoir";
|
|
251
|
+
case "behaviour.exchange":
|
|
252
|
+
return "paint pick-up";
|
|
253
|
+
case "behaviour.grain":
|
|
254
|
+
return "paper grain";
|
|
255
|
+
case "light":
|
|
256
|
+
return "light";
|
|
257
|
+
case "motion":
|
|
258
|
+
return "motion";
|
|
259
|
+
case "dynamics.velocity":
|
|
260
|
+
return "velocity dynamics";
|
|
261
|
+
case "dynamics.tilt":
|
|
262
|
+
return "tilt dynamics";
|
|
263
|
+
case "colour.default":
|
|
264
|
+
return `a ${_chunkBY5EBP26cjs.brushColourKind.call(void 0, b.colour.default)} default colour`;
|
|
265
|
+
default:
|
|
266
|
+
return null;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
var sentence = (words) => words.length < 2 ? _nullishCoalesce(words[0], () => ( "")) : `${words.slice(0, -1).join(", ")} and ${words.at(-1)}`;
|
|
270
|
+
function brushEditorScope(brush, profile = _chunkBY5EBP26cjs.PAINT_PROFILE) {
|
|
271
|
+
const hidden = [];
|
|
272
|
+
for (const issue of _chunkBY5EBP26cjs.checkBrush.call(void 0, brush, profile).issues) {
|
|
273
|
+
const label = hiddenLabel(issue, brush);
|
|
274
|
+
if (label && !hidden.some((h) => h.label === label)) hidden.push({ facet: issue.facet, label });
|
|
275
|
+
}
|
|
276
|
+
return { hidden, note: hidden.length ? `Also has ${sentence(hidden.map((h) => h.label))}, which ${profile.name} can't use.` : null };
|
|
277
|
+
}
|
|
278
|
+
function brushIdFromName(name) {
|
|
279
|
+
return name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 60) || "brush";
|
|
280
|
+
}
|
|
281
|
+
function newBrushFor(profile, from, name = "New brush") {
|
|
282
|
+
const id = brushIdFromName(name);
|
|
283
|
+
const base = { id, name, kind: profile.kinds.includes("mark") ? "mark" : profile.kinds[0], ...profile.kinds.includes("mark") ? {} : { tool: profile.tools[0] }, tip: { shape: profile.tipShapes.includes("round") ? "round" : profile.tipShapes[0] } };
|
|
284
|
+
if (from) {
|
|
285
|
+
const stripped = _chunkBY5EBP26cjs.degrade.call(void 0, from, profile, { ignored: true });
|
|
286
|
+
if (!stripped.issues.length) return { ...stripped.brush, id, name };
|
|
287
|
+
}
|
|
288
|
+
return base;
|
|
289
|
+
}
|
|
290
|
+
async function saveBrushEdit(library, options2) {
|
|
291
|
+
const { original, profile } = options2;
|
|
292
|
+
const check = _chunkBY5EBP26cjs.checkBrushEdit.call(void 0, original, options2.brush, profile);
|
|
293
|
+
if (!check.ok) {
|
|
294
|
+
const errors = check.issues.filter((i) => i.severity === "error").map((i) => `${i.facet}: ${i.reason} ${i.fix}`);
|
|
295
|
+
throw new (0, _chunkBY5EBP26cjs.BrushLibraryError)("invalid", `${profile.name} can't use this brush: ${errors.join(" ")} Nothing was saved.`);
|
|
296
|
+
}
|
|
297
|
+
const inPlace = !!original && options2.name === void 0 && !library.isBuiltin(original.id) && original.id === options2.brush.id && !!await library.get(original.id);
|
|
298
|
+
let brush = options2.brush;
|
|
299
|
+
if (!inPlace) {
|
|
300
|
+
const name = ((_nullishCoalesce(options2.name, () => ( (original ? `${original.name} copy` : brush.name)))).trim() || "Brush").slice(0, 80);
|
|
301
|
+
const stem = brushIdFromName(name).slice(0, 56);
|
|
302
|
+
let id = stem;
|
|
303
|
+
for (let n = 2; library.isBuiltin(id) || await library.get(id); n++) id = `${stem}-${n}`;
|
|
304
|
+
brush = { ...brush, id, name };
|
|
305
|
+
}
|
|
306
|
+
const saved = await library.save(brush, { overwrite: inPlace });
|
|
307
|
+
return { ...saved, kept: check.kept };
|
|
308
|
+
}
|
|
229
309
|
function setBrushEditorValue(brush, path, value) {
|
|
230
310
|
const next = JSON.parse(JSON.stringify(brush));
|
|
231
311
|
if (path === "kind") {
|
|
@@ -248,13 +328,13 @@ function setBrushEditorValue(brush, path, value) {
|
|
|
248
328
|
if (value !== "bristle") delete next.tip.bristle;
|
|
249
329
|
} else if (value === void 0 || value === "") {
|
|
250
330
|
const keys = path.split(".");
|
|
251
|
-
const parent =
|
|
331
|
+
const parent = _chunkBY5EBP26cjs.getPath.call(void 0, next, keys.slice(0, -1).join("."));
|
|
252
332
|
if (keys.length === 1) delete next[keys[0]];
|
|
253
333
|
else if (parent) delete parent[keys[keys.length - 1]];
|
|
254
|
-
} else
|
|
334
|
+
} else _chunkBY5EBP26cjs.setPath.call(void 0, next, path, value);
|
|
255
335
|
const problems = [];
|
|
256
336
|
try {
|
|
257
|
-
return { brush:
|
|
337
|
+
return { brush: _chunkBY5EBP26cjs.normalizeBrushSpec.call(void 0, JSON.parse(JSON.stringify(next)), problems), problems };
|
|
258
338
|
} catch (e) {
|
|
259
339
|
return { brush, problems: [e.message] };
|
|
260
340
|
}
|
|
@@ -270,7 +350,7 @@ function brushLibraryGroups(entries, filter = {}) {
|
|
|
270
350
|
const text = words([b.id, b.name, _nullishCoalesce(b.variety, () => ( "")), _nullishCoalesce(b.medium, () => ( "")), _nullishCoalesce(b.tool, () => ( "")), ..._nullishCoalesce(b.tags, () => ( []))].join(" "));
|
|
271
351
|
if (!wanted.every((w) => text.some((t) => t.startsWith(w)))) continue;
|
|
272
352
|
}
|
|
273
|
-
if (filter.profile && !
|
|
353
|
+
if (filter.profile && !_chunkBY5EBP26cjs.checkBrush.call(void 0, b, filter.profile).ok) continue;
|
|
274
354
|
const id = b.kind === "tool" ? "tools" : _nullishCoalesce(b.medium, () => ( "other"));
|
|
275
355
|
let g = groups.get(id);
|
|
276
356
|
if (!g) groups.set(id, g = { id, title: id === "tools" ? "Tools" : id === "other" ? "Other" : MEDIUM_LABELS[id], varieties: [] });
|
|
@@ -292,11 +372,11 @@ var BRUSH_PROFILE_JSON_SCHEMA = {
|
|
|
292
372
|
properties: {
|
|
293
373
|
id: { type: "string", description: "paint, image, canvas, vector\u2026" },
|
|
294
374
|
name: { type: "string", description: "Display name, used in messages." },
|
|
295
|
-
kinds: { type: "array", items: { type: "string", enum: [...
|
|
296
|
-
tools: { type: "array", items: { type: "string", enum: [...
|
|
297
|
-
tipShapes: { type: "array", items: { type: "string", enum: [...
|
|
298
|
-
marks: { type: "array", items: { type: "string", enum: [...
|
|
299
|
-
surfaces: { type: "array", items: { type: "string", enum: [...
|
|
375
|
+
kinds: { type: "array", items: { type: "string", enum: [..._chunkBY5EBP26cjs.BRUSH_KINDS] }, description: "Brush kinds it has." },
|
|
376
|
+
tools: { type: "array", items: { type: "string", enum: [..._chunkBY5EBP26cjs.BRUSH_TOOLS] }, description: "Tools it has (kind tool)." },
|
|
377
|
+
tipShapes: { type: "array", items: { type: "string", enum: [..._chunkBY5EBP26cjs.BRUSH_TIP_SHAPES] }, description: "Tip shapes it renders." },
|
|
378
|
+
marks: { type: "array", items: { type: "string", enum: [..._chunkBY5EBP26cjs.BRUSH_MARKS_KINDS] }, description: "Marks kinds it renders." },
|
|
379
|
+
surfaces: { type: "array", items: { type: "string", enum: [..._chunkBY5EBP26cjs.BRUSH_SURFACES] }, description: "Surfaces it renders." },
|
|
300
380
|
exchange: { ...SUPPORT, description: "Picking paint up and mixing it in." },
|
|
301
381
|
reservoir: { ...SUPPORT, description: "The Mixer Brush reservoir." },
|
|
302
382
|
grain: { ...SUPPORT, description: "Paper grain response." },
|
|
@@ -321,7 +401,7 @@ var BRUSH_LIBRARY_FILE_JSON_SCHEMA = {
|
|
|
321
401
|
additionalProperties: false
|
|
322
402
|
};
|
|
323
403
|
function migrationInputs() {
|
|
324
|
-
const pick = (id) =>
|
|
404
|
+
const pick = (id) => _chunkBY5EBP26cjs.brushToJSON.call(void 0, _chunkBY5EBP26cjs.BUILTIN_BRUSHES.find((b) => b.id === id));
|
|
325
405
|
return [
|
|
326
406
|
{ id: "plain", name: "Plain" },
|
|
327
407
|
pick("pencil-6b"),
|
|
@@ -343,34 +423,34 @@ function migrationInputs() {
|
|
|
343
423
|
function editorSectionFixtures() {
|
|
344
424
|
const ids = ["highlighter", "chalk", "watercolor-wash", "hair-strands", "mixer-brush", "blender", "spray-can"];
|
|
345
425
|
return ids.flatMap(
|
|
346
|
-
(id) => Object.keys(
|
|
347
|
-
const brush =
|
|
348
|
-
return { brush: id, host, sections: brushEditorSections(brush,
|
|
426
|
+
(id) => Object.keys(_chunkBY5EBP26cjs.BRUSH_HOST_PROFILES).map((host) => {
|
|
427
|
+
const brush = _chunkBY5EBP26cjs.BRUSH_PRESETS.find((b) => b.id === id);
|
|
428
|
+
return { brush: id, host, sections: brushEditorSections(brush, _chunkBY5EBP26cjs.BRUSH_HOST_PROFILES[host]) };
|
|
349
429
|
})
|
|
350
430
|
);
|
|
351
431
|
}
|
|
352
432
|
function toolDefinitions() {
|
|
353
|
-
const library =
|
|
354
|
-
const toolsFor = (host) =>
|
|
433
|
+
const library = _chunkBY5EBP26cjs.createBrushLibrary.call(void 0, );
|
|
434
|
+
const toolsFor = (host) => _chunkF3KKR6DDcjs.createBrushLibraryTools.call(void 0, library, { profile: _chunkBY5EBP26cjs.BRUSH_HOST_PROFILES[host], renderPreview: () => ({ data: "", mimeType: "image/png" }) });
|
|
355
435
|
return {
|
|
356
436
|
tools: toolsFor("paint").map((t) => ({ name: t.name, title: t.title, description: t.description, inputSchema: t.inputSchema, annotations: t.annotations })),
|
|
357
|
-
hosts: Object.fromEntries(Object.keys(
|
|
437
|
+
hosts: Object.fromEntries(Object.keys(_chunkBY5EBP26cjs.BRUSH_HOST_PROFILES).map((host) => [host, toolsFor(host).map((t) => t.name)]))
|
|
358
438
|
};
|
|
359
439
|
}
|
|
360
440
|
function brushContracts() {
|
|
361
|
-
const presets =
|
|
362
|
-
const resolved =
|
|
363
|
-
const profiles = Object.values(
|
|
364
|
-
const checks =
|
|
441
|
+
const presets = _chunkBY5EBP26cjs.BRUSH_PRESETS.map((b) => JSON.parse(JSON.stringify(b)));
|
|
442
|
+
const resolved = _chunkBY5EBP26cjs.BRUSH_PRESETS.map((b) => ({ id: b.id, engine: _chunkBY5EBP26cjs.resolveEngine.call(void 0, b), category: _chunkBY5EBP26cjs.resolveCategory.call(void 0, b), brush: _chunkBY5EBP26cjs.brushToJSON.call(void 0, _chunkBY5EBP26cjs.resolveBrush.call(void 0, b)) }));
|
|
443
|
+
const profiles = Object.values(_chunkBY5EBP26cjs.BRUSH_HOST_PROFILES);
|
|
444
|
+
const checks = _chunkBY5EBP26cjs.BRUSH_PRESETS.map((b) => ({
|
|
365
445
|
id: b.id,
|
|
366
446
|
hosts: Object.fromEntries(profiles.map((p) => {
|
|
367
|
-
const c =
|
|
447
|
+
const c = _chunkBY5EBP26cjs.checkBrush.call(void 0, b, p);
|
|
368
448
|
return [p.id, { ok: c.ok, issues: c.issues.map(({ facet, severity }) => ({ facet, severity })) }];
|
|
369
449
|
}))
|
|
370
450
|
}));
|
|
371
|
-
const migrations = migrationInputs().map((input) => ({ input, output:
|
|
451
|
+
const migrations = migrationInputs().map((input) => ({ input, output: _chunkBY5EBP26cjs.migrateBrushV1.call(void 0, input), resolved: _chunkBY5EBP26cjs.brushToJSON.call(void 0, _chunkBY5EBP26cjs.resolveBrush.call(void 0, _chunkBY5EBP26cjs.migrateBrushV1.call(void 0, input))), engine: _chunkBY5EBP26cjs.normalizePaintBrush.call(void 0, input).engine }));
|
|
372
452
|
const files = {
|
|
373
|
-
"brush.schema.json": { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "brush.schema.json", ...
|
|
453
|
+
"brush.schema.json": { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "brush.schema.json", ..._chunkBY5EBP26cjs.BRUSH_JSON_SCHEMA },
|
|
374
454
|
"profile.schema.json": { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "profile.schema.json", ...BRUSH_PROFILE_JSON_SCHEMA },
|
|
375
455
|
"library-file.schema.json": { $schema: "https://json-schema.org/draft/2020-12/schema", $id: "library-file.schema.json", ...BRUSH_LIBRARY_FILE_JSON_SCHEMA },
|
|
376
456
|
"presets.json": presets,
|
|
@@ -384,7 +464,7 @@ function brushContracts() {
|
|
|
384
464
|
files["manifest.json"] = {
|
|
385
465
|
domain: "brushes",
|
|
386
466
|
formatVersion: BRUSH_CONTRACT_FORMAT_VERSION,
|
|
387
|
-
limits: { maxPalette:
|
|
467
|
+
limits: { maxPalette: _chunkBY5EBP26cjs.MAX_BRUSH_PALETTE },
|
|
388
468
|
counts: { presets: presets.length, profiles: profiles.length, migrations: migrations.length, editorSections: files["editor-sections.json"].length },
|
|
389
469
|
files: Object.keys(files).sort()
|
|
390
470
|
};
|
|
@@ -437,4 +517,11 @@ function brushContracts() {
|
|
|
437
517
|
|
|
438
518
|
|
|
439
519
|
|
|
440
|
-
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
exports.BRUSH_CONTRACT_FORMAT_VERSION = BRUSH_CONTRACT_FORMAT_VERSION; exports.BRUSH_FACET_SCHEMAS = _chunkBY5EBP26cjs.BRUSH_FACET_SCHEMAS; exports.BRUSH_HOST_PROFILES = _chunkBY5EBP26cjs.BRUSH_HOST_PROFILES; exports.BRUSH_JSON_SCHEMA = _chunkBY5EBP26cjs.BRUSH_JSON_SCHEMA; exports.BRUSH_KINDS = _chunkBY5EBP26cjs.BRUSH_KINDS; exports.BRUSH_LIBRARY_FILE_JSON_SCHEMA = BRUSH_LIBRARY_FILE_JSON_SCHEMA; exports.BRUSH_MARKS_KINDS = _chunkBY5EBP26cjs.BRUSH_MARKS_KINDS; exports.BRUSH_MEDIA = _chunkBY5EBP26cjs.BRUSH_MEDIA; exports.BRUSH_PATCH_PROPERTIES = _chunkF3KKR6DDcjs.BRUSH_PATCH_PROPERTIES; exports.BRUSH_PRESETS = _chunkBY5EBP26cjs.BRUSH_PRESETS; exports.BRUSH_PROFILE_JSON_SCHEMA = BRUSH_PROFILE_JSON_SCHEMA; exports.BRUSH_SURFACES = _chunkBY5EBP26cjs.BRUSH_SURFACES; exports.BRUSH_TIP_SHAPES = _chunkBY5EBP26cjs.BRUSH_TIP_SHAPES; exports.BRUSH_TOOLS = _chunkBY5EBP26cjs.BRUSH_TOOLS; exports.BRUSH_UNSET_PROPERTY = _chunkF3KKR6DDcjs.BRUSH_UNSET_PROPERTY; exports.BRUSH_WORD = _chunkBY5EBP26cjs.BRUSH_WORD; exports.BrushLibraryError = _chunkBY5EBP26cjs.BrushLibraryError; exports.CANVAS_PROFILE = _chunkBY5EBP26cjs.CANVAS_PROFILE; exports.IMAGE_PROFILE = _chunkBY5EBP26cjs.IMAGE_PROFILE; exports.MAX_BRUSH_PALETTE = _chunkBY5EBP26cjs.MAX_BRUSH_PALETTE; exports.PAINT_PROFILE = _chunkBY5EBP26cjs.PAINT_PROFILE; exports.UNSETTABLE_BRUSH_FACETS = _chunkF3KKR6DDcjs.UNSETTABLE_BRUSH_FACETS; exports.VECTOR_PROFILE = _chunkBY5EBP26cjs.VECTOR_PROFILE; exports.WET_BRUSH_TOOLS = _chunkBY5EBP26cjs.WET_BRUSH_TOOLS; exports.brushColourHex = _chunkLRTR4ASZcjs.brushColourHex; exports.brushColourKind = _chunkBY5EBP26cjs.brushColourKind; exports.brushContracts = brushContracts; exports.brushEditorScope = brushEditorScope; exports.brushEditorSections = brushEditorSections; exports.brushIdFromName = brushIdFromName; exports.brushLibraryGroups = brushLibraryGroups; exports.changedBrushPaths = _chunkF3KKR6DDcjs.changedBrushPaths; exports.checkBrush = _chunkBY5EBP26cjs.checkBrush; exports.checkBrushEdit = _chunkBY5EBP26cjs.checkBrushEdit; exports.createBrushLibrary = _chunkBY5EBP26cjs.createBrushLibrary; exports.createBrushLibraryToolProvider = _chunkF3KKR6DDcjs.createBrushLibraryToolProvider; exports.createBrushLibraryTools = _chunkF3KKR6DDcjs.createBrushLibraryTools; exports.degrade = _chunkBY5EBP26cjs.degrade; exports.isBrushLibrary = _chunkBY5EBP26cjs.isBrushLibrary; exports.listPresets = _chunkBY5EBP26cjs.listPresets; exports.mergeBrushPatch = _chunkF3KKR6DDcjs.mergeBrushPatch; exports.migrateBrushV1 = _chunkBY5EBP26cjs.migrateBrushV1; exports.newBrushFor = newBrushFor; exports.normalizeBrushSpec = _chunkBY5EBP26cjs.normalizeBrushSpec; exports.parseBrushLibrary = _chunkBY5EBP26cjs.parseBrushLibrary2; exports.resolveBrush = _chunkBY5EBP26cjs.resolveBrush; exports.resolveCategory = _chunkBY5EBP26cjs.resolveCategory; exports.resolveEngine = _chunkBY5EBP26cjs.resolveEngine; exports.resolveWetMedium = _chunkBY5EBP26cjs.resolveWetMedium; exports.saveBrushEdit = saveBrushEdit; exports.setBrushEditorValue = setBrushEditorValue; exports.snapshotBrushLibrary = _chunkBY5EBP26cjs.snapshotBrushLibrary; exports.withKeptIssues = _chunkBY5EBP26cjs.withKeptIssues;
|
package/dist/brushes/index.d.cts
CHANGED
|
@@ -16,8 +16,8 @@ export { migrateBrushV1 } from './migrate.cjs';
|
|
|
16
16
|
export { BRUSH_PRESETS } from './presets.cjs';
|
|
17
17
|
export { brushColourHex } from './colour.cjs';
|
|
18
18
|
export { BRUSH_CONTRACT_FORMAT_VERSION, BRUSH_LIBRARY_FILE_JSON_SCHEMA, BRUSH_PROFILE_JSON_SCHEMA, brushContracts } from './contract.cjs';
|
|
19
|
-
export { BRUSH_HOST_PROFILES, brushColourKind, CANVAS_PROFILE, checkBrush, degrade, IMAGE_PROFILE, listPresets, PAINT_PROFILE, VECTOR_PROFILE, type BrushCheck, type BrushColourKind, type BrushHostProfile, type BrushIssue, type BrushSupport, type DegradedBrush } from './profiles.cjs';
|
|
20
|
-
export { BrushLibraryError, createBrushLibrary, parseBrushLibrary, snapshotBrushLibrary, type BrushFilter, type BrushLibrary, type BrushLibraryEntry, type BrushLibraryErrorCode, type BrushLibraryFile, type BrushLibrarySnapshot, type BrushLibraryOptions, type ImportBrushesResult, type SaveBrushResult, } from './library.cjs';
|
|
19
|
+
export { BRUSH_HOST_PROFILES, brushColourKind, CANVAS_PROFILE, checkBrush, checkBrushEdit, degrade, withKeptIssues, IMAGE_PROFILE, listPresets, PAINT_PROFILE, VECTOR_PROFILE, type BrushCheck, type BrushEditCheck, type BrushColourKind, type BrushHostProfile, type BrushIssue, type BrushSupport, type DegradedBrush } from './profiles.cjs';
|
|
20
|
+
export { BrushLibraryError, createBrushLibrary, isBrushLibrary, parseBrushLibrary, snapshotBrushLibrary, type BrushFilter, type BrushLibrary, type BrushLibraryEntry, type BrushLibraryErrorCode, type BrushLibraryFile, type BrushLibrarySnapshot, type BrushLibraryOptions, type ImportBrushesResult, type SaveBrushResult, } from './library.cjs';
|
|
21
21
|
export { BRUSH_PATCH_PROPERTIES, BRUSH_UNSET_PROPERTY, changedBrushPaths, mergeBrushPatch, UNSETTABLE_BRUSH_FACETS, type BrushPatch, type UnsettableBrushFacet } from './patch.cjs';
|
|
22
|
-
export { brushEditorSections, brushLibraryGroups, setBrushEditorValue, type BrushEditorControl, type BrushEditorSection, type BrushEditorSectionId, type BrushLibraryGroup } from './ui.cjs';
|
|
22
|
+
export { brushEditorScope, brushEditorSections, brushIdFromName, brushLibraryGroups, newBrushFor, saveBrushEdit, setBrushEditorValue, type BrushEditorHiddenFacet, type BrushEditorScope, type SaveBrushEditOptions, type SaveBrushEditResult, type BrushEditorControl, type BrushEditorSection, type BrushEditorSectionId, type BrushLibraryGroup, } from './ui.cjs';
|
|
23
23
|
export { createBrushLibraryToolProvider, createBrushLibraryTools, type BrushLibraryToolProviderOptions, type BrushPreviewImage, type BrushPreviewRenderer } from './tools.cjs';
|
package/dist/brushes/index.d.ts
CHANGED
|
@@ -16,8 +16,8 @@ export { migrateBrushV1 } from './migrate.js';
|
|
|
16
16
|
export { BRUSH_PRESETS } from './presets.js';
|
|
17
17
|
export { brushColourHex } from './colour.js';
|
|
18
18
|
export { BRUSH_CONTRACT_FORMAT_VERSION, BRUSH_LIBRARY_FILE_JSON_SCHEMA, BRUSH_PROFILE_JSON_SCHEMA, brushContracts } from './contract.js';
|
|
19
|
-
export { BRUSH_HOST_PROFILES, brushColourKind, CANVAS_PROFILE, checkBrush, degrade, IMAGE_PROFILE, listPresets, PAINT_PROFILE, VECTOR_PROFILE, type BrushCheck, type BrushColourKind, type BrushHostProfile, type BrushIssue, type BrushSupport, type DegradedBrush } from './profiles.js';
|
|
20
|
-
export { BrushLibraryError, createBrushLibrary, parseBrushLibrary, snapshotBrushLibrary, type BrushFilter, type BrushLibrary, type BrushLibraryEntry, type BrushLibraryErrorCode, type BrushLibraryFile, type BrushLibrarySnapshot, type BrushLibraryOptions, type ImportBrushesResult, type SaveBrushResult, } from './library.js';
|
|
19
|
+
export { BRUSH_HOST_PROFILES, brushColourKind, CANVAS_PROFILE, checkBrush, checkBrushEdit, degrade, withKeptIssues, IMAGE_PROFILE, listPresets, PAINT_PROFILE, VECTOR_PROFILE, type BrushCheck, type BrushEditCheck, type BrushColourKind, type BrushHostProfile, type BrushIssue, type BrushSupport, type DegradedBrush } from './profiles.js';
|
|
20
|
+
export { BrushLibraryError, createBrushLibrary, isBrushLibrary, parseBrushLibrary, snapshotBrushLibrary, type BrushFilter, type BrushLibrary, type BrushLibraryEntry, type BrushLibraryErrorCode, type BrushLibraryFile, type BrushLibrarySnapshot, type BrushLibraryOptions, type ImportBrushesResult, type SaveBrushResult, } from './library.js';
|
|
21
21
|
export { BRUSH_PATCH_PROPERTIES, BRUSH_UNSET_PROPERTY, changedBrushPaths, mergeBrushPatch, UNSETTABLE_BRUSH_FACETS, type BrushPatch, type UnsettableBrushFacet } from './patch.js';
|
|
22
|
-
export { brushEditorSections, brushLibraryGroups, setBrushEditorValue, type BrushEditorControl, type BrushEditorSection, type BrushEditorSectionId, type BrushLibraryGroup } from './ui.js';
|
|
22
|
+
export { brushEditorScope, brushEditorSections, brushIdFromName, brushLibraryGroups, newBrushFor, saveBrushEdit, setBrushEditorValue, type BrushEditorHiddenFacet, type BrushEditorScope, type SaveBrushEditOptions, type SaveBrushEditResult, type BrushEditorControl, type BrushEditorSection, type BrushEditorSectionId, type BrushLibraryGroup, } from './ui.js';
|
|
23
23
|
export { createBrushLibraryToolProvider, createBrushLibraryTools, type BrushLibraryToolProviderOptions, type BrushPreviewImage, type BrushPreviewRenderer } from './tools.js';
|