@cntrl-site/sdk 1.19.0 → 1.19.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.
@@ -50,7 +50,8 @@ const ImageItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
50
50
  radius: zod_1.z.number(),
51
51
  strokeWidth: zod_1.z.number(),
52
52
  strokeColor: zod_1.z.string(),
53
- blur: zod_1.z.number()
53
+ blur: zod_1.z.number(),
54
+ isDraggable: zod_1.z.boolean().optional()
54
55
  })),
55
56
  state: zod_1.z.record(zod_1.z.record(ItemState_schema_1.MediaStateParamsSchema))
56
57
  });
@@ -74,7 +75,8 @@ const VideoItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
74
75
  radius: zod_1.z.number(),
75
76
  strokeWidth: zod_1.z.number(),
76
77
  strokeColor: zod_1.z.string(),
77
- blur: zod_1.z.number()
78
+ blur: zod_1.z.number(),
79
+ isDraggable: zod_1.z.boolean().optional()
78
80
  })),
79
81
  state: zod_1.z.record(zod_1.z.record(ItemState_schema_1.MediaStateParamsSchema))
80
82
  });
@@ -95,7 +97,8 @@ const RectangleItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
95
97
  strokeColor: zod_1.z.string().min(1),
96
98
  blur: zod_1.z.number(),
97
99
  backdropBlur: zod_1.z.number(),
98
- blurMode: zod_1.z.enum(['default', 'backdrop'])
100
+ blurMode: zod_1.z.enum(['default', 'backdrop']),
101
+ isDraggable: zod_1.z.boolean().optional()
99
102
  })),
100
103
  state: zod_1.z.record(zod_1.z.record(ItemState_schema_1.RectangleStateParamsSchema))
101
104
  });
@@ -109,7 +112,9 @@ const CustomItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
109
112
  from: zod_1.z.number(),
110
113
  to: zod_1.z.number().optional()
111
114
  }).nullable()),
112
- layoutParams: zod_1.z.record(zod_1.z.object({})),
115
+ layoutParams: zod_1.z.record(zod_1.z.object({
116
+ isDraggable: zod_1.z.boolean().optional()
117
+ })),
113
118
  state: zod_1.z.record(zod_1.z.record(ItemState_schema_1.CustomItemStateParamsSchema))
114
119
  });
115
120
  const VimeoEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
@@ -172,7 +177,8 @@ const CodeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
172
177
  layoutParams: zod_1.z.record(zod_1.z.object({
173
178
  areaAnchor: zod_1.z.nativeEnum(ItemArea_1.AreaAnchor),
174
179
  opacity: zod_1.z.number().nonnegative(),
175
- blur: zod_1.z.number()
180
+ blur: zod_1.z.number(),
181
+ isDraggable: zod_1.z.boolean().optional()
176
182
  })),
177
183
  state: zod_1.z.record(zod_1.z.record(ItemState_schema_1.CodeEmbedStateParamsSchema))
178
184
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.19.0",
3
+ "version": "1.19.1",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -71,7 +71,8 @@ const ImageItemSchema = ItemBaseSchema.extend({
71
71
  radius: z.number(),
72
72
  strokeWidth: z.number(),
73
73
  strokeColor: z.string(),
74
- blur: z.number()
74
+ blur: z.number(),
75
+ isDraggable: z.boolean().optional()
75
76
  })
76
77
  ),
77
78
  state: z.record(z.record(MediaStateParamsSchema))
@@ -100,7 +101,8 @@ const VideoItemSchema = ItemBaseSchema.extend({
100
101
  radius: z.number(),
101
102
  strokeWidth: z.number(),
102
103
  strokeColor: z.string(),
103
- blur: z.number()
104
+ blur: z.number(),
105
+ isDraggable: z.boolean().optional()
104
106
  })
105
107
  ),
106
108
  state: z.record(z.record(MediaStateParamsSchema))
@@ -126,7 +128,8 @@ const RectangleItemSchema = ItemBaseSchema.extend({
126
128
  strokeColor: z.string().min(1),
127
129
  blur: z.number(),
128
130
  backdropBlur: z.number(),
129
- blurMode: z.enum(['default', 'backdrop'])
131
+ blurMode: z.enum(['default', 'backdrop']),
132
+ isDraggable: z.boolean().optional()
130
133
  })
131
134
  ),
132
135
  state: z.record(z.record(RectangleStateParamsSchema))
@@ -144,7 +147,9 @@ const CustomItemSchema = ItemBaseSchema.extend({
144
147
  to: z.number().optional()
145
148
  }).nullable(),
146
149
  ),
147
- layoutParams: z.record(z.object({})),
150
+ layoutParams: z.record(z.object({
151
+ isDraggable: z.boolean().optional()
152
+ })),
148
153
  state: z.record(z.record(CustomItemStateParamsSchema))
149
154
  }) satisfies ZodType<CustomItem>;
150
155
 
@@ -221,7 +226,8 @@ const CodeEmbedItemSchema = ItemBaseSchema.extend({
221
226
  z.object({
222
227
  areaAnchor: z.nativeEnum(AreaAnchor),
223
228
  opacity: z.number().nonnegative(),
224
- blur: z.number()
229
+ blur: z.number(),
230
+ isDraggable: z.boolean().optional()
225
231
  })
226
232
  ),
227
233
  state: z.record(z.record(CodeEmbedStateParamsSchema))
@@ -114,23 +114,29 @@ interface MediaLayoutParams {
114
114
  strokeWidth: number;
115
115
  strokeColor: string;
116
116
  blur: number;
117
+ isDraggable?: boolean;
117
118
  }
118
119
 
119
- interface CustomLayoutParams {}
120
+ interface CustomLayoutParams {
121
+ isDraggable?: boolean;
122
+ }
120
123
 
121
124
  interface GroupLayoutParams {
122
125
  opacity: number;
123
126
  blur: number;
127
+ isDraggable?: boolean;
124
128
  }
125
129
 
126
130
  interface CompoundLayoutParams {
127
131
  opacity: number;
132
+ isDraggable?: boolean;
128
133
  }
129
134
 
130
135
  interface CodeEmbedLayoutParams {
131
136
  areaAnchor: AreaAnchor;
132
137
  opacity: number;
133
138
  blur: number;
139
+ isDraggable?: boolean;
134
140
  }
135
141
 
136
142
  interface VimeoEmbedLayoutParams {
@@ -168,6 +174,7 @@ interface RichTextLayoutParams {
168
174
  fontStyle: string;
169
175
  fontWeight: number;
170
176
  fontVariant: string;
177
+ isDraggable?: boolean;
171
178
  }
172
179
 
173
180
  interface RectangleLayoutParams {
@@ -178,6 +185,7 @@ interface RectangleLayoutParams {
178
185
  blur: number;
179
186
  backdropBlur: number;
180
187
  blurMode: 'default' | 'backdrop';
188
+ isDraggable?: boolean;
181
189
  }
182
190
 
183
191
  export interface ScrollPlaybackParams {