@cntrl-site/sdk 1.22.18 → 1.22.19-alpha.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/dist/index.js CHANGED
@@ -321,7 +321,10 @@ const VideoItemSchema = ItemBaseSchema.extend({
321
321
  strokeWidth: zod.z.number(),
322
322
  strokeColor: zod.z.string(),
323
323
  blur: zod.z.number(),
324
- isDraggable: zod.z.boolean().optional()
324
+ isDraggable: zod.z.boolean().optional(),
325
+ play: zod.z.enum(["on-hover", "on-click", "auto"]),
326
+ muted: zod.z.boolean(),
327
+ controls: zod.z.boolean()
325
328
  })
326
329
  ),
327
330
  state: zod.z.record(MediaStateParamsSchema)
@@ -372,11 +375,6 @@ const CustomItemSchema = ItemBaseSchema.extend({
372
375
  const VimeoEmbedItemSchema = ItemBaseSchema.extend({
373
376
  type: zod.z.literal(ArticleItemType.VimeoEmbed),
374
377
  commonParams: zod.z.object({
375
- play: zod.z.union([zod.z.literal("on-hover"), zod.z.literal("on-click"), zod.z.literal("auto")]),
376
- controls: zod.z.boolean(),
377
- loop: zod.z.boolean(),
378
- muted: zod.z.boolean(),
379
- pictureInPicture: zod.z.boolean(),
380
378
  url: zod.z.string().min(1),
381
379
  coverUrl: zod.z.string().nullable(),
382
380
  ratioLock: zod.z.boolean(),
@@ -392,7 +390,12 @@ const VimeoEmbedItemSchema = ItemBaseSchema.extend({
392
390
  zod.z.object({
393
391
  radius: zod.z.number(),
394
392
  blur: zod.z.number(),
395
- opacity: zod.z.number().nonnegative()
393
+ opacity: zod.z.number().nonnegative(),
394
+ play: zod.z.union([zod.z.literal("on-hover"), zod.z.literal("on-click"), zod.z.literal("auto")]),
395
+ controls: zod.z.boolean(),
396
+ loop: zod.z.boolean(),
397
+ muted: zod.z.boolean(),
398
+ pictureInPicture: zod.z.boolean()
396
399
  })
397
400
  ),
398
401
  state: zod.z.record(EmbedStateParamsSchema)
@@ -400,9 +403,6 @@ const VimeoEmbedItemSchema = ItemBaseSchema.extend({
400
403
  const YoutubeEmbedItemSchema = ItemBaseSchema.extend({
401
404
  type: zod.z.literal(ArticleItemType.YoutubeEmbed),
402
405
  commonParams: zod.z.object({
403
- play: zod.z.enum(["on-hover", "on-click", "auto"]),
404
- controls: zod.z.boolean(),
405
- loop: zod.z.boolean(),
406
406
  url: zod.z.string().min(1),
407
407
  coverUrl: zod.z.string().nullable(),
408
408
  pointerEvents
@@ -417,7 +417,10 @@ const YoutubeEmbedItemSchema = ItemBaseSchema.extend({
417
417
  zod.z.object({
418
418
  radius: zod.z.number(),
419
419
  blur: zod.z.number(),
420
- opacity: zod.z.number().nonnegative()
420
+ opacity: zod.z.number().nonnegative(),
421
+ play: zod.z.enum(["on-hover", "on-click", "auto"]),
422
+ controls: zod.z.boolean(),
423
+ loop: zod.z.boolean()
421
424
  })
422
425
  ),
423
426
  state: zod.z.record(EmbedStateParamsSchema)
package/dist/index.mjs CHANGED
@@ -302,7 +302,10 @@ const VideoItemSchema = ItemBaseSchema.extend({
302
302
  strokeWidth: z.number(),
303
303
  strokeColor: z.string(),
304
304
  blur: z.number(),
305
- isDraggable: z.boolean().optional()
305
+ isDraggable: z.boolean().optional(),
306
+ play: z.enum(["on-hover", "on-click", "auto"]),
307
+ muted: z.boolean(),
308
+ controls: z.boolean()
306
309
  })
307
310
  ),
308
311
  state: z.record(MediaStateParamsSchema)
@@ -353,11 +356,6 @@ const CustomItemSchema = ItemBaseSchema.extend({
353
356
  const VimeoEmbedItemSchema = ItemBaseSchema.extend({
354
357
  type: z.literal(ArticleItemType.VimeoEmbed),
355
358
  commonParams: z.object({
356
- play: z.union([z.literal("on-hover"), z.literal("on-click"), z.literal("auto")]),
357
- controls: z.boolean(),
358
- loop: z.boolean(),
359
- muted: z.boolean(),
360
- pictureInPicture: z.boolean(),
361
359
  url: z.string().min(1),
362
360
  coverUrl: z.string().nullable(),
363
361
  ratioLock: z.boolean(),
@@ -373,7 +371,12 @@ const VimeoEmbedItemSchema = ItemBaseSchema.extend({
373
371
  z.object({
374
372
  radius: z.number(),
375
373
  blur: z.number(),
376
- opacity: z.number().nonnegative()
374
+ opacity: z.number().nonnegative(),
375
+ play: z.union([z.literal("on-hover"), z.literal("on-click"), z.literal("auto")]),
376
+ controls: z.boolean(),
377
+ loop: z.boolean(),
378
+ muted: z.boolean(),
379
+ pictureInPicture: z.boolean()
377
380
  })
378
381
  ),
379
382
  state: z.record(EmbedStateParamsSchema)
@@ -381,9 +384,6 @@ const VimeoEmbedItemSchema = ItemBaseSchema.extend({
381
384
  const YoutubeEmbedItemSchema = ItemBaseSchema.extend({
382
385
  type: z.literal(ArticleItemType.YoutubeEmbed),
383
386
  commonParams: z.object({
384
- play: z.enum(["on-hover", "on-click", "auto"]),
385
- controls: z.boolean(),
386
- loop: z.boolean(),
387
387
  url: z.string().min(1),
388
388
  coverUrl: z.string().nullable(),
389
389
  pointerEvents
@@ -398,7 +398,10 @@ const YoutubeEmbedItemSchema = ItemBaseSchema.extend({
398
398
  z.object({
399
399
  radius: z.number(),
400
400
  blur: z.number(),
401
- opacity: z.number().nonnegative()
401
+ opacity: z.number().nonnegative(),
402
+ play: z.enum(["on-hover", "on-click", "auto"]),
403
+ controls: z.boolean(),
404
+ loop: z.boolean()
402
405
  })
403
406
  ),
404
407
  state: z.record(EmbedStateParamsSchema)
@@ -31,16 +31,16 @@ export declare const ArticleSchema: z.ZodObject<{
31
31
  offsetX: z.ZodNullable<z.ZodNumber>;
32
32
  }, "strip", z.ZodTypeAny, {
33
33
  url: string;
34
- play: "on-click" | "auto";
35
34
  coverUrl: string | null;
35
+ play: "on-click" | "auto";
36
36
  position: string;
37
37
  type: "video";
38
38
  size: string;
39
39
  offsetX: number | null;
40
40
  }, {
41
41
  url: string;
42
- play: "on-click" | "auto";
43
42
  coverUrl: string | null;
43
+ play: "on-click" | "auto";
44
44
  position: string;
45
45
  type: "video";
46
46
  size: string;
@@ -78,8 +78,8 @@ export declare const ArticleSchema: z.ZodObject<{
78
78
  name?: string | undefined;
79
79
  media?: Record<string, {
80
80
  url: string;
81
- play: "on-click" | "auto";
82
81
  coverUrl: string | null;
82
+ play: "on-click" | "auto";
83
83
  position: string;
84
84
  type: "video";
85
85
  size: string;
@@ -105,8 +105,8 @@ export declare const ArticleSchema: z.ZodObject<{
105
105
  name?: string | undefined;
106
106
  media?: Record<string, {
107
107
  url: string;
108
- play: "on-click" | "auto";
109
108
  coverUrl: string | null;
109
+ play: "on-click" | "auto";
110
110
  position: string;
111
111
  type: "video";
112
112
  size: string;
@@ -212,8 +212,8 @@ export declare const ArticleSchema: z.ZodObject<{
212
212
  name?: string | undefined;
213
213
  media?: Record<string, {
214
214
  url: string;
215
- play: "on-click" | "auto";
216
215
  coverUrl: string | null;
216
+ play: "on-click" | "auto";
217
217
  position: string;
218
218
  type: "video";
219
219
  size: string;
@@ -259,8 +259,8 @@ export declare const ArticleSchema: z.ZodObject<{
259
259
  name?: string | undefined;
260
260
  media?: Record<string, {
261
261
  url: string;
262
- play: "on-click" | "auto";
263
262
  coverUrl: string | null;
263
+ play: "on-click" | "auto";
264
264
  position: string;
265
265
  type: "video";
266
266
  size: string;
@@ -71,7 +71,10 @@ const VideoItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
71
71
  strokeWidth: zod_1.z.number(),
72
72
  strokeColor: zod_1.z.string(),
73
73
  blur: zod_1.z.number(),
74
- isDraggable: zod_1.z.boolean().optional()
74
+ isDraggable: zod_1.z.boolean().optional(),
75
+ play: zod_1.z.enum(['on-hover', 'on-click', 'auto']),
76
+ muted: zod_1.z.boolean(),
77
+ controls: zod_1.z.boolean(),
75
78
  })),
76
79
  state: zod_1.z.record(ItemState_schema_1.MediaStateParamsSchema)
77
80
  });
@@ -115,11 +118,6 @@ const CustomItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
115
118
  const VimeoEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
116
119
  type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.VimeoEmbed),
117
120
  commonParams: zod_1.z.object({
118
- play: zod_1.z.union([zod_1.z.literal('on-hover'), zod_1.z.literal('on-click'), zod_1.z.literal('auto')]),
119
- controls: zod_1.z.boolean(),
120
- loop: zod_1.z.boolean(),
121
- muted: zod_1.z.boolean(),
122
- pictureInPicture: zod_1.z.boolean(),
123
121
  url: zod_1.z.string().min(1),
124
122
  coverUrl: zod_1.z.string().nullable(),
125
123
  ratioLock: zod_1.z.boolean(),
@@ -132,16 +130,18 @@ const VimeoEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
132
130
  layoutParams: zod_1.z.record(zod_1.z.object({
133
131
  radius: zod_1.z.number(),
134
132
  blur: zod_1.z.number(),
135
- opacity: zod_1.z.number().nonnegative()
133
+ opacity: zod_1.z.number().nonnegative(),
134
+ play: zod_1.z.union([zod_1.z.literal('on-hover'), zod_1.z.literal('on-click'), zod_1.z.literal('auto')]),
135
+ controls: zod_1.z.boolean(),
136
+ loop: zod_1.z.boolean(),
137
+ muted: zod_1.z.boolean(),
138
+ pictureInPicture: zod_1.z.boolean()
136
139
  })),
137
140
  state: zod_1.z.record(ItemState_schema_1.EmbedStateParamsSchema)
138
141
  });
139
142
  const YoutubeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
140
143
  type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.YoutubeEmbed),
141
144
  commonParams: zod_1.z.object({
142
- play: zod_1.z.enum(['on-hover', 'on-click', 'auto']),
143
- controls: zod_1.z.boolean(),
144
- loop: zod_1.z.boolean(),
145
145
  url: zod_1.z.string().min(1),
146
146
  coverUrl: zod_1.z.string().nullable(),
147
147
  pointerEvents
@@ -153,7 +153,10 @@ const YoutubeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
153
153
  layoutParams: zod_1.z.record(zod_1.z.object({
154
154
  radius: zod_1.z.number(),
155
155
  blur: zod_1.z.number(),
156
- opacity: zod_1.z.number().nonnegative()
156
+ opacity: zod_1.z.number().nonnegative(),
157
+ play: zod_1.z.enum(['on-hover', 'on-click', 'auto']),
158
+ controls: zod_1.z.boolean(),
159
+ loop: zod_1.z.boolean(),
157
160
  })),
158
161
  state: zod_1.z.record(ItemState_schema_1.EmbedStateParamsSchema)
159
162
  });
@@ -23,16 +23,16 @@ export declare const SectionMediaSchema: z.ZodDiscriminatedUnion<"type", [z.ZodO
23
23
  offsetX: z.ZodNullable<z.ZodNumber>;
24
24
  }, "strip", z.ZodTypeAny, {
25
25
  url: string;
26
- play: "on-click" | "auto";
27
26
  coverUrl: string | null;
27
+ play: "on-click" | "auto";
28
28
  position: string;
29
29
  type: "video";
30
30
  size: string;
31
31
  offsetX: number | null;
32
32
  }, {
33
33
  url: string;
34
- play: "on-click" | "auto";
35
34
  coverUrl: string | null;
35
+ play: "on-click" | "auto";
36
36
  position: string;
37
37
  type: "video";
38
38
  size: string;
@@ -86,16 +86,16 @@ export declare const SectionSchema: z.ZodObject<{
86
86
  offsetX: z.ZodNullable<z.ZodNumber>;
87
87
  }, "strip", z.ZodTypeAny, {
88
88
  url: string;
89
- play: "on-click" | "auto";
90
89
  coverUrl: string | null;
90
+ play: "on-click" | "auto";
91
91
  position: string;
92
92
  type: "video";
93
93
  size: string;
94
94
  offsetX: number | null;
95
95
  }, {
96
96
  url: string;
97
- play: "on-click" | "auto";
98
97
  coverUrl: string | null;
98
+ play: "on-click" | "auto";
99
99
  position: string;
100
100
  type: "video";
101
101
  size: string;
@@ -133,8 +133,8 @@ export declare const SectionSchema: z.ZodObject<{
133
133
  name?: string | undefined;
134
134
  media?: Record<string, {
135
135
  url: string;
136
- play: "on-click" | "auto";
137
136
  coverUrl: string | null;
137
+ play: "on-click" | "auto";
138
138
  position: string;
139
139
  type: "video";
140
140
  size: string;
@@ -160,8 +160,8 @@ export declare const SectionSchema: z.ZodObject<{
160
160
  name?: string | undefined;
161
161
  media?: Record<string, {
162
162
  url: string;
163
- play: "on-click" | "auto";
164
163
  coverUrl: string | null;
164
+ play: "on-click" | "auto";
165
165
  position: string;
166
166
  type: "video";
167
167
  size: string;
@@ -79,18 +79,10 @@ interface CodeEmbedCommonParams extends CommonParamsBase {
79
79
  iframe: boolean;
80
80
  }
81
81
  interface VimeoEmbedCommonParams extends CommonParamsBase {
82
- play: 'on-hover' | 'on-click' | 'auto';
83
- controls: boolean;
84
- loop: boolean;
85
- muted: boolean;
86
- pictureInPicture: boolean;
87
82
  url: string;
88
83
  coverUrl: string | null;
89
84
  }
90
85
  interface YoutubeEmbedCommonParams extends CommonParamsBase {
91
- play: 'on-hover' | 'on-click' | 'auto';
92
- controls: boolean;
93
- loop: boolean;
94
86
  url: string;
95
87
  coverUrl: string | null;
96
88
  }
@@ -125,11 +117,19 @@ interface CodeEmbedLayoutParams {
125
117
  isDraggable?: boolean;
126
118
  }
127
119
  interface VimeoEmbedLayoutParams {
120
+ play: 'on-hover' | 'on-click' | 'auto';
121
+ controls: boolean;
122
+ loop: boolean;
123
+ muted: boolean;
124
+ pictureInPicture: boolean;
128
125
  radius: number;
129
126
  blur: number;
130
127
  opacity: number;
131
128
  }
132
129
  interface YoutubeEmbedLayoutParams {
130
+ play: 'on-hover' | 'on-click' | 'auto';
131
+ controls: boolean;
132
+ loop: boolean;
133
133
  radius: number;
134
134
  blur: number;
135
135
  opacity: number;
@@ -137,7 +137,9 @@ interface YoutubeEmbedLayoutParams {
137
137
  interface ImageLayoutParams extends MediaLayoutParams {
138
138
  }
139
139
  interface VideoLayoutParams extends MediaLayoutParams {
140
- autoplay: boolean;
140
+ play: 'on-hover' | 'on-click' | 'auto';
141
+ muted: boolean;
142
+ controls: boolean;
141
143
  scrollPlayback: ScrollPlaybackParams | null;
142
144
  }
143
145
  interface RichTextLayoutParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.22.18",
3
+ "version": "1.22.19-alpha.0",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",