@pixerate/editor-svelte 0.155.0 → 0.156.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.
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
interface Props {
|
|
17
17
|
controller: ImageEditorController;
|
|
18
18
|
/** Called with the result after OK, or `null` after Cancel. */
|
|
19
|
-
onclose: (result: { layerId: string; bounds: CropBox; output: 'current' | 'new-layer' } | null) => void;
|
|
19
|
+
onclose: (result: { layerId: string; bounds: CropBox; output: 'current' | 'new-layer' | 'duplicate-layer' } | null) => void;
|
|
20
20
|
class?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
void tick;
|
|
54
54
|
return session.computing;
|
|
55
55
|
});
|
|
56
|
+
const wholeImage = $derived.by(() => {
|
|
57
|
+
void tick;
|
|
58
|
+
return session.showsWholeImage;
|
|
59
|
+
});
|
|
56
60
|
const sessionError = $derived.by(() => {
|
|
57
61
|
void tick;
|
|
58
62
|
return session.error;
|
|
@@ -164,6 +168,9 @@
|
|
|
164
168
|
</div>
|
|
165
169
|
{/if}
|
|
166
170
|
<span class="font-mono text-muted-foreground">{Math.round(zoom * 100)}%</span>
|
|
171
|
+
{#if !wholeImage}
|
|
172
|
+
<button type="button" class={button} title="Show (and sample from) more of the image around the selection" onclick={() => session.expandView()}>Expand View</button>
|
|
173
|
+
{/if}
|
|
167
174
|
{#if computing}
|
|
168
175
|
<span role="status" class="text-muted-foreground">Updating preview…</span>
|
|
169
176
|
{/if}
|
|
@@ -250,8 +257,9 @@
|
|
|
250
257
|
options={[
|
|
251
258
|
{ value: 'new-layer', label: 'New Layer' },
|
|
252
259
|
{ value: 'current', label: 'Current Layer' },
|
|
260
|
+
{ value: 'duplicate-layer', label: 'Duplicate Layer' },
|
|
253
261
|
]}
|
|
254
|
-
onchange={(v) => set({ output: v as 'current' | 'new-layer' })}
|
|
262
|
+
onchange={(v) => set({ output: v as 'current' | 'new-layer' | 'duplicate-layer' })}
|
|
255
263
|
/>
|
|
256
264
|
</label>
|
|
257
265
|
{#if error ?? sessionError}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.156.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.212.0"
|
|
169
169
|
},
|
|
170
170
|
"peerDependencies": {
|
|
171
171
|
"@dagrejs/dagre": "^1.1.4",
|