@cntrl-site/sdk 1.12.2 → 1.12.3

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.
@@ -55,7 +55,8 @@ const ImageItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
55
55
  const VideoItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
56
56
  type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.Video),
57
57
  commonParams: zod_1.z.object({
58
- url: zod_1.z.string().min(1)
58
+ url: zod_1.z.string().min(1),
59
+ coverUrl: zod_1.z.string().nullable()
59
60
  }),
60
61
  sticky: zod_1.z.record(zod_1.z.object({
61
62
  from: zod_1.z.number(),
@@ -122,6 +123,7 @@ const VimeoEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
122
123
  muted: zod_1.z.boolean(),
123
124
  pictureInPicture: zod_1.z.boolean(),
124
125
  url: zod_1.z.string().min(1),
126
+ coverUrl: zod_1.z.string().nullable(),
125
127
  ratioLock: zod_1.z.boolean()
126
128
  }),
127
129
  sticky: zod_1.z.record(zod_1.z.object({
@@ -143,7 +145,8 @@ const YoutubeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
143
145
  play: zod_1.z.enum(['on-hover', 'on-click', 'auto']),
144
146
  controls: zod_1.z.boolean(),
145
147
  loop: zod_1.z.boolean(),
146
- url: zod_1.z.string().min(1)
148
+ url: zod_1.z.string().min(1),
149
+ coverUrl: zod_1.z.string().nullable()
147
150
  }),
148
151
  sticky: zod_1.z.record(zod_1.z.object({
149
152
  from: zod_1.z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.12.2",
3
+ "version": "1.12.3",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -75,7 +75,8 @@ const ImageItemSchema = ItemBaseSchema.extend({
75
75
  const VideoItemSchema = ItemBaseSchema.extend({
76
76
  type: z.literal(ArticleItemType.Video),
77
77
  commonParams: z.object({
78
- url: z.string().min(1)
78
+ url: z.string().min(1),
79
+ coverUrl: z.string().nullable()
79
80
  }),
80
81
  sticky: z.record(
81
82
  z.object({
@@ -155,6 +156,7 @@ const VimeoEmbedItemSchema = ItemBaseSchema.extend({
155
156
  muted: z.boolean(),
156
157
  pictureInPicture: z.boolean(),
157
158
  url: z.string().min(1),
159
+ coverUrl: z.string().nullable(),
158
160
  ratioLock: z.boolean()
159
161
  }),
160
162
  sticky: z.record(
@@ -181,7 +183,8 @@ const YoutubeEmbedItemSchema = ItemBaseSchema.extend({
181
183
  play: z.enum(['on-hover', 'on-click', 'auto']),
182
184
  controls: z.boolean(),
183
185
  loop: z.boolean(),
184
- url: z.string().min(1)
186
+ url: z.string().min(1),
187
+ coverUrl: z.string().nullable()
185
188
  }),
186
189
  sticky: z.record(
187
190
  z.object({
@@ -3,6 +3,7 @@ import { ArticleItemType } from './ArticleItemType';
3
3
  import { AreaAnchor, ItemArea } from './ItemArea';
4
4
  import { ItemState } from './ItemState';
5
5
  import { FXControlAny, FXCursor } from './FX';
6
+ import { z } from 'zod';
6
7
 
7
8
  export type ItemAny = Item<ArticleItemType>;
8
9
 
@@ -47,7 +48,9 @@ interface MediaCommonParams {
47
48
  url: string;
48
49
  }
49
50
 
50
- interface VideoCommonParams extends MediaCommonParams {}
51
+ interface VideoCommonParams extends MediaCommonParams {
52
+ coverUrl: string | null;
53
+ }
51
54
 
52
55
  interface ImageCommonParams extends MediaCommonParams {
53
56
  hasGLEffect?: boolean;
@@ -84,6 +87,7 @@ interface VimeoEmbedCommonParams {
84
87
  muted: boolean;
85
88
  pictureInPicture: boolean;
86
89
  url: string;
90
+ coverUrl: string | null;
87
91
  }
88
92
 
89
93
  interface YoutubeEmbedCommonParams {
@@ -91,6 +95,7 @@ interface YoutubeEmbedCommonParams {
91
95
  controls: boolean;
92
96
  loop: boolean;
93
97
  url: string;
98
+ coverUrl: string | null;
94
99
  }
95
100
 
96
101
  interface MediaLayoutParams {
Binary file