@peteai/presentation-editor 0.0.8 → 0.0.9
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/components/editor/active-layers.svelte +2 -2
- package/dist/components/editor/header.svelte +1 -1
- package/dist/components/editor/layers/active-layer-border.svelte +1 -1
- package/dist/components/editor/layers/buttons/border-button/border-button-colors.svelte +1 -1
- package/dist/components/editor/layers/controls/corner-scale-control/corner-scale-control.svelte +1 -1
- package/dist/components/editor/layers/controls/rotate-control/rotate-control.svelte +1 -1
- package/dist/components/editor/layers/controls/side-scale-control/side-scale-control.svelte +1 -1
- package/dist/components/editor/layers/layer-button.svelte +1 -1
- package/dist/components/editor/layers/types/background/background-layer-buttons.svelte +1 -1
- package/dist/components/editor/layers/types/image/controls/image-rotate-control/image-rotate-control.svelte +1 -1
- package/dist/components/editor/layers/types/image/controls/image-scale-control/image-scale-control.svelte +1 -1
- package/dist/components/editor/layers/types/image/image-layer-crop.svelte +2 -2
- package/dist/components/editor/sidebar/color-sidebar/color-sidebar-color.svelte +2 -2
- package/dist/components/editor/sidebar/color-sidebar/color-sidebar-gradient-picker.svelte +5 -5
- package/dist/components/editor/sidebar/color-sidebar/color-sidebar.svelte +4 -4
- package/dist/components/editor/sidebar/font-sidebar/font-sidebar.svelte +1 -1
- package/dist/components/editor/sidebar/sidebar-uploads-tab.svelte +3 -3
- package/dist/components/editor/sidebar/sidebar.svelte +1 -1
- package/dist/components/editor/snapping-guides.svelte +3 -3
- package/dist/components/ui/color-picker/color-picker-alpha-grid.svelte +2 -1
- package/dist/components/ui/color-picker/color-picker.svelte +6 -6
- package/dist/components/ui/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-content.svelte +3 -1
- package/dist/components/ui/context-menu/context-menu-group-heading.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-radio-item.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-separator.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-shortcut.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-sub-content.svelte +1 -1
- package/dist/components/ui/context-menu/context-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +4 -2
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +2 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +3 -3
- package/dist/components/ui/tabs/index.d.ts +4 -4
- package/dist/components/ui/tabs/index.js +4 -4
- package/dist/components/ui/tabs/tabs-content.svelte +4 -4
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +1 -1
- package/dist/components/ui/tabs/tabs-list.svelte +5 -9
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +1 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +4 -4
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +1 -1
- package/package.json +19 -19
|
@@ -147,14 +147,14 @@
|
|
|
147
147
|
>
|
|
148
148
|
{#if !group.items.length}
|
|
149
149
|
<div
|
|
150
|
-
class="
|
|
150
|
+
class="absolute -inset-px border-2 border-primary"
|
|
151
151
|
style:box-shadow="0 0 0 1px hsla(0, 0%, 100%, .07), inset 0 0 0 1px hsla(0, 0%, 100%, .07)"
|
|
152
152
|
></div>
|
|
153
153
|
{:else}
|
|
154
154
|
<div class="group-border absolute -inset-px"></div>
|
|
155
155
|
{#each group.items as item}
|
|
156
156
|
<div
|
|
157
|
-
class="
|
|
157
|
+
class="absolute -left-px -top-px border-2 border-primary"
|
|
158
158
|
style:box-shadow="0 0 0 1px hsla(0, 0%, 100%, .07), inset 0 0 0 1px hsla(0, 0%, 100%, .07)"
|
|
159
159
|
style:width={`${item.width * item.scale * editor.zoom + 2}px`}
|
|
160
160
|
style:height={`${item.height * item.scale * editor.zoom + 2}px`}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
let disabled = $derived(!!editor.imageCropLayer);
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div class="
|
|
19
|
+
<div class="h-12 w-full border-b border-gray-200 bg-background px-2">
|
|
20
20
|
<div class="flex h-full items-center justify-between">
|
|
21
21
|
<div class="grid grid-flow-col items-center gap-2">
|
|
22
22
|
<Button
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
style:transform={`translate(${layer.x * editor.zoom}px, ${layer.y * editor.zoom}px) rotate(${layer.rotate}deg)`}
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
|
-
class="
|
|
21
|
+
class="absolute -inset-px border-2 border-primary"
|
|
22
22
|
style:box-shadow="0 0 0 1px hsla(0, 0%, 100%, .07), inset 0 0 0 1px hsla(0, 0%, 100%, .07)"
|
|
23
23
|
></div>
|
|
24
24
|
</div>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
{/each}
|
|
51
51
|
</svg>
|
|
52
52
|
<span
|
|
53
|
-
class="
|
|
53
|
+
class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-background"
|
|
54
54
|
style:width="{width / 2}px"
|
|
55
55
|
style:height="{height / 2}px"
|
|
56
56
|
></span>
|
package/dist/components/editor/layers/controls/corner-scale-control/corner-scale-control.svelte
CHANGED
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
199
199
|
<div class={cn(handler(), cursor())} onmousedown={onMouseDown}></div>
|
|
200
200
|
<div
|
|
201
|
-
class="
|
|
201
|
+
class="h-3 w-3 rounded-full bg-white transition-colors group-hover:bg-primary group-active:bg-primary"
|
|
202
202
|
style:box-shadow="0 0 4px 1px rgba(57,76,96,.15), 0 0 0 1px rgba(43,59,74,.3)"
|
|
203
203
|
></div>
|
|
204
204
|
</div>
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
onmousedown={onMouseDown}
|
|
181
181
|
></div>
|
|
182
182
|
<div
|
|
183
|
-
class="
|
|
183
|
+
class="flex h-6 w-6 items-center justify-center rounded-full bg-white transition-colors group-hover:bg-primary group-hover:text-primary-foreground group-active:bg-primary group-active:text-primary-foreground"
|
|
184
184
|
style:box-shadow="0 0 4px 1px rgba(57,76,96,.15), 0 0 0 1px rgba(43,59,74,.3)"
|
|
185
185
|
>
|
|
186
186
|
<RotateIcon class="h-4 w-4" />
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
147
147
|
<div class={cn(handler(), cursor())} onmousedown={onMouseDown}></div>
|
|
148
148
|
<div
|
|
149
|
-
class="
|
|
149
|
+
class="h-4 w-1.5 rounded-sm bg-white transition-colors group-hover:bg-primary group-active:bg-primary"
|
|
150
150
|
style:box-shadow="0 0 4px 1px rgba(57,76,96,.15), 0 0 0 1px rgba(43,59,74,.3)"
|
|
151
151
|
></div>
|
|
152
152
|
</div>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<button
|
|
34
34
|
{onclick}
|
|
35
35
|
class={cn(
|
|
36
|
-
'
|
|
36
|
+
'flex w-full items-center justify-between rounded-md border-2 border-transparent bg-muted p-2 outline-none',
|
|
37
37
|
{
|
|
38
38
|
'border-blue-500': layer
|
|
39
39
|
? editor.activeLayers.find((l) => l.id === layer.id)
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
active={editor.activeSidebarPopup === 'backgroundColor'}
|
|
21
21
|
>
|
|
22
22
|
<div
|
|
23
|
-
class="
|
|
23
|
+
class="relative h-6 w-6 overflow-hidden rounded-full after:absolute after:inset-0 after:rounded-full after:shadow-inner-1"
|
|
24
24
|
>
|
|
25
25
|
<ColorPickerAlphaGrid size={12}>
|
|
26
26
|
<ColorIndicator color={backgroundColor} />
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
onmousedown={onMouseDown}
|
|
111
111
|
>
|
|
112
112
|
<div
|
|
113
|
-
class="
|
|
113
|
+
class="flex h-6 w-6 items-center justify-center rounded-full bg-white transition-colors after:pointer-events-auto after:absolute after:inset-0 after:rounded-full group-hover:bg-primary group-hover:text-primary-foreground group-active:bg-primary group-active:text-primary-foreground"
|
|
114
114
|
style:box-shadow="0 0 4px 1px rgba(57,76,96,.15), 0 0 0 1px rgba(43,59,74,.3)"
|
|
115
115
|
>
|
|
116
116
|
<RotateIcon class="h-4 w-4" />
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
149
149
|
<div class={cn(handler(), cursor())} onmousedown={onMouseDown}></div>
|
|
150
150
|
<div
|
|
151
|
-
class="
|
|
151
|
+
class="h-3 w-3 rounded-full bg-white transition-colors group-hover:bg-primary group-active:bg-primary"
|
|
152
152
|
style:box-shadow="0 0 4px 1px rgba(57,76,96,.15), 0 0 0 1px rgba(43,59,74,.3)"
|
|
153
153
|
></div>
|
|
154
154
|
</div>
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
</div>
|
|
157
157
|
<div class="pointer-events-auto">
|
|
158
158
|
<div
|
|
159
|
-
class="
|
|
159
|
+
class="pointer-events-none absolute shadow-inner-1 outline outline-2 outline-primary/50"
|
|
160
160
|
style:width={`${layer.image.width * layer.scale * editor.zoom}px`}
|
|
161
161
|
style:height={`${layer.image.height * layer.scale * editor.zoom}px`}
|
|
162
162
|
style:transform={`translate(${imageTransform.x * editor.zoom}px, ${imageTransform.y * editor.zoom}px) rotate(${imageTransform.rotate}deg)`}
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
<ImageRotateControl {pageRef} {layer} />
|
|
174
174
|
</div>
|
|
175
175
|
<div
|
|
176
|
-
class="
|
|
176
|
+
class="pointer-events-none absolute outline outline-2 outline-primary"
|
|
177
177
|
style:width={`${layer.width * layer.scale * editor.zoom}px`}
|
|
178
178
|
style:height={`${layer.height * layer.scale * editor.zoom}px`}
|
|
179
179
|
style:transform={`translate(${layer.x * editor.zoom}px, ${layer.y * editor.zoom}px) rotate(${layer.rotate}deg)`}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
)}
|
|
31
31
|
{...restProps}
|
|
32
32
|
>
|
|
33
|
-
<div class="wrapper
|
|
33
|
+
<div class="wrapper relative h-full w-full after:absolute after:inset-0 after:shadow-inner-1">
|
|
34
34
|
<ColorPickerAlphaGrid size={12}>
|
|
35
35
|
<ColorIndicator {color} />
|
|
36
36
|
</ColorPickerAlphaGrid>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<div
|
|
41
41
|
class="pointer-events-none absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100"
|
|
42
42
|
>
|
|
43
|
-
<div class="bg-background text-foreground
|
|
43
|
+
<div class="rounded-full bg-background p-1 text-foreground">
|
|
44
44
|
<SettingsIcon class="h-4 w-4" />
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
<Popover.Trigger
|
|
67
67
|
class={cn(
|
|
68
68
|
buttonVariants({ variant: 'ghost', size: 'icon' }),
|
|
69
|
-
'
|
|
69
|
+
'relative h-full w-full shrink-0 overflow-hidden rounded-full after:absolute after:inset-0 after:rounded-full after:transition-shadow hover:after:shadow-hover data-[state=open]:after:shadow-active',
|
|
70
70
|
)}
|
|
71
71
|
>
|
|
72
72
|
<div
|
|
73
|
-
class="wrapper
|
|
73
|
+
class="wrapper relative h-full w-full after:absolute after:inset-0 after:rounded-full after:shadow-inner-1"
|
|
74
74
|
>
|
|
75
75
|
<ColorPickerAlphaGrid size={12}>
|
|
76
76
|
<ColorIndicator {color} />
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
<Button
|
|
106
106
|
variant="ghost"
|
|
107
107
|
size="icon"
|
|
108
|
-
class="
|
|
108
|
+
class="relative shrink-0 p-0 after:absolute after:inset-0 after:rounded-full after:transition-shadow hover:after:shadow-hover"
|
|
109
109
|
onclick={addColor}
|
|
110
110
|
>
|
|
111
111
|
<div
|
|
112
|
-
class="
|
|
112
|
+
class="relative h-full w-full after:absolute after:inset-0 after:rounded-full after:shadow-inner-1"
|
|
113
113
|
>
|
|
114
114
|
<div
|
|
115
115
|
class="h-full w-full rounded-full"
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
></div>
|
|
118
118
|
<span class="absolute inset-0 flex h-full w-full items-center justify-center">
|
|
119
119
|
<span
|
|
120
|
-
class="
|
|
120
|
+
class="flex h-6 w-6 items-center justify-center rounded-full bg-background text-foreground"
|
|
121
121
|
>
|
|
122
122
|
<PlusIcon />
|
|
123
123
|
</span>
|
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
)}
|
|
326
326
|
>
|
|
327
327
|
<div
|
|
328
|
-
class="
|
|
328
|
+
class="relative h-full w-full after:absolute after:inset-0 after:rounded-full after:shadow-inner-1"
|
|
329
329
|
>
|
|
330
330
|
<div
|
|
331
331
|
class="h-full w-full rounded-full"
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
></div>
|
|
334
334
|
<span class="absolute inset-0 flex h-full w-full items-center justify-center">
|
|
335
335
|
<span
|
|
336
|
-
class="
|
|
336
|
+
class="flex h-6 w-6 items-center justify-center rounded-full bg-background text-foreground"
|
|
337
337
|
>
|
|
338
338
|
<PlusIcon />
|
|
339
339
|
</span>
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
<!-- <PaletteIcon class="h-5 w-5" /> -->
|
|
382
382
|
<h5 class="text-left text-sm font-bold">Default colors</h5>
|
|
383
383
|
</div>
|
|
384
|
-
<div class="text-muted-foreground
|
|
384
|
+
<div class="text-xs text-muted-foreground">Solid colors</div>
|
|
385
385
|
<div class="grid grid-cols-6 items-stretch gap-1">
|
|
386
386
|
{#each Object.keys(defaultSolidColors) as color}
|
|
387
387
|
<div class="relative h-0 w-full" style:padding-top="100%">
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
</div>
|
|
394
394
|
|
|
395
395
|
{#if gradientsAllowed}
|
|
396
|
-
<div class="text-muted-foreground
|
|
396
|
+
<div class="text-xs text-muted-foreground">Gradients</div>
|
|
397
397
|
<div class="grid grid-cols-6 items-stretch gap-1">
|
|
398
398
|
{#each defaultGradients as color}
|
|
399
399
|
<div class="relative h-0 w-full" style:padding-top="100%">
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<div class="relative flex h-full shrink-0 flex-col gap-2">
|
|
48
48
|
{#if editor.fileDragged}
|
|
49
49
|
<div
|
|
50
|
-
class="
|
|
50
|
+
class="absolute inset-0 z-10 flex h-full w-full flex-col items-center justify-center bg-background"
|
|
51
51
|
>
|
|
52
52
|
<div class="grid gap-6">
|
|
53
53
|
<div class="grid justify-center">
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<ImageIcon class="h-4 w-4" />
|
|
61
61
|
<p class="text-sm font-semibold">Images</p>
|
|
62
62
|
</div>
|
|
63
|
-
<p class="text-muted-foreground
|
|
63
|
+
<p class="text-xs text-muted-foreground">GIF, JPG, PNG</p>
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
66
|
</div>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
class="col-span-3"
|
|
92
92
|
/>
|
|
93
93
|
{#if error}
|
|
94
|
-
<div class="
|
|
94
|
+
<div class="col-span-3 col-start-2 text-sm font-medium text-destructive">
|
|
95
95
|
Invalid
|
|
96
96
|
</div>
|
|
97
97
|
{/if}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
66
|
{#if editor.activeSidebarPopup || editor.activeSidebarTab || editor.imageCropLayer}
|
|
67
|
-
<div class="
|
|
67
|
+
<div class="h-full w-80 shrink-0 overflow-y-auto border-r border-gray-200 bg-background p-2">
|
|
68
68
|
{#if editor.imageCropLayer}
|
|
69
69
|
<ImageCropSidebar layer={editor.imageCropLayer} />
|
|
70
70
|
{:else if editor.activeSidebarPopup === 'position'}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
<div class="absolute h-full w-full">
|
|
14
14
|
{#each guides as guide (guide.id)}
|
|
15
15
|
{#if guide.type === 'box'}
|
|
16
|
-
<div class="border-primary
|
|
16
|
+
<div class="absolute border border-primary" style:inset="{guide.inset * zoom}px"></div>
|
|
17
17
|
{:else if guide.type === 'vertical'}
|
|
18
18
|
<div
|
|
19
19
|
class={cn(
|
|
20
|
-
'
|
|
20
|
+
'absolute h-full border-l border-primary',
|
|
21
21
|
guide.style === 'dashed' && 'border-dashed',
|
|
22
22
|
guide.style === 'dotted' && 'border-dotted',
|
|
23
23
|
)}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{:else if guide.type === 'horizontal'}
|
|
29
29
|
<div
|
|
30
30
|
class={cn(
|
|
31
|
-
'
|
|
31
|
+
'absolute w-full border-t border-primary',
|
|
32
32
|
guide.style === 'dashed' && 'border-dashed',
|
|
33
33
|
guide.style === 'dotted' && 'border-dotted',
|
|
34
34
|
)}
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
style:background="linear-gradient(to top, rgb(0, 0, 0), rgba(0, 0, 0, 0))"
|
|
238
238
|
>
|
|
239
239
|
<div
|
|
240
|
-
class="
|
|
240
|
+
class="relative m-0 -translate-x-1/2 -translate-y-1/2 rounded-full border-primary p-0"
|
|
241
241
|
style:width="16px"
|
|
242
242
|
style:height="16px"
|
|
243
243
|
style:border="2px solid #fffb"
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
></span>
|
|
276
276
|
<Slider.Thumb
|
|
277
277
|
index={0}
|
|
278
|
-
class="border-border-input
|
|
278
|
+
class="border-border-input hover:border-dark-40 block size-2 cursor-pointer rounded-full border bg-background shadow transition-colors focus-visible:outline-none active:scale-150 dark:bg-foreground dark:shadow-card"
|
|
279
279
|
/>
|
|
280
280
|
{/snippet}
|
|
281
281
|
</Slider.Root>
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
{#snippet children()}
|
|
295
295
|
<AlphaGrid
|
|
296
296
|
size={8}
|
|
297
|
-
class="
|
|
297
|
+
class="relative -mx-1 h-3 w-full grow cursor-pointer overflow-hidden rounded-full shadow-inner-1"
|
|
298
298
|
>
|
|
299
299
|
<div
|
|
300
300
|
class="h-full w-full rounded-full"
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
</AlphaGrid>
|
|
304
304
|
<Slider.Thumb
|
|
305
305
|
index={0}
|
|
306
|
-
class="border-border-input
|
|
306
|
+
class="border-border-input hover:border-dark-40 block size-2 cursor-pointer rounded-full border bg-background shadow transition-colors focus-visible:outline-none active:scale-150 dark:bg-foreground dark:shadow-card"
|
|
307
307
|
/>
|
|
308
308
|
{/snippet}
|
|
309
309
|
</Slider.Root>
|
|
@@ -327,9 +327,9 @@
|
|
|
327
327
|
</AlphaGrid>
|
|
328
328
|
</div>
|
|
329
329
|
</div>
|
|
330
|
-
<div class="
|
|
330
|
+
<div class="pointer-events-none absolute left-10 text-sm text-muted-foreground">#</div>
|
|
331
331
|
<Input
|
|
332
|
-
class={cn('pl-12', invalidHex && 'ring-
|
|
332
|
+
class={cn('pl-12', invalidHex && 'ring-1 ring-destructive')}
|
|
333
333
|
value={hexValue.slice(0, 7).replace('#', '')}
|
|
334
334
|
oninput={onHexInput}
|
|
335
335
|
onchange={onHexChange}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
bind:checked
|
|
23
23
|
bind:indeterminate
|
|
24
24
|
class={cn(
|
|
25
|
-
'
|
|
25
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
|
26
26
|
className,
|
|
27
27
|
)}
|
|
28
28
|
{...restProps}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
let {
|
|
6
6
|
ref = $bindable(null),
|
|
7
7
|
portalProps,
|
|
8
|
+
preventScroll = false,
|
|
8
9
|
class: className,
|
|
9
10
|
...restProps
|
|
10
11
|
}: ContextMenuPrimitive.ContentProps & {
|
|
@@ -15,8 +16,9 @@
|
|
|
15
16
|
<ContextMenuPrimitive.Portal {...portalProps}>
|
|
16
17
|
<ContextMenuPrimitive.Content
|
|
17
18
|
bind:ref
|
|
19
|
+
{preventScroll}
|
|
18
20
|
class={cn(
|
|
19
|
-
'
|
|
21
|
+
'z-50 min-w-[8rem] rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none',
|
|
20
22
|
className,
|
|
21
23
|
)}
|
|
22
24
|
{...restProps}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
<ContextMenuPrimitive.GroupHeading
|
|
16
16
|
bind:ref
|
|
17
|
-
class={cn('
|
|
17
|
+
class={cn('px-2 py-1.5 text-sm font-semibold text-foreground', inset && 'pl-8', className)}
|
|
18
18
|
{...restProps}
|
|
19
19
|
/>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<ContextMenuPrimitive.Item
|
|
16
16
|
bind:ref
|
|
17
17
|
class={cn(
|
|
18
|
-
'
|
|
18
|
+
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
|
19
19
|
inset && 'pl-8',
|
|
20
20
|
className,
|
|
21
21
|
)}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<ContextMenuPrimitive.RadioItem
|
|
15
15
|
bind:ref
|
|
16
16
|
class={cn(
|
|
17
|
-
'
|
|
17
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<kbd
|
|
15
15
|
bind:this={ref}
|
|
16
16
|
class={cn(
|
|
17
|
-
'
|
|
17
|
+
'ml-auto rounded-sm bg-muted px-2 py-1 font-sans text-xs tracking-widest text-muted-foreground',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<ContextMenuPrimitive.SubContent
|
|
13
13
|
bind:ref
|
|
14
14
|
class={cn(
|
|
15
|
-
'
|
|
15
|
+
'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md focus:outline-none',
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...restProps}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<ContextMenuPrimitive.SubTrigger
|
|
18
18
|
bind:ref
|
|
19
19
|
class={cn(
|
|
20
|
-
'data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground
|
|
20
|
+
'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground data-[disabled]:opacity-50',
|
|
21
21
|
inset && 'pl-8',
|
|
22
22
|
className,
|
|
23
23
|
)}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
ref = $bindable(null),
|
|
10
|
+
preventScroll = false,
|
|
10
11
|
class: className,
|
|
11
12
|
portalProps,
|
|
12
13
|
children,
|
|
@@ -21,15 +22,16 @@
|
|
|
21
22
|
<Dialog.Overlay />
|
|
22
23
|
<DialogPrimitive.Content
|
|
23
24
|
bind:ref
|
|
25
|
+
{preventScroll}
|
|
24
26
|
class={cn(
|
|
25
|
-
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]
|
|
27
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 sm:rounded-lg',
|
|
26
28
|
className,
|
|
27
29
|
)}
|
|
28
30
|
{...restProps}
|
|
29
31
|
>
|
|
30
32
|
{@render children?.()}
|
|
31
33
|
<DialogPrimitive.Close
|
|
32
|
-
class="
|
|
34
|
+
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none"
|
|
33
35
|
>
|
|
34
36
|
<X class="size-4" />
|
|
35
37
|
<span class="sr-only">Close</span>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
bind:checked
|
|
23
23
|
bind:indeterminate
|
|
24
24
|
class={cn(
|
|
25
|
-
'
|
|
25
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
|
26
26
|
className,
|
|
27
27
|
)}
|
|
28
28
|
{...restProps}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
let {
|
|
6
6
|
ref = $bindable(null),
|
|
7
7
|
sideOffset = 4,
|
|
8
|
+
preventScroll = false,
|
|
8
9
|
class: className,
|
|
9
10
|
...restProps
|
|
10
11
|
}: DropdownMenuPrimitive.ContentProps = $props();
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
<DropdownMenuPrimitive.Content
|
|
14
15
|
bind:ref
|
|
15
16
|
{sideOffset}
|
|
17
|
+
{preventScroll}
|
|
16
18
|
class={cn(
|
|
17
19
|
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md outline-none',
|
|
18
20
|
className,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<DropdownMenuPrimitive.Item
|
|
16
16
|
bind:ref
|
|
17
17
|
class={cn(
|
|
18
|
-
'
|
|
18
|
+
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
19
19
|
inset && 'pl-8',
|
|
20
20
|
className,
|
|
21
21
|
)}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<DropdownMenuPrimitive.RadioItem
|
|
15
15
|
bind:ref
|
|
16
16
|
class={cn(
|
|
17
|
-
'
|
|
17
|
+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<kbd
|
|
15
15
|
bind:this={ref}
|
|
16
16
|
class={cn(
|
|
17
|
-
'
|
|
17
|
+
'ml-auto rounded-sm bg-muted px-2 py-1 font-sans text-xs tracking-widest text-muted-foreground',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<DropdownMenuPrimitive.SubTrigger
|
|
18
18
|
bind:ref
|
|
19
19
|
class={cn(
|
|
20
|
-
'
|
|
20
|
+
'flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
21
21
|
inset && 'pl-8',
|
|
22
22
|
className,
|
|
23
23
|
)}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<input
|
|
15
15
|
bind:this={ref}
|
|
16
16
|
class={cn(
|
|
17
|
-
'
|
|
17
|
+
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:border-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
20
20
|
bind:value
|
|
@@ -28,16 +28,16 @@ get along, so we shut typescript up by casting `value` to `never`.
|
|
|
28
28
|
{#snippet children({ thumbs })}
|
|
29
29
|
<span
|
|
30
30
|
data-orientation={orientation}
|
|
31
|
-
class="
|
|
31
|
+
class="relative grow overflow-hidden rounded-full bg-secondary data-[orientation='horizontal']:h-2 data-[orientation='vertical']:h-full data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-2"
|
|
32
32
|
>
|
|
33
33
|
<SliderPrimitive.Range
|
|
34
|
-
class="bg-primary
|
|
34
|
+
class="absolute bg-primary data-[orientation='horizontal']:h-full data-[orientation='vertical']:w-full"
|
|
35
35
|
/>
|
|
36
36
|
</span>
|
|
37
37
|
{#each thumbs as thumb (thumb)}
|
|
38
38
|
<SliderPrimitive.Thumb
|
|
39
39
|
index={thumb}
|
|
40
|
-
class="border-primary bg-background ring-offset-background
|
|
40
|
+
class="block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
41
41
|
/>
|
|
42
42
|
{/each}
|
|
43
43
|
{/snippet}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Tabs as TabsPrimitive } from
|
|
2
|
-
import Content from
|
|
3
|
-
import List from
|
|
4
|
-
import Trigger from
|
|
1
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
2
|
+
import Content from './tabs-content.svelte';
|
|
3
|
+
import List from './tabs-list.svelte';
|
|
4
|
+
import Trigger from './tabs-trigger.svelte';
|
|
5
5
|
declare const Root: import("svelte").Component<TabsPrimitive.RootProps, {}, "ref" | "value">;
|
|
6
6
|
export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Tabs as TabsPrimitive } from
|
|
2
|
-
import Content from
|
|
3
|
-
import List from
|
|
4
|
-
import Trigger from
|
|
1
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
2
|
+
import Content from './tabs-content.svelte';
|
|
3
|
+
import List from './tabs-list.svelte';
|
|
4
|
+
import Trigger from './tabs-trigger.svelte';
|
|
5
5
|
const Root = TabsPrimitive.Root;
|
|
6
6
|
export { Root, Content, List, Trigger,
|
|
7
7
|
//
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Tabs as TabsPrimitive } from
|
|
3
|
-
import { cn } from
|
|
2
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
4
|
|
|
5
5
|
let {
|
|
6
6
|
ref = $bindable(null),
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<TabsPrimitive.Content
|
|
13
13
|
bind:ref
|
|
14
14
|
class={cn(
|
|
15
|
-
|
|
16
|
-
className
|
|
15
|
+
'mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2',
|
|
16
|
+
className,
|
|
17
17
|
)}
|
|
18
18
|
{...restProps}
|
|
19
19
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tabs as TabsPrimitive } from
|
|
1
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
2
2
|
declare const TabsContent: import("svelte").Component<TabsPrimitive.ContentProps, {}, "ref">;
|
|
3
3
|
type TabsContent = ReturnType<typeof TabsContent>;
|
|
4
4
|
export default TabsContent;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Tabs as TabsPrimitive } from
|
|
3
|
-
import { cn } from
|
|
2
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
4
|
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
...restProps
|
|
9
|
-
}: TabsPrimitive.ListProps = $props();
|
|
5
|
+
let { ref = $bindable(null), class: className, ...restProps }: TabsPrimitive.ListProps = $props();
|
|
10
6
|
</script>
|
|
11
7
|
|
|
12
8
|
<TabsPrimitive.List
|
|
13
9
|
bind:ref
|
|
14
10
|
class={cn(
|
|
15
|
-
|
|
16
|
-
className
|
|
11
|
+
'inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground',
|
|
12
|
+
className,
|
|
17
13
|
)}
|
|
18
14
|
{...restProps}
|
|
19
15
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Tabs as TabsPrimitive } from
|
|
3
|
-
import { cn } from
|
|
2
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../utils.js';
|
|
4
4
|
|
|
5
5
|
let {
|
|
6
6
|
ref = $bindable(null),
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<TabsPrimitive.Trigger
|
|
13
13
|
bind:ref
|
|
14
14
|
class={cn(
|
|
15
|
-
|
|
16
|
-
className
|
|
15
|
+
'inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm',
|
|
16
|
+
className,
|
|
17
17
|
)}
|
|
18
18
|
{...restProps}
|
|
19
19
|
/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tabs as TabsPrimitive } from
|
|
1
|
+
import { Tabs as TabsPrimitive } from 'bits-ui';
|
|
2
2
|
declare const TabsTrigger: import("svelte").Component<TabsPrimitive.TriggerProps, {}, "ref">;
|
|
3
3
|
type TabsTrigger = ReturnType<typeof TabsTrigger>;
|
|
4
4
|
export default TabsTrigger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peteai/presentation-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run package",
|
|
@@ -47,35 +47,35 @@
|
|
|
47
47
|
"svelte": "^5.19.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@playwright/test": "^1.
|
|
51
|
-
"@sveltejs/adapter-auto": "^6.0
|
|
52
|
-
"@sveltejs/kit": "^2.
|
|
53
|
-
"@sveltejs/package": "^2.4
|
|
54
|
-
"@sveltejs/vite-plugin-svelte": "^6.1
|
|
50
|
+
"@playwright/test": "^1.55.1",
|
|
51
|
+
"@sveltejs/adapter-auto": "^6.1.0",
|
|
52
|
+
"@sveltejs/kit": "^2.43.4",
|
|
53
|
+
"@sveltejs/package": "^2.5.4",
|
|
54
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
55
55
|
"@types/eslint": "^9.6.1",
|
|
56
56
|
"@types/uniqid": "^5.3.4",
|
|
57
57
|
"@types/webfontloader": "^1.6.38",
|
|
58
58
|
"autoprefixer": "^10.4.21",
|
|
59
|
-
"eslint": "^9.
|
|
59
|
+
"eslint": "^9.36.0",
|
|
60
60
|
"eslint-config-prettier": "^10.1.8",
|
|
61
|
-
"eslint-plugin-svelte": "^3.
|
|
62
|
-
"globals": "^16.
|
|
61
|
+
"eslint-plugin-svelte": "^3.12.4",
|
|
62
|
+
"globals": "^16.4.0",
|
|
63
63
|
"postcss-cli": "^11.0.1",
|
|
64
64
|
"prettier": "^3.6.2",
|
|
65
65
|
"prettier-plugin-svelte": "^3.4.0",
|
|
66
66
|
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
67
|
-
"publint": "^0.3.
|
|
68
|
-
"svelte": "^5.
|
|
69
|
-
"svelte-check": "^4.3.
|
|
67
|
+
"publint": "^0.3.13",
|
|
68
|
+
"svelte": "^5.39.6",
|
|
69
|
+
"svelte-check": "^4.3.2",
|
|
70
70
|
"svelte-kit-sst": "^2.43.5",
|
|
71
71
|
"tailwindcss": "^3.4.17",
|
|
72
|
-
"typescript": "^5.
|
|
73
|
-
"typescript-eslint": "^8.
|
|
74
|
-
"vite": "^7.
|
|
72
|
+
"typescript": "^5.9.2",
|
|
73
|
+
"typescript-eslint": "^8.44.1",
|
|
74
|
+
"vite": "^7.1.7",
|
|
75
75
|
"vitest": "^3.2.4"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@lucide/svelte": "^0.
|
|
78
|
+
"@lucide/svelte": "^0.544.0",
|
|
79
79
|
"@tiptap/core": "^2.14.0",
|
|
80
80
|
"@tiptap/extension-bold": "^2.14.0",
|
|
81
81
|
"@tiptap/extension-bullet-list": "^2.14.0",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"@tiptap/extension-text-style": "^2.14.0",
|
|
93
93
|
"@tiptap/extension-underline": "^2.14.0",
|
|
94
94
|
"@tiptap/pm": "^2.14.0",
|
|
95
|
-
"bits-ui": "^2.
|
|
95
|
+
"bits-ui": "^2.11.4",
|
|
96
96
|
"clsx": "^2.1.1",
|
|
97
97
|
"esm-env": "^1.2.2",
|
|
98
|
-
"svelte-dnd-action": "^0.9.
|
|
99
|
-
"svelte-radix": "^2.0.
|
|
98
|
+
"svelte-dnd-action": "^0.9.65",
|
|
99
|
+
"svelte-radix": "^2.0.2",
|
|
100
100
|
"tailwind-merge": "^3.3.1",
|
|
101
101
|
"tailwind-variants": "^1.0.0",
|
|
102
102
|
"tailwindcss-animate": "^1.0.7",
|