@pixerate/editor-react 0.135.0 → 0.136.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.
|
@@ -3189,6 +3189,8 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
3189
3189
|
const [newKind, setNewKind] = useState12("hueSaturation");
|
|
3190
3190
|
const [output, setOutput] = useState12("selection");
|
|
3191
3191
|
const [decontaminate, setDecontaminate] = useState12(0);
|
|
3192
|
+
const [objectAware, setObjectAware] = useState12(false);
|
|
3193
|
+
const canObject = Boolean(controller.segmentationProvider);
|
|
3192
3194
|
const toLayer = output === "new-layer" || output === "new-layer-with-mask";
|
|
3193
3195
|
const sel = selection === void 0 ? controller.getSelection() : selection;
|
|
3194
3196
|
const list = layers ?? controller.getAdjustmentLayers();
|
|
@@ -3197,7 +3199,10 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
3197
3199
|
setBusy(true);
|
|
3198
3200
|
setError(null);
|
|
3199
3201
|
try {
|
|
3200
|
-
await controller.refineSelectionTo(params, output, {
|
|
3202
|
+
await controller.refineSelectionTo(params, output, {
|
|
3203
|
+
decontaminate: toLayer ? decontaminate : 0,
|
|
3204
|
+
refineMode: canObject && objectAware ? "object" : "color"
|
|
3205
|
+
});
|
|
3201
3206
|
} catch (err) {
|
|
3202
3207
|
setError(err instanceof Error ? err.message : String(err));
|
|
3203
3208
|
} finally {
|
|
@@ -3232,6 +3237,10 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
3232
3237
|
/* @__PURE__ */ jsx16("input", { type: "checkbox", checked: params.smartRadius, onChange: (e) => setParams({ ...params, smartRadius: e.target.checked }) }),
|
|
3233
3238
|
"Smart Radius"
|
|
3234
3239
|
] }),
|
|
3240
|
+
canObject && /* @__PURE__ */ jsxs14("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
3241
|
+
/* @__PURE__ */ jsx16("input", { type: "checkbox", "aria-label": "Object aware", checked: objectAware, onChange: (e) => setObjectAware(e.target.checked) }),
|
|
3242
|
+
"Object aware (segmentation model)"
|
|
3243
|
+
] }),
|
|
3235
3244
|
/* @__PURE__ */ jsxs14("label", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
3236
3245
|
"Output to",
|
|
3237
3246
|
/* @__PURE__ */ jsx16(
|
|
@@ -5114,6 +5114,8 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
5114
5114
|
const [newKind, setNewKind] = (0, import_react26.useState)("hueSaturation");
|
|
5115
5115
|
const [output, setOutput] = (0, import_react26.useState)("selection");
|
|
5116
5116
|
const [decontaminate, setDecontaminate] = (0, import_react26.useState)(0);
|
|
5117
|
+
const [objectAware, setObjectAware] = (0, import_react26.useState)(false);
|
|
5118
|
+
const canObject = Boolean(controller.segmentationProvider);
|
|
5117
5119
|
const toLayer = output === "new-layer" || output === "new-layer-with-mask";
|
|
5118
5120
|
const sel = selection === void 0 ? controller.getSelection() : selection;
|
|
5119
5121
|
const list = layers ?? controller.getAdjustmentLayers();
|
|
@@ -5122,7 +5124,10 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
5122
5124
|
setBusy(true);
|
|
5123
5125
|
setError(null);
|
|
5124
5126
|
try {
|
|
5125
|
-
await controller.refineSelectionTo(params, output, {
|
|
5127
|
+
await controller.refineSelectionTo(params, output, {
|
|
5128
|
+
decontaminate: toLayer ? decontaminate : 0,
|
|
5129
|
+
refineMode: canObject && objectAware ? "object" : "color"
|
|
5130
|
+
});
|
|
5126
5131
|
} catch (err) {
|
|
5127
5132
|
setError(err instanceof Error ? err.message : String(err));
|
|
5128
5133
|
} finally {
|
|
@@ -5157,6 +5162,10 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
5157
5162
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { type: "checkbox", checked: params.smartRadius, onChange: (e) => setParams({ ...params, smartRadius: e.target.checked }) }),
|
|
5158
5163
|
"Smart Radius"
|
|
5159
5164
|
] }),
|
|
5165
|
+
canObject && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
5166
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("input", { type: "checkbox", "aria-label": "Object aware", checked: objectAware, onChange: (e) => setObjectAware(e.target.checked) }),
|
|
5167
|
+
"Object aware (segmentation model)"
|
|
5168
|
+
] }),
|
|
5160
5169
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("label", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
5161
5170
|
"Output to",
|
|
5162
5171
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
package/dist/index.cjs
CHANGED
|
@@ -8828,6 +8828,8 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
8828
8828
|
const [newKind, setNewKind] = (0, import_react62.useState)("hueSaturation");
|
|
8829
8829
|
const [output, setOutput] = (0, import_react62.useState)("selection");
|
|
8830
8830
|
const [decontaminate, setDecontaminate] = (0, import_react62.useState)(0);
|
|
8831
|
+
const [objectAware, setObjectAware] = (0, import_react62.useState)(false);
|
|
8832
|
+
const canObject = Boolean(controller.segmentationProvider);
|
|
8831
8833
|
const toLayer = output === "new-layer" || output === "new-layer-with-mask";
|
|
8832
8834
|
const sel = selection === void 0 ? controller.getSelection() : selection;
|
|
8833
8835
|
const list = layers ?? controller.getAdjustmentLayers();
|
|
@@ -8836,7 +8838,10 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
8836
8838
|
setBusy(true);
|
|
8837
8839
|
setError(null);
|
|
8838
8840
|
try {
|
|
8839
|
-
await controller.refineSelectionTo(params, output, {
|
|
8841
|
+
await controller.refineSelectionTo(params, output, {
|
|
8842
|
+
decontaminate: toLayer ? decontaminate : 0,
|
|
8843
|
+
refineMode: canObject && objectAware ? "object" : "color"
|
|
8844
|
+
});
|
|
8840
8845
|
} catch (err) {
|
|
8841
8846
|
setError(err instanceof Error ? err.message : String(err));
|
|
8842
8847
|
} finally {
|
|
@@ -8871,6 +8876,10 @@ var RefineEdgePanel = ({ controller, selection, layers, className = "" }) => {
|
|
|
8871
8876
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("input", { type: "checkbox", checked: params.smartRadius, onChange: (e) => setParams({ ...params, smartRadius: e.target.checked }) }),
|
|
8872
8877
|
"Smart Radius"
|
|
8873
8878
|
] }),
|
|
8879
|
+
canObject && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex items-center gap-2 text-foreground", children: [
|
|
8880
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("input", { type: "checkbox", "aria-label": "Object aware", checked: objectAware, onChange: (e) => setObjectAware(e.target.checked) }),
|
|
8881
|
+
"Object aware (segmentation model)"
|
|
8882
|
+
] }),
|
|
8874
8883
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("label", { className: "flex items-center gap-2 text-muted-foreground", children: [
|
|
8875
8884
|
"Output to",
|
|
8876
8885
|
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.136.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.
|
|
257
|
+
"@pixerate/editor": ">=0.206.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.
|
|
308
|
+
"@pixerate/editor": "0.206.0"
|
|
309
309
|
},
|
|
310
310
|
"scripts": {
|
|
311
311
|
"build": "tsup && tsc -p tsconfig.build.json && node ../../scripts/finalize-declarations.mjs dist",
|