@pixerate/editor-react 0.85.0 → 0.87.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.
@@ -1423,7 +1423,10 @@ import {
1423
1423
  RETOUCH_CHOICES,
1424
1424
  RETOUCH_OPTION_CONTROLS,
1425
1425
  RETOUCH_TOGGLES,
1426
+ CLONE_TRANSFORM_CONTROLS,
1426
1427
  cloneSourceLabel,
1428
+ cloneTransformView,
1429
+ setCloneTransformValue,
1427
1430
  isRetouchPaintTool,
1428
1431
  rgbUnitToHex,
1429
1432
  setRetouchChoice
@@ -1578,6 +1581,14 @@ var BrushOptionsBar = ({ controller, className }) => {
1578
1581
  /* @__PURE__ */ jsx9("span", { className: "text-slate-400", "data-testid": "clone-source", children: cloneSourceLabel(controller) }),
1579
1582
  cloneSource && /* @__PURE__ */ jsx9("button", { type: "button", title: "Forget the source point", className: chip(false), onClick: () => controller.setCloneSource(null), children: "Clear source" })
1580
1583
  ] }),
1584
+ (tool === "clone" || tool === "heal") && /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-1", role: "group", "aria-label": "Clone source transform", "data-testid": "clone-transform", children: [
1585
+ CLONE_TRANSFORM_CONTROLS.map((spec) => /* @__PURE__ */ jsx9(ControlSlider, { spec, value: cloneTransformView(controller)[spec.id], onChange: (v) => setCloneTransformValue(controller, spec.id, v) }, spec.id)),
1586
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1", children: [
1587
+ /* @__PURE__ */ jsx9("button", { type: "button", "aria-pressed": cloneTransformView(controller).flipH, title: "Mirror the source left to right", className: chip(cloneTransformView(controller).flipH), onClick: () => setCloneTransformValue(controller, "flipH"), children: "Flip H" }),
1588
+ /* @__PURE__ */ jsx9("button", { type: "button", "aria-pressed": cloneTransformView(controller).flipV, title: "Mirror the source top to bottom", className: chip(cloneTransformView(controller).flipV), onClick: () => setCloneTransformValue(controller, "flipV"), children: "Flip V" }),
1589
+ !cloneTransformView(controller).identity && /* @__PURE__ */ jsx9("button", { type: "button", title: "Back to 100 %, no flip, 0\xB0", className: chip(false), onClick: () => controller.setCloneTransform(null), children: "Reset transform" })
1590
+ ] })
1591
+ ] }),
1581
1592
  RETOUCH_CHOICES.filter((c) => c.tools.includes(tool)).map((choice) => /* @__PURE__ */ jsxs8("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": choice.label, children: [
1582
1593
  /* @__PURE__ */ jsx9("span", { className: "text-slate-400", children: choice.label }),
1583
1594
  choice.options.map((o) => /* @__PURE__ */ jsx9(
@@ -3967,4 +3978,4 @@ export {
3967
3978
  TypeOptionsBar,
3968
3979
  ImageEditor
3969
3980
  };
3970
- //# sourceMappingURL=chunk-VKWTKESA.js.map
3981
+ //# sourceMappingURL=chunk-4FQXRPBN.js.map