@pixerate/editor-svelte 0.142.0 → 0.143.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,32 @@
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}
206
232
  {#if options.tool === 'type' || options.tool === 'type-vertical'}
207
233
  <div data-testid="type-mask-options" class="flex flex-col gap-2">
208
234
  <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.0",
3
+ "version": "0.143.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.193.0"
168
+ "@pixerate/editor": "0.195.0"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@dagrejs/dagre": "^1.1.4",