@cntrl-site/sdk 1.7.0 → 1.8.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.
|
@@ -62,6 +62,10 @@ const VideoItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
|
|
|
62
62
|
}).nullable()),
|
|
63
63
|
layoutParams: zod_1.z.record(zod_1.z.object({
|
|
64
64
|
autoplay: zod_1.z.boolean(),
|
|
65
|
+
scrollPlayback: zod_1.z.object({
|
|
66
|
+
from: zod_1.z.number(),
|
|
67
|
+
to: zod_1.z.number()
|
|
68
|
+
}).nullable(),
|
|
65
69
|
opacity: zod_1.z.number().nonnegative(),
|
|
66
70
|
radius: zod_1.z.number(),
|
|
67
71
|
strokeWidth: zod_1.z.number(),
|
|
@@ -51,8 +51,7 @@ exports.RichTextItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
|
|
|
51
51
|
typeFace: zod_1.z.string(),
|
|
52
52
|
fontStyle: zod_1.z.string(),
|
|
53
53
|
fontWeight: zod_1.z.number(),
|
|
54
|
-
fontVariant: zod_1.z.string()
|
|
55
|
-
textDecoration: zod_1.z.nativeEnum(RichText_1.TextDecoration),
|
|
54
|
+
fontVariant: zod_1.z.string()
|
|
56
55
|
})),
|
|
57
56
|
state: zod_1.z.object({
|
|
58
57
|
hover: zod_1.z.record(ItemState_schema_1.RichTextHoverStateParamsSchema)
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z, ZodType } from 'zod';
|
|
2
2
|
import {
|
|
3
3
|
CustomItem,
|
|
4
|
-
GroupItem,
|
|
5
4
|
ImageItem,
|
|
6
5
|
ItemAny,
|
|
7
6
|
RectangleItem,
|
|
@@ -84,6 +83,10 @@ const VideoItemSchema = ItemBaseSchema.extend({
|
|
|
84
83
|
layoutParams: z.record(
|
|
85
84
|
z.object({
|
|
86
85
|
autoplay: z.boolean(),
|
|
86
|
+
scrollPlayback: z.object({
|
|
87
|
+
from: z.number(),
|
|
88
|
+
to: z.number()
|
|
89
|
+
}).nullable(),
|
|
87
90
|
opacity: z.number().nonnegative(),
|
|
88
91
|
radius: z.number(),
|
|
89
92
|
strokeWidth: z.number(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z, ZodType } from 'zod';
|
|
2
|
-
import { RichTextBlock, TextAlign,
|
|
2
|
+
import { RichTextBlock, TextAlign, TextTransform, VerticalAlign } from '../../types/article/RichText';
|
|
3
3
|
import { ItemBaseSchema } from './ItemBase.schema';
|
|
4
4
|
import { ArticleItemType } from '../../types/article/ArticleItemType';
|
|
5
5
|
import { RichTextHoverStateParamsSchema } from './ItemState.schema';
|
|
@@ -58,8 +58,7 @@ export const RichTextItemSchema = ItemBaseSchema.extend({
|
|
|
58
58
|
typeFace: z.string(),
|
|
59
59
|
fontStyle: z.string(),
|
|
60
60
|
fontWeight: z.number(),
|
|
61
|
-
fontVariant: z.string()
|
|
62
|
-
textDecoration: z.nativeEnum(TextDecoration),
|
|
61
|
+
fontVariant: z.string()
|
|
63
62
|
})
|
|
64
63
|
),
|
|
65
64
|
state: z.object({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RichTextBlock, RichTextStyle, TextAlign,
|
|
1
|
+
import { RichTextBlock, RichTextStyle, TextAlign, TextTransform, VerticalAlign } from './RichText';
|
|
2
2
|
import { ArticleItemType } from './ArticleItemType';
|
|
3
3
|
import { ItemArea } from './ItemArea';
|
|
4
4
|
import { ItemState } from './ItemState';
|
|
@@ -113,6 +113,7 @@ interface ImageLayoutParams extends MediaLayoutParams {}
|
|
|
113
113
|
|
|
114
114
|
interface VideoLayoutParams extends MediaLayoutParams {
|
|
115
115
|
autoplay: boolean;
|
|
116
|
+
scrollPlayback: ScrollPlaybackParams | null;
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
interface RichTextLayoutParams {
|
|
@@ -130,7 +131,6 @@ interface RichTextLayoutParams {
|
|
|
130
131
|
typeFace: string;
|
|
131
132
|
fontStyle: string;
|
|
132
133
|
fontWeight: number;
|
|
133
|
-
textDecoration: TextDecoration;
|
|
134
134
|
fontVariant: string;
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -144,6 +144,11 @@ interface RectangleLayoutParams {
|
|
|
144
144
|
blurMode: 'default' | 'backdrop';
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
export interface ScrollPlaybackParams {
|
|
148
|
+
from: number;
|
|
149
|
+
to: number;
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
export interface StickyParams {
|
|
148
153
|
from: number;
|
|
149
154
|
to?: number;
|