@cntrl-site/sdk 1.12.4-alpha.7 → 1.13.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.
|
@@ -91,7 +91,6 @@ const decodeVideo = (src, emitFrame, { VideoDecoder, EncodedVideoChunk, debug })
|
|
|
91
91
|
let codec;
|
|
92
92
|
const decoder = new VideoDecoder({
|
|
93
93
|
output: (frame) => {
|
|
94
|
-
console.log(frame);
|
|
95
94
|
createImageBitmap(frame, { resizeQuality: 'low' }).then((bitmap) => {
|
|
96
95
|
emitFrame(bitmap);
|
|
97
96
|
frame.close();
|
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ItemStateParamsSchema = exports.CodeEmbedStateParamsSchema = exports.GroupStateParamsSchema = exports.RichTextStateParamsSchema = exports.EmbedStateParamsSchema = exports.CustomItemStateParamsSchema = exports.RectangleStateParamsSchema = exports.MediaStateParamsSchema = exports.ItemStateBaseSchema = exports.getStateParamsSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const TransitionSchema = zod_1.z.object({
|
|
6
|
+
timing: zod_1.z.string(),
|
|
7
|
+
duration: zod_1.z.number(),
|
|
8
|
+
delay: zod_1.z.number()
|
|
9
|
+
});
|
|
5
10
|
const getStateParamsSchema = (schema) => {
|
|
6
11
|
return zod_1.z.object({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
value: schema
|
|
12
|
+
value: schema,
|
|
13
|
+
in: TransitionSchema,
|
|
14
|
+
out: TransitionSchema
|
|
11
15
|
}).optional();
|
|
12
16
|
};
|
|
13
17
|
exports.getStateParamsSchema = getStateParamsSchema;
|
package/package.json
CHANGED
|
@@ -9,12 +9,17 @@ import {
|
|
|
9
9
|
RichTextStateParams
|
|
10
10
|
} from '../../types/article/ItemState';
|
|
11
11
|
|
|
12
|
+
const TransitionSchema = z.object({
|
|
13
|
+
timing: z.string(),
|
|
14
|
+
duration: z.number(),
|
|
15
|
+
delay: z.number()
|
|
16
|
+
});
|
|
17
|
+
|
|
12
18
|
export const getStateParamsSchema = <T extends z.ZodTypeAny>(schema: T) => {
|
|
13
19
|
return z.object({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
value: schema
|
|
20
|
+
value: schema,
|
|
21
|
+
in: TransitionSchema,
|
|
22
|
+
out: TransitionSchema
|
|
18
23
|
}).optional();
|
|
19
24
|
};
|
|
20
25
|
|
|
@@ -3,7 +3,7 @@ import { ArticleItemType } from './ArticleItemType';
|
|
|
3
3
|
type LayoutId = string;
|
|
4
4
|
type StateId = string;
|
|
5
5
|
|
|
6
|
-
export type ItemState<T extends ArticleItemType> = Record<
|
|
6
|
+
export type ItemState<T extends ArticleItemType> = Record<LayoutId, Record<StateId, ItemStatesMap[T]>>;
|
|
7
7
|
|
|
8
8
|
export type ItemStateParams = ItemStatesMap[ArticleItemType];
|
|
9
9
|
|
|
@@ -20,10 +20,17 @@ export interface ItemStatesMap {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface StateParams<T> {
|
|
23
|
-
timing: string;
|
|
24
|
-
duration: number;
|
|
25
|
-
delay: number;
|
|
26
23
|
value: T;
|
|
24
|
+
in: {
|
|
25
|
+
timing: string;
|
|
26
|
+
duration: number;
|
|
27
|
+
delay: number;
|
|
28
|
+
};
|
|
29
|
+
out: {
|
|
30
|
+
timing: string;
|
|
31
|
+
duration: number;
|
|
32
|
+
delay: number;
|
|
33
|
+
};
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
interface ItemStatesBaseMap {
|