@pixerate/editor-svelte 0.142.1 → 0.144.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.
@@ -203,6 +203,52 @@
203
203
  {#if options.tool === 'polygon'}
204
204
  <p class="text-muted-foreground">Click to add corners (Shift for 45°), drag for a free-hand stretch; double-click, Enter or a click on the first corner closes it, Backspace removes a corner, Escape cancels.</p>
205
205
  {/if}
206
+ {#if options.tool === 'magnetic'}
207
+ <div data-testid="magnetic-lasso-options" class="flex flex-col gap-2">
208
+ <p class="text-muted-foreground">Click on an edge, then move along it: the outline snaps to the edge and adds points as it goes. Click to add a point; double-click, Enter or a click on the start closes it, Backspace removes the last point, Escape cancels.</p>
209
+ <label class="flex flex-col gap-1">
210
+ <span class="flex justify-between text-muted-foreground">
211
+ <span>Width</span>
212
+ <span class="font-mono">{options.magneticWidth ?? 10} px</span>
213
+ </span>
214
+ <ImageRange label="Magnetic lasso width" min={1} max={256} step={1} value={options.magneticWidth ?? 10} oninput={(v) => set({ magneticWidth: v })} />
215
+ </label>
216
+ <label class="flex flex-col gap-1">
217
+ <span class="flex justify-between text-muted-foreground">
218
+ <span>Contrast</span>
219
+ <span class="font-mono">{options.magneticContrast ?? 10}%</span>
220
+ </span>
221
+ <ImageRange label="Magnetic lasso contrast" min={1} max={100} step={1} value={options.magneticContrast ?? 10} oninput={(v) => set({ magneticContrast: v })} />
222
+ </label>
223
+ <label class="flex flex-col gap-1">
224
+ <span class="flex justify-between text-muted-foreground">
225
+ <span>Frequency</span>
226
+ <span class="font-mono">{options.magneticFrequency ?? 57}</span>
227
+ </span>
228
+ <ImageRange label="Magnetic lasso frequency" min={0} max={100} step={1} value={options.magneticFrequency ?? 57} oninput={(v) => set({ magneticFrequency: v })} />
229
+ </label>
230
+ </div>
231
+ {/if}
232
+ {#if options.tool === 'quick'}
233
+ <div data-testid="quick-selection-options" class="flex flex-col gap-2">
234
+ <p class="text-muted-foreground">Paint inside the area: the selection grows out to its edges. Each stroke adds (Alt-drag subtracts).</p>
235
+ <label class="flex flex-col gap-1">
236
+ <span class="flex justify-between text-muted-foreground">
237
+ <span>Size</span>
238
+ <span class="font-mono">{options.quickSize ?? 30} px</span>
239
+ </span>
240
+ <ImageRange label="Quick selection size" min={1} max={500} step={1} value={options.quickSize ?? 30} oninput={(v) => set({ quickSize: v })} />
241
+ </label>
242
+ <label class="flex items-center gap-2 text-foreground">
243
+ <ImageCheckbox label="Sample all layers" checked={options.quickSampleAll ?? true} onchange={(on) => set({ quickSampleAll: on })} />
244
+ Sample all layers
245
+ </label>
246
+ <label class="flex items-center gap-2 text-foreground">
247
+ <ImageCheckbox label="Auto-enhance edges" checked={options.quickEnhance ?? false} onchange={(on) => set({ quickEnhance: on })} />
248
+ Auto-enhance edges
249
+ </label>
250
+ </div>
251
+ {/if}
206
252
  {#if options.tool === 'type' || options.tool === 'type-vertical'}
207
253
  <div data-testid="type-mask-options" class="flex flex-col gap-2">
208
254
  <p class="text-muted-foreground">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-svelte",
3
- "version": "0.142.1",
3
+ "version": "0.144.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.194.0"
168
+ "@pixerate/editor": "0.197.0"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@dagrejs/dagre": "^1.1.4",