@pixerate/editor-react 0.76.0 → 0.77.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.
@@ -1,3 +1,7 @@
1
+ import {
2
+ PaintGradientEditorView
3
+ } from "./chunk-MO354USR.js";
4
+
1
5
  // src/image-editor/useImageEditor.ts
2
6
  import { useRef, useState, useEffect, useCallback, useMemo } from "react";
3
7
  import {
@@ -1279,14 +1283,22 @@ import {
1279
1283
  rgbUnitToHex,
1280
1284
  setRetouchChoice
1281
1285
  } from "@pixerate/editor/image-editor";
1282
- import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
1286
+ import { DEFAULT_PAINT_GRADIENT } from "@pixerate/editor/image-editor";
1287
+
1288
+ // src/image-editor/PaintGradientEditor.tsx
1289
+ import { PAINT_GRADIENT_KIT } from "@pixerate/editor/image-editor";
1290
+ import { jsx as jsx7 } from "react/jsx-runtime";
1291
+ var PaintGradientEditor = (props) => /* @__PURE__ */ jsx7(PaintGradientEditorView, { ...props, kit: PAINT_GRADIENT_KIT });
1292
+
1293
+ // src/image-editor/BrushOptionsBar.tsx
1294
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
1283
1295
  var chip = (on) => `px-2 py-1 rounded text-[11px] ${on ? "bg-indigo-600 text-white" : "bg-slate-800 text-slate-300 hover:text-white"}`;
1284
1296
  var BrushOptionsBar = ({ controller, className }) => {
1285
1297
  const [, setTick] = useState7(0);
1286
1298
  useEffect6(() => controller.subscribe(() => setTick((n) => n + 1)), [controller]);
1287
1299
  const [error, setError] = useState7(null);
1288
1300
  const state = controller.getState();
1289
- const { brush, foreground, background, mixer, mixerLoad, retouch, cloneSource } = state.paint;
1301
+ const { brush, foreground, background, mixer, mixerLoad, retouch, cloneSource, paint } = state.paint;
1290
1302
  const tool = state.activeTool;
1291
1303
  const attempt = (fn) => {
1292
1304
  try {
@@ -1297,7 +1309,7 @@ var BrushOptionsBar = ({ controller, className }) => {
1297
1309
  }
1298
1310
  };
1299
1311
  return /* @__PURE__ */ jsxs7("div", { className: `flex flex-col gap-2 text-xs text-slate-200 ${className ?? ""}`, "data-testid": "brush-options", children: [
1300
- /* @__PURE__ */ jsx7("div", { className: "flex flex-wrap gap-1", role: "toolbar", "aria-label": "Paint tools", children: PAINT_TOOLS.map((t) => /* @__PURE__ */ jsx7(
1312
+ /* @__PURE__ */ jsx8("div", { className: "flex flex-wrap gap-1", role: "toolbar", "aria-label": "Paint tools", children: PAINT_TOOLS.map((t) => /* @__PURE__ */ jsx8(
1301
1313
  "button",
1302
1314
  {
1303
1315
  type: "button",
@@ -1311,7 +1323,7 @@ var BrushOptionsBar = ({ controller, className }) => {
1311
1323
  )) }),
1312
1324
  /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", role: "group", "aria-label": "Colours", children: [
1313
1325
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1", children: [
1314
- /* @__PURE__ */ jsx7(
1326
+ /* @__PURE__ */ jsx8(
1315
1327
  "input",
1316
1328
  {
1317
1329
  type: "color",
@@ -1321,10 +1333,10 @@ var BrushOptionsBar = ({ controller, className }) => {
1321
1333
  className: "h-6 w-8 rounded border border-slate-700 bg-transparent"
1322
1334
  }
1323
1335
  ),
1324
- /* @__PURE__ */ jsx7("span", { className: "text-slate-400", children: "FG" })
1336
+ /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: "FG" })
1325
1337
  ] }),
1326
1338
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1", children: [
1327
- /* @__PURE__ */ jsx7(
1339
+ /* @__PURE__ */ jsx8(
1328
1340
  "input",
1329
1341
  {
1330
1342
  type: "color",
@@ -1334,12 +1346,24 @@ var BrushOptionsBar = ({ controller, className }) => {
1334
1346
  className: "h-6 w-8 rounded border border-slate-700 bg-transparent"
1335
1347
  }
1336
1348
  ),
1337
- /* @__PURE__ */ jsx7("span", { className: "text-slate-400", children: "BG" })
1349
+ /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: "BG" })
1338
1350
  ] }),
1339
- /* @__PURE__ */ jsx7("button", { type: "button", title: "Swap colours (X)", className: chip(false), onClick: () => controller.swapPaintColors(), children: "Swap" }),
1340
- /* @__PURE__ */ jsx7("button", { type: "button", title: "Default colours (D)", className: chip(false), onClick: () => controller.resetPaintColors(), children: "Default" })
1351
+ /* @__PURE__ */ jsx8("button", { type: "button", title: "Swap colours (X)", className: chip(false), onClick: () => controller.swapPaintColors(), children: "Swap" }),
1352
+ /* @__PURE__ */ jsx8("button", { type: "button", title: "Default colours (D)", className: chip(false), onClick: () => controller.resetPaintColors(), children: "Default" }),
1353
+ state.activeTool === "brush" && /* @__PURE__ */ jsx8(
1354
+ "button",
1355
+ {
1356
+ type: "button",
1357
+ "aria-pressed": paint.type === "gradient",
1358
+ title: "Gradient paint: the brush changes colour as the stroke goes",
1359
+ className: chip(paint.type === "gradient"),
1360
+ onClick: () => attempt(() => controller.setPaintOptions(paint.type === "gradient" ? { foreground } : { paint: DEFAULT_PAINT_GRADIENT })),
1361
+ children: "Gradient"
1362
+ }
1363
+ )
1341
1364
  ] }),
1342
- BRUSH_OPTION_CONTROLS.map((spec) => /* @__PURE__ */ jsx7(
1365
+ state.activeTool === "brush" && paint.type === "gradient" && /* @__PURE__ */ jsx8(PaintGradientEditor, { value: paint, colors: { paint: foreground, secondary: background }, onChange: (g) => attempt(() => controller.setPaintOptions({ paint: g })) }),
1366
+ BRUSH_OPTION_CONTROLS.map((spec) => /* @__PURE__ */ jsx8(
1343
1367
  ControlSlider,
1344
1368
  {
1345
1369
  spec,
@@ -1350,7 +1374,7 @@ var BrushOptionsBar = ({ controller, className }) => {
1350
1374
  )),
1351
1375
  state.activeTool === "mixer" && /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2 border-t border-slate-800 pt-2", role: "group", "aria-label": "Mixer Brush", "data-testid": "mixer-options", children: [
1352
1376
  /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", children: [
1353
- /* @__PURE__ */ jsx7(
1377
+ /* @__PURE__ */ jsx8(
1354
1378
  "span",
1355
1379
  {
1356
1380
  "aria-label": "Brush load",
@@ -1359,10 +1383,10 @@ var BrushOptionsBar = ({ controller, className }) => {
1359
1383
  style: { background: mixerLoad.reservoir ? rgbUnitToHex(mixerLoad.reservoir) : "transparent" }
1360
1384
  }
1361
1385
  ),
1362
- /* @__PURE__ */ jsx7("button", { type: "button", title: "Fill the reservoir with the foreground colour", className: chip(false), onClick: () => controller.loadMixerBrush(), children: "Load brush" }),
1363
- /* @__PURE__ */ jsx7("button", { type: "button", title: "Empty the picked-up colour", className: chip(false), onClick: () => controller.cleanMixerBrush(), children: "Clean brush" })
1386
+ /* @__PURE__ */ jsx8("button", { type: "button", title: "Fill the reservoir with the foreground colour", className: chip(false), onClick: () => controller.loadMixerBrush(), children: "Load brush" }),
1387
+ /* @__PURE__ */ jsx8("button", { type: "button", title: "Empty the picked-up colour", className: chip(false), onClick: () => controller.cleanMixerBrush(), children: "Clean brush" })
1364
1388
  ] }),
1365
- /* @__PURE__ */ jsx7("div", { className: "flex gap-1", role: "group", "aria-label": "Mixing", children: MIXER_MIXING_OPTIONS.map((m) => /* @__PURE__ */ jsx7(
1389
+ /* @__PURE__ */ jsx8("div", { className: "flex gap-1", role: "group", "aria-label": "Mixing", children: MIXER_MIXING_OPTIONS.map((m) => /* @__PURE__ */ jsx8(
1366
1390
  "button",
1367
1391
  {
1368
1392
  type: "button",
@@ -1374,10 +1398,10 @@ var BrushOptionsBar = ({ controller, className }) => {
1374
1398
  },
1375
1399
  m.id
1376
1400
  )) }),
1377
- MIXER_OPTION_CONTROLS.map((spec) => /* @__PURE__ */ jsx7(ControlSlider, { spec, value: mixer[spec.id], onChange: (v) => controller.setPaintOptions({ mixer: { [spec.id]: v } }) }, spec.id)),
1401
+ MIXER_OPTION_CONTROLS.map((spec) => /* @__PURE__ */ jsx8(ControlSlider, { spec, value: mixer[spec.id], onChange: (v) => controller.setPaintOptions({ mixer: { [spec.id]: v } }) }, spec.id)),
1378
1402
  /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap gap-3 text-slate-300", children: [
1379
1403
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1.5", children: [
1380
- /* @__PURE__ */ jsx7(
1404
+ /* @__PURE__ */ jsx8(
1381
1405
  "input",
1382
1406
  {
1383
1407
  type: "checkbox",
@@ -1390,7 +1414,7 @@ var BrushOptionsBar = ({ controller, className }) => {
1390
1414
  "Load each stroke"
1391
1415
  ] }),
1392
1416
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1.5", children: [
1393
- /* @__PURE__ */ jsx7(
1417
+ /* @__PURE__ */ jsx8(
1394
1418
  "input",
1395
1419
  {
1396
1420
  type: "checkbox",
@@ -1406,12 +1430,12 @@ var BrushOptionsBar = ({ controller, className }) => {
1406
1430
  ] }),
1407
1431
  isRetouchPaintTool(tool) && /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2 border-t border-slate-800 pt-2", role: "group", "aria-label": "Retouch options", "data-testid": "retouch-options", children: [
1408
1432
  (tool === "clone" || tool === "heal") && /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2", children: [
1409
- /* @__PURE__ */ jsx7("span", { className: "text-slate-400", "data-testid": "clone-source", children: cloneSourceLabel(controller) }),
1410
- cloneSource && /* @__PURE__ */ jsx7("button", { type: "button", title: "Forget the source point", className: chip(false), onClick: () => controller.setCloneSource(null), children: "Clear source" })
1433
+ /* @__PURE__ */ jsx8("span", { className: "text-slate-400", "data-testid": "clone-source", children: cloneSourceLabel(controller) }),
1434
+ cloneSource && /* @__PURE__ */ jsx8("button", { type: "button", title: "Forget the source point", className: chip(false), onClick: () => controller.setCloneSource(null), children: "Clear source" })
1411
1435
  ] }),
1412
1436
  RETOUCH_CHOICES.filter((c) => c.tools.includes(tool)).map((choice) => /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": choice.label, children: [
1413
- /* @__PURE__ */ jsx7("span", { className: "text-slate-400", children: choice.label }),
1414
- choice.options.map((o) => /* @__PURE__ */ jsx7(
1437
+ /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: choice.label }),
1438
+ choice.options.map((o) => /* @__PURE__ */ jsx8(
1415
1439
  "button",
1416
1440
  {
1417
1441
  type: "button",
@@ -1424,9 +1448,9 @@ var BrushOptionsBar = ({ controller, className }) => {
1424
1448
  o.id
1425
1449
  ))
1426
1450
  ] }, choice.id)),
1427
- RETOUCH_OPTION_CONTROLS.filter((c) => c.tools.includes(tool)).map((spec) => /* @__PURE__ */ jsx7(ControlSlider, { spec, value: retouch[spec.id], onChange: (v) => controller.setPaintOptions({ retouch: { [spec.id]: v } }) }, spec.id)),
1428
- /* @__PURE__ */ jsx7("div", { className: "flex flex-wrap gap-3 text-slate-300", children: RETOUCH_TOGGLES.filter((t) => t.tools.includes(tool)).map((t) => /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1.5", children: [
1429
- /* @__PURE__ */ jsx7(
1451
+ RETOUCH_OPTION_CONTROLS.filter((c) => c.tools.includes(tool)).map((spec) => /* @__PURE__ */ jsx8(ControlSlider, { spec, value: retouch[spec.id], onChange: (v) => controller.setPaintOptions({ retouch: { [spec.id]: v } }) }, spec.id)),
1452
+ /* @__PURE__ */ jsx8("div", { className: "flex flex-wrap gap-3 text-slate-300", children: RETOUCH_TOGGLES.filter((t) => t.tools.includes(tool)).map((t) => /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1.5", children: [
1453
+ /* @__PURE__ */ jsx8(
1430
1454
  "input",
1431
1455
  {
1432
1456
  type: "checkbox",
@@ -1441,7 +1465,7 @@ var BrushOptionsBar = ({ controller, className }) => {
1441
1465
  ] }),
1442
1466
  /* @__PURE__ */ jsxs7("div", { className: "flex flex-wrap gap-3 text-slate-300", role: "group", "aria-label": "Pressure", children: [
1443
1467
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1.5", children: [
1444
- /* @__PURE__ */ jsx7(
1468
+ /* @__PURE__ */ jsx8(
1445
1469
  "input",
1446
1470
  {
1447
1471
  type: "checkbox",
@@ -1454,7 +1478,7 @@ var BrushOptionsBar = ({ controller, className }) => {
1454
1478
  "Pressure size"
1455
1479
  ] }),
1456
1480
  /* @__PURE__ */ jsxs7("label", { className: "flex items-center gap-1.5", children: [
1457
- /* @__PURE__ */ jsx7(
1481
+ /* @__PURE__ */ jsx8(
1458
1482
  "input",
1459
1483
  {
1460
1484
  type: "checkbox",
@@ -1468,17 +1492,17 @@ var BrushOptionsBar = ({ controller, className }) => {
1468
1492
  ] })
1469
1493
  ] }),
1470
1494
  /* @__PURE__ */ jsxs7("div", { className: "flex gap-1", children: [
1471
- /* @__PURE__ */ jsx7("button", { type: "button", className: chip(false), onClick: () => attempt(() => controller.fillPixels()), children: "Fill" }),
1472
- /* @__PURE__ */ jsx7("button", { type: "button", className: chip(false), onClick: () => attempt(() => controller.clearPixels()), children: "Clear" })
1495
+ /* @__PURE__ */ jsx8("button", { type: "button", className: chip(false), onClick: () => attempt(() => controller.fillPixels()), children: "Fill" }),
1496
+ /* @__PURE__ */ jsx8("button", { type: "button", className: chip(false), onClick: () => attempt(() => controller.clearPixels()), children: "Clear" })
1473
1497
  ] }),
1474
- error && /* @__PURE__ */ jsx7("p", { role: "alert", className: "text-rose-400", children: error })
1498
+ error && /* @__PURE__ */ jsx8("p", { role: "alert", className: "text-rose-400", children: error })
1475
1499
  ] });
1476
1500
  };
1477
1501
 
1478
1502
  // src/image-editor/ColorProfilePanel.tsx
1479
1503
  import { useEffect as useEffect7, useState as useState8 } from "react";
1480
1504
  import { COLOR_MODE_OPTIONS, INTENT_OPTIONS, PROOF_PROFILE_OPTIONS, WORKING_SPACE_OPTIONS, colorPanelView } from "@pixerate/editor/image-editor";
1481
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
1505
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
1482
1506
  var chip2 = "px-2 py-1 rounded text-[11px] bg-slate-800 text-slate-300 hover:text-white";
1483
1507
  var select = "rounded bg-slate-800 px-1 py-0.5 text-[11px] text-slate-200";
1484
1508
  var ColorProfilePanel = ({ controller, className }) => {
@@ -1511,26 +1535,26 @@ var ColorProfilePanel = ({ controller, className }) => {
1511
1535
  };
1512
1536
  return /* @__PURE__ */ jsxs8("div", { className: `flex flex-col gap-2 text-xs text-slate-200 ${className ?? ""}`, "data-testid": "color-profile-panel", children: [
1513
1537
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
1514
- /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: "Profile" }),
1515
- /* @__PURE__ */ jsx8("span", { "data-testid": "color-profile-name", children: view.profileName })
1538
+ /* @__PURE__ */ jsx9("span", { className: "text-slate-400", children: "Profile" }),
1539
+ /* @__PURE__ */ jsx9("span", { "data-testid": "color-profile-name", children: view.profileName })
1516
1540
  ] }),
1517
1541
  /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": "Colour mode", children: [
1518
- /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: "Mode" }),
1519
- /* @__PURE__ */ jsx8("select", { "aria-label": "Colour mode", className: select, value: view.mode, onChange: (e) => attempt(() => controller.setColorMode(e.target.value)), children: COLOR_MODE_OPTIONS.map((o) => /* @__PURE__ */ jsx8("option", { value: o.id, title: o.title, children: o.label }, o.id)) }),
1520
- view.cmykProfileName && /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: view.cmykProfileName })
1542
+ /* @__PURE__ */ jsx9("span", { className: "text-slate-400", children: "Mode" }),
1543
+ /* @__PURE__ */ jsx9("select", { "aria-label": "Colour mode", className: select, value: view.mode, onChange: (e) => attempt(() => controller.setColorMode(e.target.value)), children: COLOR_MODE_OPTIONS.map((o) => /* @__PURE__ */ jsx9("option", { value: o.id, title: o.title, children: o.label }, o.id)) }),
1544
+ view.cmykProfileName && /* @__PURE__ */ jsx9("span", { className: "text-slate-400", children: view.cmykProfileName })
1521
1545
  ] }),
1522
1546
  /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": "Assign or convert", children: [
1523
- /* @__PURE__ */ jsx8("select", { "aria-label": "Target profile", className: select, value: target, onChange: (e) => setTarget(e.target.value), children: WORKING_SPACE_OPTIONS.map((o) => /* @__PURE__ */ jsx8("option", { value: o.id, children: o.label }, o.id)) }),
1524
- /* @__PURE__ */ jsx8("select", { "aria-label": "Rendering intent", className: select, value: intent, onChange: (e) => setIntent(e.target.value), children: INTENT_OPTIONS.map((o) => /* @__PURE__ */ jsx8("option", { value: o.id, title: o.title, children: o.label }, o.id)) }),
1547
+ /* @__PURE__ */ jsx9("select", { "aria-label": "Target profile", className: select, value: target, onChange: (e) => setTarget(e.target.value), children: WORKING_SPACE_OPTIONS.map((o) => /* @__PURE__ */ jsx9("option", { value: o.id, children: o.label }, o.id)) }),
1548
+ /* @__PURE__ */ jsx9("select", { "aria-label": "Rendering intent", className: select, value: intent, onChange: (e) => setIntent(e.target.value), children: INTENT_OPTIONS.map((o) => /* @__PURE__ */ jsx9("option", { value: o.id, title: o.title, children: o.label }, o.id)) }),
1525
1549
  /* @__PURE__ */ jsxs8("label", { className: "flex items-center gap-1", children: [
1526
- /* @__PURE__ */ jsx8("input", { type: "checkbox", "aria-label": "Black point compensation", checked: bpc, onChange: (e) => setBpc(e.target.checked), className: "accent-indigo-500" }),
1550
+ /* @__PURE__ */ jsx9("input", { type: "checkbox", "aria-label": "Black point compensation", checked: bpc, onChange: (e) => setBpc(e.target.checked), className: "accent-indigo-500" }),
1527
1551
  "BPC"
1528
1552
  ] }),
1529
- /* @__PURE__ */ jsx8("button", { type: "button", className: chip2, title: "Edit \u203A Assign Profile: keep the numbers", onClick: () => attempt(() => controller.assignProfile(target)), children: "Assign" }),
1530
- /* @__PURE__ */ jsx8("button", { type: "button", className: chip2, title: "Edit \u203A Convert to Profile: keep the look", onClick: () => attempt(() => controller.convertToProfile(target, { intent, bpc })), children: "Convert" })
1553
+ /* @__PURE__ */ jsx9("button", { type: "button", className: chip2, title: "Edit \u203A Assign Profile: keep the numbers", onClick: () => attempt(() => controller.assignProfile(target)), children: "Assign" }),
1554
+ /* @__PURE__ */ jsx9("button", { type: "button", className: chip2, title: "Edit \u203A Convert to Profile: keep the look", onClick: () => attempt(() => controller.convertToProfile(target, { intent, bpc })), children: "Convert" })
1531
1555
  ] }),
1532
1556
  /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": "Proof setup", children: [
1533
- /* @__PURE__ */ jsx8("span", { className: "text-slate-400", children: "Proof" }),
1557
+ /* @__PURE__ */ jsx9("span", { className: "text-slate-400", children: "Proof" }),
1534
1558
  /* @__PURE__ */ jsxs8(
1535
1559
  "select",
1536
1560
  {
@@ -1539,24 +1563,24 @@ var ColorProfilePanel = ({ controller, className }) => {
1539
1563
  value: view.proof?.id ?? "",
1540
1564
  onChange: (e) => e.target.value ? proofWith({ id: e.target.value }) : attempt(() => controller.setProofSetup(null)),
1541
1565
  children: [
1542
- /* @__PURE__ */ jsx8("option", { value: "", children: "Off" }),
1543
- PROOF_PROFILE_OPTIONS.map((o) => /* @__PURE__ */ jsx8("option", { value: o.id, children: o.label }, o.id))
1566
+ /* @__PURE__ */ jsx9("option", { value: "", children: "Off" }),
1567
+ PROOF_PROFILE_OPTIONS.map((o) => /* @__PURE__ */ jsx9("option", { value: o.id, children: o.label }, o.id))
1544
1568
  ]
1545
1569
  }
1546
1570
  ),
1547
1571
  view.proof && /* @__PURE__ */ jsxs8(Fragment2, { children: [
1548
- /* @__PURE__ */ jsx8("select", { "aria-label": "Proof intent", className: select, value: view.proof.intent, onChange: (e) => proofWith({ intent: e.target.value }), children: INTENT_OPTIONS.map((o) => /* @__PURE__ */ jsx8("option", { value: o.id, children: o.label }, o.id)) }),
1572
+ /* @__PURE__ */ jsx9("select", { "aria-label": "Proof intent", className: select, value: view.proof.intent, onChange: (e) => proofWith({ intent: e.target.value }), children: INTENT_OPTIONS.map((o) => /* @__PURE__ */ jsx9("option", { value: o.id, children: o.label }, o.id)) }),
1549
1573
  /* @__PURE__ */ jsxs8("label", { className: "flex items-center gap-1", children: [
1550
- /* @__PURE__ */ jsx8("input", { type: "checkbox", "aria-label": "Simulate paper colour", checked: view.proof.simulatePaper, onChange: (e) => proofWith({ simulatePaper: e.target.checked }), className: "accent-indigo-500" }),
1574
+ /* @__PURE__ */ jsx9("input", { type: "checkbox", "aria-label": "Simulate paper colour", checked: view.proof.simulatePaper, onChange: (e) => proofWith({ simulatePaper: e.target.checked }), className: "accent-indigo-500" }),
1551
1575
  "Paper"
1552
1576
  ] }),
1553
1577
  /* @__PURE__ */ jsxs8("label", { className: "flex items-center gap-1", children: [
1554
- /* @__PURE__ */ jsx8("input", { type: "checkbox", "aria-label": "Gamut warning", checked: view.proof.gamutWarning, onChange: (e) => proofWith({ gamutWarning: e.target.checked }), className: "accent-indigo-500" }),
1578
+ /* @__PURE__ */ jsx9("input", { type: "checkbox", "aria-label": "Gamut warning", checked: view.proof.gamutWarning, onChange: (e) => proofWith({ gamutWarning: e.target.checked }), className: "accent-indigo-500" }),
1555
1579
  "Gamut warning"
1556
1580
  ] })
1557
1581
  ] })
1558
1582
  ] }),
1559
- error && /* @__PURE__ */ jsx8("p", { role: "alert", className: "text-rose-400", children: error })
1583
+ error && /* @__PURE__ */ jsx9("p", { role: "alert", className: "text-rose-400", children: error })
1560
1584
  ] });
1561
1585
  };
1562
1586
 
@@ -1568,7 +1592,7 @@ import {
1568
1592
  SELECTION_TOOLS,
1569
1593
  describeSelection
1570
1594
  } from "@pixerate/editor/image-editor";
1571
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
1595
+ import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1572
1596
  var MODIFY_OPS = [
1573
1597
  { op: "grow", label: "Grow" },
1574
1598
  { op: "shrink", label: "Shrink" },
@@ -1590,15 +1614,15 @@ var SelectionOptionsBar = ({
1590
1614
  const sel = selection === void 0 ? controller.getSelection() : selection;
1591
1615
  const qm = quickMask ?? Boolean(controller.getState().quickMask);
1592
1616
  return /* @__PURE__ */ jsxs9("div", { "data-testid": "selection-options-bar", className: `flex flex-col gap-3 text-xs ${className}`, children: [
1593
- /* @__PURE__ */ jsx9("div", { role: "group", "aria-label": "Selection tool", className: "flex flex-wrap gap-1", children: SELECTION_TOOLS.map((t) => /* @__PURE__ */ jsx9("button", { type: "button", "aria-pressed": options.tool === t.id, className: btn(options.tool === t.id), onClick: () => set({ tool: t.id }), children: t.label }, t.id)) }),
1594
- /* @__PURE__ */ jsx9("div", { role: "group", "aria-label": "Selection mode", className: "flex flex-wrap gap-1", children: SELECTION_MODES.map((m) => /* @__PURE__ */ jsx9("button", { type: "button", "aria-pressed": options.mode === m, className: btn(options.mode === m), onClick: () => set({ mode: m }), children: SELECTION_MODE_LABELS[m] }, m)) }),
1617
+ /* @__PURE__ */ jsx10("div", { role: "group", "aria-label": "Selection tool", className: "flex flex-wrap gap-1", children: SELECTION_TOOLS.map((t) => /* @__PURE__ */ jsx10("button", { type: "button", "aria-pressed": options.tool === t.id, className: btn(options.tool === t.id), onClick: () => set({ tool: t.id }), children: t.label }, t.id)) }),
1618
+ /* @__PURE__ */ jsx10("div", { role: "group", "aria-label": "Selection mode", className: "flex flex-wrap gap-1", children: SELECTION_MODES.map((m) => /* @__PURE__ */ jsx10("button", { type: "button", "aria-pressed": options.mode === m, className: btn(options.mode === m), onClick: () => set({ mode: m }), children: SELECTION_MODE_LABELS[m] }, m)) }),
1595
1619
  options.tool === "wand" && /* @__PURE__ */ jsxs9("div", { className: "flex flex-col gap-2", children: [
1596
1620
  /* @__PURE__ */ jsxs9("label", { className: "flex flex-col gap-1", children: [
1597
1621
  /* @__PURE__ */ jsxs9("span", { className: "flex justify-between text-slate-400", children: [
1598
- /* @__PURE__ */ jsx9("span", { children: "Tolerance" }),
1599
- /* @__PURE__ */ jsx9("span", { className: "font-mono", children: options.tolerance })
1622
+ /* @__PURE__ */ jsx10("span", { children: "Tolerance" }),
1623
+ /* @__PURE__ */ jsx10("span", { className: "font-mono", children: options.tolerance })
1600
1624
  ] }),
1601
- /* @__PURE__ */ jsx9(
1625
+ /* @__PURE__ */ jsx10(
1602
1626
  "input",
1603
1627
  {
1604
1628
  type: "range",
@@ -1613,11 +1637,11 @@ var SelectionOptionsBar = ({
1613
1637
  )
1614
1638
  ] }),
1615
1639
  /* @__PURE__ */ jsxs9("label", { className: "flex items-center gap-2 text-slate-300", children: [
1616
- /* @__PURE__ */ jsx9("input", { type: "checkbox", checked: options.contiguous, onChange: (e) => set({ contiguous: e.target.checked }) }),
1640
+ /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: options.contiguous, onChange: (e) => set({ contiguous: e.target.checked }) }),
1617
1641
  "Contiguous"
1618
1642
  ] }),
1619
1643
  /* @__PURE__ */ jsxs9("label", { className: "flex items-center gap-2 text-slate-300", children: [
1620
- /* @__PURE__ */ jsx9("input", { type: "checkbox", checked: options.sampleMerged, onChange: (e) => set({ sampleMerged: e.target.checked }) }),
1644
+ /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: options.sampleMerged, onChange: (e) => set({ sampleMerged: e.target.checked }) }),
1621
1645
  "Sample adjusted image"
1622
1646
  ] }),
1623
1647
  /* @__PURE__ */ jsxs9("label", { className: "flex items-center gap-2 text-slate-300", children: [
@@ -1630,27 +1654,27 @@ var SelectionOptionsBar = ({
1630
1654
  onChange: (e) => set({ sample: e.target.value }),
1631
1655
  className: "bg-slate-800 border border-slate-700 rounded px-1 py-0.5",
1632
1656
  children: [
1633
- /* @__PURE__ */ jsx9("option", { value: "composite", children: "All layers" }),
1634
- /* @__PURE__ */ jsx9("option", { value: "active-layer", children: "Active layer" })
1657
+ /* @__PURE__ */ jsx10("option", { value: "composite", children: "All layers" }),
1658
+ /* @__PURE__ */ jsx10("option", { value: "active-layer", children: "Active layer" })
1635
1659
  ]
1636
1660
  }
1637
1661
  )
1638
1662
  ] })
1639
1663
  ] }),
1640
1664
  /* @__PURE__ */ jsxs9("label", { className: "flex items-center gap-2 text-slate-300", children: [
1641
- /* @__PURE__ */ jsx9("input", { type: "checkbox", checked: options.antiAlias, onChange: (e) => set({ antiAlias: e.target.checked }) }),
1665
+ /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: options.antiAlias, onChange: (e) => set({ antiAlias: e.target.checked }) }),
1642
1666
  "Anti-alias"
1643
1667
  ] }),
1644
1668
  /* @__PURE__ */ jsxs9("div", { className: "flex flex-wrap gap-1", children: [
1645
- /* @__PURE__ */ jsx9("button", { type: "button", className: btn(false), onClick: () => controller.selectAll(), children: "Select All" }),
1646
- /* @__PURE__ */ jsx9("button", { type: "button", className: btn(false), disabled: !sel, onClick: () => controller.deselect(), children: "Deselect" }),
1647
- /* @__PURE__ */ jsx9("button", { type: "button", className: btn(false), onClick: () => controller.invertSelection(), children: "Inverse" }),
1648
- /* @__PURE__ */ jsx9("button", { type: "button", "aria-pressed": qm, className: btn(qm), onClick: () => controller.setQuickMask(!qm), children: "Quick Mask" })
1669
+ /* @__PURE__ */ jsx10("button", { type: "button", className: btn(false), onClick: () => controller.selectAll(), children: "Select All" }),
1670
+ /* @__PURE__ */ jsx10("button", { type: "button", className: btn(false), disabled: !sel, onClick: () => controller.deselect(), children: "Deselect" }),
1671
+ /* @__PURE__ */ jsx10("button", { type: "button", className: btn(false), onClick: () => controller.invertSelection(), children: "Inverse" }),
1672
+ /* @__PURE__ */ jsx10("button", { type: "button", "aria-pressed": qm, className: btn(qm), onClick: () => controller.setQuickMask(!qm), children: "Quick Mask" })
1649
1673
  ] }),
1650
1674
  /* @__PURE__ */ jsxs9("div", { className: "flex flex-wrap items-center gap-1", children: [
1651
1675
  /* @__PURE__ */ jsxs9("label", { className: "flex items-center gap-1 text-slate-400", children: [
1652
1676
  "Radius",
1653
- /* @__PURE__ */ jsx9(
1677
+ /* @__PURE__ */ jsx10(
1654
1678
  "input",
1655
1679
  {
1656
1680
  type: "number",
@@ -1664,9 +1688,9 @@ var SelectionOptionsBar = ({
1664
1688
  }
1665
1689
  )
1666
1690
  ] }),
1667
- MODIFY_OPS.map(({ op, label }) => /* @__PURE__ */ jsx9("button", { type: "button", className: btn(false), disabled: !sel, onClick: () => controller.modifySelection(op, radius), children: label }, op))
1691
+ MODIFY_OPS.map(({ op, label }) => /* @__PURE__ */ jsx10("button", { type: "button", className: btn(false), disabled: !sel, onClick: () => controller.modifySelection(op, radius), children: label }, op))
1668
1692
  ] }),
1669
- /* @__PURE__ */ jsx9("p", { "data-testid": "selection-status", className: "text-slate-400", children: describeSelection(sel) })
1693
+ /* @__PURE__ */ jsx10("p", { "data-testid": "selection-status", className: "text-slate-400", children: describeSelection(sel) })
1670
1694
  ] });
1671
1695
  };
1672
1696
 
@@ -1678,7 +1702,7 @@ import {
1678
1702
  adjustmentKindLabel as adjustmentKindLabel2,
1679
1703
  layerMaskFromSelection
1680
1704
  } from "@pixerate/editor/image-editor";
1681
- import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
1705
+ import { Fragment as Fragment3, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
1682
1706
  var DEFAULT_PARAMS = { radius: 8, smartRadius: false, smooth: 0, feather: 0, contrast: 0, shiftEdge: 0 };
1683
1707
  var button2 = "px-2 py-1 rounded-md border border-slate-800 bg-slate-950 text-[11px] text-slate-200 hover:text-white disabled:opacity-40";
1684
1708
  var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
@@ -1702,16 +1726,16 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
1702
1726
  }
1703
1727
  };
1704
1728
  return /* @__PURE__ */ jsxs10("div", { "data-testid": "refine-edge-panel", className: `flex flex-col gap-3 text-xs ${className}`, children: [
1705
- /* @__PURE__ */ jsx10("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Refine Edge" }),
1729
+ /* @__PURE__ */ jsx11("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Refine Edge" }),
1706
1730
  REFINE_EDGE_CONTROLS.map((c) => /* @__PURE__ */ jsxs10("label", { className: "flex flex-col gap-1", children: [
1707
1731
  /* @__PURE__ */ jsxs10("span", { className: "flex justify-between text-slate-400", children: [
1708
- /* @__PURE__ */ jsx10("span", { children: c.label }),
1732
+ /* @__PURE__ */ jsx11("span", { children: c.label }),
1709
1733
  /* @__PURE__ */ jsxs10("span", { className: "font-mono", children: [
1710
1734
  params[c.id],
1711
1735
  c.unit
1712
1736
  ] })
1713
1737
  ] }),
1714
- /* @__PURE__ */ jsx10(
1738
+ /* @__PURE__ */ jsx11(
1715
1739
  "input",
1716
1740
  {
1717
1741
  type: "range",
@@ -1726,27 +1750,27 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
1726
1750
  )
1727
1751
  ] }, c.id)),
1728
1752
  /* @__PURE__ */ jsxs10("label", { className: "flex items-center gap-2 text-slate-300", children: [
1729
- /* @__PURE__ */ jsx10("input", { type: "checkbox", checked: params.smartRadius, onChange: (e) => setParams({ ...params, smartRadius: e.target.checked }) }),
1753
+ /* @__PURE__ */ jsx11("input", { type: "checkbox", checked: params.smartRadius, onChange: (e) => setParams({ ...params, smartRadius: e.target.checked }) }),
1730
1754
  "Smart Radius"
1731
1755
  ] }),
1732
1756
  /* @__PURE__ */ jsxs10("div", { className: "flex gap-1", children: [
1733
- /* @__PURE__ */ jsx10("button", { type: "button", className: button2, disabled: !sel || busy, onClick: refine, children: "Refine Edge" }),
1734
- /* @__PURE__ */ jsx10("button", { type: "button", className: button2, onClick: () => setParams(DEFAULT_PARAMS), children: "Reset" })
1757
+ /* @__PURE__ */ jsx11("button", { type: "button", className: button2, disabled: !sel || busy, onClick: refine, children: "Refine Edge" }),
1758
+ /* @__PURE__ */ jsx11("button", { type: "button", className: button2, onClick: () => setParams(DEFAULT_PARAMS), children: "Reset" })
1735
1759
  ] }),
1736
- error && /* @__PURE__ */ jsx10("p", { role: "alert", className: "text-rose-400", children: error }),
1737
- /* @__PURE__ */ jsx10("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px] mt-2", children: "Layer Mask" }),
1760
+ error && /* @__PURE__ */ jsx11("p", { role: "alert", className: "text-rose-400", children: error }),
1761
+ /* @__PURE__ */ jsx11("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px] mt-2", children: "Layer Mask" }),
1738
1762
  /* @__PURE__ */ jsxs10("div", { className: "flex gap-1 items-center", children: [
1739
- /* @__PURE__ */ jsx10(
1763
+ /* @__PURE__ */ jsx11(
1740
1764
  "select",
1741
1765
  {
1742
1766
  "aria-label": "New masked layer kind",
1743
1767
  value: newKind,
1744
1768
  onChange: (e) => setNewKind(e.target.value),
1745
1769
  className: "flex-1 bg-slate-950 border border-slate-800 rounded px-1 py-1 text-slate-200",
1746
- children: ADJUSTMENT_KINDS2.map((k) => /* @__PURE__ */ jsx10("option", { value: k.kind, children: k.label }, k.kind))
1770
+ children: ADJUSTMENT_KINDS2.map((k) => /* @__PURE__ */ jsx11("option", { value: k.kind, children: k.label }, k.kind))
1747
1771
  }
1748
1772
  ),
1749
- /* @__PURE__ */ jsx10(
1773
+ /* @__PURE__ */ jsx11(
1750
1774
  "button",
1751
1775
  {
1752
1776
  type: "button",
@@ -1758,7 +1782,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
1758
1782
  )
1759
1783
  ] }),
1760
1784
  list.length > 0 && target && /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-2", children: [
1761
- /* @__PURE__ */ jsx10(
1785
+ /* @__PURE__ */ jsx11(
1762
1786
  "select",
1763
1787
  {
1764
1788
  "aria-label": "Mask layer",
@@ -1772,20 +1796,20 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
1772
1796
  }
1773
1797
  ),
1774
1798
  /* @__PURE__ */ jsxs10("div", { className: "flex flex-wrap gap-1", children: [
1775
- /* @__PURE__ */ jsx10("button", { type: "button", className: button2, disabled: !sel, onClick: () => controller.applySelectionAsLayerMask(target.id), children: "Mask with Selection" }),
1776
- /* @__PURE__ */ jsx10("button", { type: "button", className: button2, disabled: !target.mask, onClick: () => controller.selectionFromLayerMask(target.id), children: "Load as Selection" }),
1777
- /* @__PURE__ */ jsx10("button", { type: "button", className: button2, disabled: !target.mask, onClick: () => controller.setAdjustmentLayerMask(target.id, null), children: "Remove Mask" })
1799
+ /* @__PURE__ */ jsx11("button", { type: "button", className: button2, disabled: !sel, onClick: () => controller.applySelectionAsLayerMask(target.id), children: "Mask with Selection" }),
1800
+ /* @__PURE__ */ jsx11("button", { type: "button", className: button2, disabled: !target.mask, onClick: () => controller.selectionFromLayerMask(target.id), children: "Load as Selection" }),
1801
+ /* @__PURE__ */ jsx11("button", { type: "button", className: button2, disabled: !target.mask, onClick: () => controller.setAdjustmentLayerMask(target.id, null), children: "Remove Mask" })
1778
1802
  ] }),
1779
1803
  target.mask && /* @__PURE__ */ jsxs10(Fragment3, { children: [
1780
1804
  /* @__PURE__ */ jsxs10("label", { className: "flex flex-col gap-1", children: [
1781
1805
  /* @__PURE__ */ jsxs10("span", { className: "flex justify-between text-slate-400", children: [
1782
- /* @__PURE__ */ jsx10("span", { children: "Density" }),
1806
+ /* @__PURE__ */ jsx11("span", { children: "Density" }),
1783
1807
  /* @__PURE__ */ jsxs10("span", { className: "font-mono", children: [
1784
1808
  Math.round((target.mask.density ?? 1) * 100),
1785
1809
  "%"
1786
1810
  ] })
1787
1811
  ] }),
1788
- /* @__PURE__ */ jsx10(
1812
+ /* @__PURE__ */ jsx11(
1789
1813
  "input",
1790
1814
  {
1791
1815
  type: "range",
@@ -1801,13 +1825,13 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
1801
1825
  ] }),
1802
1826
  /* @__PURE__ */ jsxs10("label", { className: "flex flex-col gap-1", children: [
1803
1827
  /* @__PURE__ */ jsxs10("span", { className: "flex justify-between text-slate-400", children: [
1804
- /* @__PURE__ */ jsx10("span", { children: "Mask Feather" }),
1828
+ /* @__PURE__ */ jsx11("span", { children: "Mask Feather" }),
1805
1829
  /* @__PURE__ */ jsxs10("span", { className: "font-mono", children: [
1806
1830
  target.mask.feather ?? 0,
1807
1831
  "px"
1808
1832
  ] })
1809
1833
  ] }),
1810
- /* @__PURE__ */ jsx10(
1834
+ /* @__PURE__ */ jsx11(
1811
1835
  "input",
1812
1836
  {
1813
1837
  type: "range",
@@ -1829,7 +1853,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
1829
1853
  // src/image-editor/FreeTransformOptionsBar.tsx
1830
1854
  import { useEffect as useEffect8, useState as useState11 } from "react";
1831
1855
  import { FREE_TRANSFORM_FIELDS, FREE_TRANSFORM_MODE_OPTIONS, INTERPOLATIONS, TRANSFORM_ANCHORS, WARP_GRID_OPTIONS, WARP_STYLE_OPTIONS } from "@pixerate/editor/image-editor";
1832
- import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
1856
+ import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
1833
1857
  var chip3 = (on) => `px-2 py-1 rounded text-[11px] ${on ? "bg-indigo-600 text-white" : "bg-slate-800 text-slate-300 hover:text-white"}`;
1834
1858
  var round = (v, unit) => unit === "px" ? Math.round(v * 10) / 10 : Math.round(v * 100) / 100;
1835
1859
  var FreeTransformOptionsBar = ({ tool, className }) => {
@@ -1847,16 +1871,16 @@ var FreeTransformOptionsBar = ({ tool, className }) => {
1847
1871
  if (raw.trim() !== "" && Number.isFinite(v) && Math.abs(v - bar[field]) > 1e-9) tool.setField(field, v);
1848
1872
  };
1849
1873
  return /* @__PURE__ */ jsxs11("div", { className: `flex flex-wrap items-center gap-2 text-xs text-slate-200 ${className ?? ""}`, "data-testid": "free-transform-options", role: "toolbar", "aria-label": "Free Transform options", children: [
1850
- /* @__PURE__ */ jsx11("div", { className: "flex gap-1", role: "group", "aria-label": "Transform mode", children: FREE_TRANSFORM_MODE_OPTIONS.map((m) => /* @__PURE__ */ jsx11("button", { type: "button", title: m.title, "aria-pressed": tool.mode === m.id, className: chip3(tool.mode === m.id), onClick: () => tool.setMode(m.id), children: m.label }, m.id)) }),
1851
- /* @__PURE__ */ jsx11("div", { className: "grid grid-cols-3 gap-px", role: "group", "aria-label": "Reference point", children: TRANSFORM_ANCHORS.map((a) => /* @__PURE__ */ jsx11("button", { type: "button", "aria-label": `Reference point ${a}`, title: `Reference point: ${a}`, className: "h-2.5 w-2.5 rounded-sm bg-slate-700 hover:bg-indigo-500", onClick: () => tool.setReference(a) }, a)) }),
1874
+ /* @__PURE__ */ jsx12("div", { className: "flex gap-1", role: "group", "aria-label": "Transform mode", children: FREE_TRANSFORM_MODE_OPTIONS.map((m) => /* @__PURE__ */ jsx12("button", { type: "button", title: m.title, "aria-pressed": tool.mode === m.id, className: chip3(tool.mode === m.id), onClick: () => tool.setMode(m.id), children: m.label }, m.id)) }),
1875
+ /* @__PURE__ */ jsx12("div", { className: "grid grid-cols-3 gap-px", role: "group", "aria-label": "Reference point", children: TRANSFORM_ANCHORS.map((a) => /* @__PURE__ */ jsx12("button", { type: "button", "aria-label": `Reference point ${a}`, title: `Reference point: ${a}`, className: "h-2.5 w-2.5 rounded-sm bg-slate-700 hover:bg-indigo-500", onClick: () => tool.setReference(a) }, a)) }),
1852
1876
  tool.mode === "warp" && /* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap items-center gap-2", role: "group", "aria-label": "Warp options", children: [
1853
1877
  /* @__PURE__ */ jsxs11("label", { className: "flex items-center gap-1", children: [
1854
- /* @__PURE__ */ jsx11("span", { className: "text-slate-400", children: "Warp" }),
1855
- /* @__PURE__ */ jsx11("select", { "aria-label": "Warp style", value: warp.style, onChange: (e) => tool.setWarp({ style: e.target.value }), className: "rounded border border-slate-700 bg-slate-900 px-1 py-0.5", children: WARP_STYLE_OPTIONS.map((o) => /* @__PURE__ */ jsx11("option", { value: o.id, children: o.label }, o.id)) })
1878
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-400", children: "Warp" }),
1879
+ /* @__PURE__ */ jsx12("select", { "aria-label": "Warp style", value: warp.style, onChange: (e) => tool.setWarp({ style: e.target.value }), className: "rounded border border-slate-700 bg-slate-900 px-1 py-0.5", children: WARP_STYLE_OPTIONS.map((o) => /* @__PURE__ */ jsx12("option", { value: o.id, children: o.label }, o.id)) })
1856
1880
  ] }),
1857
1881
  ["bend", "horizontal", "vertical"].map((k) => /* @__PURE__ */ jsxs11("label", { className: "flex items-center gap-1", children: [
1858
- /* @__PURE__ */ jsx11("span", { className: "text-slate-400", children: k === "bend" ? "Bend" : k === "horizontal" ? "H" : "V" }),
1859
- /* @__PURE__ */ jsx11(
1882
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-400", children: k === "bend" ? "Bend" : k === "horizontal" ? "H" : "V" }),
1883
+ /* @__PURE__ */ jsx12(
1860
1884
  "input",
1861
1885
  {
1862
1886
  type: "number",
@@ -1877,9 +1901,9 @@ var FreeTransformOptionsBar = ({ tool, className }) => {
1877
1901
  },
1878
1902
  `${k}:${warp[k]}`
1879
1903
  ),
1880
- /* @__PURE__ */ jsx11("span", { className: "text-slate-500", children: "%" })
1904
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-500", children: "%" })
1881
1905
  ] }, k)),
1882
- /* @__PURE__ */ jsx11(
1906
+ /* @__PURE__ */ jsx12(
1883
1907
  "button",
1884
1908
  {
1885
1909
  type: "button",
@@ -1892,8 +1916,8 @@ var FreeTransformOptionsBar = ({ tool, className }) => {
1892
1916
  }
1893
1917
  ),
1894
1918
  /* @__PURE__ */ jsxs11("label", { className: "flex items-center gap-1", children: [
1895
- /* @__PURE__ */ jsx11("span", { className: "text-slate-400", children: "Grid" }),
1896
- /* @__PURE__ */ jsx11(
1919
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-400", children: "Grid" }),
1920
+ /* @__PURE__ */ jsx12(
1897
1921
  "select",
1898
1922
  {
1899
1923
  "aria-label": "Warp grid",
@@ -1903,14 +1927,14 @@ var FreeTransformOptionsBar = ({ tool, className }) => {
1903
1927
  tool.setWarp({ columns: g.columns, rows: g.rows });
1904
1928
  },
1905
1929
  className: "rounded border border-slate-700 bg-slate-900 px-1 py-0.5",
1906
- children: WARP_GRID_OPTIONS.map((g) => /* @__PURE__ */ jsx11("option", { value: g.id, children: g.label }, g.id))
1930
+ children: WARP_GRID_OPTIONS.map((g) => /* @__PURE__ */ jsx12("option", { value: g.id, children: g.label }, g.id))
1907
1931
  }
1908
1932
  )
1909
1933
  ] })
1910
1934
  ] }),
1911
1935
  tool.mode !== "warp" && FREE_TRANSFORM_FIELDS.map((f) => /* @__PURE__ */ jsxs11("label", { className: "flex items-center gap-1", title: f.title, children: [
1912
- /* @__PURE__ */ jsx11("span", { className: "text-slate-400", children: f.label }),
1913
- /* @__PURE__ */ jsx11(
1936
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-400", children: f.label }),
1937
+ /* @__PURE__ */ jsx12(
1914
1938
  "input",
1915
1939
  {
1916
1940
  type: "number",
@@ -1930,8 +1954,8 @@ var FreeTransformOptionsBar = ({ tool, className }) => {
1930
1954
  },
1931
1955
  `${f.id}:${round(bar[f.id], f.unit)}`
1932
1956
  ),
1933
- /* @__PURE__ */ jsx11("span", { className: "text-slate-500", children: f.unit }),
1934
- f.id === "scaleX" && /* @__PURE__ */ jsx11(
1957
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-500", children: f.unit }),
1958
+ f.id === "scaleX" && /* @__PURE__ */ jsx12(
1935
1959
  "button",
1936
1960
  {
1937
1961
  type: "button",
@@ -1947,28 +1971,28 @@ var FreeTransformOptionsBar = ({ tool, className }) => {
1947
1971
  )
1948
1972
  ] }, f.id)),
1949
1973
  /* @__PURE__ */ jsxs11("label", { className: "flex items-center gap-1", children: [
1950
- /* @__PURE__ */ jsx11("span", { className: "text-slate-400", children: "Interpolation" }),
1951
- /* @__PURE__ */ jsx11(
1974
+ /* @__PURE__ */ jsx12("span", { className: "text-slate-400", children: "Interpolation" }),
1975
+ /* @__PURE__ */ jsx12(
1952
1976
  "select",
1953
1977
  {
1954
1978
  "aria-label": "Interpolation",
1955
1979
  value: tool.interpolation,
1956
1980
  onChange: (e) => tool.setInterpolation(e.target.value),
1957
1981
  className: "rounded border border-slate-700 bg-slate-900 px-1 py-0.5",
1958
- children: INTERPOLATIONS.map((i) => /* @__PURE__ */ jsx11("option", { value: i, children: i[0].toUpperCase() + i.slice(1) }, i))
1982
+ children: INTERPOLATIONS.map((i) => /* @__PURE__ */ jsx12("option", { value: i, children: i[0].toUpperCase() + i.slice(1) }, i))
1959
1983
  }
1960
1984
  )
1961
1985
  ] }),
1962
- /* @__PURE__ */ jsx11("button", { type: "button", title: "Commit (Enter)", className: "px-2 py-1 rounded bg-emerald-600 text-white hover:bg-emerald-500", onClick: () => tool.commit(), children: "Commit" }),
1963
- /* @__PURE__ */ jsx11("button", { type: "button", title: "Cancel (Esc)", className: chip3(false), onClick: () => tool.cancel(), children: "Cancel" }),
1964
- tool.error && /* @__PURE__ */ jsx11("span", { role: "alert", className: "text-rose-400", children: tool.error })
1986
+ /* @__PURE__ */ jsx12("button", { type: "button", title: "Commit (Enter)", className: "px-2 py-1 rounded bg-emerald-600 text-white hover:bg-emerald-500", onClick: () => tool.commit(), children: "Commit" }),
1987
+ /* @__PURE__ */ jsx12("button", { type: "button", title: "Cancel (Esc)", className: chip3(false), onClick: () => tool.cancel(), children: "Cancel" }),
1988
+ tool.error && /* @__PURE__ */ jsx12("span", { role: "alert", className: "text-rose-400", children: tool.error })
1965
1989
  ] });
1966
1990
  };
1967
1991
 
1968
1992
  // src/image-editor/ShapeOptionsBar.tsx
1969
1993
  import { useEffect as useEffect9, useState as useState12 } from "react";
1970
1994
  import { LIVE_SHAPE_KINDS, SHAPE_KIND_LABELS, applyShapeOptions } from "@pixerate/editor/image-editor";
1971
- import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
1995
+ import { Fragment as Fragment4, jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
1972
1996
  var chip4 = (on) => `px-2 py-1 rounded text-[11px] ${on ? "bg-indigo-600 text-white" : "bg-slate-800 text-slate-300 hover:text-white"}`;
1973
1997
  var ShapeOptionsBar = ({ controller, options, onChange, className }) => {
1974
1998
  const [, setTick] = useState12(0);
@@ -1988,12 +2012,12 @@ var ShapeOptionsBar = ({ controller, options, onChange, className }) => {
1988
2012
  };
1989
2013
  const num = (v, min, max) => Math.max(min, Math.min(max, Number(v) || min));
1990
2014
  return /* @__PURE__ */ jsxs12("div", { className: `flex flex-col gap-2 text-xs text-slate-200 ${className ?? ""}`, "data-testid": "shape-options", children: [
1991
- /* @__PURE__ */ jsx12("div", { className: "flex flex-wrap gap-1", role: "toolbar", "aria-label": "Shape kind", children: LIVE_SHAPE_KINDS.map((k) => /* @__PURE__ */ jsx12("button", { type: "button", "aria-pressed": options.kind === k, className: chip4(options.kind === k), onClick: () => onChange({ ...options, kind: k }), children: SHAPE_KIND_LABELS[k] }, k)) }),
2015
+ /* @__PURE__ */ jsx13("div", { className: "flex flex-wrap gap-1", role: "toolbar", "aria-label": "Shape kind", children: LIVE_SHAPE_KINDS.map((k) => /* @__PURE__ */ jsx13("button", { type: "button", "aria-pressed": options.kind === k, className: chip4(options.kind === k), onClick: () => onChange({ ...options, kind: k }), children: SHAPE_KIND_LABELS[k] }, k)) }),
1992
2016
  /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-3", children: [
1993
2017
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
1994
- /* @__PURE__ */ jsx12("input", { type: "checkbox", "aria-label": "Fill", checked: options.fill !== null, onChange: (e) => set({ fill: e.target.checked ? "#4f46e5" : null }) }),
2018
+ /* @__PURE__ */ jsx13("input", { type: "checkbox", "aria-label": "Fill", checked: options.fill !== null, onChange: (e) => set({ fill: e.target.checked ? "#4f46e5" : null }) }),
1995
2019
  "Fill",
1996
- /* @__PURE__ */ jsx12(
2020
+ /* @__PURE__ */ jsx13(
1997
2021
  "input",
1998
2022
  {
1999
2023
  type: "color",
@@ -2006,9 +2030,9 @@ var ShapeOptionsBar = ({ controller, options, onChange, className }) => {
2006
2030
  )
2007
2031
  ] }),
2008
2032
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2009
- /* @__PURE__ */ jsx12("input", { type: "checkbox", "aria-label": "Stroke", checked: options.stroke !== null, onChange: (e) => set({ stroke: e.target.checked ? "#000000" : null }) }),
2033
+ /* @__PURE__ */ jsx13("input", { type: "checkbox", "aria-label": "Stroke", checked: options.stroke !== null, onChange: (e) => set({ stroke: e.target.checked ? "#000000" : null }) }),
2010
2034
  "Stroke",
2011
- /* @__PURE__ */ jsx12(
2035
+ /* @__PURE__ */ jsx13(
2012
2036
  "input",
2013
2037
  {
2014
2038
  type: "color",
@@ -2022,7 +2046,7 @@ var ShapeOptionsBar = ({ controller, options, onChange, className }) => {
2022
2046
  ] }),
2023
2047
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2024
2048
  "Width",
2025
- /* @__PURE__ */ jsx12(
2049
+ /* @__PURE__ */ jsx13(
2026
2050
  "input",
2027
2051
  {
2028
2052
  type: "number",
@@ -2039,20 +2063,20 @@ var ShapeOptionsBar = ({ controller, options, onChange, className }) => {
2039
2063
  /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-3", children: [
2040
2064
  options.kind === "rect" && /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2041
2065
  "Radius",
2042
- /* @__PURE__ */ jsx12("input", { type: "number", "aria-label": "Corner radius", min: 0, max: 1e3, value: options.radius, onChange: (e) => set({ radius: num(e.target.value, 0, 1e3) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2066
+ /* @__PURE__ */ jsx13("input", { type: "number", "aria-label": "Corner radius", min: 0, max: 1e3, value: options.radius, onChange: (e) => set({ radius: num(e.target.value, 0, 1e3) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2043
2067
  ] }),
2044
2068
  options.kind === "polygon" && /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2045
2069
  "Sides",
2046
- /* @__PURE__ */ jsx12("input", { type: "number", "aria-label": "Sides", min: 3, max: 100, value: options.sides, onChange: (e) => set({ sides: num(e.target.value, 3, 100) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2070
+ /* @__PURE__ */ jsx13("input", { type: "number", "aria-label": "Sides", min: 3, max: 100, value: options.sides, onChange: (e) => set({ sides: num(e.target.value, 3, 100) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2047
2071
  ] }),
2048
2072
  options.kind === "star" && /* @__PURE__ */ jsxs12(Fragment4, { children: [
2049
2073
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2050
2074
  "Points",
2051
- /* @__PURE__ */ jsx12("input", { type: "number", "aria-label": "Points", min: 3, max: 100, value: options.points, onChange: (e) => set({ points: num(e.target.value, 3, 100) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2075
+ /* @__PURE__ */ jsx13("input", { type: "number", "aria-label": "Points", min: 3, max: 100, value: options.points, onChange: (e) => set({ points: num(e.target.value, 3, 100) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2052
2076
  ] }),
2053
2077
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2054
2078
  "Inner",
2055
- /* @__PURE__ */ jsx12(
2079
+ /* @__PURE__ */ jsx13(
2056
2080
  "input",
2057
2081
  {
2058
2082
  type: "range",
@@ -2070,23 +2094,23 @@ var ShapeOptionsBar = ({ controller, options, onChange, className }) => {
2070
2094
  options.kind === "line" && /* @__PURE__ */ jsxs12(Fragment4, { children: [
2071
2095
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2072
2096
  "Weight",
2073
- /* @__PURE__ */ jsx12("input", { type: "number", "aria-label": "Line weight", min: 1, max: 200, value: options.weight, onChange: (e) => set({ weight: num(e.target.value, 1, 200) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2097
+ /* @__PURE__ */ jsx13("input", { type: "number", "aria-label": "Line weight", min: 1, max: 200, value: options.weight, onChange: (e) => set({ weight: num(e.target.value, 1, 200) }), className: "w-14 rounded border border-slate-700 bg-slate-950 px-1 py-0.5" })
2074
2098
  ] }),
2075
2099
  /* @__PURE__ */ jsxs12("label", { className: "flex items-center gap-1", children: [
2076
- /* @__PURE__ */ jsx12("input", { type: "checkbox", "aria-label": "Arrowhead", checked: options.arrow, onChange: (e) => set({ arrow: e.target.checked }) }),
2100
+ /* @__PURE__ */ jsx13("input", { type: "checkbox", "aria-label": "Arrowhead", checked: options.arrow, onChange: (e) => set({ arrow: e.target.checked }) }),
2077
2101
  "Arrowhead"
2078
2102
  ] })
2079
2103
  ] })
2080
2104
  ] }),
2081
- /* @__PURE__ */ jsx12("p", { className: "text-[10px] text-slate-500", children: "Drag on the image to draw. Shift: square, circle or 45\xB0 line. Alt: from the centre." }),
2082
- error && /* @__PURE__ */ jsx12("p", { role: "alert", className: "text-rose-400", children: error })
2105
+ /* @__PURE__ */ jsx13("p", { className: "text-[10px] text-slate-500", children: "Drag on the image to draw. Shift: square, circle or 45\xB0 line. Alt: from the centre." }),
2106
+ error && /* @__PURE__ */ jsx13("p", { role: "alert", className: "text-rose-400", children: error })
2083
2107
  ] });
2084
2108
  };
2085
2109
 
2086
2110
  // src/image-editor/TypeOptionsBar.tsx
2087
2111
  import { useEffect as useEffect10, useState as useState13 } from "react";
2088
2112
  import { TEXT_ALIGNS } from "@pixerate/editor/image-editor";
2089
- import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
2113
+ import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
2090
2114
  var chip5 = (on) => `px-2 py-1 rounded text-[11px] ${on ? "bg-indigo-600 text-white" : "bg-slate-800 text-slate-300 hover:text-white"}`;
2091
2115
  var ALIGN_LABELS = { left: "Left", center: "Centre", right: "Right", justify: "Justify" };
2092
2116
  var TypeOptionsBar = ({ controller, options, onChange, session, className }) => {
@@ -2129,7 +2153,7 @@ var TypeOptionsBar = ({ controller, options, onChange, session, className }) =>
2129
2153
  /* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center gap-2", children: [
2130
2154
  /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", children: [
2131
2155
  "Font",
2132
- /* @__PURE__ */ jsx13(
2156
+ /* @__PURE__ */ jsx14(
2133
2157
  "input",
2134
2158
  {
2135
2159
  list: "pixerate-type-fonts",
@@ -2139,11 +2163,11 @@ var TypeOptionsBar = ({ controller, options, onChange, session, className }) =>
2139
2163
  className: "w-32 rounded border border-slate-700 bg-slate-950 px-1 py-0.5"
2140
2164
  }
2141
2165
  ),
2142
- /* @__PURE__ */ jsx13("datalist", { id: "pixerate-type-fonts", children: fonts.map((f) => /* @__PURE__ */ jsx13("option", { value: f }, f)) })
2166
+ /* @__PURE__ */ jsx14("datalist", { id: "pixerate-type-fonts", children: fonts.map((f) => /* @__PURE__ */ jsx14("option", { value: f }, f)) })
2143
2167
  ] }),
2144
2168
  /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1", children: [
2145
2169
  "Size",
2146
- /* @__PURE__ */ jsx13(
2170
+ /* @__PURE__ */ jsx14(
2147
2171
  "input",
2148
2172
  {
2149
2173
  type: "number",
@@ -2156,24 +2180,24 @@ var TypeOptionsBar = ({ controller, options, onChange, session, className }) =>
2156
2180
  }
2157
2181
  )
2158
2182
  ] }),
2159
- /* @__PURE__ */ jsx13("button", { type: "button", "aria-pressed": shown.fontWeight >= 600, className: `${chip5(shown.fontWeight >= 600)} font-bold`, onClick: () => style({ fontWeight: shown.fontWeight >= 600 ? 400 : 700 }), children: "B" }),
2160
- /* @__PURE__ */ jsx13("button", { type: "button", "aria-pressed": shown.italic, className: `${chip5(shown.italic)} italic`, onClick: () => style({ italic: !shown.italic }), children: "I" }),
2161
- /* @__PURE__ */ jsx13("input", { type: "color", "aria-label": "Text colour", value: shown.color, onChange: (e) => style({ color: e.target.value }), className: "h-6 w-8 rounded border border-slate-700 bg-transparent" })
2183
+ /* @__PURE__ */ jsx14("button", { type: "button", "aria-pressed": shown.fontWeight >= 600, className: `${chip5(shown.fontWeight >= 600)} font-bold`, onClick: () => style({ fontWeight: shown.fontWeight >= 600 ? 400 : 700 }), children: "B" }),
2184
+ /* @__PURE__ */ jsx14("button", { type: "button", "aria-pressed": shown.italic, className: `${chip5(shown.italic)} italic`, onClick: () => style({ italic: !shown.italic }), children: "I" }),
2185
+ /* @__PURE__ */ jsx14("input", { type: "color", "aria-label": "Text colour", value: shown.color, onChange: (e) => style({ color: e.target.value }), className: "h-6 w-8 rounded border border-slate-700 bg-transparent" })
2162
2186
  ] }),
2163
- /* @__PURE__ */ jsx13("div", { className: "flex gap-1", role: "toolbar", "aria-label": "Alignment", children: TEXT_ALIGNS.map((a) => /* @__PURE__ */ jsx13("button", { type: "button", "aria-pressed": options.align === a, className: chip5(options.align === a), onClick: () => style({ align: a }), children: ALIGN_LABELS[a] }, a)) }),
2164
- /* @__PURE__ */ jsx13("p", { className: "text-[10px] text-slate-500", children: "Click to type point text, drag for a paragraph box, click text to edit it. Esc finishes." }),
2187
+ /* @__PURE__ */ jsx14("div", { className: "flex gap-1", role: "toolbar", "aria-label": "Alignment", children: TEXT_ALIGNS.map((a) => /* @__PURE__ */ jsx14("button", { type: "button", "aria-pressed": options.align === a, className: chip5(options.align === a), onClick: () => style({ align: a }), children: ALIGN_LABELS[a] }, a)) }),
2188
+ /* @__PURE__ */ jsx14("p", { className: "text-[10px] text-slate-500", children: "Click to type point text, drag for a paragraph box, click text to edit it. Esc finishes." }),
2165
2189
  missing.length > 0 && /* @__PURE__ */ jsxs13("p", { role: "status", className: "text-amber-400", "data-testid": "type-missing-fonts", children: [
2166
2190
  "Missing ",
2167
2191
  missing.length === 1 ? "font" : "fonts",
2168
2192
  ": ",
2169
2193
  missing.join(", ")
2170
2194
  ] }),
2171
- error && /* @__PURE__ */ jsx13("p", { role: "alert", className: "text-rose-400", children: error })
2195
+ error && /* @__PURE__ */ jsx14("p", { role: "alert", className: "text-rose-400", children: error })
2172
2196
  ] });
2173
2197
  };
2174
2198
 
2175
2199
  // src/image-editor/ImageEditor.tsx
2176
- import { Fragment as Fragment5, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
2200
+ import { Fragment as Fragment5, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
2177
2201
  var ImageEditor = ({
2178
2202
  editor: externalEditor,
2179
2203
  src,
@@ -2914,7 +2938,7 @@ var ImageEditor = ({
2914
2938
  children: [
2915
2939
  /* @__PURE__ */ jsxs14("div", { className: "flex flex-wrap items-center justify-between px-4 py-3 bg-slate-950/80 border-b border-slate-800 gap-3", children: [
2916
2940
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1 bg-slate-900 p-1 rounded-lg border border-slate-800 text-xs", children: [
2917
- /* @__PURE__ */ jsx14(
2941
+ /* @__PURE__ */ jsx15(
2918
2942
  "button",
2919
2943
  {
2920
2944
  type: "button",
@@ -2926,7 +2950,7 @@ var ImageEditor = ({
2926
2950
  children: "Transform & Crop"
2927
2951
  }
2928
2952
  ),
2929
- /* @__PURE__ */ jsx14(
2953
+ /* @__PURE__ */ jsx15(
2930
2954
  "button",
2931
2955
  {
2932
2956
  type: "button",
@@ -2938,7 +2962,7 @@ var ImageEditor = ({
2938
2962
  children: "Adjustments"
2939
2963
  }
2940
2964
  ),
2941
- /* @__PURE__ */ jsx14(
2965
+ /* @__PURE__ */ jsx15(
2942
2966
  "button",
2943
2967
  {
2944
2968
  type: "button",
@@ -2950,7 +2974,7 @@ var ImageEditor = ({
2950
2974
  children: "Layers"
2951
2975
  }
2952
2976
  ),
2953
- /* @__PURE__ */ jsx14(
2977
+ /* @__PURE__ */ jsx15(
2954
2978
  "button",
2955
2979
  {
2956
2980
  type: "button",
@@ -2962,7 +2986,7 @@ var ImageEditor = ({
2962
2986
  children: "Paint"
2963
2987
  }
2964
2988
  ),
2965
- /* @__PURE__ */ jsx14(
2989
+ /* @__PURE__ */ jsx15(
2966
2990
  "button",
2967
2991
  {
2968
2992
  type: "button",
@@ -2974,7 +2998,7 @@ var ImageEditor = ({
2974
2998
  children: "Select & Mask"
2975
2999
  }
2976
3000
  ),
2977
- /* @__PURE__ */ jsx14(
3001
+ /* @__PURE__ */ jsx15(
2978
3002
  "button",
2979
3003
  {
2980
3004
  type: "button",
@@ -2986,7 +3010,7 @@ var ImageEditor = ({
2986
3010
  children: "Annotations"
2987
3011
  }
2988
3012
  ),
2989
- /* @__PURE__ */ jsx14(
3013
+ /* @__PURE__ */ jsx15(
2990
3014
  "button",
2991
3015
  {
2992
3016
  type: "button",
@@ -3008,14 +3032,14 @@ var ImageEditor = ({
3008
3032
  },
3009
3033
  className: `px-3 py-1.5 rounded-md font-medium transition-colors flex items-center gap-1.5 ${activeTab === "ai" ? "bg-indigo-600 text-white shadow" : "text-slate-400 hover:text-slate-200"}`,
3010
3034
  children: [
3011
- /* @__PURE__ */ jsx14("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx14("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }),
3035
+ /* @__PURE__ */ jsx15("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx15("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }),
3012
3036
  "AI Tools"
3013
3037
  ]
3014
3038
  }
3015
3039
  )
3016
3040
  ] }),
3017
3041
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 text-xs", children: [
3018
- /* @__PURE__ */ jsx14(
3042
+ /* @__PURE__ */ jsx15(
3019
3043
  "button",
3020
3044
  {
3021
3045
  type: "button",
@@ -3026,7 +3050,7 @@ var ImageEditor = ({
3026
3050
  children: "\u21A9"
3027
3051
  }
3028
3052
  ),
3029
- /* @__PURE__ */ jsx14(
3053
+ /* @__PURE__ */ jsx15(
3030
3054
  "button",
3031
3055
  {
3032
3056
  type: "button",
@@ -3037,7 +3061,7 @@ var ImageEditor = ({
3037
3061
  children: "\u21AA"
3038
3062
  }
3039
3063
  ),
3040
- /* @__PURE__ */ jsx14(
3064
+ /* @__PURE__ */ jsx15(
3041
3065
  "button",
3042
3066
  {
3043
3067
  type: "button",
@@ -3046,8 +3070,8 @@ var ImageEditor = ({
3046
3070
  children: "Reset"
3047
3071
  }
3048
3072
  ),
3049
- /* @__PURE__ */ jsx14("div", { className: "h-4 w-px bg-slate-800 mx-1" }),
3050
- /* @__PURE__ */ jsx14(
3073
+ /* @__PURE__ */ jsx15("div", { className: "h-4 w-px bg-slate-800 mx-1" }),
3074
+ /* @__PURE__ */ jsx15(
3051
3075
  "button",
3052
3076
  {
3053
3077
  type: "button",
@@ -3061,7 +3085,7 @@ var ImageEditor = ({
3061
3085
  Math.round(state.zoom * 100),
3062
3086
  "%"
3063
3087
  ] }),
3064
- /* @__PURE__ */ jsx14(
3088
+ /* @__PURE__ */ jsx15(
3065
3089
  "button",
3066
3090
  {
3067
3091
  type: "button",
@@ -3071,8 +3095,8 @@ var ImageEditor = ({
3071
3095
  children: "+"
3072
3096
  }
3073
3097
  ),
3074
- /* @__PURE__ */ jsx14("div", { className: "h-4 w-px bg-slate-800 mx-1" }),
3075
- /* @__PURE__ */ jsx14(
3098
+ /* @__PURE__ */ jsx15("div", { className: "h-4 w-px bg-slate-800 mx-1" }),
3099
+ /* @__PURE__ */ jsx15(
3076
3100
  "button",
3077
3101
  {
3078
3102
  type: "button",
@@ -3083,7 +3107,7 @@ var ImageEditor = ({
3083
3107
  children: "Hold Compare"
3084
3108
  }
3085
3109
  ),
3086
- /* @__PURE__ */ jsx14(
3110
+ /* @__PURE__ */ jsx15(
3087
3111
  "button",
3088
3112
  {
3089
3113
  type: "button",
@@ -3094,8 +3118,8 @@ var ImageEditor = ({
3094
3118
  )
3095
3119
  ] })
3096
3120
  ] }),
3097
- transformTool.active && /* @__PURE__ */ jsx14(FreeTransformOptionsBar, { tool: transformTool, className: "border-b border-slate-800 bg-slate-900/95 px-4 py-2" }),
3098
- !transformTool.active && transformTool.error && /* @__PURE__ */ jsx14("div", { role: "alert", className: "border-b border-rose-900 bg-rose-950/80 px-4 py-1.5 text-xs text-rose-200", children: transformTool.error }),
3121
+ transformTool.active && /* @__PURE__ */ jsx15(FreeTransformOptionsBar, { tool: transformTool, className: "border-b border-slate-800 bg-slate-900/95 px-4 py-2" }),
3122
+ !transformTool.active && transformTool.error && /* @__PURE__ */ jsx15("div", { role: "alert", className: "border-b border-rose-900 bg-rose-950/80 px-4 py-1.5 text-xs text-rose-200", children: transformTool.error }),
3099
3123
  /* @__PURE__ */ jsxs14("div", { className: "flex flex-col md:flex-row flex-1 min-h-[520px] md:h-[560px]", children: [
3100
3124
  /* @__PURE__ */ jsxs14(
3101
3125
  "div",
@@ -3103,7 +3127,7 @@ var ImageEditor = ({
3103
3127
  ref: containerRef,
3104
3128
  className: "relative flex-1 h-[360px] md:h-full min-h-[320px] bg-slate-950 overflow-hidden select-none",
3105
3129
  children: [
3106
- /* @__PURE__ */ jsx14(
3130
+ /* @__PURE__ */ jsx15(
3107
3131
  "canvas",
3108
3132
  {
3109
3133
  ref: canvasRef,
@@ -3120,7 +3144,7 @@ var ImageEditor = ({
3120
3144
  className: `absolute inset-0 w-full h-full block ${transformTool.active ? "touch-none" : activeTab === "paint" ? "touch-none cursor-crosshair" : activeTab === "annotate" && state.activeTool === "type" ? "cursor-text" : activeTab === "annotate" && state.activeTool === "shape" ? "cursor-crosshair" : ""}`
3121
3145
  }
3122
3146
  ),
3123
- typeSession && /* @__PURE__ */ jsx14(
3147
+ typeSession && /* @__PURE__ */ jsx15(
3124
3148
  "textarea",
3125
3149
  {
3126
3150
  ref: typeInputRef,
@@ -3144,9 +3168,9 @@ var ImageEditor = ({
3144
3168
  ),
3145
3169
  /* @__PURE__ */ jsxs14("div", { className: "w-full md:w-80 bg-slate-900/90 border-t md:border-t-0 md:border-l border-slate-800 p-4 overflow-y-auto h-auto md:h-full md:max-h-[560px]", children: [
3146
3170
  activeTab === "crop" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4 text-xs", children: [
3147
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Aspect Ratio Presets" }),
3171
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Aspect Ratio Presets" }),
3148
3172
  /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-3 gap-2", children: [
3149
- /* @__PURE__ */ jsx14(
3173
+ /* @__PURE__ */ jsx15(
3150
3174
  "button",
3151
3175
  {
3152
3176
  type: "button",
@@ -3158,7 +3182,7 @@ var ImageEditor = ({
3158
3182
  children: "Freeform"
3159
3183
  }
3160
3184
  ),
3161
- /* @__PURE__ */ jsx14(
3185
+ /* @__PURE__ */ jsx15(
3162
3186
  "button",
3163
3187
  {
3164
3188
  type: "button",
@@ -3170,7 +3194,7 @@ var ImageEditor = ({
3170
3194
  children: "1:1 Square"
3171
3195
  }
3172
3196
  ),
3173
- /* @__PURE__ */ jsx14(
3197
+ /* @__PURE__ */ jsx15(
3174
3198
  "button",
3175
3199
  {
3176
3200
  type: "button",
@@ -3182,7 +3206,7 @@ var ImageEditor = ({
3182
3206
  children: "4:3 Standard"
3183
3207
  }
3184
3208
  ),
3185
- /* @__PURE__ */ jsx14(
3209
+ /* @__PURE__ */ jsx15(
3186
3210
  "button",
3187
3211
  {
3188
3212
  type: "button",
@@ -3194,7 +3218,7 @@ var ImageEditor = ({
3194
3218
  children: "16:9 Wide"
3195
3219
  }
3196
3220
  ),
3197
- /* @__PURE__ */ jsx14(
3221
+ /* @__PURE__ */ jsx15(
3198
3222
  "button",
3199
3223
  {
3200
3224
  type: "button",
@@ -3206,7 +3230,7 @@ var ImageEditor = ({
3206
3230
  children: "3:2 Photo"
3207
3231
  }
3208
3232
  ),
3209
- /* @__PURE__ */ jsx14(
3233
+ /* @__PURE__ */ jsx15(
3210
3234
  "button",
3211
3235
  {
3212
3236
  type: "button",
@@ -3219,10 +3243,10 @@ var ImageEditor = ({
3219
3243
  }
3220
3244
  )
3221
3245
  ] }),
3222
- /* @__PURE__ */ jsx14("div", { className: "h-px bg-slate-800 my-1" }),
3223
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Orientation & Flips" }),
3246
+ /* @__PURE__ */ jsx15("div", { className: "h-px bg-slate-800 my-1" }),
3247
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Orientation & Flips" }),
3224
3248
  /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-2 gap-2", children: [
3225
- /* @__PURE__ */ jsx14(
3249
+ /* @__PURE__ */ jsx15(
3226
3250
  "button",
3227
3251
  {
3228
3252
  type: "button",
@@ -3231,7 +3255,7 @@ var ImageEditor = ({
3231
3255
  children: "Rotate -90\xB0"
3232
3256
  }
3233
3257
  ),
3234
- /* @__PURE__ */ jsx14(
3258
+ /* @__PURE__ */ jsx15(
3235
3259
  "button",
3236
3260
  {
3237
3261
  type: "button",
@@ -3240,7 +3264,7 @@ var ImageEditor = ({
3240
3264
  children: "Rotate +90\xB0"
3241
3265
  }
3242
3266
  ),
3243
- /* @__PURE__ */ jsx14(
3267
+ /* @__PURE__ */ jsx15(
3244
3268
  "button",
3245
3269
  {
3246
3270
  type: "button",
@@ -3249,7 +3273,7 @@ var ImageEditor = ({
3249
3273
  children: "Flip Horizontal"
3250
3274
  }
3251
3275
  ),
3252
- /* @__PURE__ */ jsx14(
3276
+ /* @__PURE__ */ jsx15(
3253
3277
  "button",
3254
3278
  {
3255
3279
  type: "button",
@@ -3262,8 +3286,8 @@ var ImageEditor = ({
3262
3286
  ] }),
3263
3287
  activeTab === "adjust" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-3 text-xs", children: [
3264
3288
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between", children: [
3265
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Color Adjustments" }),
3266
- /* @__PURE__ */ jsx14(
3289
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Color Adjustments" }),
3290
+ /* @__PURE__ */ jsx15(
3267
3291
  "button",
3268
3292
  {
3269
3293
  type: "button",
@@ -3273,9 +3297,9 @@ var ImageEditor = ({
3273
3297
  }
3274
3298
  )
3275
3299
  ] }),
3276
- /* @__PURE__ */ jsx14(Histogram, { histogram: editor.histogram }),
3300
+ /* @__PURE__ */ jsx15(Histogram, { histogram: editor.histogram }),
3277
3301
  IMAGE_ADJUSTMENT_CONTROLS.map((spec) => /* @__PURE__ */ jsxs14(React13.Fragment, { children: [
3278
- /* @__PURE__ */ jsx14(
3302
+ /* @__PURE__ */ jsx15(
3279
3303
  ControlSlider,
3280
3304
  {
3281
3305
  spec,
@@ -3290,8 +3314,8 @@ var ImageEditor = ({
3290
3314
  className: "flex items-center justify-between gap-2 rounded border border-amber-500/30 bg-amber-500/10 px-2 py-1.5 text-[10px] text-amber-200",
3291
3315
  "data-testid": "image-editor-process-notice",
3292
3316
  children: [
3293
- /* @__PURE__ */ jsx14("span", { children: "Legacy rendering (process 1). Tint needs the current process." }),
3294
- /* @__PURE__ */ jsx14(
3317
+ /* @__PURE__ */ jsx15("span", { children: "Legacy rendering (process 1). Tint needs the current process." }),
3318
+ /* @__PURE__ */ jsx15(
3295
3319
  "button",
3296
3320
  {
3297
3321
  type: "button",
@@ -3304,7 +3328,7 @@ var ImageEditor = ({
3304
3328
  }
3305
3329
  )
3306
3330
  ] }, spec.id)),
3307
- /* @__PURE__ */ jsx14("div", { className: "border-t border-slate-700/60 pt-3", children: /* @__PURE__ */ jsx14(
3331
+ /* @__PURE__ */ jsx15("div", { className: "border-t border-slate-700/60 pt-3", children: /* @__PURE__ */ jsx15(
3308
3332
  AdjustmentLayersPanel,
3309
3333
  {
3310
3334
  controller,
@@ -3314,8 +3338,8 @@ var ImageEditor = ({
3314
3338
  ) })
3315
3339
  ] }),
3316
3340
  activeTab === "layers" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-3 text-xs", children: [
3317
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Layers" }),
3318
- /* @__PURE__ */ jsx14(
3341
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Layers" }),
3342
+ /* @__PURE__ */ jsx15(
3319
3343
  "button",
3320
3344
  {
3321
3345
  type: "button",
@@ -3326,14 +3350,14 @@ var ImageEditor = ({
3326
3350
  children: "Free Transform"
3327
3351
  }
3328
3352
  ),
3329
- /* @__PURE__ */ jsx14(LayersPanel, { controller }),
3330
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Colour" }),
3331
- /* @__PURE__ */ jsx14(ColorProfilePanel, { controller })
3353
+ /* @__PURE__ */ jsx15(LayersPanel, { controller }),
3354
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Colour" }),
3355
+ /* @__PURE__ */ jsx15(ColorProfilePanel, { controller })
3332
3356
  ] }),
3333
3357
  activeTab === "paint" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-3 text-xs", children: [
3334
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Paint" }),
3335
- /* @__PURE__ */ jsx14(BrushOptionsBar, { controller }),
3336
- /* @__PURE__ */ jsx14(
3358
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Paint" }),
3359
+ /* @__PURE__ */ jsx15(BrushOptionsBar, { controller }),
3360
+ /* @__PURE__ */ jsx15(
3337
3361
  "button",
3338
3362
  {
3339
3363
  type: "button",
@@ -3344,12 +3368,12 @@ var ImageEditor = ({
3344
3368
  children: "Free Transform"
3345
3369
  }
3346
3370
  ),
3347
- paintError && /* @__PURE__ */ jsx14("p", { role: "alert", className: "text-rose-400", "data-testid": "paint-error", children: paintError }),
3348
- /* @__PURE__ */ jsx14("div", { className: "border-t border-slate-700/60 pt-3", children: /* @__PURE__ */ jsx14(LayersPanel, { controller }) })
3371
+ paintError && /* @__PURE__ */ jsx15("p", { role: "alert", className: "text-rose-400", "data-testid": "paint-error", children: paintError }),
3372
+ /* @__PURE__ */ jsx15("div", { className: "border-t border-slate-700/60 pt-3", children: /* @__PURE__ */ jsx15(LayersPanel, { controller }) })
3349
3373
  ] }),
3350
3374
  activeTab === "annotate" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-3 text-xs", children: [
3351
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Shape & Type Layers" }),
3352
- /* @__PURE__ */ jsx14("div", { className: "grid grid-cols-2 gap-1.5", children: ["shape", "type"].map((t) => /* @__PURE__ */ jsx14(
3375
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Shape & Type Layers" }),
3376
+ /* @__PURE__ */ jsx15("div", { className: "grid grid-cols-2 gap-1.5", children: ["shape", "type"].map((t) => /* @__PURE__ */ jsx15(
3353
3377
  "button",
3354
3378
  {
3355
3379
  type: "button",
@@ -3360,13 +3384,13 @@ var ImageEditor = ({
3360
3384
  },
3361
3385
  t
3362
3386
  )) }),
3363
- state.activeTool === "shape" && /* @__PURE__ */ jsx14(ShapeOptionsBar, { controller, options: shapeOptions, onChange: setShapeOptions }),
3364
- state.activeTool === "type" && /* @__PURE__ */ jsx14(TypeOptionsBar, { controller, options: typeOptions, onChange: setTypeOptions, session: typeSession }),
3365
- state.activeTool === "type" && typeSession && /* @__PURE__ */ jsx14("button", { type: "button", onClick: finishTyping, className: "self-start rounded bg-slate-800 px-2 py-1 text-[11px] text-slate-200 hover:bg-slate-700", children: "Done editing text" }),
3366
- shapeTypeError && /* @__PURE__ */ jsx14("p", { role: "alert", className: "text-rose-400", "data-testid": "shape-type-error", children: shapeTypeError }),
3367
- /* @__PURE__ */ jsx14("div", { className: "h-px bg-slate-800 my-1" }),
3368
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Draw & Annotate" }),
3369
- /* @__PURE__ */ jsx14("div", { className: "grid grid-cols-3 gap-1.5", children: ["pen", "rect", "circle", "arrow", "line"].map((t) => /* @__PURE__ */ jsx14(
3387
+ state.activeTool === "shape" && /* @__PURE__ */ jsx15(ShapeOptionsBar, { controller, options: shapeOptions, onChange: setShapeOptions }),
3388
+ state.activeTool === "type" && /* @__PURE__ */ jsx15(TypeOptionsBar, { controller, options: typeOptions, onChange: setTypeOptions, session: typeSession }),
3389
+ state.activeTool === "type" && typeSession && /* @__PURE__ */ jsx15("button", { type: "button", onClick: finishTyping, className: "self-start rounded bg-slate-800 px-2 py-1 text-[11px] text-slate-200 hover:bg-slate-700", children: "Done editing text" }),
3390
+ shapeTypeError && /* @__PURE__ */ jsx15("p", { role: "alert", className: "text-rose-400", "data-testid": "shape-type-error", children: shapeTypeError }),
3391
+ /* @__PURE__ */ jsx15("div", { className: "h-px bg-slate-800 my-1" }),
3392
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Draw & Annotate" }),
3393
+ /* @__PURE__ */ jsx15("div", { className: "grid grid-cols-3 gap-1.5", children: ["pen", "rect", "circle", "arrow", "line"].map((t) => /* @__PURE__ */ jsx15(
3370
3394
  "button",
3371
3395
  {
3372
3396
  type: "button",
@@ -3377,8 +3401,8 @@ var ImageEditor = ({
3377
3401
  t
3378
3402
  )) }),
3379
3403
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2 mt-2", children: [
3380
- /* @__PURE__ */ jsx14("label", { className: "text-slate-400", children: "Color:" }),
3381
- /* @__PURE__ */ jsx14(
3404
+ /* @__PURE__ */ jsx15("label", { className: "text-slate-400", children: "Color:" }),
3405
+ /* @__PURE__ */ jsx15(
3382
3406
  "input",
3383
3407
  {
3384
3408
  type: "color",
@@ -3389,13 +3413,13 @@ var ImageEditor = ({
3389
3413
  ),
3390
3414
  /* @__PURE__ */ jsxs14("div", { className: "flex-1 ml-2", children: [
3391
3415
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-slate-400 mb-0.5", children: [
3392
- /* @__PURE__ */ jsx14("span", { children: "Width:" }),
3416
+ /* @__PURE__ */ jsx15("span", { children: "Width:" }),
3393
3417
  /* @__PURE__ */ jsxs14("span", { className: "font-mono", children: [
3394
3418
  strokeWidth,
3395
3419
  "px"
3396
3420
  ] })
3397
3421
  ] }),
3398
- /* @__PURE__ */ jsx14(
3422
+ /* @__PURE__ */ jsx15(
3399
3423
  "input",
3400
3424
  {
3401
3425
  type: "range",
@@ -3408,10 +3432,10 @@ var ImageEditor = ({
3408
3432
  )
3409
3433
  ] })
3410
3434
  ] }),
3411
- /* @__PURE__ */ jsx14("div", { className: "h-px bg-slate-800 my-1" }),
3412
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Add Text" }),
3435
+ /* @__PURE__ */ jsx15("div", { className: "h-px bg-slate-800 my-1" }),
3436
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Add Text" }),
3413
3437
  /* @__PURE__ */ jsxs14("div", { className: "flex gap-2", children: [
3414
- /* @__PURE__ */ jsx14(
3438
+ /* @__PURE__ */ jsx15(
3415
3439
  "input",
3416
3440
  {
3417
3441
  type: "text",
@@ -3422,7 +3446,7 @@ var ImageEditor = ({
3422
3446
  className: "flex-1 bg-slate-950 border border-slate-700 rounded-lg px-2.5 py-1.5 text-xs text-slate-100 placeholder-slate-500 focus:outline-none focus:border-indigo-500"
3423
3447
  }
3424
3448
  ),
3425
- /* @__PURE__ */ jsx14(
3449
+ /* @__PURE__ */ jsx15(
3426
3450
  "button",
3427
3451
  {
3428
3452
  type: "button",
@@ -3433,13 +3457,13 @@ var ImageEditor = ({
3433
3457
  )
3434
3458
  ] }),
3435
3459
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between text-slate-400", children: [
3436
- /* @__PURE__ */ jsx14("span", { children: "Font Size:" }),
3460
+ /* @__PURE__ */ jsx15("span", { children: "Font Size:" }),
3437
3461
  /* @__PURE__ */ jsxs14("span", { className: "font-mono", children: [
3438
3462
  fontSize,
3439
3463
  "px"
3440
3464
  ] })
3441
3465
  ] }),
3442
- /* @__PURE__ */ jsx14(
3466
+ /* @__PURE__ */ jsx15(
3443
3467
  "input",
3444
3468
  {
3445
3469
  type: "range",
@@ -3450,14 +3474,14 @@ var ImageEditor = ({
3450
3474
  className: "w-full accent-indigo-500"
3451
3475
  }
3452
3476
  ),
3453
- /* @__PURE__ */ jsx14("div", { className: "h-px bg-slate-800 my-1" }),
3477
+ /* @__PURE__ */ jsx15("div", { className: "h-px bg-slate-800 my-1" }),
3454
3478
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between", children: [
3455
3479
  /* @__PURE__ */ jsxs14("span", { className: "text-slate-400", children: [
3456
3480
  "Layers (",
3457
3481
  state.annotations.length,
3458
3482
  ")"
3459
3483
  ] }),
3460
- state.selectedAnnotationId && /* @__PURE__ */ jsx14(
3484
+ state.selectedAnnotationId && /* @__PURE__ */ jsx15(
3461
3485
  "button",
3462
3486
  {
3463
3487
  type: "button",
@@ -3466,7 +3490,7 @@ var ImageEditor = ({
3466
3490
  children: "Delete Selected"
3467
3491
  }
3468
3492
  ),
3469
- state.annotations.length > 0 && /* @__PURE__ */ jsx14(
3493
+ state.annotations.length > 0 && /* @__PURE__ */ jsx15(
3470
3494
  "button",
3471
3495
  {
3472
3496
  type: "button",
@@ -3479,8 +3503,8 @@ var ImageEditor = ({
3479
3503
  ] }),
3480
3504
  activeTab === "depth" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-3 text-xs", children: [
3481
3505
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between", children: [
3482
- /* @__PURE__ */ jsx14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Depth Masking" }),
3483
- /* @__PURE__ */ jsx14(
3506
+ /* @__PURE__ */ jsx15("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px]", children: "Depth Masking" }),
3507
+ /* @__PURE__ */ jsx15(
3484
3508
  "button",
3485
3509
  {
3486
3510
  type: "button",
@@ -3491,7 +3515,7 @@ var ImageEditor = ({
3491
3515
  )
3492
3516
  ] }),
3493
3517
  /* @__PURE__ */ jsxs14("label", { className: "flex items-center gap-2 cursor-pointer text-slate-300", children: [
3494
- /* @__PURE__ */ jsx14(
3518
+ /* @__PURE__ */ jsx15(
3495
3519
  "input",
3496
3520
  {
3497
3521
  type: "checkbox",
@@ -3500,12 +3524,12 @@ var ImageEditor = ({
3500
3524
  className: "rounded accent-indigo-500"
3501
3525
  }
3502
3526
  ),
3503
- /* @__PURE__ */ jsx14("span", { children: "Enable Depth / Alpha Mask" })
3527
+ /* @__PURE__ */ jsx15("span", { children: "Enable Depth / Alpha Mask" })
3504
3528
  ] }),
3505
3529
  state.depthMask.enabled && /* @__PURE__ */ jsxs14(Fragment5, { children: [
3506
3530
  /* @__PURE__ */ jsxs14("div", { children: [
3507
- /* @__PURE__ */ jsx14("label", { className: "text-slate-400 block mb-1", children: "Mask Image URL:" }),
3508
- /* @__PURE__ */ jsx14(
3531
+ /* @__PURE__ */ jsx15("label", { className: "text-slate-400 block mb-1", children: "Mask Image URL:" }),
3532
+ /* @__PURE__ */ jsx15(
3509
3533
  "input",
3510
3534
  {
3511
3535
  type: "text",
@@ -3517,7 +3541,7 @@ var ImageEditor = ({
3517
3541
  )
3518
3542
  ] }),
3519
3543
  /* @__PURE__ */ jsxs14("div", { className: "flex gap-2", children: [
3520
- /* @__PURE__ */ jsx14(
3544
+ /* @__PURE__ */ jsx15(
3521
3545
  "button",
3522
3546
  {
3523
3547
  type: "button",
@@ -3526,7 +3550,7 @@ var ImageEditor = ({
3526
3550
  children: "Threshold Mode"
3527
3551
  }
3528
3552
  ),
3529
- /* @__PURE__ */ jsx14(
3553
+ /* @__PURE__ */ jsx15(
3530
3554
  "button",
3531
3555
  {
3532
3556
  type: "button",
@@ -3538,10 +3562,10 @@ var ImageEditor = ({
3538
3562
  ] }),
3539
3563
  /* @__PURE__ */ jsxs14("div", { children: [
3540
3564
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-slate-400 mb-1", children: [
3541
- /* @__PURE__ */ jsx14("span", { children: "Depth Start (Lower):" }),
3542
- /* @__PURE__ */ jsx14("span", { className: "font-mono", children: state.depthMask.depthRange[0] })
3565
+ /* @__PURE__ */ jsx15("span", { children: "Depth Start (Lower):" }),
3566
+ /* @__PURE__ */ jsx15("span", { className: "font-mono", children: state.depthMask.depthRange[0] })
3543
3567
  ] }),
3544
- /* @__PURE__ */ jsx14(
3568
+ /* @__PURE__ */ jsx15(
3545
3569
  "input",
3546
3570
  {
3547
3571
  type: "range",
@@ -3557,10 +3581,10 @@ var ImageEditor = ({
3557
3581
  ] }),
3558
3582
  /* @__PURE__ */ jsxs14("div", { children: [
3559
3583
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-slate-400 mb-1", children: [
3560
- /* @__PURE__ */ jsx14("span", { children: "Depth Stop (Upper):" }),
3561
- /* @__PURE__ */ jsx14("span", { className: "font-mono", children: state.depthMask.depthRange[1] })
3584
+ /* @__PURE__ */ jsx15("span", { children: "Depth Stop (Upper):" }),
3585
+ /* @__PURE__ */ jsx15("span", { className: "font-mono", children: state.depthMask.depthRange[1] })
3562
3586
  ] }),
3563
- /* @__PURE__ */ jsx14(
3587
+ /* @__PURE__ */ jsx15(
3564
3588
  "input",
3565
3589
  {
3566
3590
  type: "range",
@@ -3576,10 +3600,10 @@ var ImageEditor = ({
3576
3600
  ] }),
3577
3601
  /* @__PURE__ */ jsxs14("div", { children: [
3578
3602
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-slate-400 mb-1", children: [
3579
- /* @__PURE__ */ jsx14("span", { children: "Softness:" }),
3580
- /* @__PURE__ */ jsx14("span", { className: "font-mono", children: state.depthMask.softness })
3603
+ /* @__PURE__ */ jsx15("span", { children: "Softness:" }),
3604
+ /* @__PURE__ */ jsx15("span", { className: "font-mono", children: state.depthMask.softness })
3581
3605
  ] }),
3582
- /* @__PURE__ */ jsx14(
3606
+ /* @__PURE__ */ jsx15(
3583
3607
  "input",
3584
3608
  {
3585
3609
  type: "range",
@@ -3592,7 +3616,7 @@ var ImageEditor = ({
3592
3616
  )
3593
3617
  ] }),
3594
3618
  /* @__PURE__ */ jsxs14("label", { className: "flex items-center gap-2 cursor-pointer text-slate-300 mt-1", children: [
3595
- /* @__PURE__ */ jsx14(
3619
+ /* @__PURE__ */ jsx15(
3596
3620
  "input",
3597
3621
  {
3598
3622
  type: "checkbox",
@@ -3601,12 +3625,12 @@ var ImageEditor = ({
3601
3625
  className: "rounded accent-indigo-500"
3602
3626
  }
3603
3627
  ),
3604
- /* @__PURE__ */ jsx14("span", { children: "Invert Mask" })
3628
+ /* @__PURE__ */ jsx15("span", { children: "Invert Mask" })
3605
3629
  ] })
3606
3630
  ] })
3607
3631
  ] }),
3608
3632
  activeTab === "select" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4 text-xs", children: [
3609
- /* @__PURE__ */ jsx14(
3633
+ /* @__PURE__ */ jsx15(
3610
3634
  SelectionOptionsBar,
3611
3635
  {
3612
3636
  controller,
@@ -3616,9 +3640,9 @@ var ImageEditor = ({
3616
3640
  quickMask: Boolean(state.quickMask)
3617
3641
  }
3618
3642
  ),
3619
- selectionError && /* @__PURE__ */ jsx14("p", { role: "alert", className: "text-rose-400", children: selectionError }),
3643
+ selectionError && /* @__PURE__ */ jsx15("p", { role: "alert", className: "text-rose-400", children: selectionError }),
3620
3644
  /* @__PURE__ */ jsxs14("div", { className: "flex gap-1", children: [
3621
- /* @__PURE__ */ jsx14(
3645
+ /* @__PURE__ */ jsx15(
3622
3646
  "button",
3623
3647
  {
3624
3648
  type: "button",
@@ -3629,7 +3653,7 @@ var ImageEditor = ({
3629
3653
  children: "Transform Selection"
3630
3654
  }
3631
3655
  ),
3632
- /* @__PURE__ */ jsx14(
3656
+ /* @__PURE__ */ jsx15(
3633
3657
  "button",
3634
3658
  {
3635
3659
  type: "button",
@@ -3641,11 +3665,11 @@ var ImageEditor = ({
3641
3665
  }
3642
3666
  )
3643
3667
  ] }),
3644
- /* @__PURE__ */ jsx14(RefineEdgePanel, { controller, selection: state.selection ?? null, layers: state.adjustments.layers })
3668
+ /* @__PURE__ */ jsx15(RefineEdgePanel, { controller, selection: state.selection ?? null, layers: state.adjustments.layers })
3645
3669
  ] }),
3646
3670
  activeTab === "ai" && /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4 text-xs", children: [
3647
3671
  /* @__PURE__ */ jsxs14("label", { className: "flex items-center justify-between gap-2 text-slate-300", children: [
3648
- /* @__PURE__ */ jsx14("span", { children: "Results go to" }),
3672
+ /* @__PURE__ */ jsx15("span", { children: "Results go to" }),
3649
3673
  /* @__PURE__ */ jsxs14(
3650
3674
  "select",
3651
3675
  {
@@ -3654,9 +3678,9 @@ var ImageEditor = ({
3654
3678
  onChange: (e) => setAiTarget(e.target.value),
3655
3679
  className: "bg-slate-800 border border-slate-700 rounded px-1.5 py-1",
3656
3680
  children: [
3657
- /* @__PURE__ */ jsx14("option", { value: "auto", children: controller.isMultiLayer ? "Auto (new layer)" : "Auto (replace image)" }),
3658
- /* @__PURE__ */ jsx14("option", { value: "new-layer", children: "New layer / mask" }),
3659
- /* @__PURE__ */ jsx14("option", { value: "replace", children: "Replace image" })
3681
+ /* @__PURE__ */ jsx15("option", { value: "auto", children: controller.isMultiLayer ? "Auto (new layer)" : "Auto (replace image)" }),
3682
+ /* @__PURE__ */ jsx15("option", { value: "new-layer", children: "New layer / mask" }),
3683
+ /* @__PURE__ */ jsx15("option", { value: "replace", children: "Replace image" })
3660
3684
  ]
3661
3685
  }
3662
3686
  )
@@ -3664,13 +3688,13 @@ var ImageEditor = ({
3664
3688
  /* @__PURE__ */ jsxs14("div", { className: "p-3 rounded-lg bg-slate-950/60 border border-slate-800 flex flex-col gap-2.5", children: [
3665
3689
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between", children: [
3666
3690
  /* @__PURE__ */ jsxs14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px] flex items-center gap-1.5", children: [
3667
- /* @__PURE__ */ jsx14("svg", { className: "w-3.5 h-3.5 text-indigo-400", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx14("path", { d: "M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" }) }),
3691
+ /* @__PURE__ */ jsx15("svg", { className: "w-3.5 h-3.5 text-indigo-400", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx15("path", { d: "M6 3v12M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" }) }),
3668
3692
  "Background Removal"
3669
3693
  ] }),
3670
- isRemovingBg && /* @__PURE__ */ jsx14("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-indigo-900/60 text-indigo-300 animate-pulse", children: "Removing..." })
3694
+ isRemovingBg && /* @__PURE__ */ jsx15("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-indigo-900/60 text-indigo-300 animate-pulse", children: "Removing..." })
3671
3695
  ] }),
3672
- /* @__PURE__ */ jsx14("p", { className: "text-slate-400 text-[11px] leading-relaxed", children: "Isolate foreground subject with AI alpha transparency segmentation." }),
3673
- /* @__PURE__ */ jsx14(
3696
+ /* @__PURE__ */ jsx15("p", { className: "text-slate-400 text-[11px] leading-relaxed", children: "Isolate foreground subject with AI alpha transparency segmentation." }),
3697
+ /* @__PURE__ */ jsx15(
3674
3698
  "button",
3675
3699
  {
3676
3700
  type: "button",
@@ -3678,10 +3702,10 @@ var ImageEditor = ({
3678
3702
  disabled: isRemovingBg || isInpainting,
3679
3703
  className: "mt-1 px-3 py-2 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-white font-medium shadow transition-colors flex items-center justify-center gap-2",
3680
3704
  children: isRemovingBg ? /* @__PURE__ */ jsxs14(Fragment5, { children: [
3681
- /* @__PURE__ */ jsx14("div", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" }),
3705
+ /* @__PURE__ */ jsx15("div", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" }),
3682
3706
  "Removing Background..."
3683
3707
  ] }) : /* @__PURE__ */ jsxs14(Fragment5, { children: [
3684
- /* @__PURE__ */ jsx14("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx14("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }),
3708
+ /* @__PURE__ */ jsx15("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx15("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }),
3685
3709
  "Remove Background"
3686
3710
  ] })
3687
3711
  }
@@ -3691,17 +3715,17 @@ var ImageEditor = ({
3691
3715
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between", children: [
3692
3716
  /* @__PURE__ */ jsxs14("span", { className: "font-semibold text-slate-200 uppercase tracking-wider text-[11px] flex items-center gap-1.5", children: [
3693
3717
  /* @__PURE__ */ jsxs14("svg", { className: "w-3.5 h-3.5 text-purple-400", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3694
- /* @__PURE__ */ jsx14("path", { d: "m21.64 3.64-1.28-1.28a1.2 1.2 0 0 0-1.7 0l-9.72 9.72-1.94 4.86 4.86-1.94 9.72-9.72a1.2 1.2 0 0 0 .06-1.64z" }),
3695
- /* @__PURE__ */ jsx14("path", { d: "m14 7 3 3" })
3718
+ /* @__PURE__ */ jsx15("path", { d: "m21.64 3.64-1.28-1.28a1.2 1.2 0 0 0-1.7 0l-9.72 9.72-1.94 4.86 4.86-1.94 9.72-9.72a1.2 1.2 0 0 0 .06-1.64z" }),
3719
+ /* @__PURE__ */ jsx15("path", { d: "m14 7 3 3" })
3696
3720
  ] }),
3697
3721
  "Generative Inpainting"
3698
3722
  ] }),
3699
- isInpainting && /* @__PURE__ */ jsx14("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-purple-900/60 text-purple-300 animate-pulse", children: "Inpainting..." })
3723
+ isInpainting && /* @__PURE__ */ jsx15("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-purple-900/60 text-purple-300 animate-pulse", children: "Inpainting..." })
3700
3724
  ] }),
3701
- /* @__PURE__ */ jsx14("p", { className: "text-slate-400 text-[11px] leading-relaxed", children: "Replace, modify, or fill selected regions using prompt-guided generative inpainting." }),
3725
+ /* @__PURE__ */ jsx15("p", { className: "text-slate-400 text-[11px] leading-relaxed", children: "Replace, modify, or fill selected regions using prompt-guided generative inpainting." }),
3702
3726
  /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-1", children: [
3703
- /* @__PURE__ */ jsx14("label", { htmlFor: "ai-inpaint-prompt-react", className: "text-slate-300 text-[11px] font-medium", children: "Prompt" }),
3704
- /* @__PURE__ */ jsx14(
3727
+ /* @__PURE__ */ jsx15("label", { htmlFor: "ai-inpaint-prompt-react", className: "text-slate-300 text-[11px] font-medium", children: "Prompt" }),
3728
+ /* @__PURE__ */ jsx15(
3705
3729
  "textarea",
3706
3730
  {
3707
3731
  id: "ai-inpaint-prompt-react",
@@ -3714,7 +3738,7 @@ var ImageEditor = ({
3714
3738
  )
3715
3739
  ] }),
3716
3740
  /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-1", children: [
3717
- /* @__PURE__ */ jsx14("span", { className: "text-slate-300 text-[11px] font-medium", children: "Target Mask Region" }),
3741
+ /* @__PURE__ */ jsx15("span", { className: "text-slate-300 text-[11px] font-medium", children: "Target Mask Region" }),
3718
3742
  /* @__PURE__ */ jsxs14("div", { className: "grid grid-cols-2 gap-1.5", children: [
3719
3743
  /* @__PURE__ */ jsxs14(
3720
3744
  "button",
@@ -3744,7 +3768,7 @@ var ImageEditor = ({
3744
3768
  )
3745
3769
  ] })
3746
3770
  ] }),
3747
- /* @__PURE__ */ jsx14(
3771
+ /* @__PURE__ */ jsx15(
3748
3772
  "button",
3749
3773
  {
3750
3774
  type: "button",
@@ -3752,17 +3776,17 @@ var ImageEditor = ({
3752
3776
  disabled: isInpainting || isRemovingBg || !inpaintPrompt.trim(),
3753
3777
  className: "mt-1 px-3 py-2 rounded-lg bg-purple-600 hover:bg-purple-500 disabled:opacity-50 text-white font-medium shadow transition-colors flex items-center justify-center gap-2",
3754
3778
  children: isInpainting ? /* @__PURE__ */ jsxs14(Fragment5, { children: [
3755
- /* @__PURE__ */ jsx14("div", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" }),
3779
+ /* @__PURE__ */ jsx15("div", { className: "w-3.5 h-3.5 border-2 border-white/30 border-t-white rounded-full animate-spin" }),
3756
3780
  "Generating Inpaint..."
3757
3781
  ] }) : /* @__PURE__ */ jsxs14(Fragment5, { children: [
3758
- /* @__PURE__ */ jsx14("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx14("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }),
3782
+ /* @__PURE__ */ jsx15("svg", { className: "w-3.5 h-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx15("path", { d: "M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83" }) }),
3759
3783
  "Apply Inpainting"
3760
3784
  ] })
3761
3785
  }
3762
3786
  )
3763
3787
  ] }),
3764
- aiError && /* @__PURE__ */ jsx14("div", { className: "p-2.5 rounded-lg bg-rose-950/60 border border-rose-800 text-rose-300 text-[11px]", children: aiError }),
3765
- aiSuccess && /* @__PURE__ */ jsx14("div", { className: "p-2.5 rounded-lg bg-emerald-950/60 border border-emerald-800 text-emerald-300 text-[11px]", children: aiSuccess })
3788
+ aiError && /* @__PURE__ */ jsx15("div", { className: "p-2.5 rounded-lg bg-rose-950/60 border border-rose-800 text-rose-300 text-[11px]", children: aiError }),
3789
+ aiSuccess && /* @__PURE__ */ jsx15("div", { className: "p-2.5 rounded-lg bg-emerald-950/60 border border-emerald-800 text-emerald-300 text-[11px]", children: aiSuccess })
3766
3790
  ] })
3767
3791
  ] })
3768
3792
  ] })
@@ -3780,6 +3804,7 @@ export {
3780
3804
  AdjustmentLayersPanel,
3781
3805
  LayerEffectsPanel,
3782
3806
  LayersPanel,
3807
+ PaintGradientEditor,
3783
3808
  BrushOptionsBar,
3784
3809
  ColorProfilePanel,
3785
3810
  SelectionOptionsBar,
@@ -3789,4 +3814,4 @@ export {
3789
3814
  TypeOptionsBar,
3790
3815
  ImageEditor
3791
3816
  };
3792
- //# sourceMappingURL=chunk-LWMUV5TC.js.map
3817
+ //# sourceMappingURL=chunk-QARGR5E5.js.map