@pixerate/editor-react 0.187.0 → 0.189.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/paint-editor/EvolutionPanel.d.cts +15 -0
- package/dist/paint-editor/EvolutionPanel.d.ts +15 -0
- package/dist/paint-editor/PaintCanvas.d.cts +3 -1
- package/dist/paint-editor/PaintCanvas.d.ts +3 -1
- package/dist/paint-editor/PaintToolbar.d.cts +5 -2
- package/dist/paint-editor/PaintToolbar.d.ts +5 -2
- package/dist/paint-editor/index.cjs +565 -322
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +340 -91
- package/package.json +3 -3
|
@@ -12,6 +12,7 @@ export * from './StickerPanel.cjs';
|
|
|
12
12
|
export * from './StickerPicker.cjs';
|
|
13
13
|
export * from './StrokePanel.cjs';
|
|
14
14
|
export * from './PathStrokePanel.cjs';
|
|
15
|
+
export * from './EvolutionPanel.cjs';
|
|
15
16
|
export * from './PaintEditor.cjs';
|
|
16
17
|
export { PaintSlider } from './shared.cjs';
|
|
17
18
|
export * from './PaintGradientEditor.cjs';
|
|
@@ -12,6 +12,7 @@ export * from './StickerPanel.js';
|
|
|
12
12
|
export * from './StickerPicker.js';
|
|
13
13
|
export * from './StrokePanel.js';
|
|
14
14
|
export * from './PathStrokePanel.js';
|
|
15
|
+
export * from './EvolutionPanel.js';
|
|
15
16
|
export * from './PaintEditor.js';
|
|
16
17
|
export { PaintSlider } from './shared.js';
|
|
17
18
|
export * from './PaintGradientEditor.js';
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
paintProposalGhost
|
|
101
101
|
} from "@pixerate/editor/paint-editor";
|
|
102
102
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
103
|
-
var PaintCanvas = ({ controller, tool = "brush", showGuides = true, fitOnMount = true, onError, presence, proposals, agentStrokes, className }) => {
|
|
103
|
+
var PaintCanvas = ({ controller, tool = "brush", fillOptions, showGuides = true, fitOnMount = true, onError, presence, proposals, agentStrokes, className }) => {
|
|
104
104
|
const state = usePaintEditorState(controller);
|
|
105
105
|
const viewport = useRef2(null);
|
|
106
106
|
const canvas = useRef2(null);
|
|
@@ -120,6 +120,7 @@ var PaintCanvas = ({ controller, tool = "brush", showGuides = true, fitOnMount =
|
|
|
120
120
|
[controller]
|
|
121
121
|
);
|
|
122
122
|
gesture.tool = tool;
|
|
123
|
+
if (fillOptions) gesture.fillOptions = fillOptions;
|
|
123
124
|
const { canvas: doc } = state.document;
|
|
124
125
|
useEffect2(() => {
|
|
125
126
|
const el = viewport.current;
|
|
@@ -354,11 +355,19 @@ var PaintAgentStrokeLines = ({ strokes }) => {
|
|
|
354
355
|
import { useRef as useRef3, useState as useState3 } from "react";
|
|
355
356
|
import { PAINT_TOOLS, SYMMETRY_MODES, decodeImageBlob, downloadBytes, quickStencil, timeLapseZip } from "@pixerate/editor/paint-editor";
|
|
356
357
|
import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
357
|
-
var PaintToolbar = ({ controller, tool, onToolChange, fileName = "painting", className }) => {
|
|
358
|
+
var PaintToolbar = ({ controller, tool, onToolChange, fillOptions: controlledFill, onFillOptionsChange, fileName = "painting", className }) => {
|
|
358
359
|
const state = usePaintEditorState(controller);
|
|
359
360
|
const [error, attempt] = useAttempt();
|
|
360
361
|
const [busy, setBusy] = useState3(null);
|
|
361
362
|
const [note, setNote] = useState3(null);
|
|
363
|
+
const [localFill, setLocalFill] = useState3({ reference: "all", tolerance: 32, closeGap: 4, expand: 1, antialias: true });
|
|
364
|
+
const fill = controlledFill ?? localFill;
|
|
365
|
+
const updateFill = (patch) => {
|
|
366
|
+
const next = { ...fill, ...patch };
|
|
367
|
+
setLocalFill(next);
|
|
368
|
+
onFillOptionsChange?.(next);
|
|
369
|
+
};
|
|
370
|
+
const layers = controller.listLayers().filter((l) => l.type === "pixel");
|
|
362
371
|
const openRef = useRef3(null);
|
|
363
372
|
const tracingRef = useRef3(null);
|
|
364
373
|
const refRef = useRef3(null);
|
|
@@ -367,6 +376,71 @@ var PaintToolbar = ({ controller, tool, onToolChange, fileName = "painting", cla
|
|
|
367
376
|
const exportImage = (format) => attempt(async () => downloadBytes(await controller.exportImage({ format }), `${fileName}.${format === "image/png" ? "png" : "jpg"}`, format));
|
|
368
377
|
return /* @__PURE__ */ jsxs2("div", { className: `flex flex-wrap items-center gap-1.5 text-xs text-slate-200 ${className ?? ""}`, role: "toolbar", "aria-label": "Paint toolbar", "data-testid": "paint-toolbar", children: [
|
|
369
378
|
PAINT_TOOLS.map((t) => /* @__PURE__ */ jsx2("button", { type: "button", "aria-pressed": tool === t.id, title: `${t.label} (${t.key.toUpperCase()})`, className: chip(tool === t.id), onClick: () => onToolChange(t.id), children: t.label }, t.id)),
|
|
379
|
+
tool === "fill" && /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1.5 rounded border border-slate-700/80 bg-slate-900/60 px-2 py-0.5 text-[11px] text-slate-300", "data-testid": "paint-fill-options", children: [
|
|
380
|
+
/* @__PURE__ */ jsxs2("label", { className: "flex items-center gap-1", children: [
|
|
381
|
+
/* @__PURE__ */ jsx2("span", { children: "Ref" }),
|
|
382
|
+
/* @__PURE__ */ jsxs2(
|
|
383
|
+
"select",
|
|
384
|
+
{
|
|
385
|
+
"aria-label": "Fill reference",
|
|
386
|
+
className: "rounded bg-slate-800 px-1 py-0.5 text-[11px]",
|
|
387
|
+
value: fill.reference ?? "all",
|
|
388
|
+
onChange: (e) => updateFill({ reference: e.target.value }),
|
|
389
|
+
children: [
|
|
390
|
+
/* @__PURE__ */ jsx2("option", { value: "all", children: "All layers" }),
|
|
391
|
+
/* @__PURE__ */ jsx2("option", { value: "layer", children: "Active layer" }),
|
|
392
|
+
layers.map((l) => /* @__PURE__ */ jsx2("option", { value: l.id, children: l.name }, l.id))
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
)
|
|
396
|
+
] }),
|
|
397
|
+
/* @__PURE__ */ jsxs2("label", { className: "flex items-center gap-1", children: [
|
|
398
|
+
/* @__PURE__ */ jsx2("span", { children: "Tol" }),
|
|
399
|
+
/* @__PURE__ */ jsx2(
|
|
400
|
+
"input",
|
|
401
|
+
{
|
|
402
|
+
type: "number",
|
|
403
|
+
"aria-label": "Fill tolerance",
|
|
404
|
+
min: 0,
|
|
405
|
+
max: 255,
|
|
406
|
+
value: fill.tolerance ?? 32,
|
|
407
|
+
onChange: (e) => updateFill({ tolerance: Math.max(0, Math.min(255, Number(e.target.value) || 0)) }),
|
|
408
|
+
className: "w-11 rounded bg-slate-800 px-1 py-0.5 text-[11px]"
|
|
409
|
+
}
|
|
410
|
+
)
|
|
411
|
+
] }),
|
|
412
|
+
/* @__PURE__ */ jsxs2("label", { className: "flex items-center gap-1", children: [
|
|
413
|
+
/* @__PURE__ */ jsx2("span", { children: "Gap" }),
|
|
414
|
+
/* @__PURE__ */ jsx2(
|
|
415
|
+
"input",
|
|
416
|
+
{
|
|
417
|
+
type: "number",
|
|
418
|
+
"aria-label": "Close gap",
|
|
419
|
+
min: 0,
|
|
420
|
+
max: 32,
|
|
421
|
+
value: fill.closeGap ?? 4,
|
|
422
|
+
onChange: (e) => updateFill({ closeGap: Math.max(0, Math.min(32, Number(e.target.value) || 0)) }),
|
|
423
|
+
className: "w-10 rounded bg-slate-800 px-1 py-0.5 text-[11px]"
|
|
424
|
+
}
|
|
425
|
+
)
|
|
426
|
+
] }),
|
|
427
|
+
/* @__PURE__ */ jsxs2("label", { className: "flex items-center gap-1", children: [
|
|
428
|
+
/* @__PURE__ */ jsx2("span", { children: "Expand" }),
|
|
429
|
+
/* @__PURE__ */ jsx2(
|
|
430
|
+
"input",
|
|
431
|
+
{
|
|
432
|
+
type: "number",
|
|
433
|
+
"aria-label": "Expand fill",
|
|
434
|
+
min: -16,
|
|
435
|
+
max: 16,
|
|
436
|
+
value: fill.expand ?? 1,
|
|
437
|
+
onChange: (e) => updateFill({ expand: Math.max(-16, Math.min(16, Number(e.target.value) || 0)) }),
|
|
438
|
+
className: "w-10 rounded bg-slate-800 px-1 py-0.5 text-[11px]"
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
] }),
|
|
442
|
+
/* @__PURE__ */ jsx2("button", { type: "button", className: chip(Boolean(fill.wet)), "aria-pressed": Boolean(fill.wet), onClick: () => updateFill({ wet: !fill.wet }), children: "Wet" })
|
|
443
|
+
] }),
|
|
370
444
|
/* @__PURE__ */ jsx2("span", { className: "mx-1 h-4 w-px bg-slate-700" }),
|
|
371
445
|
/* @__PURE__ */ jsx2("button", { type: "button", className: button, disabled: !state.canUndo, title: state.undoLabel ? `Undo ${state.undoLabel}` : "Undo", onClick: () => controller.undo(), children: "Undo" }),
|
|
372
446
|
/* @__PURE__ */ jsx2("button", { type: "button", className: button, disabled: !state.canRedo, title: state.redoLabel ? `Redo ${state.redoLabel}` : "Redo", onClick: () => controller.redo(), children: "Redo" }),
|
|
@@ -1299,17 +1373,189 @@ var PathStrokePanel = ({ controller, className }) => {
|
|
|
1299
1373
|
] });
|
|
1300
1374
|
};
|
|
1301
1375
|
|
|
1376
|
+
// src/paint-editor/EvolutionPanel.tsx
|
|
1377
|
+
import { useState as useState8, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
1378
|
+
import {
|
|
1379
|
+
EVOLUTION_SLIDERS,
|
|
1380
|
+
exportProposalContactSheetPng,
|
|
1381
|
+
liveStrokeRefusal as liveStrokeRefusal2,
|
|
1382
|
+
normalizeMutationRates,
|
|
1383
|
+
paintProposalGhost as paintProposalGhost2,
|
|
1384
|
+
proposalGenomeStrokes
|
|
1385
|
+
} from "@pixerate/editor/paint-editor";
|
|
1386
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1387
|
+
var EvolutionPanel = ({ controller, proposals, className }) => {
|
|
1388
|
+
const state = usePaintEditorState(controller);
|
|
1389
|
+
const store = proposals ?? controller.proposals;
|
|
1390
|
+
const proposalState = useSyncExternalStore3(store.subscribe, store.getState, store.getState);
|
|
1391
|
+
const [error, attempt] = useAttempt();
|
|
1392
|
+
const [selectedStrokes, setSelectedStrokes] = useState8([]);
|
|
1393
|
+
const [selectedProposals, setSelectedProposals] = useState8([]);
|
|
1394
|
+
const [count, setCount] = useState8(4);
|
|
1395
|
+
const [seed, setSeed] = useState8(1);
|
|
1396
|
+
const [mutation, setMutation] = useState8(() => normalizeMutationRates());
|
|
1397
|
+
const [contactSheetUrl, setContactSheetUrl] = useState8(null);
|
|
1398
|
+
const eligibleStrokes = state.document.strokes.filter((s) => !liveStrokeRefusal2(s.brush));
|
|
1399
|
+
const activeStrokeIds = selectedStrokes.filter((id) => eligibleStrokes.some((s) => s.id === id));
|
|
1400
|
+
const effectiveStrokeIds = activeStrokeIds.length > 0 ? activeStrokeIds : state.selectedStroke && eligibleStrokes.some((s) => s.id === state.selectedStroke) ? [state.selectedStroke] : eligibleStrokes.length > 0 ? [eligibleStrokes[eligibleStrokes.length - 1].id] : [];
|
|
1401
|
+
const variants = proposalState.proposals.filter((p) => proposalGenomeStrokes(p).length > 0);
|
|
1402
|
+
const activeProposalIds = selectedProposals.filter((id) => variants.some((v) => v.id === id));
|
|
1403
|
+
const toggleStroke = (id) => {
|
|
1404
|
+
setSelectedStrokes((prev) => prev.includes(id) ? prev.filter((x) => x !== id) : [...prev.slice(-15), id]);
|
|
1405
|
+
};
|
|
1406
|
+
const toggleProposal = (id) => {
|
|
1407
|
+
setSelectedProposals((prev) => prev.includes(id) ? prev.filter((x) => x !== id) : [...prev.slice(-1), id]);
|
|
1408
|
+
};
|
|
1409
|
+
return /* @__PURE__ */ jsxs12("div", { className: `${panel} ${className ?? ""}`, "data-testid": "evolution-panel", children: [
|
|
1410
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between", children: [
|
|
1411
|
+
/* @__PURE__ */ jsxs12("span", { className: "font-medium text-slate-300", children: [
|
|
1412
|
+
"Evolution (",
|
|
1413
|
+
eligibleStrokes.length,
|
|
1414
|
+
")"
|
|
1415
|
+
] }),
|
|
1416
|
+
/* @__PURE__ */ jsx13("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1 text-[11px] text-slate-400", children: [
|
|
1417
|
+
/* @__PURE__ */ jsx13("span", { children: "Count" }),
|
|
1418
|
+
/* @__PURE__ */ jsx13(
|
|
1419
|
+
"input",
|
|
1420
|
+
{
|
|
1421
|
+
type: "number",
|
|
1422
|
+
"aria-label": "Variant count",
|
|
1423
|
+
min: 2,
|
|
1424
|
+
max: 12,
|
|
1425
|
+
value: count,
|
|
1426
|
+
onChange: (e) => setCount(Math.max(2, Math.min(12, Number(e.target.value) || 4))),
|
|
1427
|
+
className: "w-11 rounded bg-slate-800 px-1 py-0.5 text-right font-mono text-slate-200"
|
|
1428
|
+
}
|
|
1429
|
+
)
|
|
1430
|
+
] }) })
|
|
1431
|
+
] }),
|
|
1432
|
+
eligibleStrokes.length > 0 && /* @__PURE__ */ jsx13("div", { className: "flex max-h-20 flex-wrap gap-1 overflow-y-auto", role: "listbox", "aria-label": "Parent strokes", children: eligibleStrokes.map((s, i) => {
|
|
1433
|
+
const on = effectiveStrokeIds.includes(s.id);
|
|
1434
|
+
return /* @__PURE__ */ jsx13(
|
|
1435
|
+
"button",
|
|
1436
|
+
{
|
|
1437
|
+
type: "button",
|
|
1438
|
+
role: "option",
|
|
1439
|
+
"aria-selected": on,
|
|
1440
|
+
title: `${i + 1}. ${s.brush.name} (${s.id})`,
|
|
1441
|
+
className: `h-5 w-5 rounded ring-1 ${on ? "ring-indigo-400" : "ring-slate-700"}`,
|
|
1442
|
+
style: { background: s.color },
|
|
1443
|
+
onClick: () => toggleStroke(s.id)
|
|
1444
|
+
},
|
|
1445
|
+
s.id
|
|
1446
|
+
);
|
|
1447
|
+
}) }),
|
|
1448
|
+
EVOLUTION_SLIDERS.map((c) => {
|
|
1449
|
+
const key = c.path;
|
|
1450
|
+
return /* @__PURE__ */ jsx13(
|
|
1451
|
+
PaintSlider,
|
|
1452
|
+
{
|
|
1453
|
+
control: c,
|
|
1454
|
+
value: mutation[key],
|
|
1455
|
+
onChange: (v) => setMutation((prev) => ({ ...prev, [key]: v }))
|
|
1456
|
+
},
|
|
1457
|
+
c.path
|
|
1458
|
+
);
|
|
1459
|
+
}),
|
|
1460
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap gap-1", children: [
|
|
1461
|
+
/* @__PURE__ */ jsx13(
|
|
1462
|
+
"button",
|
|
1463
|
+
{
|
|
1464
|
+
type: "button",
|
|
1465
|
+
className: button,
|
|
1466
|
+
disabled: effectiveStrokeIds.length === 0 || state.stroking,
|
|
1467
|
+
onClick: () => attempt(() => {
|
|
1468
|
+
controller.breedStrokes({ strokeIds: effectiveStrokeIds, count, mutation, seed });
|
|
1469
|
+
setSeed((s) => s + 1);
|
|
1470
|
+
}),
|
|
1471
|
+
children: "Breed strokes"
|
|
1472
|
+
}
|
|
1473
|
+
),
|
|
1474
|
+
activeProposalIds.length === 2 && /* @__PURE__ */ jsx13(
|
|
1475
|
+
"button",
|
|
1476
|
+
{
|
|
1477
|
+
type: "button",
|
|
1478
|
+
className: button,
|
|
1479
|
+
disabled: state.stroking,
|
|
1480
|
+
onClick: () => attempt(() => {
|
|
1481
|
+
controller.breedProposal({ proposalIds: activeProposalIds, count, mutation, seed });
|
|
1482
|
+
setSeed((s) => s + 1);
|
|
1483
|
+
}),
|
|
1484
|
+
children: "Cross over (2)"
|
|
1485
|
+
}
|
|
1486
|
+
),
|
|
1487
|
+
variants.length > 0 && /* @__PURE__ */ jsx13(
|
|
1488
|
+
"button",
|
|
1489
|
+
{
|
|
1490
|
+
type: "button",
|
|
1491
|
+
className: button,
|
|
1492
|
+
onClick: () => attempt(() => {
|
|
1493
|
+
const sheet = exportProposalContactSheetPng(controller, variants);
|
|
1494
|
+
setContactSheetUrl(`data:image/png;base64,${sheet.base64}`);
|
|
1495
|
+
}),
|
|
1496
|
+
children: "Contact sheet"
|
|
1497
|
+
}
|
|
1498
|
+
)
|
|
1499
|
+
] }),
|
|
1500
|
+
variants.length > 0 && /* @__PURE__ */ jsx13("div", { className: "grid grid-cols-2 gap-1.5", "data-testid": "evolution-grid", children: variants.map((p) => {
|
|
1501
|
+
const g = paintProposalGhost2(p);
|
|
1502
|
+
const picked = activeProposalIds.includes(p.id);
|
|
1503
|
+
return /* @__PURE__ */ jsxs12(
|
|
1504
|
+
"div",
|
|
1505
|
+
{
|
|
1506
|
+
"data-testid": `evolution-variant-${p.id}`,
|
|
1507
|
+
className: `flex flex-col gap-1 rounded border p-1.5 ${picked ? "border-indigo-500 bg-slate-800/90" : "border-slate-800 bg-slate-950/60"}`,
|
|
1508
|
+
children: [
|
|
1509
|
+
/* @__PURE__ */ jsx13("div", { className: "flex items-center justify-between gap-1", children: /* @__PURE__ */ jsx13(
|
|
1510
|
+
"button",
|
|
1511
|
+
{
|
|
1512
|
+
type: "button",
|
|
1513
|
+
"aria-pressed": picked,
|
|
1514
|
+
className: chip(picked),
|
|
1515
|
+
onClick: () => toggleProposal(p.id),
|
|
1516
|
+
children: p.title
|
|
1517
|
+
}
|
|
1518
|
+
) }),
|
|
1519
|
+
g && /* @__PURE__ */ jsx13("div", { className: "flex h-16 items-center justify-center overflow-hidden rounded bg-slate-900/80 p-1", children: /* @__PURE__ */ jsx13(PixelCanvas, { pixels: g, label: p.title, className: "max-h-full max-w-full object-contain" }) }),
|
|
1520
|
+
p.rationale && /* @__PURE__ */ jsx13("span", { className: "line-clamp-2 text-[10px] text-slate-400", title: p.rationale, children: p.rationale }),
|
|
1521
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap gap-1", children: [
|
|
1522
|
+
/* @__PURE__ */ jsx13(
|
|
1523
|
+
"button",
|
|
1524
|
+
{
|
|
1525
|
+
type: "button",
|
|
1526
|
+
className: button,
|
|
1527
|
+
disabled: state.stroking,
|
|
1528
|
+
onClick: () => attempt(() => {
|
|
1529
|
+
controller.breedProposal({ proposalIds: [p.id], count, mutation, seed });
|
|
1530
|
+
setSeed((s) => s + 1);
|
|
1531
|
+
}),
|
|
1532
|
+
children: "Breed from"
|
|
1533
|
+
}
|
|
1534
|
+
),
|
|
1535
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: button, onClick: () => attempt(() => store.accept(p.id)), children: "Accept" }),
|
|
1536
|
+
/* @__PURE__ */ jsx13("button", { type: "button", className: button, onClick: () => attempt(() => store.reject(p.id)), children: "Dismiss" })
|
|
1537
|
+
] })
|
|
1538
|
+
]
|
|
1539
|
+
},
|
|
1540
|
+
p.id
|
|
1541
|
+
);
|
|
1542
|
+
}) }),
|
|
1543
|
+
contactSheetUrl && /* @__PURE__ */ jsx13("img", { src: contactSheetUrl, alt: "Variant contact sheet", className: "w-full rounded border border-slate-800", "data-testid": "evolution-contact-sheet" }),
|
|
1544
|
+
/* @__PURE__ */ jsx13(ErrorLine, { error })
|
|
1545
|
+
] });
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1302
1548
|
// src/paint-editor/PaintEditor.tsx
|
|
1303
|
-
import { useRef as useRef7, useState as
|
|
1549
|
+
import { useRef as useRef7, useState as useState10 } from "react";
|
|
1304
1550
|
import { PaintPresence as PaintPresence2, documentToScreen as documentToScreen2, screenToDocument } from "@pixerate/editor/paint-editor";
|
|
1305
1551
|
|
|
1306
1552
|
// src/paint-editor/PaintEffectsPanel.tsx
|
|
1307
|
-
import { useEffect as useEffect4, useMemo as useMemo6, useRef as useRef6, useState as
|
|
1553
|
+
import { useEffect as useEffect4, useMemo as useMemo6, useRef as useRef6, useState as useState9 } from "react";
|
|
1308
1554
|
import { createPaintEffectsToolProvider, PAPER_EFFECT_BLENDS } from "@pixerate/editor/paint-editor";
|
|
1309
1555
|
import { pathControlsOf } from "@pixerate/editor/effects";
|
|
1310
|
-
import { jsx as
|
|
1556
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1311
1557
|
function usePaintEffectsProvider(controller) {
|
|
1312
|
-
const [provider, setProvider] =
|
|
1558
|
+
const [provider, setProvider] = useState9(controller.effectsProvider);
|
|
1313
1559
|
useEffect4(() => {
|
|
1314
1560
|
setProvider(controller.effectsProvider);
|
|
1315
1561
|
return controller.effects.subscribe(setProvider);
|
|
@@ -1326,19 +1572,19 @@ function usePaintEffectsTools(registry, controller, options = {}) {
|
|
|
1326
1572
|
function Controls({ provider, effect, name, values, apply }) {
|
|
1327
1573
|
const { description, error } = useEffectDescription(provider, effect);
|
|
1328
1574
|
const drags = useRef6(/* @__PURE__ */ new Set());
|
|
1329
|
-
if (!provider) return /* @__PURE__ */
|
|
1575
|
+
if (!provider) return /* @__PURE__ */ jsxs13("p", { className: "text-[11px] text-slate-400", children: [
|
|
1330
1576
|
'No effects provider: "',
|
|
1331
1577
|
name ?? effect,
|
|
1332
1578
|
'" is kept as it was drawn.'
|
|
1333
1579
|
] });
|
|
1334
|
-
if (error) return /* @__PURE__ */
|
|
1335
|
-
if (!description) return /* @__PURE__ */
|
|
1580
|
+
if (error) return /* @__PURE__ */ jsx14("p", { className: "text-[11px] text-amber-400", children: error });
|
|
1581
|
+
if (!description) return /* @__PURE__ */ jsx14("p", { className: "text-[11px] text-slate-400", children: "Loading\u2026" });
|
|
1336
1582
|
const commit = (gesture) => {
|
|
1337
1583
|
if (!gesture || drags.current.has(gesture)) return !gesture;
|
|
1338
1584
|
drags.current.add(gesture);
|
|
1339
1585
|
return true;
|
|
1340
1586
|
};
|
|
1341
|
-
return /* @__PURE__ */
|
|
1587
|
+
return /* @__PURE__ */ jsx14(
|
|
1342
1588
|
EffectParameters,
|
|
1343
1589
|
{
|
|
1344
1590
|
description,
|
|
@@ -1360,8 +1606,8 @@ var PaintEffectsPanel = ({ controller, className }) => {
|
|
|
1360
1606
|
const state = usePaintEditorState(controller);
|
|
1361
1607
|
const provider = usePaintEffectsProvider(controller);
|
|
1362
1608
|
const [error, attempt] = useAttempt();
|
|
1363
|
-
const [browse, setBrowse] =
|
|
1364
|
-
const [busy, setBusy] =
|
|
1609
|
+
const [browse, setBrowse] = useState9(null);
|
|
1610
|
+
const [busy, setBusy] = useState9(false);
|
|
1365
1611
|
const paper = controller.getPaperEffect();
|
|
1366
1612
|
const activeId = state.document.activeLayerId;
|
|
1367
1613
|
const layerEffect = activeId ? controller.getEffectLayer(activeId) : void 0;
|
|
@@ -1391,28 +1637,28 @@ var PaintEffectsPanel = ({ controller, className }) => {
|
|
|
1391
1637
|
};
|
|
1392
1638
|
const toggle = (b) => setBrowse(browse === b ? null : b);
|
|
1393
1639
|
const pixel = active?.type === "pixel";
|
|
1394
|
-
return /* @__PURE__ */
|
|
1395
|
-
/* @__PURE__ */
|
|
1396
|
-
/* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */
|
|
1398
|
-
/* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */
|
|
1400
|
-
/* @__PURE__ */
|
|
1401
|
-
/* @__PURE__ */
|
|
1640
|
+
return /* @__PURE__ */ jsxs13("div", { className: `${panel} ${className ?? ""}`, "data-testid": "paint-effects-panel", "aria-busy": busy, children: [
|
|
1641
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
1642
|
+
/* @__PURE__ */ jsx14("span", { className: "flex-1 font-medium text-slate-300", children: "Effects" }),
|
|
1643
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, disabled: !provider, "aria-pressed": browse === "paper", onClick: () => toggle("paper"), children: "Paper\u2026" }),
|
|
1644
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, disabled: !provider, "aria-pressed": browse === "layer", onClick: () => toggle("layer"), children: "Layer\u2026" }),
|
|
1645
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, disabled: !provider || !pixel, "aria-pressed": browse === "fill", onClick: () => toggle("fill"), children: "Fill\u2026" }),
|
|
1646
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, disabled: !provider || !pixel, "aria-pressed": browse === "light", onClick: () => toggle("light"), title: "Bake a light, glow or grade into the active layer's dried paint", children: "Light\u2026" }),
|
|
1647
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, disabled: !provider, "aria-pressed": browse === "paint", onClick: () => toggle("paint"), title: "Paint with an effect: brushes take each pixel's colour from it", children: "Paint\u2026" })
|
|
1402
1648
|
] }),
|
|
1403
|
-
!provider && /* @__PURE__ */
|
|
1404
|
-
browse && /* @__PURE__ */
|
|
1405
|
-
paper && /* @__PURE__ */
|
|
1406
|
-
/* @__PURE__ */
|
|
1407
|
-
/* @__PURE__ */
|
|
1649
|
+
!provider && /* @__PURE__ */ jsx14("p", { className: "text-[11px] text-slate-400", children: "No effects provider is registered. Effects in the painting are kept." }),
|
|
1650
|
+
browse && /* @__PURE__ */ jsx14(EffectsBrowser, { provider, uses: BROWSERS[browse].uses, title: BROWSERS[browse].title, onPick: (e) => pick(e.id) }),
|
|
1651
|
+
paper && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-1 rounded border border-slate-700 p-1", "data-effect-part": "paper", children: [
|
|
1652
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
|
|
1653
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex-1 truncate", children: [
|
|
1408
1654
|
"Paper: ",
|
|
1409
1655
|
paper.name ?? paper.effect
|
|
1410
1656
|
] }),
|
|
1411
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, "aria-label": "Remove the effect paper", onClick: () => run(() => controller.setPaperEffect(null)), children: "\u2715" })
|
|
1412
1658
|
] }),
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
/* @__PURE__ */
|
|
1659
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", children: [
|
|
1660
|
+
/* @__PURE__ */ jsx14("span", { className: "w-14 text-[11px] text-slate-400", children: "Opacity" }),
|
|
1661
|
+
/* @__PURE__ */ jsx14(
|
|
1416
1662
|
"input",
|
|
1417
1663
|
{
|
|
1418
1664
|
type: "range",
|
|
@@ -1434,43 +1680,43 @@ var PaintEffectsPanel = ({ controller, className }) => {
|
|
|
1434
1680
|
`o${paper.opacity}`
|
|
1435
1681
|
)
|
|
1436
1682
|
] }),
|
|
1437
|
-
/* @__PURE__ */
|
|
1438
|
-
/* @__PURE__ */
|
|
1439
|
-
/* @__PURE__ */
|
|
1683
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", children: [
|
|
1684
|
+
/* @__PURE__ */ jsx14("span", { className: "w-14 text-[11px] text-slate-400", children: "Blend" }),
|
|
1685
|
+
/* @__PURE__ */ jsx14("select", { className: "flex-1 rounded bg-slate-800 px-1 py-0.5 text-[11px]", "aria-label": "Effect paper blend", value: paper.blend, onChange: (e) => {
|
|
1440
1686
|
const blend = e.currentTarget.value;
|
|
1441
1687
|
run(() => controller.updatePaperEffect({ blend }));
|
|
1442
|
-
}, children: PAPER_EFFECT_BLENDS.map((b) => /* @__PURE__ */
|
|
1688
|
+
}, children: PAPER_EFFECT_BLENDS.map((b) => /* @__PURE__ */ jsx14("option", { value: b, children: b }, b)) })
|
|
1443
1689
|
] }),
|
|
1444
|
-
/* @__PURE__ */
|
|
1690
|
+
/* @__PURE__ */ jsx14(Controls, { provider, effect: paper.effect, name: paper.name, values: paper.values, apply: (values, commit) => run(() => controller.updatePaperEffect({ values }, commit)) })
|
|
1445
1691
|
] }),
|
|
1446
|
-
effectPaint && /* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */
|
|
1448
|
-
thumbnail ? /* @__PURE__ */
|
|
1449
|
-
/* @__PURE__ */
|
|
1692
|
+
effectPaint && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-1 rounded border border-slate-700 p-1", "data-effect-part": "paint", children: [
|
|
1693
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
|
|
1694
|
+
thumbnail ? /* @__PURE__ */ jsx14("img", { src: thumbnail, alt: "", className: "h-5 w-8 rounded object-cover ring-1 ring-slate-700", "data-testid": "effect-paint-thumbnail" }) : null,
|
|
1695
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex-1 truncate", children: [
|
|
1450
1696
|
"Paint: ",
|
|
1451
1697
|
effectPaint.effect,
|
|
1452
1698
|
state.effectPaintRendering ? " (rendering\u2026)" : ""
|
|
1453
1699
|
] }),
|
|
1454
|
-
/* @__PURE__ */
|
|
1700
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, "aria-label": "Stop painting with the effect", onClick: () => attempt(() => controller.setColor(state.color)), children: "\u2715" })
|
|
1455
1701
|
] }),
|
|
1456
|
-
/* @__PURE__ */
|
|
1457
|
-
/* @__PURE__ */
|
|
1458
|
-
/* @__PURE__ */
|
|
1702
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-2", "data-testid": "effect-paint-placement", children: [
|
|
1703
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", title: "Lay the effect along each stroke instead of fixing it to the canvas", children: [
|
|
1704
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: effectPaint.map?.by === "stroke", onChange: (e) => repaint({ map: e.target.checked ? { by: "stroke", length: 300, repeat: "repeat" } : { by: "canvas" } }) }),
|
|
1459
1705
|
"Along the stroke"
|
|
1460
1706
|
] }),
|
|
1461
|
-
hasPathControl && /* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */
|
|
1707
|
+
hasPathControl && /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", title: "Pass each stroke's centreline to the effect's own path control", children: [
|
|
1708
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: effectPaint.map?.by === "path", onChange: (e) => repaint({ map: e.target.checked ? { by: "path" } : { by: "canvas" } }) }),
|
|
1463
1709
|
"Along the stroke (native)"
|
|
1464
1710
|
] }),
|
|
1465
|
-
/* @__PURE__ */
|
|
1466
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", title: "Strokes on a stroke layer keep playing the effect", children: [
|
|
1712
|
+
/* @__PURE__ */ jsx14("input", { type: "checkbox", checked: Boolean(effectPaint.live), onChange: (e) => repaint({ live: e.target.checked }) }),
|
|
1467
1713
|
"Live"
|
|
1468
1714
|
] })
|
|
1469
1715
|
] }),
|
|
1470
|
-
effectPaint.map?.by === "stroke" && /* @__PURE__ */
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
1473
|
-
/* @__PURE__ */
|
|
1716
|
+
effectPaint.map?.by === "stroke" && /* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1717
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", children: [
|
|
1718
|
+
/* @__PURE__ */ jsx14("span", { className: "text-slate-400", children: "Length" }),
|
|
1719
|
+
/* @__PURE__ */ jsx14(
|
|
1474
1720
|
"input",
|
|
1475
1721
|
{
|
|
1476
1722
|
type: "number",
|
|
@@ -1484,55 +1730,56 @@ var PaintEffectsPanel = ({ controller, className }) => {
|
|
|
1484
1730
|
effectPaint.map.length
|
|
1485
1731
|
)
|
|
1486
1732
|
] }),
|
|
1487
|
-
/* @__PURE__ */
|
|
1488
|
-
/* @__PURE__ */
|
|
1489
|
-
/* @__PURE__ */
|
|
1490
|
-
/* @__PURE__ */
|
|
1733
|
+
/* @__PURE__ */ jsxs13("select", { "aria-label": "Effect repeat", value: effectPaint.map.repeat, onChange: (e) => repaint({ map: { ...effectPaint.map, repeat: e.target.value } }), className: "rounded bg-slate-800 px-1 py-0.5", children: [
|
|
1734
|
+
/* @__PURE__ */ jsx14("option", { value: "repeat", children: "Repeat" }),
|
|
1735
|
+
/* @__PURE__ */ jsx14("option", { value: "mirror", children: "Mirror" }),
|
|
1736
|
+
/* @__PURE__ */ jsx14("option", { value: "clamp", children: "Clamp" })
|
|
1491
1737
|
] })
|
|
1492
1738
|
] }),
|
|
1493
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ jsx14(Controls, { provider, effect: effectPaint.effect, values: effectPaint.values, apply: (values) => repaint({ values: { ...effectPaint.values, ...values } }) })
|
|
1494
1740
|
] }),
|
|
1495
|
-
animation && /* @__PURE__ */
|
|
1496
|
-
/* @__PURE__ */
|
|
1741
|
+
animation && /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 rounded border border-slate-700 p-1", "data-effect-part": "playback", children: [
|
|
1742
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex-1 truncate", children: [
|
|
1497
1743
|
"Live paint: ",
|
|
1498
1744
|
animation.strokes,
|
|
1499
1745
|
" ",
|
|
1500
1746
|
animation.strokes === 1 ? "stroke" : "strokes"
|
|
1501
1747
|
] }),
|
|
1502
|
-
/* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
/* @__PURE__ */
|
|
1748
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, "aria-pressed": playback.playing, onClick: () => attempt(() => controller.setEffectPlayback({ playing: !playback.playing })), children: playback.playing ? "Pause" : "Play" }),
|
|
1749
|
+
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", children: [
|
|
1750
|
+
/* @__PURE__ */ jsx14("span", { className: "text-slate-400", children: "fps" }),
|
|
1751
|
+
/* @__PURE__ */ jsx14("input", { type: "number", "aria-label": "Live paint frame rate", min: 1, max: 60, value: playback.fps, onChange: (e) => attempt(() => controller.setEffectPlayback({ fps: Math.round(Number(e.target.value)) })), className: "w-12 rounded bg-slate-800 px-1 py-0.5" })
|
|
1506
1752
|
] })
|
|
1507
1753
|
] }),
|
|
1508
|
-
layerEffect && activeId && /* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1754
|
+
layerEffect && activeId && /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-1 rounded border border-slate-700 p-1", "data-effect-part": "layer", children: [
|
|
1755
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
|
|
1756
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex-1 truncate", children: [
|
|
1511
1757
|
"Layer: ",
|
|
1512
1758
|
layerEffect.name ?? layerEffect.effect
|
|
1513
1759
|
] }),
|
|
1514
|
-
/* @__PURE__ */
|
|
1760
|
+
/* @__PURE__ */ jsx14("button", { type: "button", className: button, title: "Keep the pixels as a plain layer", onClick: () => attempt(() => controller.rasterizeEffectLayer(activeId)), children: "Rasterize" })
|
|
1515
1761
|
] }),
|
|
1516
|
-
/* @__PURE__ */
|
|
1762
|
+
/* @__PURE__ */ jsx14(Controls, { provider, effect: layerEffect.effect, name: layerEffect.name, values: layerEffect.values, apply: (values, commit) => run(() => controller.updateEffectLayer(activeId, { values }, commit)) })
|
|
1517
1763
|
] }),
|
|
1518
|
-
/* @__PURE__ */
|
|
1764
|
+
/* @__PURE__ */ jsx14(ErrorLine, { error })
|
|
1519
1765
|
] });
|
|
1520
1766
|
};
|
|
1521
1767
|
|
|
1522
1768
|
// src/paint-editor/PaintEditor.tsx
|
|
1523
|
-
import { jsx as
|
|
1769
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1524
1770
|
var PAINT_CONTROLS = {
|
|
1525
1771
|
"mixing-pad": '[data-testid="mixing-pad"]',
|
|
1526
1772
|
lighting: '[data-testid="light-panel"]',
|
|
1527
1773
|
symmetry: '[aria-label="Symmetry"]'
|
|
1528
1774
|
};
|
|
1529
1775
|
var PaintEditor = ({ controller, fileName, height = 720, presence, proposals, agentStrokes, className, playback, playbackId = "paint", onPlaybackReveal }) => {
|
|
1530
|
-
const [tool, setTool] =
|
|
1531
|
-
const [
|
|
1776
|
+
const [tool, setTool] = useState10("brush");
|
|
1777
|
+
const [fillOptions, setFillOptions] = useState10({ reference: "all", tolerance: 32, closeGap: 4, expand: 1, antialias: true });
|
|
1778
|
+
const [tab, setTab] = useState10("color");
|
|
1532
1779
|
const tabRef = useRef7(tab);
|
|
1533
1780
|
tabRef.current = tab;
|
|
1534
1781
|
const rootRef = useRef7(null);
|
|
1535
|
-
const [ownPresence] =
|
|
1782
|
+
const [ownPresence] = useState10(() => new PaintPresence2());
|
|
1536
1783
|
const ambientPlayback = useAgentPlayback();
|
|
1537
1784
|
const playing = (playback === void 0 ? ambientPlayback : playback) ?? null;
|
|
1538
1785
|
const viewBox = () => {
|
|
@@ -1588,29 +1835,30 @@ var PaintEditor = ({ controller, fileName, height = 720, presence, proposals, ag
|
|
|
1588
1835
|
const box = rootRef.current?.getBoundingClientRect();
|
|
1589
1836
|
return c && box ? { x: c.x - box.left, y: c.y - box.top } : p;
|
|
1590
1837
|
};
|
|
1591
|
-
const [error, setError] =
|
|
1838
|
+
const [error, setError] = useState10(null);
|
|
1592
1839
|
const effects = usePaintEffectsProvider(controller);
|
|
1593
1840
|
const tabs = effects ? ["color", "wet", "paper", "layers", "effects"] : ["color", "wet", "paper", "layers"];
|
|
1594
|
-
return /* @__PURE__ */
|
|
1595
|
-
playing && /* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1598
|
-
/* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
error && /* @__PURE__ */
|
|
1841
|
+
return /* @__PURE__ */ jsxs14("div", { ref: rootRef, className: `relative flex flex-col gap-2 rounded-xl border border-slate-800 bg-slate-900 p-2 ${className ?? ""}`, style: { height }, "data-testid": "paint-editor", children: [
|
|
1842
|
+
playing && /* @__PURE__ */ jsx15(PresenceLayer, { presence: agentPresence, viewport: docToRoot }),
|
|
1843
|
+
/* @__PURE__ */ jsx15(PaintToolbar, { controller, tool, onToolChange: setTool, fillOptions, onFillOptionsChange: setFillOptions, fileName }),
|
|
1844
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex min-h-0 flex-1 gap-2", children: [
|
|
1845
|
+
/* @__PURE__ */ jsx15(BrushPanel, { controller, className: "w-60 shrink-0 overflow-y-auto pr-1" }),
|
|
1846
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
1847
|
+
/* @__PURE__ */ jsx15(PaintCanvas, { controller, tool, fillOptions, onError: setError, presence: playing ? void 0 : presence, proposals, agentStrokes, className: "flex-1 rounded-lg" }),
|
|
1848
|
+
error && /* @__PURE__ */ jsx15("p", { role: "alert", className: "mt-1 text-[11px] text-rose-400", children: error })
|
|
1602
1849
|
] }),
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
/* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
tab === "color" && /* @__PURE__ */
|
|
1607
|
-
tab === "wet" && /* @__PURE__ */
|
|
1608
|
-
tab === "paper" && /* @__PURE__ */
|
|
1609
|
-
tab === "layers" && /* @__PURE__ */
|
|
1610
|
-
tab === "layers" && /* @__PURE__ */
|
|
1611
|
-
tab === "layers" && /* @__PURE__ */
|
|
1612
|
-
tab === "layers" && /* @__PURE__ */
|
|
1613
|
-
tab === "
|
|
1850
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex w-64 shrink-0 flex-col gap-2 overflow-y-auto pr-1", children: [
|
|
1851
|
+
/* @__PURE__ */ jsx15("div", { className: "flex gap-1", role: "tablist", "aria-label": "Paint panels", children: tabs.map((t) => /* @__PURE__ */ jsx15("button", { type: "button", role: "tab", "aria-selected": tab === t, "data-paint-tab": t, className: chip(tab === t), onClick: () => setTab(t), children: t === "color" ? "Colour" : t === "wet" ? "Wet" : t === "paper" ? "Paper" : t === "layers" ? "Layers" : "Effects" }, t)) }),
|
|
1852
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-2", "data-paint-panel": tab, children: [
|
|
1853
|
+
tab === "color" && /* @__PURE__ */ jsx15(ColorPanel, { controller }),
|
|
1854
|
+
tab === "wet" && /* @__PURE__ */ jsx15(WetPanel, { controller }),
|
|
1855
|
+
tab === "paper" && /* @__PURE__ */ jsx15(PaperPanel, { controller }),
|
|
1856
|
+
tab === "layers" && /* @__PURE__ */ jsx15(PaintLayersPanel, { controller }),
|
|
1857
|
+
tab === "layers" && /* @__PURE__ */ jsx15(StrokePanel, { controller }),
|
|
1858
|
+
tab === "layers" && /* @__PURE__ */ jsx15(PathStrokePanel, { controller }),
|
|
1859
|
+
tab === "layers" && /* @__PURE__ */ jsx15(EvolutionPanel, { controller, proposals }),
|
|
1860
|
+
tab === "layers" && /* @__PURE__ */ jsx15(StickerPanel, { controller }),
|
|
1861
|
+
tab === "effects" && effects && /* @__PURE__ */ jsx15(PaintEffectsPanel, { controller })
|
|
1614
1862
|
] })
|
|
1615
1863
|
] })
|
|
1616
1864
|
] })
|
|
@@ -1621,6 +1869,7 @@ export {
|
|
|
1621
1869
|
BrushLibraryBrowser,
|
|
1622
1870
|
BrushPanel,
|
|
1623
1871
|
ColorPanel,
|
|
1872
|
+
EvolutionPanel,
|
|
1624
1873
|
PaintCanvas,
|
|
1625
1874
|
PaintEditor,
|
|
1626
1875
|
PaintEffectsPanel,
|