@pixerate/editor-react 0.200.0 → 0.201.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/brushes/BrushEditor.d.cts +1 -1
- package/dist/brushes/BrushEditor.d.ts +1 -1
- package/dist/brushes/BrushLibraryBrowser.d.cts +1 -1
- package/dist/brushes/BrushLibraryBrowser.d.ts +1 -1
- package/dist/brushes/index.cjs +8 -5
- package/dist/brushes/index.js +2 -2
- package/dist/{chunk-JYWF6IGM.js → chunk-HOFRSMB6.js} +2 -2
- package/dist/{chunk-GUBRH2OO.js → chunk-IYYUBI3M.js} +8 -5
- package/dist/{chunk-2QXGKOVK.js → chunk-QYARM2FN.js} +1 -1
- package/dist/image-editor/index.cjs +8 -5
- package/dist/image-editor/index.js +3 -3
- package/dist/index.cjs +8 -5
- package/dist/index.js +3 -3
- package/dist/paint-editor/BrushPanel.d.cts +5 -1
- package/dist/paint-editor/BrushPanel.d.ts +5 -1
- package/dist/paint-editor/PaintEditor.d.cts +3 -2
- package/dist/paint-editor/PaintEditor.d.ts +3 -2
- package/dist/paint-editor/PaperPanel.d.cts +2 -1
- package/dist/paint-editor/PaperPanel.d.ts +2 -1
- package/dist/paint-editor/SpecialtyPanel.d.cts +24 -0
- package/dist/paint-editor/SpecialtyPanel.d.ts +24 -0
- package/dist/paint-editor/index.cjs +907 -836
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +555 -489
- package/dist/vector/index.cjs +8 -5
- package/dist/vector/index.js +2 -2
- package/package.json +3 -3
|
@@ -38,7 +38,7 @@ export interface BrushEditorProps {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Edits a brush by its facets (`brushEditorSections`): Medium, Shape, Marks, Feel, Behaviour,
|
|
41
|
-
* Light, Motion and Colour, each control a facet, with a live preview stroke, "Save" and "Save
|
|
41
|
+
* Light, Specialty (opt-in specialty paint, with how to use each once it is on), Motion and Colour, each control a facet, with a live preview stroke, "Save" and "Save
|
|
42
42
|
* as". It needs no editor controller, so every host that paints uses it. Only what the host
|
|
43
43
|
* profile uses is shown; what the brush has for other hosts is kept and named
|
|
44
44
|
* (`brushEditorScope`). `BrushLibraryEditor` wires it to a brush library.
|
|
@@ -38,7 +38,7 @@ export interface BrushEditorProps {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Edits a brush by its facets (`brushEditorSections`): Medium, Shape, Marks, Feel, Behaviour,
|
|
41
|
-
* Light, Motion and Colour, each control a facet, with a live preview stroke, "Save" and "Save
|
|
41
|
+
* Light, Specialty (opt-in specialty paint, with how to use each once it is on), Motion and Colour, each control a facet, with a live preview stroke, "Save" and "Save
|
|
42
42
|
* as". It needs no editor controller, so every host that paints uses it. Only what the host
|
|
43
43
|
* profile uses is shown; what the brush has for other hosts is kept and named
|
|
44
44
|
* (`brushEditorScope`). `BrushLibraryEditor` wires it to a brush library.
|
|
@@ -19,6 +19,6 @@ export interface BrushLibraryBrowserProps {
|
|
|
19
19
|
thumbnailHeight?: number;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
/** The brush library grouped by medium, then variety, with tools as their own
|
|
22
|
+
/** The brush library grouped by medium, then variety, with specialty paint (by kind) and tools as their own groups, and a filter (`brushLibraryGroups`). */
|
|
23
23
|
export declare const BrushLibraryBrowser: React.FC<BrushLibraryBrowserProps>;
|
|
24
24
|
export {};
|
|
@@ -19,6 +19,6 @@ export interface BrushLibraryBrowserProps {
|
|
|
19
19
|
thumbnailHeight?: number;
|
|
20
20
|
className?: string;
|
|
21
21
|
}
|
|
22
|
-
/** The brush library grouped by medium, then variety, with tools as their own
|
|
22
|
+
/** The brush library grouped by medium, then variety, with specialty paint (by kind) and tools as their own groups, and a filter (`brushLibraryGroups`). */
|
|
23
23
|
export declare const BrushLibraryBrowser: React.FC<BrushLibraryBrowserProps>;
|
|
24
24
|
export {};
|
package/dist/brushes/index.cjs
CHANGED
|
@@ -141,6 +141,7 @@ var BrushEditor = ({ brush, profile = import_brushes.PAINT_PROFILE, onChange, pr
|
|
|
141
141
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "font-medium text-slate-300", children: s.title }),
|
|
142
142
|
s.controls.map((c) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react2.default.Fragment, { children: [
|
|
143
143
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(EditorControl, { control: c, onSet: set }),
|
|
144
|
+
c.hint && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-[10px] leading-snug text-slate-400", "data-hint": c.path, children: c.hint }),
|
|
144
145
|
addSource && (c.path === "tip.stamps" || c.path === "tip.grain.source") && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AddImage, { label: c.path === "tip.stamps" ? "Add image tip\u2026" : "Add grain image\u2026", onFile: (f) => addSource(f, c.path === "tip.stamps" ? "tip" : "grain") })
|
|
145
146
|
] }, c.path)),
|
|
146
147
|
renderExtra?.(s.id)
|
|
@@ -266,10 +267,12 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
266
267
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `flex flex-col gap-1 ${className ?? ""}`, "data-testid": "brush-library", children: [
|
|
267
268
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("input", { type: "search", value: text, placeholder: "Find a brush", "aria-label": "Find a brush", onChange: (e) => setText(e.target.value), className: "rounded bg-slate-800 px-1.5 py-0.5" }),
|
|
268
269
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col gap-1.5", role: "listbox", "aria-label": "Brushes", children: [
|
|
269
|
-
groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { role: "group", "aria-label": g.title, className:
|
|
270
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className:
|
|
271
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap(
|
|
272
|
-
|
|
270
|
+
groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { role: "group", "aria-label": g.title, "data-group": g.id, className: `flex flex-col gap-0.5 ${g.id === "specialty" ? "mt-1 border-t border-indigo-500/40 pt-1" : ""}`, children: [
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: `text-[10px] uppercase tracking-wide ${g.id === "specialty" ? "text-indigo-300" : "text-slate-500"}`, children: g.title }),
|
|
272
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap((v) => [
|
|
273
|
+
// Specialty paint is listed by kind (Ferrofluid, UV-fluorescent…).
|
|
274
|
+
...g.id === "specialty" ? [/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "col-span-2 text-[10px] text-slate-400", children: v.title }, `kind-${v.variety}`)] : [],
|
|
275
|
+
...v.entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
273
276
|
"button",
|
|
274
277
|
{
|
|
275
278
|
type: "button",
|
|
@@ -285,7 +288,7 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
285
288
|
},
|
|
286
289
|
e.brush.id
|
|
287
290
|
))
|
|
288
|
-
) })
|
|
291
|
+
]) })
|
|
289
292
|
] }, g.id)),
|
|
290
293
|
!groups.length && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-slate-500", children: "No brush matches." })
|
|
291
294
|
] })
|
package/dist/brushes/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BrushLibraryEditor,
|
|
3
3
|
useBrushLibrary
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-QYARM2FN.js";
|
|
5
5
|
import {
|
|
6
6
|
BrushEditor,
|
|
7
7
|
BrushLibraryBrowser
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-IYYUBI3M.js";
|
|
9
9
|
export {
|
|
10
10
|
BrushEditor,
|
|
11
11
|
BrushLibraryBrowser,
|
|
@@ -44,10 +44,10 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
BrushLibraryEditor,
|
|
46
46
|
useBrushLibrary
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-QYARM2FN.js";
|
|
48
48
|
import {
|
|
49
49
|
BrushLibraryBrowser
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-IYYUBI3M.js";
|
|
51
51
|
|
|
52
52
|
// src/image-editor/useImageEditor.ts
|
|
53
53
|
import { useRef, useState, useEffect, useCallback, useMemo } from "react";
|
|
@@ -23,10 +23,12 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
23
23
|
return /* @__PURE__ */ jsxs("div", { className: `flex flex-col gap-1 ${className ?? ""}`, "data-testid": "brush-library", children: [
|
|
24
24
|
/* @__PURE__ */ jsx("input", { type: "search", value: text, placeholder: "Find a brush", "aria-label": "Find a brush", onChange: (e) => setText(e.target.value), className: "rounded bg-slate-800 px-1.5 py-0.5" }),
|
|
25
25
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", role: "listbox", "aria-label": "Brushes", children: [
|
|
26
|
-
groups.map((g) => /* @__PURE__ */ jsxs("div", { role: "group", "aria-label": g.title, className:
|
|
27
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap(
|
|
29
|
-
|
|
26
|
+
groups.map((g) => /* @__PURE__ */ jsxs("div", { role: "group", "aria-label": g.title, "data-group": g.id, className: `flex flex-col gap-0.5 ${g.id === "specialty" ? "mt-1 border-t border-indigo-500/40 pt-1" : ""}`, children: [
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: `text-[10px] uppercase tracking-wide ${g.id === "specialty" ? "text-indigo-300" : "text-slate-500"}`, children: g.title }),
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap((v) => [
|
|
29
|
+
// Specialty paint is listed by kind (Ferrofluid, UV-fluorescent…).
|
|
30
|
+
...g.id === "specialty" ? [/* @__PURE__ */ jsx("span", { className: "col-span-2 text-[10px] text-slate-400", children: v.title }, `kind-${v.variety}`)] : [],
|
|
31
|
+
...v.entries.map((e) => /* @__PURE__ */ jsxs(
|
|
30
32
|
"button",
|
|
31
33
|
{
|
|
32
34
|
type: "button",
|
|
@@ -42,7 +44,7 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
42
44
|
},
|
|
43
45
|
e.brush.id
|
|
44
46
|
))
|
|
45
|
-
) })
|
|
47
|
+
]) })
|
|
46
48
|
] }, g.id)),
|
|
47
49
|
!groups.length && /* @__PURE__ */ jsx("span", { className: "text-slate-500", children: "No brush matches." })
|
|
48
50
|
] })
|
|
@@ -178,6 +180,7 @@ var BrushEditor = ({ brush, profile = PAINT_PROFILE, onChange, preview, previewB
|
|
|
178
180
|
/* @__PURE__ */ jsx3("span", { className: "font-medium text-slate-300", children: s.title }),
|
|
179
181
|
s.controls.map((c) => /* @__PURE__ */ jsxs3(React3.Fragment, { children: [
|
|
180
182
|
/* @__PURE__ */ jsx3(EditorControl, { control: c, onSet: set }),
|
|
183
|
+
c.hint && /* @__PURE__ */ jsx3("p", { className: "text-[10px] leading-snug text-slate-400", "data-hint": c.path, children: c.hint }),
|
|
181
184
|
addSource && (c.path === "tip.stamps" || c.path === "tip.grain.source") && /* @__PURE__ */ jsx3(AddImage, { label: c.path === "tip.stamps" ? "Add image tip\u2026" : "Add grain image\u2026", onFile: (f) => addSource(f, c.path === "tip.stamps" ? "tip" : "grain") })
|
|
182
185
|
] }, c.path)),
|
|
183
186
|
renderExtra?.(s.id)
|
|
@@ -4616,10 +4616,12 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
4616
4616
|
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: `flex flex-col gap-1 ${className ?? ""}`, "data-testid": "brush-library", children: [
|
|
4617
4617
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("input", { type: "search", value: text, placeholder: "Find a brush", "aria-label": "Find a brush", onChange: (e) => setText(e.target.value), className: "rounded bg-slate-800 px-1.5 py-0.5" }),
|
|
4618
4618
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-1.5", role: "listbox", "aria-label": "Brushes", children: [
|
|
4619
|
-
groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { role: "group", "aria-label": g.title, className:
|
|
4620
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className:
|
|
4621
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap(
|
|
4622
|
-
|
|
4619
|
+
groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { role: "group", "aria-label": g.title, "data-group": g.id, className: `flex flex-col gap-0.5 ${g.id === "specialty" ? "mt-1 border-t border-indigo-500/40 pt-1" : ""}`, children: [
|
|
4620
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: `text-[10px] uppercase tracking-wide ${g.id === "specialty" ? "text-indigo-300" : "text-slate-500"}`, children: g.title }),
|
|
4621
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap((v) => [
|
|
4622
|
+
// Specialty paint is listed by kind (Ferrofluid, UV-fluorescent…).
|
|
4623
|
+
...g.id === "specialty" ? [/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "col-span-2 text-[10px] text-slate-400", children: v.title }, `kind-${v.variety}`)] : [],
|
|
4624
|
+
...v.entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4623
4625
|
"button",
|
|
4624
4626
|
{
|
|
4625
4627
|
type: "button",
|
|
@@ -4635,7 +4637,7 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
4635
4637
|
},
|
|
4636
4638
|
e.brush.id
|
|
4637
4639
|
))
|
|
4638
|
-
) })
|
|
4640
|
+
]) })
|
|
4639
4641
|
] }, g.id)),
|
|
4640
4642
|
!groups.length && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-slate-500", children: "No brush matches." })
|
|
4641
4643
|
] })
|
|
@@ -4748,6 +4750,7 @@ var BrushEditor = ({ brush, profile = import_brushes2.PAINT_PROFILE, onChange, p
|
|
|
4748
4750
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "font-medium text-slate-300", children: s.title }),
|
|
4749
4751
|
s.controls.map((c) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react27.default.Fragment, { children: [
|
|
4750
4752
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(EditorControl, { control: c, onSet: set }),
|
|
4753
|
+
c.hint && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "text-[10px] leading-snug text-slate-400", "data-hint": c.path, children: c.hint }),
|
|
4751
4754
|
addSource && (c.path === "tip.stamps" || c.path === "tip.grain.source") && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(AddImage, { label: c.path === "tip.stamps" ? "Add image tip\u2026" : "Add grain image\u2026", onFile: (f) => addSource(f, c.path === "tip.stamps" ? "tip" : "grain") })
|
|
4752
4755
|
] }, c.path)),
|
|
4753
4756
|
renderExtra?.(s.id)
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
useImageEditor,
|
|
30
30
|
useImageEffectsTools,
|
|
31
31
|
useImageHistogram
|
|
32
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-HOFRSMB6.js";
|
|
33
33
|
import {
|
|
34
34
|
ImageCheckbox,
|
|
35
35
|
ImageColor,
|
|
@@ -44,8 +44,8 @@ import "../chunk-5RPB4WGT.js";
|
|
|
44
44
|
import "../chunk-KIRIU53A.js";
|
|
45
45
|
import "../chunk-3I7FOSLF.js";
|
|
46
46
|
import "../chunk-W5CMGX3I.js";
|
|
47
|
-
import "../chunk-
|
|
48
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-QYARM2FN.js";
|
|
48
|
+
import "../chunk-IYYUBI3M.js";
|
|
49
49
|
export {
|
|
50
50
|
AdjustmentLayersPanel,
|
|
51
51
|
BrushOptionsBar,
|
package/dist/index.cjs
CHANGED
|
@@ -8173,10 +8173,12 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
8173
8173
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: `flex flex-col gap-1 ${className ?? ""}`, "data-testid": "brush-library", children: [
|
|
8174
8174
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("input", { type: "search", value: text, placeholder: "Find a brush", "aria-label": "Find a brush", onChange: (e) => setText(e.target.value), className: "rounded bg-slate-800 px-1.5 py-0.5" }),
|
|
8175
8175
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-col gap-1.5", role: "listbox", "aria-label": "Brushes", children: [
|
|
8176
|
-
groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { role: "group", "aria-label": g.title, className:
|
|
8177
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className:
|
|
8178
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap(
|
|
8179
|
-
|
|
8176
|
+
groups.map((g) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { role: "group", "aria-label": g.title, "data-group": g.id, className: `flex flex-col gap-0.5 ${g.id === "specialty" ? "mt-1 border-t border-indigo-500/40 pt-1" : ""}`, children: [
|
|
8177
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: `text-[10px] uppercase tracking-wide ${g.id === "specialty" ? "text-indigo-300" : "text-slate-500"}`, children: g.title }),
|
|
8178
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "grid grid-cols-2 gap-1", children: g.varieties.flatMap((v) => [
|
|
8179
|
+
// Specialty paint is listed by kind (Ferrofluid, UV-fluorescent…).
|
|
8180
|
+
...g.id === "specialty" ? [/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "col-span-2 text-[10px] text-slate-400", children: v.title }, `kind-${v.variety}`)] : [],
|
|
8181
|
+
...v.entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8180
8182
|
"button",
|
|
8181
8183
|
{
|
|
8182
8184
|
type: "button",
|
|
@@ -8192,7 +8194,7 @@ var BrushLibraryBrowser = ({ entries, activeId, onSelect, profile, thumbnail, th
|
|
|
8192
8194
|
},
|
|
8193
8195
|
e.brush.id
|
|
8194
8196
|
))
|
|
8195
|
-
) })
|
|
8197
|
+
]) })
|
|
8196
8198
|
] }, g.id)),
|
|
8197
8199
|
!groups.length && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-slate-500", children: "No brush matches." })
|
|
8198
8200
|
] })
|
|
@@ -8305,6 +8307,7 @@ var BrushEditor = ({ brush, profile = import_brushes2.PAINT_PROFILE, onChange, p
|
|
|
8305
8307
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "font-medium text-slate-300", children: s.title }),
|
|
8306
8308
|
s.controls.map((c) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react63.default.Fragment, { children: [
|
|
8307
8309
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(EditorControl, { control: c, onSet: set }),
|
|
8310
|
+
c.hint && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-[10px] leading-snug text-slate-400", "data-hint": c.path, children: c.hint }),
|
|
8308
8311
|
addSource && (c.path === "tip.stamps" || c.path === "tip.grain.source") && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AddImage, { label: c.path === "tip.stamps" ? "Add image tip\u2026" : "Add grain image\u2026", onFile: (f) => addSource(f, c.path === "tip.stamps" ? "tip" : "grain") })
|
|
8309
8312
|
] }, c.path)),
|
|
8310
8313
|
renderExtra?.(s.id)
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
useImageEditor,
|
|
63
63
|
useImageEffectsTools,
|
|
64
64
|
useImageHistogram
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-HOFRSMB6.js";
|
|
66
66
|
import {
|
|
67
67
|
ImageCheckbox,
|
|
68
68
|
ImageColor,
|
|
@@ -82,8 +82,8 @@ import {
|
|
|
82
82
|
useAgentPlayback,
|
|
83
83
|
usePlaybackSurface
|
|
84
84
|
} from "./chunk-W5CMGX3I.js";
|
|
85
|
-
import "./chunk-
|
|
86
|
-
import "./chunk-
|
|
85
|
+
import "./chunk-QYARM2FN.js";
|
|
86
|
+
import "./chunk-IYYUBI3M.js";
|
|
87
87
|
import {
|
|
88
88
|
CommandPalette,
|
|
89
89
|
useCommandPalette,
|
|
@@ -5,11 +5,15 @@ export interface BrushPanelProps {
|
|
|
5
5
|
/** Thumbnail size in px (default 112 × 32). */
|
|
6
6
|
thumbnailWidth?: number;
|
|
7
7
|
thumbnailHeight?: number;
|
|
8
|
+
/** With it, the specialty guide card has an "Open Specialty panel" button (the paint editor's Specialty tab). */
|
|
9
|
+
onOpenSpecialtyPanel?: () => void;
|
|
8
10
|
className?: string;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* The brush library (`BrushLibraryBrowser`: thumbnails of a test stroke on the current paper,
|
|
12
|
-
* grouped by medium and variety, tools apart)
|
|
14
|
+
* grouped by medium and variety, specialty paint and tools apart), a guide card for a specialty
|
|
15
|
+
* brush (`SpecialtyGuideCard`: how to use it, the canvas's status, one-click setup) and the active
|
|
16
|
+
* brush in the `BrushEditor`: its
|
|
13
17
|
* facets with a live preview, and "Save brush" into the editor's brush library. The paint
|
|
14
18
|
* editor adds the brush's own gradient, the sticker stamps, what the brush carries (Load /
|
|
15
19
|
* Clean), and import and export of library files; import also reads brush packs (`.abr`,
|
|
@@ -5,11 +5,15 @@ export interface BrushPanelProps {
|
|
|
5
5
|
/** Thumbnail size in px (default 112 × 32). */
|
|
6
6
|
thumbnailWidth?: number;
|
|
7
7
|
thumbnailHeight?: number;
|
|
8
|
+
/** With it, the specialty guide card has an "Open Specialty panel" button (the paint editor's Specialty tab). */
|
|
9
|
+
onOpenSpecialtyPanel?: () => void;
|
|
8
10
|
className?: string;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* The brush library (`BrushLibraryBrowser`: thumbnails of a test stroke on the current paper,
|
|
12
|
-
* grouped by medium and variety, tools apart)
|
|
14
|
+
* grouped by medium and variety, specialty paint and tools apart), a guide card for a specialty
|
|
15
|
+
* brush (`SpecialtyGuideCard`: how to use it, the canvas's status, one-click setup) and the active
|
|
16
|
+
* brush in the `BrushEditor`: its
|
|
13
17
|
* facets with a live preview, and "Save brush" into the editor's brush library. The paint
|
|
14
18
|
* editor adds the brush's own gradient, the sticker stamps, what the brush carries (Load /
|
|
15
19
|
* Clean), and import and export of library files; import also reads brush packs (`.abr`,
|
|
@@ -29,7 +29,8 @@ export interface PaintEditorProps {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* The paint editor: toolbar, brush library on the left, the canvas, and colour (wheel,
|
|
32
|
-
* harmonies, swatches, mixing pad), wet media, paper
|
|
33
|
-
*
|
|
32
|
+
* harmonies, swatches, mixing pad), wet media, paper, specialty paint (UV blacklight, heat,
|
|
33
|
+
* magnets, view tilt; marked while a specialty brush or effect is in play) and layers on the right,
|
|
34
|
+
* and provider effects when an effects provider is registered.
|
|
34
35
|
*/
|
|
35
36
|
export declare const PaintEditor: React.FC<PaintEditorProps>;
|
|
@@ -29,7 +29,8 @@ export interface PaintEditorProps {
|
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* The paint editor: toolbar, brush library on the left, the canvas, and colour (wheel,
|
|
32
|
-
* harmonies, swatches, mixing pad), wet media, paper
|
|
33
|
-
*
|
|
32
|
+
* harmonies, swatches, mixing pad), wet media, paper, specialty paint (UV blacklight, heat,
|
|
33
|
+
* magnets, view tilt; marked while a specialty brush or effect is in play) and layers on the right,
|
|
34
|
+
* and provider effects when an effects provider is registered.
|
|
34
35
|
*/
|
|
35
36
|
export declare const PaintEditor: React.FC<PaintEditorProps>;
|
|
@@ -8,6 +8,7 @@ export interface PaperPanelProps {
|
|
|
8
8
|
* The paper library by family (each a generated grain preview) and the current paper's colour,
|
|
9
9
|
* grain depth, scale, shading and contrast, the wet-media properties, metallic sheen and backlight
|
|
10
10
|
* with its colour (each change one undo step; sliders commit on release); then the light for thick paint and metallic
|
|
11
|
-
* paper (not an undo step) and Flatten relief for the active layer.
|
|
11
|
+
* paper (not an undo step) and Flatten relief for the active layer. The UV blacklight, heat, magnets
|
|
12
|
+
* and view tilt for specialty paint are in `SpecialtyPanel`.
|
|
12
13
|
*/
|
|
13
14
|
export declare const PaperPanel: React.FC<PaperPanelProps>;
|
|
@@ -8,6 +8,7 @@ export interface PaperPanelProps {
|
|
|
8
8
|
* The paper library by family (each a generated grain preview) and the current paper's colour,
|
|
9
9
|
* grain depth, scale, shading and contrast, the wet-media properties, metallic sheen and backlight
|
|
10
10
|
* with its colour (each change one undo step; sliders commit on release); then the light for thick paint and metallic
|
|
11
|
-
* paper (not an undo step) and Flatten relief for the active layer.
|
|
11
|
+
* paper (not an undo step) and Flatten relief for the active layer. The UV blacklight, heat, magnets
|
|
12
|
+
* and view tilt for specialty paint are in `SpecialtyPanel`.
|
|
12
13
|
*/
|
|
13
14
|
export declare const PaperPanel: React.FC<PaperPanelProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PaintEditorController } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export interface SpecialtyGuideCardProps {
|
|
4
|
+
controller: PaintEditorController;
|
|
5
|
+
/** With it, an "Open Specialty panel" button (the paint editor switches to its Specialty tab). */
|
|
6
|
+
onOpenSpecialtyPanel?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* How to use the active brush's specialty paint (`brushSpecialtyGuides`): one card per specialty
|
|
11
|
+
* with its how-to, the canvas's live status and one-click setup actions (UV blacklight, heat,
|
|
12
|
+
* magnets, view tilt, seeding). Renders nothing for a standard brush.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SpecialtyGuideCard: React.FC<SpecialtyGuideCardProps>;
|
|
15
|
+
export interface SpecialtyPanelProps {
|
|
16
|
+
controller: PaintEditorController;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The canvas environment for specialty paint: the active brush's guide (or a quick pick of
|
|
21
|
+
* specialty brushes while a standard one is active), the UV blacklight and heat for UV-fluorescent
|
|
22
|
+
* and thermochromic ink, magnets for ferrofluid, and the view tilt for thin-film iridescence.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SpecialtyPanel: React.FC<SpecialtyPanelProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PaintEditorController } from '@pixerate/editor/paint-editor';
|
|
3
|
+
export interface SpecialtyGuideCardProps {
|
|
4
|
+
controller: PaintEditorController;
|
|
5
|
+
/** With it, an "Open Specialty panel" button (the paint editor switches to its Specialty tab). */
|
|
6
|
+
onOpenSpecialtyPanel?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* How to use the active brush's specialty paint (`brushSpecialtyGuides`): one card per specialty
|
|
11
|
+
* with its how-to, the canvas's live status and one-click setup actions (UV blacklight, heat,
|
|
12
|
+
* magnets, view tilt, seeding). Renders nothing for a standard brush.
|
|
13
|
+
*/
|
|
14
|
+
export declare const SpecialtyGuideCard: React.FC<SpecialtyGuideCardProps>;
|
|
15
|
+
export interface SpecialtyPanelProps {
|
|
16
|
+
controller: PaintEditorController;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The canvas environment for specialty paint: the active brush's guide (or a quick pick of
|
|
21
|
+
* specialty brushes while a standard one is active), the UV blacklight and heat for UV-fluorescent
|
|
22
|
+
* and thermochromic ink, magnets for ferrofluid, and the view tilt for thin-film iridescence.
|
|
23
|
+
*/
|
|
24
|
+
export declare const SpecialtyPanel: React.FC<SpecialtyPanelProps>;
|