@pixerate/editor-react 0.129.0 → 0.131.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.
@@ -2835,6 +2835,38 @@ var SelectionOptionsBar = ({
2835
2835
  /* @__PURE__ */ jsx15(ImageRange, { label: "Magnetic lasso frequency", min: 0, max: 100, step: 1, value: options.magneticFrequency ?? 57, onChange: (v) => set({ magneticFrequency: v }) })
2836
2836
  ] })
2837
2837
  ] }),
2838
+ options.tool === "quick" && /* @__PURE__ */ jsxs13("div", { "data-testid": "quick-selection-options", className: "flex flex-col gap-2", children: [
2839
+ /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts)." }),
2840
+ /* @__PURE__ */ jsxs13("label", { className: "flex flex-col gap-1", children: [
2841
+ /* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
2842
+ /* @__PURE__ */ jsx15("span", { children: "Size" }),
2843
+ /* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
2844
+ options.quickSize ?? 30,
2845
+ " px"
2846
+ ] })
2847
+ ] }),
2848
+ /* @__PURE__ */ jsx15(ImageRange, { label: "Quick selection size", min: 1, max: 500, step: 1, value: options.quickSize ?? 30, onChange: (v) => set({ quickSize: v }) })
2849
+ ] }),
2850
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-2 text-foreground", children: [
2851
+ /* @__PURE__ */ jsx15(ImageCheckbox, { label: "Sample all layers", checked: options.quickSampleAll ?? true, onChange: (on) => set({ quickSampleAll: on }) }),
2852
+ "Sample all layers"
2853
+ ] }),
2854
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-2 text-foreground", children: [
2855
+ /* @__PURE__ */ jsx15(ImageCheckbox, { label: "Auto-enhance edges", checked: options.quickEnhance ?? false, onChange: (on) => set({ quickEnhance: on }) }),
2856
+ "Auto-enhance edges"
2857
+ ] })
2858
+ ] }),
2859
+ options.tool === "object" && /* @__PURE__ */ jsxs13("div", { "data-testid": "object-selection-options", className: "flex flex-col gap-2", children: [
2860
+ /* @__PURE__ */ jsx15("p", { className: "text-muted-foreground", children: "Drag a box loosely around an object, or click on it. Shift adds, Alt subtracts." }),
2861
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-2 text-foreground", children: [
2862
+ /* @__PURE__ */ jsx15(ImageCheckbox, { label: "Object sample all layers", checked: options.objectSampleAll ?? true, onChange: (on) => set({ objectSampleAll: on }) }),
2863
+ "Sample all layers"
2864
+ ] }),
2865
+ /* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-2 text-foreground", children: [
2866
+ /* @__PURE__ */ jsx15(ImageCheckbox, { label: "Object auto-enhance edges", checked: options.objectEnhance ?? false, onChange: (on) => set({ objectEnhance: on }) }),
2867
+ "Auto-enhance edges"
2868
+ ] })
2869
+ ] }),
2838
2870
  (options.tool === "type" || options.tool === "type-vertical") && /* @__PURE__ */ jsxs13("div", { "data-testid": "type-mask-options", className: "flex flex-col gap-2", children: [
2839
2871
  /* @__PURE__ */ jsxs13("p", { className: "text-muted-foreground", children: [
2840
2872
  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).",
@@ -4766,6 +4766,38 @@ var SelectionOptionsBar = ({
4766
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
4767
  ] })
4768
4768
  ] }),
4769
+ options.tool === "quick" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "quick-selection-options", className: "flex flex-col gap-2", children: [
4770
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts)." }),
4771
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex flex-col gap-1", children: [
4772
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
4773
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children: "Size" }),
4774
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
4775
+ options.quickSize ?? 30,
4776
+ " px"
4777
+ ] })
4778
+ ] }),
4779
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageRange, { label: "Quick selection size", min: 1, max: 500, step: 1, value: options.quickSize ?? 30, onChange: (v) => set({ quickSize: v }) })
4780
+ ] }),
4781
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
4782
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Sample all layers", checked: options.quickSampleAll ?? true, onChange: (on) => set({ quickSampleAll: on }) }),
4783
+ "Sample all layers"
4784
+ ] }),
4785
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
4786
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Auto-enhance edges", checked: options.quickEnhance ?? false, onChange: (on) => set({ quickEnhance: on }) }),
4787
+ "Auto-enhance edges"
4788
+ ] })
4789
+ ] }),
4790
+ options.tool === "object" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { "data-testid": "object-selection-options", className: "flex flex-col gap-2", children: [
4791
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-muted-foreground", children: "Drag a box loosely around an object, or click on it. Shift adds, Alt subtracts." }),
4792
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
4793
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Object sample all layers", checked: options.objectSampleAll ?? true, onChange: (on) => set({ objectSampleAll: on }) }),
4794
+ "Sample all layers"
4795
+ ] }),
4796
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
4797
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ImageCheckbox, { label: "Object auto-enhance edges", checked: options.objectEnhance ?? false, onChange: (on) => set({ objectEnhance: on }) }),
4798
+ "Auto-enhance edges"
4799
+ ] })
4800
+ ] }),
4769
4801
  (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: [
4770
4802
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-muted-foreground", children: [
4771
4803
  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-5XDRXZSA.js";
30
+ } from "../chunk-6TDQ5DIO.js";
31
31
  import "../chunk-AJCWF6SN.js";
32
32
  import "../chunk-6BWTJ3EE.js";
33
33
  import "../chunk-5RPB4WGT.js";
package/dist/index.cjs CHANGED
@@ -8480,6 +8480,38 @@ var SelectionOptionsBar = ({
8480
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
8481
  ] })
8482
8482
  ] }),
8483
+ options.tool === "quick" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "quick-selection-options", className: "flex flex-col gap-2", children: [
8484
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts)." }),
8485
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex flex-col gap-1", children: [
8486
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
8487
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: "Size" }),
8488
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
8489
+ options.quickSize ?? 30,
8490
+ " px"
8491
+ ] })
8492
+ ] }),
8493
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageRange, { label: "Quick selection size", min: 1, max: 500, step: 1, value: options.quickSize ?? 30, onChange: (v) => set({ quickSize: v }) })
8494
+ ] }),
8495
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
8496
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageCheckbox, { label: "Sample all layers", checked: options.quickSampleAll ?? true, onChange: (on) => set({ quickSampleAll: on }) }),
8497
+ "Sample all layers"
8498
+ ] }),
8499
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
8500
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageCheckbox, { label: "Auto-enhance edges", checked: options.quickEnhance ?? false, onChange: (on) => set({ quickEnhance: on }) }),
8501
+ "Auto-enhance edges"
8502
+ ] })
8503
+ ] }),
8504
+ options.tool === "object" && /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { "data-testid": "object-selection-options", className: "flex flex-col gap-2", children: [
8505
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground", children: "Drag a box loosely around an object, or click on it. Shift adds, Alt subtracts." }),
8506
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
8507
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageCheckbox, { label: "Object sample all layers", checked: options.objectSampleAll ?? true, onChange: (on) => set({ objectSampleAll: on }) }),
8508
+ "Sample all layers"
8509
+ ] }),
8510
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
8511
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ImageCheckbox, { label: "Object auto-enhance edges", checked: options.objectEnhance ?? false, onChange: (on) => set({ objectEnhance: on }) }),
8512
+ "Auto-enhance edges"
8513
+ ] })
8514
+ ] }),
8483
8515
  (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: [
8484
8516
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "text-muted-foreground", children: [
8485
8517
  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-5XDRXZSA.js";
54
+ } from "./chunk-6TDQ5DIO.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.129.0",
3
+ "version": "0.131.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.195.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.198.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.195.0"
308
+ "@pixerate/editor": "0.198.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",