@cntrl-site/sdk 1.12.1 → 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(),
|
|
@@ -162,7 +165,8 @@ const CodeEmbedItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
|
|
|
162
165
|
type: zod_1.z.literal(ArticleItemType_1.ArticleItemType.CodeEmbed),
|
|
163
166
|
commonParams: zod_1.z.object({
|
|
164
167
|
html: zod_1.z.string(),
|
|
165
|
-
scale: zod_1.z.boolean()
|
|
168
|
+
scale: zod_1.z.boolean(),
|
|
169
|
+
iframe: zod_1.z.boolean()
|
|
166
170
|
}),
|
|
167
171
|
sticky: zod_1.z.record(zod_1.z.object({
|
|
168
172
|
from: zod_1.z.number(),
|
package/package.json
CHANGED
|
@@ -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({
|
|
@@ -205,7 +208,8 @@ const CodeEmbedItemSchema = ItemBaseSchema.extend({
|
|
|
205
208
|
type: z.literal(ArticleItemType.CodeEmbed),
|
|
206
209
|
commonParams: z.object({
|
|
207
210
|
html: z.string(),
|
|
208
|
-
scale: z.boolean()
|
|
211
|
+
scale: z.boolean(),
|
|
212
|
+
iframe: z.boolean()
|
|
209
213
|
}),
|
|
210
214
|
sticky: z.record(
|
|
211
215
|
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;
|
|
@@ -74,6 +77,7 @@ interface GroupCommonParams {}
|
|
|
74
77
|
interface CodeEmbedCommonParams {
|
|
75
78
|
html: string;
|
|
76
79
|
scale: boolean;
|
|
80
|
+
iframe: boolean;
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
interface VimeoEmbedCommonParams {
|
|
@@ -83,6 +87,7 @@ interface VimeoEmbedCommonParams {
|
|
|
83
87
|
muted: boolean;
|
|
84
88
|
pictureInPicture: boolean;
|
|
85
89
|
url: string;
|
|
90
|
+
coverUrl: string | null;
|
|
86
91
|
}
|
|
87
92
|
|
|
88
93
|
interface YoutubeEmbedCommonParams {
|
|
@@ -90,6 +95,7 @@ interface YoutubeEmbedCommonParams {
|
|
|
90
95
|
controls: boolean;
|
|
91
96
|
loop: boolean;
|
|
92
97
|
url: string;
|
|
98
|
+
coverUrl: string | null;
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
interface MediaLayoutParams {
|
|
Binary file
|