@pixerate/editor-svelte 0.149.0 → 0.150.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.
|
@@ -50,6 +50,11 @@
|
|
|
50
50
|
let newKind = $state<AdjustmentKind>('hueSaturation');
|
|
51
51
|
let output = $state<RefineOutput>('selection');
|
|
52
52
|
let decontaminate = $state(0);
|
|
53
|
+
let objectAware = $state(false);
|
|
54
|
+
const canObject = $derived.by(() => {
|
|
55
|
+
void tick;
|
|
56
|
+
return Boolean(controller.segmentationProvider);
|
|
57
|
+
});
|
|
53
58
|
const toLayer = $derived(output === 'new-layer' || output === 'new-layer-with-mask');
|
|
54
59
|
const target = $derived(list.find((l) => l.id === layerId) ?? list[list.length - 1]);
|
|
55
60
|
|
|
@@ -57,7 +62,10 @@
|
|
|
57
62
|
busy = true;
|
|
58
63
|
error = null;
|
|
59
64
|
try {
|
|
60
|
-
await controller.refineSelectionTo({ ...params }, output, {
|
|
65
|
+
await controller.refineSelectionTo({ ...params }, output, {
|
|
66
|
+
decontaminate: toLayer ? decontaminate : 0,
|
|
67
|
+
refineMode: canObject && objectAware ? 'object' : 'color',
|
|
68
|
+
});
|
|
61
69
|
} catch (err) {
|
|
62
70
|
error = err instanceof Error ? err.message : String(err);
|
|
63
71
|
} finally {
|
|
@@ -102,6 +110,12 @@
|
|
|
102
110
|
/>
|
|
103
111
|
Smart Radius
|
|
104
112
|
</label>
|
|
113
|
+
{#if canObject}
|
|
114
|
+
<label class="flex items-center gap-2 text-foreground">
|
|
115
|
+
<input type="checkbox" aria-label="Object aware" checked={objectAware} onchange={(e) => (objectAware = (e.currentTarget as HTMLInputElement).checked)} />
|
|
116
|
+
Object aware (segmentation model)
|
|
117
|
+
</label>
|
|
118
|
+
{/if}
|
|
105
119
|
<label class="flex items-center gap-2 text-muted-foreground">
|
|
106
120
|
Output to
|
|
107
121
|
<select
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.150.0",
|
|
4
4
|
"description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"**/*.css"
|
|
166
166
|
],
|
|
167
167
|
"dependencies": {
|
|
168
|
-
"@pixerate/editor": "0.
|
|
168
|
+
"@pixerate/editor": "0.206.0"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"@dagrejs/dagre": "^1.1.4",
|