storyloco 1.4.5 → 1.5.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/README.md +1 -1
- package/package.json +1 -1
- package/packages/heading/types.ts +3 -2
- package/packages/plans/types.ts +5 -5
- package/packages/theme/src/app.svelte +12 -12
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ A collection of slick Storyblok field plugins built with Svelte 5, TypeScript, a
|
|
|
10
10
|
- **📝 Heading** - Simple heading editor with level selection (H1-H6)
|
|
11
11
|
- **🎨 Theme** - Color theme selector with visual previews
|
|
12
12
|
- **🔗 Link** - Link editor with support for internal, external, email, and asset links
|
|
13
|
-
- **🏗️ Plans** - Floor plan manager with drag-and-drop sorting for types, floors,
|
|
13
|
+
- **🏗️ Plans** - Floor plan manager with drag-and-drop sorting for types, floors, dimensions, and rooms
|
|
14
14
|
|
|
15
15
|
### Vite Plugins
|
|
16
16
|
|
package/package.json
CHANGED
package/packages/plans/types.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Asset } from '@storyblok/field-plugin'
|
|
1
|
+
import type { Asset } from '@storyblok/field-plugin'
|
|
2
2
|
|
|
3
3
|
export type UUID = ReturnType<typeof crypto.randomUUID>
|
|
4
4
|
|
|
@@ -12,9 +12,9 @@ export type Types = {
|
|
|
12
12
|
id: UUID
|
|
13
13
|
name: string
|
|
14
14
|
plan?: Asset
|
|
15
|
-
|
|
15
|
+
dimensions: Array<{
|
|
16
16
|
id: UUID
|
|
17
|
-
|
|
17
|
+
name: string
|
|
18
18
|
rooms: Array<{
|
|
19
19
|
id: UUID
|
|
20
20
|
name: string
|
|
@@ -28,5 +28,5 @@ export type Types = {
|
|
|
28
28
|
|
|
29
29
|
export type Type = Types['types'][number]
|
|
30
30
|
export type Floor = Type['floors'][number]
|
|
31
|
-
export type
|
|
32
|
-
export type Room =
|
|
31
|
+
export type Dimension = Floor['dimensions'][number]
|
|
32
|
+
export type Room = Dimension['rooms'][number]
|
|
@@ -76,23 +76,23 @@
|
|
|
76
76
|
</button>
|
|
77
77
|
{#if open}
|
|
78
78
|
<fieldset
|
|
79
|
-
class="bg-input-background border border-input rounded grid @
|
|
79
|
+
class="bg-input-background border border-input rounded grid @[250px]:grid-cols-2 @sm:grid-cols-3 divide-y mt-1 overflow-hidden p-3 gap-3 max-h-54 @xl:max-h-58 overflow-y-auto"
|
|
80
80
|
transition:slide
|
|
81
81
|
>
|
|
82
82
|
{#each themes as { value, name, primary, secondary, tertiary }, index}
|
|
83
|
-
{#snippet
|
|
83
|
+
{#snippet Label(value: string)}
|
|
84
84
|
<input
|
|
85
85
|
class={cn(
|
|
86
86
|
'sr-only',
|
|
87
87
|
`
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
dark:[&:checked+label]:text-background
|
|
89
|
+
[&:checked+label]:border-primary
|
|
90
|
+
[&:checked+label]:bg-white
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
focus-visible:[&:checked+label]:outline-primary
|
|
93
|
+
focus-visible:[&:checked+label]:outline-2
|
|
94
|
+
focus-visible:[&:checked+label]:outline-offset-2
|
|
95
|
+
`,
|
|
96
96
|
{
|
|
97
97
|
'dark:[&:checked+label_figure_span]:border-background': value === 'none',
|
|
98
98
|
}
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
/>
|
|
106
106
|
<label
|
|
107
107
|
for={value}
|
|
108
|
-
class="grid
|
|
108
|
+
class="grid text-xs text-center items-center gap-2 p-3 border rounded relative cursor-pointer justify-center hover:bg-primary/10 border-input bg-secondary hover:border-primary transition-colors"
|
|
109
109
|
>
|
|
110
110
|
<figure
|
|
111
111
|
class={cn(
|
|
@@ -132,9 +132,9 @@
|
|
|
132
132
|
</label>
|
|
133
133
|
{/snippet}
|
|
134
134
|
{#if index === 0}
|
|
135
|
-
{@render
|
|
135
|
+
{@render Label('none')}
|
|
136
136
|
{/if}
|
|
137
|
-
{@render
|
|
137
|
+
{@render Label(value)}
|
|
138
138
|
{/each}
|
|
139
139
|
</fieldset>
|
|
140
140
|
{/if}
|