@pixerate/editor-react 0.128.0 → 0.129.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.
@@ -2805,6 +2805,36 @@ var SelectionOptionsBar = ({
2805
2805
  ] })
2806
2806
  ] }),
2807
2807
  options.tool === "polygon" && /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Click to add corners (Shift for 45\xB0), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels." }),
2808
+ options.tool === "magnetic" && /* @__PURE__ */ jsxs13("div", { "data-testid": "magnetic-lasso-options", className: "flex flex-col gap-2", children: [
2809
+ /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels." }),
2810
+ /* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
2811
+ /* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
2812
+ /* @__PURE__ */ jsx15("span", { children: "Width" }),
2813
+ /* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
2814
+ options.magneticWidth ?? 10,
2815
+ " px"
2816
+ ] })
2817
+ ] }),
2818
+ /* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso width", min: 1, max: 256, step: 1, value: options.magneticWidth ?? 10, onChange: (v) => set({ magneticWidth: v }) })
2819
+ ] }),
2820
+ /* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
2821
+ /* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
2822
+ /* @__PURE__ */ jsx15("span", { children: "Contrast" }),
2823
+ /* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
2824
+ options.magneticContrast ?? 10,
2825
+ "%"
2826
+ ] })
2827
+ ] }),
2828
+ /* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso contrast", min: 1, max: 100, step: 1, value: options.magneticContrast ?? 10, onChange: (v) => set({ magneticContrast: v }) })
2829
+ ] }),
2830
+ /* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
2831
+ /* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
2832
+ /* @__PURE__ */ jsx15("span", { children: "Frequency" }),
2833
+ /* @__PURE__ */ jsx15("span", { className: "font-mono", children: options.magneticFrequency ?? 57 })
2834
+ ] }),
2835
+ /* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
2836
+ ] })
2837
+ ] }),
2808
2838
  (options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ jsxs13("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
2809
2839
  /* @__PURE__ */ jsxs13("p", { className: "text-muted-foreground", children: [
2810
2840
  options.tool === "type-vertical" ? "Click where the column starts: the letters are stacked down from there, centred on the click." : "Click where the text starts (its baseline).",
@@ -4736,6 +4736,36 @@ var SelectionOptionsBar = ({
4736
4736
  ] })
4737
4737
  ] }),
4738
4738
  options.tool === "polygon" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Click to add corners (Shift for 45\xB0), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels." }),
4739
+ options.tool === "magnetic" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "magnetic-lasso-options", className: "flex flex-col gap-2", children: [
4740
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels." }),
4741
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
4742
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
4743
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Width" }),
4744
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
4745
+ options.magneticWidth ?? 10,
4746
+ " px"
4747
+ ] })
4748
+ ] }),
4749
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Magnetic lasso width", min: 1, max: 256, step: 1, value: options.magneticWidth ?? 10, onChange: (v) => set({ magneticWidth: v }) })
4750
+ ] }),
4751
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
4752
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
4753
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Contrast" }),
4754
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
4755
+ options.magneticContrast ?? 10,
4756
+ "%"
4757
+ ] })
4758
+ ] }),
4759
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Magnetic lasso contrast", min: 1, max: 100, step: 1, value: options.magneticContrast ?? 10, onChange: (v) => set({ magneticContrast: v }) })
4760
+ ] }),
4761
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
4762
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
4763
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Frequency" }),
4764
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "font-mono", children: options.magneticFrequency ?? 57 })
4765
+ ] }),
4766
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
4767
+ ] })
4768
+ ] }),
4739
4769
  (options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
4740
4770
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-muted-foreground", children: [
4741
4771
  options.tool === "type-vertical" ? "Click where the column starts: the letters are stacked down from there, centred on the click." : "Click where the text starts (its baseline).",
@@ -27,7 +27,7 @@ import {
27
27
  useImageEditorControls,
28
28
  useImageEffectsTools,
29
29
  useImageHistogram
30
- } from "../chunk-EEF44DJ6.js";
30
+ } from "../chunk-5XDRXZSA.js";
31
31
  import "../chunk-AJCWF6SN.js";
32
32
  import "../chunk-6BWTJ3EE.js";
33
33
  import "../chunk-5RPB4WGT.js";
package/dist/index.cjs CHANGED
@@ -8450,6 +8450,36 @@ var SelectionOptionsBar = ({
8450
8450
  ] })
8451
8451
  ] }),
8452
8452
  options.tool === "polygon" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Click to add corners (Shift for 45\xB0), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels." }),
8453
+ options.tool === "magnetic" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "magnetic-lasso-options", className: "flex flex-col gap-2", children: [
8454
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels." }),
8455
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
8456
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
8457
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Width" }),
8458
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
8459
+ options.magneticWidth ?? 10,
8460
+ " px"
8461
+ ] })
8462
+ ] }),
8463
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Magnetic lasso width", min: 1, max: 256, step: 1, value: options.magneticWidth ?? 10, onChange: (v) => set({ magneticWidth: v }) })
8464
+ ] }),
8465
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
8466
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
8467
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Contrast" }),
8468
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
8469
+ options.magneticContrast ?? 10,
8470
+ "%"
8471
+ ] })
8472
+ ] }),
8473
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Magnetic lasso contrast", min: 1, max: 100, step: 1, value: options.magneticContrast ?? 10, onChange: (v) => set({ magneticContrast: v }) })
8474
+ ] }),
8475
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
8476
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
8477
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Frequency" }),
8478
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "font-mono", children: options.magneticFrequency ?? 57 })
8479
+ ] }),
8480
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
8481
+ ] })
8482
+ ] }),
8453
8483
  (options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
8454
8484
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "text-muted-foreground", children: [
8455
8485
  options.tool === "type-vertical" ? "Click where the column starts: the letters are stacked down from there, centred on the click." : "Click where the text starts (its baseline).",
package/dist/index.js CHANGED
@@ -51,7 +51,7 @@ import {
51
51
  useImageEditorControls,
52
52
  useImageEffectsTools,
53
53
  useImageHistogram
54
- } from "./chunk-EEF44DJ6.js";
54
+ } from "./chunk-5XDRXZSA.js";
55
55
  import "./chunk-AJCWF6SN.js";
56
56
  import "./chunk-6BWTJ3EE.js";
57
57
  import "./chunk-5RPB4WGT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.128.0",
3
+ "version": "0.129.0",
4
4
  "description": "React bindings and prompt/rich-text components for @pixerate/editor",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -254,7 +254,7 @@
254
254
  "dependencies": {},
255
255
  "peerDependencies": {
256
256
  "@dagrejs/dagre": "^1.1.8",
257
- "@pixerate/editor": ">=0.193.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.195.0 <1.0.0-0",
258
258
  "@tiptap/core": "^2.27.3",
259
259
  "@tiptap/extension-bubble-menu": "^2.27.3",
260
260
  "@tiptap/extension-placeholder": "^2.27.3",
@@ -305,7 +305,7 @@
305
305
  "tsup": "^9.0.0",
306
306
  "typescript": "^5.7.3",
307
307
  "vitest": "^5.0.5",
308
- "@pixerate/editor": "0.193.0"
308
+ "@pixerate/editor": "0.195.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",