@pixerate/editor-react 0.138.0 → 0.139.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.
@@ -2759,7 +2759,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
2759
2759
  panFrom.current = null;
2760
2760
  session.end();
2761
2761
  };
2762
- const toLayer = settings.output === "new-layer" || settings.output === "new-layer-with-mask";
2762
+ const toLayer = settings.output !== "selection" && settings.output !== "layer-mask";
2763
2763
  const brushTool = settings.tool === "quick-select" || settings.tool === "brush" || settings.tool === "refine-brush";
2764
2764
  return /* @__PURE__ */ jsxs13(
2765
2765
  "div",
@@ -2896,7 +2896,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
2896
2896
  /* @__PURE__ */ jsxs13("span", { className: "flex justify-between text-muted-foreground", children: [
2897
2897
  /* @__PURE__ */ jsxs13("span", { children: [
2898
2898
  "Decontaminate Colors",
2899
- toLayer ? "" : " (new layer outputs)"
2899
+ toLayer ? "" : " (new layer or document outputs)"
2900
2900
  ] }),
2901
2901
  /* @__PURE__ */ jsxs13("span", { className: "font-mono", children: [
2902
2902
  settings.decontaminate,
@@ -2912,7 +2912,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
2912
2912
  {
2913
2913
  label: "Output to",
2914
2914
  value: settings.output,
2915
- options: REFINE_OUTPUTS.map((o) => ({ value: o.id, label: o.label })),
2915
+ options: REFINE_OUTPUTS.filter((o) => !o.needsDocuments || controller.canOpenDocuments).map((o) => ({ value: o.id, label: o.label })),
2916
2916
  onChange: (v) => set({ output: v })
2917
2917
  }
2918
2918
  )
@@ -3490,7 +3490,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
3490
3490
  const [decontaminate, setDecontaminate] = useState13(0);
3491
3491
  const [objectAware, setObjectAware] = useState13(false);
3492
3492
  const canObject = Boolean(controller.segmentationProvider);
3493
- const toLayer = output === "new-layer" || output === "new-layer-with-mask";
3493
+ const toLayer = output !== "selection" && output !== "layer-mask";
3494
3494
  const sel = selection === void 0 ? controller.getSelection() : selection;
3495
3495
  const list = layers ?? controller.getAdjustmentLayers();
3496
3496
  const target = list.find((l) => l.id === layerId) ?? list[list.length - 1];
@@ -3549,7 +3549,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
3549
3549
  value: output,
3550
3550
  onChange: (e) => setOutput(e.target.value),
3551
3551
  className: "flex-1 bg-background border border-border rounded px-1 py-1 text-foreground",
3552
- children: REFINE_OUTPUTS2.map((o) => /* @__PURE__ */ jsx17("option", { value: o.id, children: o.label }, o.id))
3552
+ children: REFINE_OUTPUTS2.filter((o) => !o.needsDocuments || controller.canOpenDocuments).map((o) => /* @__PURE__ */ jsx17("option", { value: o.id, children: o.label }, o.id))
3553
3553
  }
3554
3554
  )
3555
3555
  ] }),
@@ -3557,7 +3557,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
3557
3557
  /* @__PURE__ */ jsxs15("span", { className: "flex justify-between text-muted-foreground", children: [
3558
3558
  /* @__PURE__ */ jsxs15("span", { children: [
3559
3559
  "Decontaminate colors",
3560
- toLayer ? "" : " (new layer outputs)"
3560
+ toLayer ? "" : " (new layer or document outputs)"
3561
3561
  ] }),
3562
3562
  /* @__PURE__ */ jsxs15("span", { className: "font-mono", children: [
3563
3563
  decontaminate,
@@ -4691,7 +4691,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
4691
4691
  panFrom.current = null;
4692
4692
  session.end();
4693
4693
  };
4694
- const toLayer = settings.output === "new-layer" || settings.output === "new-layer-with-mask";
4694
+ const toLayer = settings.output !== "selection" && settings.output !== "layer-mask";
4695
4695
  const brushTool = settings.tool === "quick-select" || settings.tool === "brush" || settings.tool === "refine-brush";
4696
4696
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
4697
4697
  "div",
@@ -4828,7 +4828,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
4828
4828
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
4829
4829
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { children: [
4830
4830
  "Decontaminate Colors",
4831
- toLayer ? "" : " (new layer outputs)"
4831
+ toLayer ? "" : " (new layer or document outputs)"
4832
4832
  ] }),
4833
4833
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "font-mono", children: [
4834
4834
  settings.decontaminate,
@@ -4844,7 +4844,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
4844
4844
  {
4845
4845
  label: "Output to",
4846
4846
  value: settings.output,
4847
- options: import_image_editor14.REFINE_OUTPUTS.map((o) => ({ value: o.id, label: o.label })),
4847
+ options: import_image_editor14.REFINE_OUTPUTS.filter((o) => !o.needsDocuments || controller.canOpenDocuments).map((o) => ({ value: o.id, label: o.label })),
4848
4848
  onChange: (v) => set({ output: v })
4849
4849
  }
4850
4850
  )
@@ -5416,7 +5416,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
5416
5416
  const [decontaminate, setDecontaminate] = (0, import_react27.useState)(0);
5417
5417
  const [objectAware, setObjectAware] = (0, import_react27.useState)(false);
5418
5418
  const canObject = Boolean(controller.segmentationProvider);
5419
- const toLayer = output === "new-layer" || output === "new-layer-with-mask";
5419
+ const toLayer = output !== "selection" && output !== "layer-mask";
5420
5420
  const sel = selection === void 0 ? controller.getSelection() : selection;
5421
5421
  const list = layers ?? controller.getAdjustmentLayers();
5422
5422
  const target = list.find((l) => l.id === layerId) ?? list[list.length - 1];
@@ -5475,7 +5475,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
5475
5475
  value: output,
5476
5476
  onChange: (e) => setOutput(e.target.value),
5477
5477
  className: "flex-1 bg-background border border-border rounded px-1 py-1 text-foreground",
5478
- children: import_image_editor16.REFINE_OUTPUTS.map((o) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: o.id, children: o.label }, o.id))
5478
+ children: import_image_editor16.REFINE_OUTPUTS.filter((o) => !o.needsDocuments || controller.canOpenDocuments).map((o) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: o.id, children: o.label }, o.id))
5479
5479
  }
5480
5480
  )
5481
5481
  ] }),
@@ -5483,7 +5483,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
5483
5483
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
5484
5484
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { children: [
5485
5485
  "Decontaminate colors",
5486
- toLayer ? "" : " (new layer outputs)"
5486
+ toLayer ? "" : " (new layer or document outputs)"
5487
5487
  ] }),
5488
5488
  /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "font-mono", children: [
5489
5489
  decontaminate,
@@ -28,7 +28,7 @@ import {
28
28
  useImageEditorControls,
29
29
  useImageEffectsTools,
30
30
  useImageHistogram
31
- } from "../chunk-3BL4QCPE.js";
31
+ } from "../chunk-7M3PJKFN.js";
32
32
  import "../chunk-AJCWF6SN.js";
33
33
  import "../chunk-6BWTJ3EE.js";
34
34
  import "../chunk-5RPB4WGT.js";
package/dist/index.cjs CHANGED
@@ -8405,7 +8405,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
8405
8405
  panFrom.current = null;
8406
8406
  session.end();
8407
8407
  };
8408
- const toLayer = settings.output === "new-layer" || settings.output === "new-layer-with-mask";
8408
+ const toLayer = settings.output !== "selection" && settings.output !== "layer-mask";
8409
8409
  const brushTool = settings.tool === "quick-select" || settings.tool === "brush" || settings.tool === "refine-brush";
8410
8410
  return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
8411
8411
  "div",
@@ -8542,7 +8542,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
8542
8542
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
8543
8543
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { children: [
8544
8544
  "Decontaminate Colors",
8545
- toLayer ? "" : " (new layer outputs)"
8545
+ toLayer ? "" : " (new layer or document outputs)"
8546
8546
  ] }),
8547
8547
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "font-mono", children: [
8548
8548
  settings.decontaminate,
@@ -8558,7 +8558,7 @@ var SelectAndMaskWorkspace = ({ controller, onClose, className = "" }) => {
8558
8558
  {
8559
8559
  label: "Output to",
8560
8560
  value: settings.output,
8561
- options: import_image_editor14.REFINE_OUTPUTS.map((o) => ({ value: o.id, label: o.label })),
8561
+ options: import_image_editor14.REFINE_OUTPUTS.filter((o) => !o.needsDocuments || controller.canOpenDocuments).map((o) => ({ value: o.id, label: o.label })),
8562
8562
  onChange: (v) => set({ output: v })
8563
8563
  }
8564
8564
  )
@@ -9130,7 +9130,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
9130
9130
  const [decontaminate, setDecontaminate] = (0, import_react63.useState)(0);
9131
9131
  const [objectAware, setObjectAware] = (0, import_react63.useState)(false);
9132
9132
  const canObject = Boolean(controller.segmentationProvider);
9133
- const toLayer = output === "new-layer" || output === "new-layer-with-mask";
9133
+ const toLayer = output !== "selection" && output !== "layer-mask";
9134
9134
  const sel = selection === void 0 ? controller.getSelection() : selection;
9135
9135
  const list = layers ?? controller.getAdjustmentLayers();
9136
9136
  const target = list.find((l) => l.id === layerId) ?? list[list.length - 1];
@@ -9189,7 +9189,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
9189
9189
  value: output,
9190
9190
  onChange: (e) => setOutput(e.target.value),
9191
9191
  className: "flex-1 bg-background border border-border rounded px-1 py-1 text-foreground",
9192
- children: import_image_editor16.REFINE_OUTPUTS.map((o) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: o.id, children: o.label }, o.id))
9192
+ children: import_image_editor16.REFINE_OUTPUTS.filter((o) => !o.needsDocuments || controller.canOpenDocuments).map((o) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("option", { value: o.id, children: o.label }, o.id))
9193
9193
  }
9194
9194
  )
9195
9195
  ] }),
@@ -9197,7 +9197,7 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
9197
9197
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "flex justify-between text-muted-foreground", children: [
9198
9198
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { children: [
9199
9199
  "Decontaminate colors",
9200
- toLayer ? "" : " (new layer outputs)"
9200
+ toLayer ? "" : " (new layer or document outputs)"
9201
9201
  ] }),
9202
9202
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: "font-mono", children: [
9203
9203
  decontaminate,
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ import {
52
52
  useImageEditorControls,
53
53
  useImageEffectsTools,
54
54
  useImageHistogram
55
- } from "./chunk-3BL4QCPE.js";
55
+ } from "./chunk-7M3PJKFN.js";
56
56
  import "./chunk-AJCWF6SN.js";
57
57
  import "./chunk-6BWTJ3EE.js";
58
58
  import "./chunk-5RPB4WGT.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-react",
3
- "version": "0.138.0",
3
+ "version": "0.139.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.208.0 <1.0.0-0",
257
+ "@pixerate/editor": ">=0.209.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.208.0"
308
+ "@pixerate/editor": "0.209.0"
309
309
  },
310
310
  "scripts": {
311
311
  "build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",