@pixerate/editor-svelte 0.140.0 → 0.141.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,46 @@
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 === 'type' || options.tool === 'type-vertical'}
207
+ <div data-testid="type-mask-options" class="flex flex-col gap-2">
208
+ <p class="text-muted-foreground">
209
+ {options.tool === 'type-vertical' ? 'Click where the column starts: the letters are stacked down from there, centred on the click.' : 'Click where the text starts (its baseline).'} Shift-click adds, Alt-click subtracts.
210
+ </p>
211
+ <label class="flex items-center gap-1 text-muted-foreground">
212
+ Text
213
+ <input
214
+ type="text"
215
+ aria-label="Type mask text"
216
+ value={options.typeText ?? 'Type'}
217
+ oninput={(e) => set({ typeText: (e.currentTarget as HTMLInputElement).value })}
218
+ class="min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
219
+ />
220
+ </label>
221
+ <label class="flex items-center gap-1 text-muted-foreground">
222
+ Size
223
+ <input
224
+ type="number"
225
+ min="1"
226
+ step="1"
227
+ aria-label="Type mask size"
228
+ value={options.typeSize ?? 72}
229
+ oninput={(e) => set({ typeSize: Math.max(1, Number((e.currentTarget as HTMLInputElement).value) || 1) })}
230
+ class={numberInput}
231
+ />
232
+ px
233
+ </label>
234
+ <label class="flex items-center gap-1 text-muted-foreground">
235
+ Font
236
+ <input
237
+ type="text"
238
+ aria-label="Type mask font"
239
+ value={options.typeFamily ?? 'sans-serif'}
240
+ oninput={(e) => set({ typeFamily: (e.currentTarget as HTMLInputElement).value })}
241
+ class="min-w-0 flex-1 bg-background border border-border rounded px-1 py-0.5 text-foreground"
242
+ />
243
+ </label>
244
+ </div>
245
+ {/if}
206
246
  {#if options.tool === 'range'}
207
247
  <div data-testid="color-range-options" class="flex flex-col gap-2">
208
248
  <p class="text-muted-foreground">Click a colour to select it; Shift-click adds a colour, Alt-click removes one.</p>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor-svelte",
3
- "version": "0.140.0",
3
+ "version": "0.141.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.191.0"
168
+ "@pixerate/editor": "0.192.0"
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@dagrejs/dagre": "^1.1.4",