storyloco 1.4.0 → 1.4.1
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/package.json +6 -1
- package/packages/plans/types.ts +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storyloco",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "A collection of slick Storyblok field plugins built with Svelte 5, TypeScript, and Tailwind CSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storyblok",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"packages/mux/types.ts",
|
|
25
25
|
"packages/heading/src/app.svelte",
|
|
26
26
|
"packages/heading/types.ts",
|
|
27
|
+
"packages/plans/types.ts",
|
|
27
28
|
"packages/theme/src/app.svelte",
|
|
28
29
|
"packages/shared/dist",
|
|
29
30
|
"packages/vite/dist"
|
|
@@ -41,6 +42,10 @@
|
|
|
41
42
|
"types": "./packages/heading/types.ts",
|
|
42
43
|
"import": "./packages/heading/src/app.svelte"
|
|
43
44
|
},
|
|
45
|
+
"./plans": {
|
|
46
|
+
"types": "./packages/plans/types.ts",
|
|
47
|
+
"import": "./packages/plans/types.ts"
|
|
48
|
+
},
|
|
44
49
|
"./shared": {
|
|
45
50
|
"types": "./packages/shared/dist/index.d.ts",
|
|
46
51
|
"svelte": "./packages/shared/dist/index.js"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Asset } from '@storyblok/field-plugin'
|
|
2
|
+
|
|
3
|
+
export type UUID = ReturnType<typeof crypto.randomUUID>
|
|
4
|
+
|
|
5
|
+
export type Types = {
|
|
6
|
+
_active_type?: UUID
|
|
7
|
+
_active_floor?: UUID
|
|
8
|
+
types: Array<{
|
|
9
|
+
id: UUID
|
|
10
|
+
name?: string
|
|
11
|
+
floors: Array<{
|
|
12
|
+
id: UUID
|
|
13
|
+
name: string
|
|
14
|
+
plan?: Asset
|
|
15
|
+
plot_dimensions: Array<{
|
|
16
|
+
id: UUID
|
|
17
|
+
plot_number: number
|
|
18
|
+
rooms: Array<{
|
|
19
|
+
id: UUID
|
|
20
|
+
name: string
|
|
21
|
+
area_m: `${string} x ${string}m`
|
|
22
|
+
area_ft: `${string} x ${string}"`
|
|
23
|
+
}>
|
|
24
|
+
}>
|
|
25
|
+
}>
|
|
26
|
+
}>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type Type = Types['types'][number]
|
|
30
|
+
export type Floor = Type['floors'][number]
|
|
31
|
+
export type PlotDimension = Floor['plot_dimensions'][number]
|
|
32
|
+
export type Room = PlotDimension['rooms'][number]
|