@pixerate/editor-svelte 0.75.0 → 0.76.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.
- package/dist/vector/VectorAppearancePanel.svelte +250 -0
- package/dist/vector/VectorAppearancePanel.svelte.d.ts +16 -0
- package/dist/vector/VectorAppearancePanel.svelte.d.ts.map +1 -0
- package/dist/vector/VectorCanvas.svelte +2 -0
- package/dist/vector/VectorCanvas.svelte.d.ts.map +1 -1
- package/dist/vector/VectorFilterDefs.svelte +26 -0
- package/dist/vector/VectorFilterDefs.svelte.d.ts +9 -0
- package/dist/vector/VectorFilterDefs.svelte.d.ts.map +1 -0
- package/dist/vector/VectorPaintPath.svelte +88 -0
- package/dist/vector/VectorPaintPath.svelte.d.ts +22 -0
- package/dist/vector/VectorPaintPath.svelte.d.ts.map +1 -0
- package/dist/vector/VectorSceneNodes.svelte +9 -56
- package/dist/vector/VectorSceneNodes.svelte.d.ts.map +1 -1
- package/dist/vector/VectorStylePanel.svelte +2 -0
- package/dist/vector/VectorStylePanel.svelte.d.ts.map +1 -1
- package/dist/vector/index.d.ts +3 -0
- package/dist/vector/index.d.ts.map +1 -1
- package/dist/vector/index.js +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
VECTOR_BLEND_MODE_MENU,
|
|
4
|
+
VECTOR_FILTER_MENU,
|
|
5
|
+
VECTOR_STROKE_ALIGN_LABELS,
|
|
6
|
+
getVectorAppearancePanel,
|
|
7
|
+
type VectorAppearancePanelLayer,
|
|
8
|
+
type VectorBlendMode,
|
|
9
|
+
type VectorEditorController,
|
|
10
|
+
type VectorFilterType,
|
|
11
|
+
type VectorFiltersPanelItem,
|
|
12
|
+
type VectorStrokeAlign
|
|
13
|
+
} from '@pixerate/editor/vector';
|
|
14
|
+
import { vectorStateOf } from './subscribe.svelte.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The appearance of the selection: its fill and stroke stacks (listed top first; add, remove,
|
|
18
|
+
* reorder, show / hide, paint, opacity and blend mode per layer, width and alignment per
|
|
19
|
+
* stroke), the node blend mode, and for one selected node its filters (drop and inner shadows,
|
|
20
|
+
* glows, blurs, feather). The pencil on a layer points the gradient editor and tool at it.
|
|
21
|
+
* Slider drags and typing are one undo step each.
|
|
22
|
+
*/
|
|
23
|
+
interface Props {
|
|
24
|
+
controller: VectorEditorController;
|
|
25
|
+
class?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let { controller, class: className = '' }: Props = $props();
|
|
29
|
+
|
|
30
|
+
const store = vectorStateOf(() => controller);
|
|
31
|
+
const view = $derived(store.current);
|
|
32
|
+
const panel = $derived(getVectorAppearancePanel(view));
|
|
33
|
+
|
|
34
|
+
const buttonClass =
|
|
35
|
+
'inline-flex h-7 min-w-7 items-center justify-center rounded-md border border-border bg-background px-1.5 text-xs font-medium text-foreground hover:bg-muted disabled:cursor-not-allowed disabled:opacity-40';
|
|
36
|
+
const numberClass = 'h-7 w-14 rounded border border-border bg-background px-1.5 text-xs';
|
|
37
|
+
const selectClass = 'h-7 min-w-0 flex-1 rounded border border-border bg-background px-1 text-xs';
|
|
38
|
+
const headingClass = 'text-[11px] font-medium uppercase tracking-wide text-muted-foreground';
|
|
39
|
+
const labelClass = 'w-full truncate text-[11px] text-muted-foreground';
|
|
40
|
+
const ALIGNS = Object.keys(VECTOR_STROKE_ALIGN_LABELS) as VectorStrokeAlign[];
|
|
41
|
+
|
|
42
|
+
const end = () => controller.endMergedEdit();
|
|
43
|
+
const nameOf = (l: VectorAppearancePanelLayer) => `${l.kind === 'fill' ? 'Fill' : 'Stroke'} ${l.index + 1}`;
|
|
44
|
+
function update(l: VectorAppearancePanelLayer, patch: Record<string, unknown>, merge = false) {
|
|
45
|
+
if (panel) controller.updatePaintLayer(l.kind, l.index, patch, { ids: panel.pathIds, merge });
|
|
46
|
+
}
|
|
47
|
+
function setNumber(l: VectorAppearancePanelLayer, key: 'opacity' | 'strokeWidth', raw: string) {
|
|
48
|
+
const n = parseFloat(raw);
|
|
49
|
+
if (!Number.isFinite(n)) return;
|
|
50
|
+
if (key === 'opacity') update(l, { opacity: Math.min(100, Math.max(0, n)) / 100 }, true);
|
|
51
|
+
else if (n >= 0) update(l, { strokeWidth: n }, true);
|
|
52
|
+
}
|
|
53
|
+
function setFilter(f: VectorFiltersPanelItem, key: string, value: unknown, merge: boolean) {
|
|
54
|
+
if (panel?.filterNodeId) controller.updateFilter(panel.filterNodeId, f.id, { params: { [key]: value } }, { merge });
|
|
55
|
+
}
|
|
56
|
+
function setFilterNumber(f: VectorFiltersPanelItem, key: string, raw: string) {
|
|
57
|
+
const n = parseFloat(raw);
|
|
58
|
+
if (Number.isFinite(n)) setFilter(f, key, n, true);
|
|
59
|
+
}
|
|
60
|
+
const hexOf = (v: unknown) => (/^#[0-9a-f]{6}$/i.test(String(v)) ? String(v) : '#000000');
|
|
61
|
+
const round = (n: number) => Math.round(n * 1000) / 1000;
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
{#snippet layerRow(l: VectorAppearancePanelLayer, count: number, ids: string[])}
|
|
65
|
+
{@const name = nameOf(l)}
|
|
66
|
+
{#if l.unknownKind}
|
|
67
|
+
<div class="text-[11px] text-muted-foreground" data-vector-layer="{l.kind}-{l.index}">{name}: {l.unknownKind} (not drawn by this version)</div>
|
|
68
|
+
{:else}
|
|
69
|
+
<div class="space-y-1 rounded border border-border p-1" data-vector-layer="{l.kind}-{l.index}" data-vector-layer-editing={l.editing ? '' : undefined}>
|
|
70
|
+
<div class="flex items-center gap-1">
|
|
71
|
+
<input type="checkbox" aria-label="{name} visible" title="Show" checked={l.visible} onchange={(e) => update(l, { visible: e.currentTarget.checked })} />
|
|
72
|
+
{#if l.gradient}
|
|
73
|
+
<button
|
|
74
|
+
type="button"
|
|
75
|
+
aria-label="{name} gradient"
|
|
76
|
+
title="Edit this gradient"
|
|
77
|
+
class="h-7 w-10 rounded border border-border"
|
|
78
|
+
style="background: {l.swatch}"
|
|
79
|
+
onclick={() => controller.setGradientTarget(l.kind, l.index)}
|
|
80
|
+
></button>
|
|
81
|
+
{:else}
|
|
82
|
+
<input
|
|
83
|
+
type="color"
|
|
84
|
+
aria-label="{name} colour"
|
|
85
|
+
class="h-7 w-10 cursor-pointer rounded border border-border bg-background"
|
|
86
|
+
value={l.color ?? '#000000'}
|
|
87
|
+
oninput={(e) => update(l, { paint: e.currentTarget.value }, true)}
|
|
88
|
+
onblur={end}
|
|
89
|
+
/>
|
|
90
|
+
{/if}
|
|
91
|
+
<input
|
|
92
|
+
type="number"
|
|
93
|
+
min={0}
|
|
94
|
+
max={100}
|
|
95
|
+
step={5}
|
|
96
|
+
aria-label="{name} opacity"
|
|
97
|
+
title="Opacity %"
|
|
98
|
+
class={numberClass}
|
|
99
|
+
value={Math.round(l.opacity * 100)}
|
|
100
|
+
oninput={(e) => setNumber(l, 'opacity', e.currentTarget.value)}
|
|
101
|
+
onblur={end}
|
|
102
|
+
/>
|
|
103
|
+
<select aria-label="{name} blend mode" class={selectClass} value={l.blendMode} onchange={(e) => update(l, { blendMode: e.currentTarget.value })}>
|
|
104
|
+
{#each VECTOR_BLEND_MODE_MENU as m (m.mode)}<option value={m.mode}>{m.label}</option>{/each}
|
|
105
|
+
</select>
|
|
106
|
+
</div>
|
|
107
|
+
{#if l.kind === 'stroke'}
|
|
108
|
+
<div class="flex items-center gap-1">
|
|
109
|
+
<input
|
|
110
|
+
type="number"
|
|
111
|
+
min={0}
|
|
112
|
+
step={0.5}
|
|
113
|
+
aria-label="{name} width"
|
|
114
|
+
title="Width"
|
|
115
|
+
class={numberClass}
|
|
116
|
+
value={l.strokeWidth ?? 1}
|
|
117
|
+
oninput={(e) => setNumber(l, 'strokeWidth', e.currentTarget.value)}
|
|
118
|
+
onblur={end}
|
|
119
|
+
/>
|
|
120
|
+
<select aria-label="{name} alignment" class={selectClass} value={l.strokeAlign ?? 'center'} onchange={(e) => update(l, { strokeAlign: e.currentTarget.value })}>
|
|
121
|
+
{#each ALIGNS as a (a)}<option value={a}>{VECTOR_STROKE_ALIGN_LABELS[a]}</option>{/each}
|
|
122
|
+
</select>
|
|
123
|
+
</div>
|
|
124
|
+
{/if}
|
|
125
|
+
<div class="flex items-center gap-1">
|
|
126
|
+
<span class="flex-1"></span>
|
|
127
|
+
<button type="button" class={buttonClass} title="Edit gradient" aria-label="Edit {name} gradient" aria-pressed={l.editing} onclick={() => controller.setGradientTarget(l.kind, l.index)}>✎</button>
|
|
128
|
+
<button type="button" class={buttonClass} title="Move up" aria-label="Move {name} up" disabled={l.index === count - 1} onclick={() => controller.movePaintLayer(l.kind, l.index, l.index + 1, { ids })}>↑</button>
|
|
129
|
+
<button type="button" class={buttonClass} title="Move down" aria-label="Move {name} down" disabled={l.index === 0} onclick={() => controller.movePaintLayer(l.kind, l.index, l.index - 1, { ids })}>↓</button>
|
|
130
|
+
<button type="button" class={buttonClass} title="Remove" aria-label="Remove {name}" onclick={() => controller.removePaintLayer(l.kind, l.index, { ids })}>×</button>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
{/if}
|
|
134
|
+
{/snippet}
|
|
135
|
+
|
|
136
|
+
{#snippet stack(kind: 'fill' | 'stroke', layers: VectorAppearancePanelLayer[], mixed: boolean, ids: string[])}
|
|
137
|
+
<div class="space-y-1" data-vector-stack={kind}>
|
|
138
|
+
<div class="flex items-center gap-2">
|
|
139
|
+
<span class="flex-1 {headingClass}">{kind === 'fill' ? 'Fills' : 'Strokes'}</span>
|
|
140
|
+
{#if mixed}<span class="text-[11px] text-muted-foreground">Mixed</span>{/if}
|
|
141
|
+
<button
|
|
142
|
+
type="button"
|
|
143
|
+
class={buttonClass}
|
|
144
|
+
title={kind === 'fill' ? 'Add fill' : 'Add stroke'}
|
|
145
|
+
aria-label={kind === 'fill' ? 'Add fill' : 'Add stroke'}
|
|
146
|
+
disabled={!ids.length}
|
|
147
|
+
onclick={() => controller.addPaintLayer(kind, {}, { ids })}>+</button
|
|
148
|
+
>
|
|
149
|
+
</div>
|
|
150
|
+
<!-- Top layer first, as it draws. -->
|
|
151
|
+
{#each [...layers].reverse() as l (`${l.kind}-${l.index}`)}{@render layerRow(l, layers.length, ids)}{/each}
|
|
152
|
+
</div>
|
|
153
|
+
{/snippet}
|
|
154
|
+
|
|
155
|
+
{#if panel}
|
|
156
|
+
<div class="space-y-2 {className}" data-vector-appearance="" aria-label="Appearance">
|
|
157
|
+
{#if panel.pathIds.length}
|
|
158
|
+
{@render stack('stroke', panel.strokes, panel.mixed.strokes, panel.pathIds)}
|
|
159
|
+
{@render stack('fill', panel.fills, panel.mixed.fills, panel.pathIds)}
|
|
160
|
+
{/if}
|
|
161
|
+
<label class="flex items-center gap-2 text-xs text-foreground" data-vector-style="blendMode">
|
|
162
|
+
<span class="w-16">Blend</span>
|
|
163
|
+
<select aria-label="Blend mode" class={selectClass} value={panel.blendMode} onchange={(e) => panel && controller.setBlendMode(e.currentTarget.value as VectorBlendMode, { ids: panel.nodeIds })}>
|
|
164
|
+
{#each VECTOR_BLEND_MODE_MENU as m (m.mode)}<option value={m.mode}>{m.label}</option>{/each}
|
|
165
|
+
</select>
|
|
166
|
+
{#if panel.mixed.blendMode}<span class="text-[11px] text-muted-foreground">Mixed</span>{/if}
|
|
167
|
+
</label>
|
|
168
|
+
<div class="space-y-2" data-vector-filters="">
|
|
169
|
+
<div class="flex items-center gap-2">
|
|
170
|
+
<span class="w-16 {headingClass}">Filters</span>
|
|
171
|
+
<select
|
|
172
|
+
aria-label="Add filter"
|
|
173
|
+
class={selectClass}
|
|
174
|
+
value=""
|
|
175
|
+
onchange={(e) => {
|
|
176
|
+
const type = e.currentTarget.value;
|
|
177
|
+
e.currentTarget.value = '';
|
|
178
|
+
if (type && panel) controller.addFilter(type as VectorFilterType, { ids: panel.nodeIds });
|
|
179
|
+
}}
|
|
180
|
+
>
|
|
181
|
+
<option value="">Add filter…</option>
|
|
182
|
+
{#each VECTOR_FILTER_MENU as m (m.type)}<option value={m.type}>{m.label}</option>{/each}
|
|
183
|
+
</select>
|
|
184
|
+
</div>
|
|
185
|
+
{#if !panel.filterNodeId}<p class="text-[11px] text-muted-foreground">Select one object to edit its filters.</p>{/if}
|
|
186
|
+
{#if panel.filterNodeId}
|
|
187
|
+
{@const nodeId = panel.filterNodeId}
|
|
188
|
+
{#each panel.filters as f, i (f.id)}
|
|
189
|
+
<div class="space-y-1 rounded border border-border p-1.5" data-vector-filter={f.id} data-vector-filter-type={f.type}>
|
|
190
|
+
<div class="flex items-center gap-1">
|
|
191
|
+
<label class="flex min-w-0 flex-1 items-center gap-1.5 text-xs font-medium text-foreground">
|
|
192
|
+
<input type="checkbox" aria-label="{f.label} on" checked={f.enabled} onchange={(e) => controller.updateFilter(nodeId, f.id, { enabled: e.currentTarget.checked })} />
|
|
193
|
+
<span class="truncate">{f.label}</span>
|
|
194
|
+
</label>
|
|
195
|
+
<button type="button" class={buttonClass} title="Move up" aria-label="Move {f.label} up" disabled={i === 0} onclick={() => controller.moveFilter(nodeId, f.id, i - 1)}>↑</button>
|
|
196
|
+
<button type="button" class={buttonClass} title="Move down" aria-label="Move {f.label} down" disabled={i === panel.filters.length - 1} onclick={() => controller.moveFilter(nodeId, f.id, i + 1)}>↓</button>
|
|
197
|
+
<button type="button" class={buttonClass} title="Remove" aria-label="Remove {f.label}" onclick={() => controller.removeFilter(nodeId, f.id)}>×</button>
|
|
198
|
+
</div>
|
|
199
|
+
{#each f.specs as spec (spec.key)}
|
|
200
|
+
{#if spec.kind === 'color'}
|
|
201
|
+
<label class="flex items-center gap-2 text-xs text-foreground" data-vector-filter-param={spec.key}>
|
|
202
|
+
<span class="w-14 truncate text-[11px] text-muted-foreground">{spec.label}</span>
|
|
203
|
+
<input
|
|
204
|
+
type="color"
|
|
205
|
+
aria-label="{f.label} {spec.label}"
|
|
206
|
+
class="h-7 w-10 cursor-pointer rounded border border-border bg-background"
|
|
207
|
+
value={hexOf(f.params[spec.key])}
|
|
208
|
+
oninput={(e) => setFilter(f, spec.key, e.currentTarget.value, true)}
|
|
209
|
+
onblur={end}
|
|
210
|
+
/>
|
|
211
|
+
</label>
|
|
212
|
+
{:else if spec.kind === 'number'}
|
|
213
|
+
{@const value = Number(f.params[spec.key] ?? 0)}
|
|
214
|
+
<label class="flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-foreground" data-vector-filter-param={spec.key}>
|
|
215
|
+
<span class={labelClass}>{spec.label}</span>
|
|
216
|
+
{#if spec.slider}
|
|
217
|
+
<input
|
|
218
|
+
type="range"
|
|
219
|
+
min={spec.min}
|
|
220
|
+
max={spec.max}
|
|
221
|
+
step={spec.step}
|
|
222
|
+
aria-label="{f.label} {spec.label} slider"
|
|
223
|
+
class="h-4 min-w-0 flex-1 accent-primary"
|
|
224
|
+
{value}
|
|
225
|
+
oninput={(e) => setFilterNumber(f, spec.key, e.currentTarget.value)}
|
|
226
|
+
onpointerup={end}
|
|
227
|
+
onkeyup={end}
|
|
228
|
+
onblur={end}
|
|
229
|
+
/>
|
|
230
|
+
{/if}
|
|
231
|
+
<input
|
|
232
|
+
type="number"
|
|
233
|
+
min={spec.min}
|
|
234
|
+
max={spec.max}
|
|
235
|
+
step={spec.step}
|
|
236
|
+
aria-label="{f.label} {spec.label}"
|
|
237
|
+
class={numberClass}
|
|
238
|
+
value={round(value)}
|
|
239
|
+
oninput={(e) => setFilterNumber(f, spec.key, e.currentTarget.value)}
|
|
240
|
+
onblur={end}
|
|
241
|
+
/>
|
|
242
|
+
</label>
|
|
243
|
+
{/if}
|
|
244
|
+
{/each}
|
|
245
|
+
</div>
|
|
246
|
+
{/each}
|
|
247
|
+
{/if}
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
{/if}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VectorEditorController } from '@pixerate/editor/vector';
|
|
2
|
+
/**
|
|
3
|
+
* The appearance of the selection: its fill and stroke stacks (listed top first; add, remove,
|
|
4
|
+
* reorder, show / hide, paint, opacity and blend mode per layer, width and alignment per
|
|
5
|
+
* stroke), the node blend mode, and for one selected node its filters (drop and inner shadows,
|
|
6
|
+
* glows, blurs, feather). The pencil on a layer points the gradient editor and tool at it.
|
|
7
|
+
* Slider drags and typing are one undo step each.
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
controller: VectorEditorController;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const VectorAppearancePanel: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type VectorAppearancePanel = ReturnType<typeof VectorAppearancePanel>;
|
|
15
|
+
export default VectorAppearancePanel;
|
|
16
|
+
//# sourceMappingURL=VectorAppearancePanel.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorAppearancePanel.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorAppearancePanel.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAOH,KAAK,sBAAsB,EAI5B,MAAM,yBAAyB,CAAC;AAIjC;;;;;;GAMG;AACH,UAAU,KAAK;IACb,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4JH,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
type VectorEditorController
|
|
17
17
|
} from '@pixerate/editor/vector';
|
|
18
18
|
import VectorGradientDefs from './VectorGradientDefs.svelte';
|
|
19
|
+
import VectorFilterDefs from './VectorFilterDefs.svelte';
|
|
19
20
|
import VectorGradientAnnotator from './VectorGradientAnnotator.svelte';
|
|
20
21
|
import VectorSceneNodes from './VectorSceneNodes.svelte';
|
|
21
22
|
import VectorWidthPointEditor from './VectorWidthPointEditor.svelte';
|
|
@@ -175,6 +176,7 @@
|
|
|
175
176
|
</defs>
|
|
176
177
|
{/if}
|
|
177
178
|
<VectorGradientDefs defs={scene.defs} />
|
|
179
|
+
<VectorFilterDefs filters={scene.filters} />
|
|
178
180
|
<rect
|
|
179
181
|
data-vector-artboard=""
|
|
180
182
|
x={overlay.artboard.x}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorCanvas.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorCanvas.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,EAQH,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorCanvas.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorCanvas.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,EAQH,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AASjC,UAAU,KAAK;IACb,UAAU,EAAE,sBAAsB,CAAC;IACnC,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAsSH,QAAA,MAAM,YAAY,2CAAwC,CAAC;AAC3D,KAAK,YAAY,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AACpD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VectorFilterPrimitive, VectorRenderFilter } from '@pixerate/editor/vector';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Node filters (shadows, glows, blurs, feather) from `getVectorSceneRenderData(...).filters`. */
|
|
6
|
+
filters: readonly VectorRenderFilter[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { filters }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#snippet primitive(p: VectorFilterPrimitive)}
|
|
13
|
+
<svelte:element this={p.tag} {...p.attrs}>
|
|
14
|
+
{#each p.children ?? [] as child, i (i)}{@render primitive(child)}{/each}
|
|
15
|
+
</svelte:element>
|
|
16
|
+
{/snippet}
|
|
17
|
+
|
|
18
|
+
{#if filters.length}
|
|
19
|
+
<defs>
|
|
20
|
+
{#each filters as f (f.id)}
|
|
21
|
+
<filter id={f.id} filterUnits="userSpaceOnUse" x={f.x} y={f.y} width={f.width} height={f.height} color-interpolation-filters="sRGB">
|
|
22
|
+
{#each f.primitives as p, i (i)}{@render primitive(p)}{/each}
|
|
23
|
+
</filter>
|
|
24
|
+
{/each}
|
|
25
|
+
</defs>
|
|
26
|
+
{/if}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VectorRenderFilter } from '@pixerate/editor/vector';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Node filters (shadows, glows, blurs, feather) from `getVectorSceneRenderData(...).filters`. */
|
|
4
|
+
filters: readonly VectorRenderFilter[];
|
|
5
|
+
}
|
|
6
|
+
declare const VectorFilterDefs: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type VectorFilterDefs = ReturnType<typeof VectorFilterDefs>;
|
|
8
|
+
export default VectorFilterDefs;
|
|
9
|
+
//# sourceMappingURL=VectorFilterDefs.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorFilterDefs.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorFilterDefs.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAyB,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGvF,UAAU,KAAK;IACb,kGAAkG;IAClG,OAAO,EAAE,SAAS,kBAAkB,EAAE,CAAC;CACxC;AA0BH,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VectorRenderPaintLayer, VectorRenderPath } from '@pixerate/editor/vector';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One paint of a path: a node's fill and stroke, or one layer of its stacks. A stroke aligned
|
|
6
|
+
* inside / outside (double width, clipped or masked by the shape) or with arrowheads draws in
|
|
7
|
+
* parts inside a group.
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
paint: VectorRenderPaintLayer | VectorRenderPath;
|
|
11
|
+
d: string;
|
|
12
|
+
fillRule: 'nonzero' | 'evenodd';
|
|
13
|
+
id?: string;
|
|
14
|
+
transform?: string;
|
|
15
|
+
filter?: string;
|
|
16
|
+
/** A node's blend mode (a layer carries its own). */
|
|
17
|
+
blendMode?: string;
|
|
18
|
+
/** `fill-0`, `stroke-1`, … for a layer of a stack. */
|
|
19
|
+
layer?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let { paint, d, fillRule, id, transform, filter, blendMode, layer }: Props = $props();
|
|
23
|
+
const opacity = $derived(paint.opacity < 1 ? paint.opacity : undefined);
|
|
24
|
+
const blend = $derived(blendMode ?? (layer ? paint.blendMode : undefined));
|
|
25
|
+
const style = $derived(blend ? `mix-blend-mode: ${blend}` : undefined);
|
|
26
|
+
const sp = $derived(paint.strokeParts);
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
{#if sp}
|
|
30
|
+
<g data-vector-id={id} data-vector-layer={layer} data-vector-stroke-align={sp.align} {transform} {opacity} {filter} {style}>
|
|
31
|
+
{#if sp.clip}
|
|
32
|
+
<defs>
|
|
33
|
+
{#if sp.clip.kind === 'clip'}
|
|
34
|
+
<clipPath id={sp.clip.id}><path {d} clip-rule={fillRule} /></clipPath>
|
|
35
|
+
{:else}
|
|
36
|
+
<mask id={sp.clip.id} maskUnits="userSpaceOnUse" x={sp.clip.bounds.x} y={sp.clip.bounds.y} width={sp.clip.bounds.width} height={sp.clip.bounds.height}>
|
|
37
|
+
<rect x={sp.clip.bounds.x} y={sp.clip.bounds.y} width={sp.clip.bounds.width} height={sp.clip.bounds.height} fill="#fff" />
|
|
38
|
+
<path {d} fill="#000" fill-rule={fillRule} />
|
|
39
|
+
</mask>
|
|
40
|
+
{/if}
|
|
41
|
+
</defs>
|
|
42
|
+
{/if}
|
|
43
|
+
<path data-vector-part="fill" {d} fill={paint.fill} fill-rule={fillRule} stroke="none" />
|
|
44
|
+
{#if sp.outline !== undefined}
|
|
45
|
+
<!-- A variable-width stroke: its outline, filled. -->
|
|
46
|
+
<path
|
|
47
|
+
data-vector-part="stroke-outline"
|
|
48
|
+
d={sp.outline}
|
|
49
|
+
fill={paint.stroke}
|
|
50
|
+
clip-path={sp.clip?.kind === 'clip' ? `url(#${sp.clip.id})` : undefined}
|
|
51
|
+
mask={sp.clip?.kind === 'mask' ? `url(#${sp.clip.id})` : undefined}
|
|
52
|
+
/>
|
|
53
|
+
{:else}
|
|
54
|
+
<path
|
|
55
|
+
data-vector-part="stroke"
|
|
56
|
+
d={sp.d}
|
|
57
|
+
fill="none"
|
|
58
|
+
stroke={paint.stroke}
|
|
59
|
+
stroke-width={sp.width}
|
|
60
|
+
stroke-linecap={paint.strokeLinecap as any}
|
|
61
|
+
stroke-linejoin={paint.strokeLinejoin as any}
|
|
62
|
+
stroke-dasharray={paint.strokeDasharray}
|
|
63
|
+
clip-path={sp.clip?.kind === 'clip' ? `url(#${sp.clip.id})` : undefined}
|
|
64
|
+
mask={sp.clip?.kind === 'mask' ? `url(#${sp.clip.id})` : undefined}
|
|
65
|
+
/>
|
|
66
|
+
{/if}
|
|
67
|
+
{#each sp.heads as head, i (i)}
|
|
68
|
+
<path data-vector-part="head" d={head} fill={paint.stroke} />
|
|
69
|
+
{/each}
|
|
70
|
+
</g>
|
|
71
|
+
{:else}
|
|
72
|
+
<path
|
|
73
|
+
data-vector-id={id}
|
|
74
|
+
data-vector-layer={layer}
|
|
75
|
+
{transform}
|
|
76
|
+
{d}
|
|
77
|
+
fill={paint.fill}
|
|
78
|
+
fill-rule={fillRule}
|
|
79
|
+
stroke={paint.stroke}
|
|
80
|
+
stroke-width={paint.stroke === 'none' ? undefined : paint.strokeWidth}
|
|
81
|
+
stroke-linecap={paint.strokeLinecap as any}
|
|
82
|
+
stroke-linejoin={paint.strokeLinejoin as any}
|
|
83
|
+
stroke-dasharray={paint.strokeDasharray}
|
|
84
|
+
{opacity}
|
|
85
|
+
{filter}
|
|
86
|
+
{style}
|
|
87
|
+
/>
|
|
88
|
+
{/if}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { VectorRenderPaintLayer, VectorRenderPath } from '@pixerate/editor/vector';
|
|
2
|
+
/**
|
|
3
|
+
* One paint of a path: a node's fill and stroke, or one layer of its stacks. A stroke aligned
|
|
4
|
+
* inside / outside (double width, clipped or masked by the shape) or with arrowheads draws in
|
|
5
|
+
* parts inside a group.
|
|
6
|
+
*/
|
|
7
|
+
interface Props {
|
|
8
|
+
paint: VectorRenderPaintLayer | VectorRenderPath;
|
|
9
|
+
d: string;
|
|
10
|
+
fillRule: 'nonzero' | 'evenodd';
|
|
11
|
+
id?: string;
|
|
12
|
+
transform?: string;
|
|
13
|
+
filter?: string;
|
|
14
|
+
/** A node's blend mode (a layer carries its own). */
|
|
15
|
+
blendMode?: string;
|
|
16
|
+
/** `fill-0`, `stroke-1`, … for a layer of a stack. */
|
|
17
|
+
layer?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const VectorPaintPath: import("svelte").Component<Props, {}, "">;
|
|
20
|
+
type VectorPaintPath = ReturnType<typeof VectorPaintPath>;
|
|
21
|
+
export default VectorPaintPath;
|
|
22
|
+
//# sourceMappingURL=VectorPaintPath.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorPaintPath.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorPaintPath.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGtF;;;;GAIG;AACH,UAAU,KAAK;IACb,KAAK,EAAE,sBAAsB,GAAG,gBAAgB,CAAC;IACjD,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2CH,QAAA,MAAM,eAAe,2CAAwC,CAAC;AAC9D,KAAK,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAC1D,eAAe,eAAe,CAAC"}
|
|
@@ -1,76 +1,29 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { VectorRenderNode } from '@pixerate/editor/vector';
|
|
3
3
|
import Self from './VectorSceneNodes.svelte';
|
|
4
|
+
import VectorPaintPath from './VectorPaintPath.svelte';
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
7
|
nodes: readonly VectorRenderNode[];
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
let { nodes }: Props = $props();
|
|
11
|
+
const blend = (mode: string | undefined) => (mode ? `mix-blend-mode: ${mode}` : undefined);
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
14
|
{#each nodes as node (node.id)}
|
|
13
15
|
{#if node.kind === 'group'}
|
|
14
|
-
<g data-vector-id={node.id} transform={node.transform} opacity={node.opacity < 1 ? node.opacity : undefined}>
|
|
16
|
+
<g data-vector-id={node.id} transform={node.transform} opacity={node.opacity < 1 ? node.opacity : undefined} filter={node.filter} style={blend(node.blendMode)}>
|
|
15
17
|
<Self nodes={node.children} />
|
|
16
18
|
</g>
|
|
17
|
-
{:else if node.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<defs>
|
|
23
|
-
{#if sp.clip.kind === 'clip'}
|
|
24
|
-
<clipPath id={sp.clip.id}><path d={node.d} clip-rule={node.fillRule} /></clipPath>
|
|
25
|
-
{:else}
|
|
26
|
-
<mask id={sp.clip.id} maskUnits="userSpaceOnUse" x={sp.clip.bounds.x} y={sp.clip.bounds.y} width={sp.clip.bounds.width} height={sp.clip.bounds.height}>
|
|
27
|
-
<rect x={sp.clip.bounds.x} y={sp.clip.bounds.y} width={sp.clip.bounds.width} height={sp.clip.bounds.height} fill="#fff" />
|
|
28
|
-
<path d={node.d} fill="#000" fill-rule={node.fillRule} />
|
|
29
|
-
</mask>
|
|
30
|
-
{/if}
|
|
31
|
-
</defs>
|
|
32
|
-
{/if}
|
|
33
|
-
<path data-vector-part="fill" d={node.d} fill={node.fill} fill-rule={node.fillRule} stroke="none" />
|
|
34
|
-
{#if sp.outline !== undefined}
|
|
35
|
-
<!-- A variable-width stroke: its outline, filled. -->
|
|
36
|
-
<path
|
|
37
|
-
data-vector-part="stroke-outline"
|
|
38
|
-
d={sp.outline}
|
|
39
|
-
fill={node.stroke}
|
|
40
|
-
clip-path={sp.clip?.kind === 'clip' ? `url(#${sp.clip.id})` : undefined}
|
|
41
|
-
mask={sp.clip?.kind === 'mask' ? `url(#${sp.clip.id})` : undefined}
|
|
42
|
-
/>
|
|
43
|
-
{:else}
|
|
44
|
-
<path
|
|
45
|
-
data-vector-part="stroke"
|
|
46
|
-
d={sp.d}
|
|
47
|
-
fill="none"
|
|
48
|
-
stroke={node.stroke}
|
|
49
|
-
stroke-width={sp.width}
|
|
50
|
-
stroke-linecap={node.strokeLinecap as any}
|
|
51
|
-
stroke-linejoin={node.strokeLinejoin as any}
|
|
52
|
-
stroke-dasharray={node.strokeDasharray}
|
|
53
|
-
clip-path={sp.clip?.kind === 'clip' ? `url(#${sp.clip.id})` : undefined}
|
|
54
|
-
mask={sp.clip?.kind === 'mask' ? `url(#${sp.clip.id})` : undefined}
|
|
55
|
-
/>
|
|
56
|
-
{/if}
|
|
57
|
-
{#each sp.heads as head, i (i)}
|
|
58
|
-
<path data-vector-part="head" d={head} fill={node.stroke} />
|
|
19
|
+
{:else if node.layers}
|
|
20
|
+
<!-- Fill and stroke stacks: each layer in order, bottom to top. -->
|
|
21
|
+
<g data-vector-id={node.id} transform={node.transform} opacity={node.opacity < 1 ? node.opacity : undefined} filter={node.filter} style={blend(node.blendMode)}>
|
|
22
|
+
{#each node.layers as layer (`${layer.kind}-${layer.index}`)}
|
|
23
|
+
<VectorPaintPath paint={layer} d={node.d} fillRule={node.fillRule} layer={`${layer.kind}-${layer.index}`} />
|
|
59
24
|
{/each}
|
|
60
25
|
</g>
|
|
61
26
|
{:else}
|
|
62
|
-
<
|
|
63
|
-
data-vector-id={node.id}
|
|
64
|
-
transform={node.transform}
|
|
65
|
-
d={node.d}
|
|
66
|
-
fill={node.fill}
|
|
67
|
-
fill-rule={node.fillRule}
|
|
68
|
-
stroke={node.stroke}
|
|
69
|
-
stroke-width={node.stroke === 'none' ? undefined : node.strokeWidth}
|
|
70
|
-
stroke-linecap={node.strokeLinecap as any}
|
|
71
|
-
stroke-linejoin={node.strokeLinejoin as any}
|
|
72
|
-
stroke-dasharray={node.strokeDasharray}
|
|
73
|
-
opacity={node.opacity < 1 ? node.opacity : undefined}
|
|
74
|
-
/>
|
|
27
|
+
<VectorPaintPath paint={node} d={node.d} fillRule={node.fillRule} id={node.id} transform={node.transform} filter={node.filter} blendMode={node.blendMode} />
|
|
75
28
|
{/if}
|
|
76
29
|
{/each}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorSceneNodes.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorSceneNodes.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorSceneNodes.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorSceneNodes.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK9D,UAAU,KAAK;IACb,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACpC;AA8BH,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
import { vectorStateOf } from './subscribe.svelte.js';
|
|
19
19
|
import { vectorButtonClass } from './styles.js';
|
|
20
20
|
import VectorEffectsPanel from './VectorEffectsPanel.svelte';
|
|
21
|
+
import VectorAppearancePanel from './VectorAppearancePanel.svelte';
|
|
21
22
|
import VectorEnvelopePanel from './VectorEnvelopePanel.svelte';
|
|
22
23
|
import VectorGradientEditor from './VectorGradientEditor.svelte';
|
|
23
24
|
|
|
@@ -221,6 +222,7 @@
|
|
|
221
222
|
oninput={(e) => apply({ opacity: parseFloat(e.currentTarget.value) })}
|
|
222
223
|
/>
|
|
223
224
|
</label>
|
|
225
|
+
<VectorAppearancePanel {controller} />
|
|
224
226
|
<VectorEffectsPanel {controller} />
|
|
225
227
|
<VectorEnvelopePanel {controller} />
|
|
226
228
|
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VectorStylePanel.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorStylePanel.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAYH,KAAK,sBAAsB,EAG5B,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"VectorStylePanel.svelte.d.ts","sourceRoot":"","sources":["../../src/vector/VectorStylePanel.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAYH,KAAK,sBAAsB,EAG5B,MAAM,yBAAyB,CAAC;AASjC,UAAU,KAAK;IACb,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiKH,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
package/dist/vector/index.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export { default as VectorEffectsPanel } from "./VectorEffectsPanel.svelte";
|
|
|
10
10
|
export { default as VectorEnvelopePanel } from "./VectorEnvelopePanel.svelte";
|
|
11
11
|
export { default as VectorSceneNodes } from "./VectorSceneNodes.svelte";
|
|
12
12
|
export { default as VectorGradientDefs } from "./VectorGradientDefs.svelte";
|
|
13
|
+
export { default as VectorFilterDefs } from "./VectorFilterDefs.svelte";
|
|
14
|
+
export { default as VectorPaintPath } from "./VectorPaintPath.svelte";
|
|
15
|
+
export { default as VectorAppearancePanel } from "./VectorAppearancePanel.svelte";
|
|
13
16
|
export { default as VectorGradientAnnotator } from "./VectorGradientAnnotator.svelte";
|
|
14
17
|
export { default as VectorGradientEditor } from "./VectorGradientEditor.svelte";
|
|
15
18
|
export * from "./createVectorEditor.svelte.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAChF,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,aAAa,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vector/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAE/D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAChF,cAAc,gCAAgC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,cAAc,aAAa,CAAC;AAE5B,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/vector/index.js
CHANGED
|
@@ -7,6 +7,9 @@ export { default as VectorEffectsPanel } from "./VectorEffectsPanel.svelte";
|
|
|
7
7
|
export { default as VectorEnvelopePanel } from "./VectorEnvelopePanel.svelte";
|
|
8
8
|
export { default as VectorSceneNodes } from "./VectorSceneNodes.svelte";
|
|
9
9
|
export { default as VectorGradientDefs } from "./VectorGradientDefs.svelte";
|
|
10
|
+
export { default as VectorFilterDefs } from "./VectorFilterDefs.svelte";
|
|
11
|
+
export { default as VectorPaintPath } from "./VectorPaintPath.svelte";
|
|
12
|
+
export { default as VectorAppearancePanel } from "./VectorAppearancePanel.svelte";
|
|
10
13
|
export { default as VectorGradientAnnotator } from "./VectorGradientAnnotator.svelte";
|
|
11
14
|
export { default as VectorGradientEditor } from "./VectorGradientEditor.svelte";
|
|
12
15
|
export * from "./createVectorEditor.svelte.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixerate/editor-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.76.0",
|
|
4
4
|
"description": "Svelte bindings and prompt/rich-text components for @pixerate/editor",
|
|
5
5
|
"author": "Pixerate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"@tiptap/extension-bubble-menu": "^2.11.5",
|
|
132
132
|
"@tiptap/extension-placeholder": "^2.11.5",
|
|
133
133
|
"@tiptap/starter-kit": "^2.11.5",
|
|
134
|
-
"@pixerate/editor": "0.
|
|
134
|
+
"@pixerate/editor": "0.101.0"
|
|
135
135
|
},
|
|
136
136
|
"peerDependencies": {
|
|
137
137
|
"@dagrejs/dagre": "^1.1.4",
|