storyloco 1.11.2 → 1.12.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 CHANGED
@@ -12,6 +12,7 @@ A collection of slick Storyblok field plugins built with Svelte 5, TypeScript, a
12
12
  - **🔗 Link** - Link editor with support for internal, external, email, and asset links
13
13
  - **🏗️ Plans** - Floor plan manager with drag-and-drop sorting for types, floors, dimensions, and rooms
14
14
  - **📝 Input** - Comprehensive form input field with support for all HTML input types, checkboxes, radio buttons, selects, and textareas
15
+ - **⏰ Time** - Simple time input field with step control
15
16
 
16
17
  ### Vite Plugins
17
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storyloco",
3
- "version": "1.11.2",
3
+ "version": "1.12.0",
4
4
  "description": "A collection of slick Storyblok field plugins built with Svelte 5, TypeScript, and Tailwind CSS",
5
5
  "keywords": [
6
6
  "storyblok",
@@ -28,7 +28,8 @@
28
28
  "packages/shared/dist",
29
29
  "packages/vite/dist",
30
30
  "packages/ticketsource/types.ts",
31
- "packages/input/types.ts"
31
+ "packages/input/types.ts",
32
+ "packages/time/types.ts"
32
33
  ],
33
34
  "exports": {
34
35
  ".": {
@@ -66,6 +67,10 @@
66
67
  "./vite": {
67
68
  "types": "./packages/vite/dist/index.d.ts",
68
69
  "import": "./packages/vite/dist/index.js"
70
+ },
71
+ "./time": {
72
+ "types": "./packages/time/types.ts",
73
+ "svelte": "./packages/time/src/app.svelte.ts"
69
74
  }
70
75
  },
71
76
  "devDependencies": {
@@ -1,3 +1,5 @@
1
+ import type { UUID } from 'crypto'
2
+
1
3
  const types = [
2
4
  'text',
3
5
  'email',
@@ -17,7 +19,7 @@ const types = [
17
19
  'hidden',
18
20
  ] as const
19
21
 
20
- namespace Field {
22
+ export namespace Field {
21
23
  export type Type = (typeof types)[number]
22
24
 
23
25
  export type Base = {
@@ -47,20 +49,24 @@ namespace Field {
47
49
  disabled: boolean
48
50
  selected: boolean
49
51
  label: string
50
- _id: string
52
+ checked?: boolean
53
+ required?: boolean
54
+ id: UUID
51
55
  }>
52
56
  multiple: boolean
53
57
  }
54
58
 
55
59
  export type Checkbox = Omit<Base, 'required' | 'disabled'> & {
56
60
  type: 'checkbox'
61
+ at_least_one: boolean
57
62
  options: Array<{
58
63
  value: string
59
64
  required: boolean
60
65
  disabled: boolean
61
66
  checked: boolean
62
67
  label: string
63
- _id: string
68
+ selected?: boolean
69
+ id: UUID
64
70
  }>
65
71
  }
66
72
 
@@ -71,7 +77,9 @@ namespace Field {
71
77
  disabled: boolean
72
78
  checked: boolean
73
79
  label: string
74
- _id: string
80
+ selected?: boolean
81
+ required?: boolean
82
+ id: UUID
75
83
  }>
76
84
  }
77
85
 
@@ -0,0 +1 @@
1
+ export type Time = string