@makeswift/prop-controllers 0.0.0-5b910bb-20240510191620
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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/index.cjs +2444 -0
- package/dist/types/backgrounds/backgrounds.d.ts +3965 -0
- package/dist/types/backgrounds/backgrounds.d.ts.map +1 -0
- package/dist/types/backgrounds/backgrounds.test.d.ts +2 -0
- package/dist/types/backgrounds/backgrounds.test.d.ts.map +1 -0
- package/dist/types/backgrounds/index.d.ts +2 -0
- package/dist/types/backgrounds/index.d.ts.map +1 -0
- package/dist/types/border/border.d.ts +2435 -0
- package/dist/types/border/border.d.ts.map +1 -0
- package/dist/types/border/border.test.d.ts +2 -0
- package/dist/types/border/border.test.d.ts.map +1 -0
- package/dist/types/border/index.d.ts +2 -0
- package/dist/types/border/index.d.ts.map +1 -0
- package/dist/types/border-radius/border-radius.d.ts +563 -0
- package/dist/types/border-radius/border-radius.d.ts.map +1 -0
- package/dist/types/border-radius/index.d.ts +2 -0
- package/dist/types/border-radius/index.d.ts.map +1 -0
- package/dist/types/checkbox/checkbox.d.ts +52 -0
- package/dist/types/checkbox/checkbox.d.ts.map +1 -0
- package/dist/types/checkbox/checkbox.test.d.ts +2 -0
- package/dist/types/checkbox/checkbox.test.d.ts.map +1 -0
- package/dist/types/checkbox/index.d.ts +2 -0
- package/dist/types/checkbox/index.d.ts.map +1 -0
- package/dist/types/data.d.ts +138 -0
- package/dist/types/data.d.ts.map +1 -0
- package/dist/types/date/date.d.ts +50 -0
- package/dist/types/date/date.d.ts.map +1 -0
- package/dist/types/date/date.test.d.ts +2 -0
- package/dist/types/date/date.test.d.ts.map +1 -0
- package/dist/types/date/index.d.ts +2 -0
- package/dist/types/date/index.d.ts.map +1 -0
- package/dist/types/element-id/element-id.d.ts +51 -0
- package/dist/types/element-id/element-id.d.ts.map +1 -0
- package/dist/types/element-id/element-id.test.d.ts +2 -0
- package/dist/types/element-id/element-id.test.d.ts.map +1 -0
- package/dist/types/element-id/index.d.ts +2 -0
- package/dist/types/element-id/index.d.ts.map +1 -0
- package/dist/types/font/font.d.ts +112 -0
- package/dist/types/font/font.d.ts.map +1 -0
- package/dist/types/font/font.test.d.ts +2 -0
- package/dist/types/font/font.test.d.ts.map +1 -0
- package/dist/types/font/index.d.ts +2 -0
- package/dist/types/font/index.d.ts.map +1 -0
- package/dist/types/gap-x/gap-x.d.ts +493 -0
- package/dist/types/gap-x/gap-x.d.ts.map +1 -0
- package/dist/types/gap-x/gap-x.test.d.ts +2 -0
- package/dist/types/gap-x/gap-x.test.d.ts.map +1 -0
- package/dist/types/gap-x/index.d.ts +2 -0
- package/dist/types/gap-x/index.d.ts.map +1 -0
- package/dist/types/gap-y/gap-y.d.ts +177 -0
- package/dist/types/gap-y/gap-y.d.ts.map +1 -0
- package/dist/types/gap-y/gap-y.test.d.ts +2 -0
- package/dist/types/gap-y/gap-y.test.d.ts.map +1 -0
- package/dist/types/gap-y/index.d.ts +2 -0
- package/dist/types/gap-y/index.d.ts.map +1 -0
- package/dist/types/grid/grid.d.ts +548 -0
- package/dist/types/grid/grid.d.ts.map +1 -0
- package/dist/types/grid/grid.test.d.ts +2 -0
- package/dist/types/grid/grid.test.d.ts.map +1 -0
- package/dist/types/grid/index.d.ts +2 -0
- package/dist/types/grid/index.d.ts.map +1 -0
- package/dist/types/image/image.d.ts +267 -0
- package/dist/types/image/image.d.ts.map +1 -0
- package/dist/types/image/image.test.d.ts +2 -0
- package/dist/types/image/image.test.d.ts.map +1 -0
- package/dist/types/image/index.d.ts +2 -0
- package/dist/types/image/index.d.ts.map +1 -0
- package/dist/types/images/images.d.ts +5347 -0
- package/dist/types/images/images.d.ts.map +1 -0
- package/dist/types/images/images.test.d.ts +2 -0
- package/dist/types/images/images.test.d.ts.map +1 -0
- package/dist/types/images/index.d.ts +2 -0
- package/dist/types/images/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +60 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/link/index.d.ts +2 -0
- package/dist/types/link/index.d.ts.map +1 -0
- package/dist/types/link/link.d.ts +989 -0
- package/dist/types/link/link.d.ts.map +1 -0
- package/dist/types/link/link.test.d.ts +2 -0
- package/dist/types/link/link.test.d.ts.map +1 -0
- package/dist/types/margin/index.d.ts +2 -0
- package/dist/types/margin/index.d.ts.map +1 -0
- package/dist/types/margin/margin.d.ts +1026 -0
- package/dist/types/margin/margin.d.ts.map +1 -0
- package/dist/types/margin/margin.test.d.ts +2 -0
- package/dist/types/margin/margin.test.d.ts.map +1 -0
- package/dist/types/navigation-links/index.d.ts +2 -0
- package/dist/types/navigation-links/index.d.ts.map +1 -0
- package/dist/types/navigation-links/navigation-links.d.ts +11321 -0
- package/dist/types/navigation-links/navigation-links.d.ts.map +1 -0
- package/dist/types/navigation-links/navigation-links.test.d.ts +2 -0
- package/dist/types/navigation-links/navigation-links.test.d.ts.map +1 -0
- package/dist/types/number.d.ts +56 -0
- package/dist/types/number.d.ts.map +1 -0
- package/dist/types/padding/index.d.ts +2 -0
- package/dist/types/padding/index.d.ts.map +1 -0
- package/dist/types/padding/padding.d.ts +1026 -0
- package/dist/types/padding/padding.d.ts.map +1 -0
- package/dist/types/padding/padding.test.d.ts +2 -0
- package/dist/types/padding/padding.test.d.ts.map +1 -0
- package/dist/types/prop-controllers.d.ts +142 -0
- package/dist/types/prop-controllers.d.ts.map +1 -0
- package/dist/types/responsive-color.d.ts +200 -0
- package/dist/types/responsive-color.d.ts.map +1 -0
- package/dist/types/responsive-length.d.ts +210 -0
- package/dist/types/responsive-length.d.ts.map +1 -0
- package/dist/types/responsive-number/index.d.ts +2 -0
- package/dist/types/responsive-number/index.d.ts.map +1 -0
- package/dist/types/responsive-number/responsive-number.d.ts +225 -0
- package/dist/types/responsive-number/responsive-number.d.ts.map +1 -0
- package/dist/types/responsive-number/responsive-number.test.d.ts +2 -0
- package/dist/types/responsive-number/responsive-number.test.d.ts.map +1 -0
- package/dist/types/responsive-opacity/index.d.ts +2 -0
- package/dist/types/responsive-opacity/index.d.ts.map +1 -0
- package/dist/types/responsive-opacity/responsive-opacity.d.ts +261 -0
- package/dist/types/responsive-opacity/responsive-opacity.d.ts.map +1 -0
- package/dist/types/responsive-opacity/responsive-opacity.test.d.ts +2 -0
- package/dist/types/responsive-opacity/responsive-opacity.test.d.ts.map +1 -0
- package/dist/types/shadows.d.ts +590 -0
- package/dist/types/shadows.d.ts.map +1 -0
- package/dist/types/shadows.test.d.ts +2 -0
- package/dist/types/shadows.test.d.ts.map +1 -0
- package/dist/types/social-links/index.d.ts +2 -0
- package/dist/types/social-links/index.d.ts.map +1 -0
- package/dist/types/social-links/social-links.d.ts +648 -0
- package/dist/types/social-links/social-links.d.ts.map +1 -0
- package/dist/types/social-links/social-links.test.d.ts +2 -0
- package/dist/types/social-links/social-links.test.d.ts.map +1 -0
- package/dist/types/table/index.d.ts +2 -0
- package/dist/types/table/index.d.ts.map +1 -0
- package/dist/types/table/table.d.ts +54 -0
- package/dist/types/table/table.d.ts.map +1 -0
- package/dist/types/table/table.test.d.ts +2 -0
- package/dist/types/table/table.test.d.ts.map +1 -0
- package/dist/types/table-form-fields/index.d.ts +2 -0
- package/dist/types/table-form-fields/index.d.ts.map +1 -0
- package/dist/types/table-form-fields/table-form-fields.d.ts +633 -0
- package/dist/types/table-form-fields/table-form-fields.d.ts.map +1 -0
- package/dist/types/table-form-fields/table-form-fields.test.d.ts +2 -0
- package/dist/types/table-form-fields/table-form-fields.test.d.ts.map +1 -0
- package/dist/types/text-area/index.d.ts +2 -0
- package/dist/types/text-area/index.d.ts.map +1 -0
- package/dist/types/text-area/text-area.d.ts +52 -0
- package/dist/types/text-area/text-area.d.ts.map +1 -0
- package/dist/types/text-area/text-area.test.d.ts +2 -0
- package/dist/types/text-area/text-area.test.d.ts.map +1 -0
- package/dist/types/text-input/index.d.ts +2 -0
- package/dist/types/text-input/index.d.ts.map +1 -0
- package/dist/types/text-input/text-input.d.ts +52 -0
- package/dist/types/text-input/text-input.d.ts.map +1 -0
- package/dist/types/text-input/text-input.test.d.ts +2 -0
- package/dist/types/text-input/text-input.test.d.ts.map +1 -0
- package/dist/types/text-style/index.d.ts +2 -0
- package/dist/types/text-style/index.d.ts.map +1 -0
- package/dist/types/text-style/text-style.d.ts +589 -0
- package/dist/types/text-style/text-style.d.ts.map +1 -0
- package/dist/types/text-style/text-style.test.d.ts +2 -0
- package/dist/types/text-style/text-style.test.d.ts.map +1 -0
- package/dist/types/utils/associated-types.d.ts +5 -0
- package/dist/types/utils/associated-types.d.ts.map +1 -0
- package/dist/types/utils/utils.d.ts +14 -0
- package/dist/types/utils/utils.d.ts.map +1 -0
- package/dist/types/versioned.d.ts +337 -0
- package/dist/types/versioned.d.ts.map +1 -0
- package/dist/types/video/index.d.ts +2 -0
- package/dist/types/video/index.d.ts.map +1 -0
- package/dist/types/video/video.d.ts +166 -0
- package/dist/types/video/video.d.ts.map +1 -0
- package/dist/types/video/video.test.d.ts +2 -0
- package/dist/types/video/video.test.d.ts.map +1 -0
- package/dist/types/width/index.d.ts +2 -0
- package/dist/types/width/index.d.ts.map +1 -0
- package/dist/types/width/width.d.ts +185 -0
- package/dist/types/width/width.d.ts.map +1 -0
- package/dist/types/width/width.test.d.ts +2 -0
- package/dist/types/width/width.test.d.ts.map +1 -0
- package/package.json +28 -0
@@ -0,0 +1,337 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { type Options, ControlDataTypeKey } from './prop-controllers';
|
3
|
+
export type VersionDiscriminator<Version extends number = number, Key extends string = string> = {
|
4
|
+
version: Version;
|
5
|
+
dataKey: Key;
|
6
|
+
};
|
7
|
+
export type VersionedDescriptor<Discriminator = VersionDiscriminator, Type = string, Opts = Options<any>> = {
|
8
|
+
type: Type;
|
9
|
+
options: Opts;
|
10
|
+
} & (Discriminator | {
|
11
|
+
type: Type;
|
12
|
+
options: Opts;
|
13
|
+
});
|
14
|
+
type VersionedPropData<Value, Key extends string = string> = Value | {
|
15
|
+
[ControlDataTypeKey]: Key;
|
16
|
+
value: Value;
|
17
|
+
};
|
18
|
+
export declare abstract class PropDef<Type = string, Value = any, PropData extends VersionedPropData<Value> = VersionedPropData<Value>, Descriptor extends VersionedDescriptor = VersionedDescriptor> extends Function {
|
19
|
+
readonly __associated_types__?: () => {
|
20
|
+
Type: Type;
|
21
|
+
Value: Value;
|
22
|
+
PropData: PropData;
|
23
|
+
Descriptor: Descriptor;
|
24
|
+
Discriminator: VersionDiscriminator | {};
|
25
|
+
};
|
26
|
+
readonly _callable: any;
|
27
|
+
constructor();
|
28
|
+
abstract get type(): Type;
|
29
|
+
abstract get schema(): z.ZodSchema;
|
30
|
+
abstract fromPropData(propData: PropData): Value;
|
31
|
+
abstract toPropData(data: Value, descriptor: VersionDiscriminator | {}): PropData;
|
32
|
+
}
|
33
|
+
type FillPresetType<RawOptions, Preset> = RawOptions extends {
|
34
|
+
preset?: unknown;
|
35
|
+
} ? RawOptions & {
|
36
|
+
preset?: Preset;
|
37
|
+
} : RawOptions;
|
38
|
+
type IfNullable<Opts extends Options<any>, R> = Opts extends Options<infer T> ? {} extends NonNullable<T> ? R : 'non-empty options are required' : never;
|
39
|
+
export declare const versionedPropDef: <RawOptions>() => <Type extends "Backgrounds" | "Border" | "BorderRadius" | "Checkbox" | "Date" | "ElementID" | "Font" | "GapX" | "GapY" | "Grid" | "Image" | "Images" | "Link" | "Margin" | "NavigationLinks" | "Padding" | "Number" | "Shadows" | "ResponsiveColor" | "ResponsiveLength" | "ResponsiveNumber" | "ResponsiveOpacity" | "SocialLinks" | "TextArea" | "TextInput" | "Table" | "TableFormFields" | "TextStyle" | "Width" | "Video", ValueSchema extends z.ZodTypeAny, Version extends number, Key extends string>(type: Type, valueSchema: ValueSchema, discriminator: VersionDiscriminator<Version, Key>) => {
|
40
|
+
(options: Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
41
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
42
|
+
value: ValueSchema;
|
43
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
44
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
45
|
+
value: ValueSchema;
|
46
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
47
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
48
|
+
value: ValueSchema;
|
49
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
50
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
51
|
+
value: ValueSchema;
|
52
|
+
}>]: z.baseObjectInputType<{
|
53
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
54
|
+
value: ValueSchema;
|
55
|
+
}>[k_2]; }>)["_output"]>>): VersionedDescriptor<VersionDiscriminator<Version, Key>, Type, Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
56
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
57
|
+
value: ValueSchema;
|
58
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
59
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
60
|
+
value: ValueSchema;
|
61
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
62
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
63
|
+
value: ValueSchema;
|
64
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
65
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
66
|
+
value: ValueSchema;
|
67
|
+
}>]: z.baseObjectInputType<{
|
68
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
69
|
+
value: ValueSchema;
|
70
|
+
}>[k_2]; }>)["_output"]>>> & {
|
71
|
+
__associated_types__?: (() => {
|
72
|
+
Options: Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
73
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
74
|
+
value: ValueSchema;
|
75
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
76
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
77
|
+
value: ValueSchema;
|
78
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
79
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
80
|
+
value: ValueSchema;
|
81
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
82
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
83
|
+
value: ValueSchema;
|
84
|
+
}>]: z.baseObjectInputType<{
|
85
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
86
|
+
value: ValueSchema;
|
87
|
+
}>[k_2]; }>)["_output"]>>;
|
88
|
+
Value: z.TypeOf<ValueSchema>;
|
89
|
+
}) | undefined;
|
90
|
+
};
|
91
|
+
(): IfNullable<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
92
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
93
|
+
value: ValueSchema;
|
94
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
95
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
96
|
+
value: ValueSchema;
|
97
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
98
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
99
|
+
value: ValueSchema;
|
100
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
101
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
102
|
+
value: ValueSchema;
|
103
|
+
}>]: z.baseObjectInputType<{
|
104
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
105
|
+
value: ValueSchema;
|
106
|
+
}>[k_2]; }>)["_output"]>, VersionedDescriptor<VersionDiscriminator<Version, Key>, Type, Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
107
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
108
|
+
value: ValueSchema;
|
109
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
110
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
111
|
+
value: ValueSchema;
|
112
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
113
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
114
|
+
value: ValueSchema;
|
115
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
116
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
117
|
+
value: ValueSchema;
|
118
|
+
}>]: z.baseObjectInputType<{
|
119
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
120
|
+
value: ValueSchema;
|
121
|
+
}>[k_2]; }>)["_output"]>>> & {
|
122
|
+
__associated_types__?: (() => {
|
123
|
+
Options: Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
124
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
125
|
+
value: ValueSchema;
|
126
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
127
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
128
|
+
value: ValueSchema;
|
129
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
130
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
131
|
+
value: ValueSchema;
|
132
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
133
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
134
|
+
value: ValueSchema;
|
135
|
+
}>]: z.baseObjectInputType<{
|
136
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
137
|
+
value: ValueSchema;
|
138
|
+
}>[k_2]; }>)["_output"]>>;
|
139
|
+
Value: z.TypeOf<ValueSchema>;
|
140
|
+
}) | undefined;
|
141
|
+
}> | IfNullable<(props: Record<string, unknown>, deviceMode: string) => FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
142
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
143
|
+
value: ValueSchema;
|
144
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
145
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
146
|
+
value: ValueSchema;
|
147
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
148
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
149
|
+
value: ValueSchema;
|
150
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
151
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
152
|
+
value: ValueSchema;
|
153
|
+
}>]: z.baseObjectInputType<{
|
154
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
155
|
+
value: ValueSchema;
|
156
|
+
}>[k_2]; }>)["_output"]>, VersionedDescriptor<VersionDiscriminator<Version, Key>, Type, Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
157
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
158
|
+
value: ValueSchema;
|
159
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
160
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
161
|
+
value: ValueSchema;
|
162
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
163
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
164
|
+
value: ValueSchema;
|
165
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
166
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
167
|
+
value: ValueSchema;
|
168
|
+
}>]: z.baseObjectInputType<{
|
169
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
170
|
+
value: ValueSchema;
|
171
|
+
}>[k_2]; }>)["_output"]>>> & {
|
172
|
+
__associated_types__?: (() => {
|
173
|
+
Options: Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
174
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
175
|
+
value: ValueSchema;
|
176
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
177
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
178
|
+
value: ValueSchema;
|
179
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
180
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
181
|
+
value: ValueSchema;
|
182
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
183
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
184
|
+
value: ValueSchema;
|
185
|
+
}>]: z.baseObjectInputType<{
|
186
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
187
|
+
value: ValueSchema;
|
188
|
+
}>[k_2]; }>)["_output"]>>;
|
189
|
+
Value: z.TypeOf<ValueSchema>;
|
190
|
+
}) | undefined;
|
191
|
+
}>;
|
192
|
+
__associated_types__?: (() => {
|
193
|
+
Type: Type;
|
194
|
+
Value: z.TypeOf<ValueSchema>;
|
195
|
+
PropData: (ValueSchema | z.ZodObject<{
|
196
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
197
|
+
value: ValueSchema;
|
198
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
199
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
200
|
+
value: ValueSchema;
|
201
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
202
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
203
|
+
value: ValueSchema;
|
204
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
205
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
206
|
+
value: ValueSchema;
|
207
|
+
}>]: z.baseObjectInputType<{
|
208
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
209
|
+
value: ValueSchema;
|
210
|
+
}>[k_2]; }>)["_output"];
|
211
|
+
Descriptor: VersionedDescriptor<VersionDiscriminator<Version, Key>, Type, Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
212
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
213
|
+
value: ValueSchema;
|
214
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
215
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
216
|
+
value: ValueSchema;
|
217
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
218
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
219
|
+
value: ValueSchema;
|
220
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
221
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
222
|
+
value: ValueSchema;
|
223
|
+
}>]: z.baseObjectInputType<{
|
224
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
225
|
+
value: ValueSchema;
|
226
|
+
}>[k_2]; }>)["_output"]>>> & {
|
227
|
+
__associated_types__?: (() => {
|
228
|
+
Options: Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
229
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
230
|
+
value: ValueSchema;
|
231
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
232
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
233
|
+
value: ValueSchema;
|
234
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
235
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
236
|
+
value: ValueSchema;
|
237
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
238
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
239
|
+
value: ValueSchema;
|
240
|
+
}>]: z.baseObjectInputType<{
|
241
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
242
|
+
value: ValueSchema;
|
243
|
+
}>[k_2]; }>)["_output"]>>;
|
244
|
+
Value: z.TypeOf<ValueSchema>;
|
245
|
+
}) | undefined;
|
246
|
+
};
|
247
|
+
Discriminator: {} | VersionDiscriminator<Version, Key>;
|
248
|
+
}) | undefined;
|
249
|
+
readonly schemaV0: ValueSchema;
|
250
|
+
readonly schemaV1: z.ZodObject<{
|
251
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
252
|
+
value: ValueSchema;
|
253
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
254
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
255
|
+
value: ValueSchema;
|
256
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
257
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
258
|
+
value: ValueSchema;
|
259
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
260
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
261
|
+
value: ValueSchema;
|
262
|
+
}>]: z.baseObjectInputType<{
|
263
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
264
|
+
value: ValueSchema;
|
265
|
+
}>[k_2]; }>;
|
266
|
+
readonly schema: z.ZodUnion<[ValueSchema, z.ZodObject<{
|
267
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
268
|
+
value: ValueSchema;
|
269
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
270
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
271
|
+
value: ValueSchema;
|
272
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
273
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
274
|
+
value: ValueSchema;
|
275
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
276
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
277
|
+
value: ValueSchema;
|
278
|
+
}>]: z.baseObjectInputType<{
|
279
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
280
|
+
value: ValueSchema;
|
281
|
+
}>[k_2]; }>]>;
|
282
|
+
readonly type: Type;
|
283
|
+
readonly discriminator: VersionDiscriminator<Version, Key>;
|
284
|
+
__call__(options?: Options<FillPresetType<RawOptions, (ValueSchema | z.ZodObject<{
|
285
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
286
|
+
value: ValueSchema;
|
287
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
288
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
289
|
+
value: ValueSchema;
|
290
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
291
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
292
|
+
value: ValueSchema;
|
293
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
294
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
295
|
+
value: ValueSchema;
|
296
|
+
}>]: z.baseObjectInputType<{
|
297
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
298
|
+
value: ValueSchema;
|
299
|
+
}>[k_2]; }>)["_output"]>> | undefined): {
|
300
|
+
type: Type;
|
301
|
+
version: Version;
|
302
|
+
options: any;
|
303
|
+
};
|
304
|
+
fromPropData(propData: (ValueSchema | z.ZodObject<{
|
305
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
306
|
+
value: ValueSchema;
|
307
|
+
}, "strip", z.ZodTypeAny, { [k_1 in keyof z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
308
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
309
|
+
value: ValueSchema;
|
310
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>]: z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
311
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
312
|
+
value: ValueSchema;
|
313
|
+
}>, (undefined extends Key ? never : "@@makeswift/type") | (undefined extends ValueSchema["_output"] ? never : "value")>[k_1]; }, { [k_2 in keyof z.baseObjectInputType<{
|
314
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
315
|
+
value: ValueSchema;
|
316
|
+
}>]: z.baseObjectInputType<{
|
317
|
+
"@@makeswift/type": z.ZodLiteral<Key>;
|
318
|
+
value: ValueSchema;
|
319
|
+
}>[k_2]; }>)["_output"]): z.TypeOf<ValueSchema>;
|
320
|
+
toPropData(data: z.TypeOf<ValueSchema>, descriptor: {} | VersionDiscriminator<Version, Key>): import("ts-pattern/dist/types/helpers").Union<{
|
321
|
+
readonly "@@makeswift/type": Key;
|
322
|
+
readonly value: z.TypeOf<ValueSchema>;
|
323
|
+
}, z.TypeOf<ValueSchema>>;
|
324
|
+
readonly _callable: any;
|
325
|
+
apply(this: Function, thisArg: any, argArray?: any): any;
|
326
|
+
call(this: Function, thisArg: any, ...argArray: any[]): any;
|
327
|
+
bind(this: Function, thisArg: any, ...argArray: any[]): any;
|
328
|
+
toString(): string;
|
329
|
+
prototype: any;
|
330
|
+
readonly length: number;
|
331
|
+
arguments: any;
|
332
|
+
caller: Function;
|
333
|
+
readonly name: string;
|
334
|
+
[Symbol.hasInstance](value: any): boolean;
|
335
|
+
};
|
336
|
+
export {};
|
337
|
+
//# sourceMappingURL=versioned.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"versioned.d.ts","sourceRoot":"","sources":["../../src/versioned.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,KAAK,OAAO,EAAE,kBAAkB,EAAS,MAAM,oBAAoB,CAAA;AAE5E,MAAM,MAAM,oBAAoB,CAC9B,OAAO,SAAS,MAAM,GAAG,MAAM,EAC/B,GAAG,SAAS,MAAM,GAAG,MAAM,IACzB;IACF,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,GAAG,CAAA;CACb,CAAA;AAED,MAAM,MAAM,mBAAmB,CAC7B,aAAa,GAAG,oBAAoB,EACpC,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IACjB;IACF,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,IAAI,CAAA;CACd,GAAG,CACA,aAAa,GACb;IACE,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,IAAI,CAAA;CACd,CACJ,CAAA;AAED,KAAK,iBAAiB,CAAC,KAAK,EAAE,GAAG,SAAS,MAAM,GAAG,MAAM,IACrD,KAAK,GACL;IACE,CAAC,kBAAkB,CAAC,EAAE,GAAG,CAAA;IACzB,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAEL,8BAAsB,OAAO,CAC3B,IAAI,GAAG,MAAM,EACb,KAAK,GAAG,GAAG,EACX,QAAQ,SAAS,iBAAiB,CAAC,KAAK,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,EACpE,UAAU,SAAS,mBAAmB,GAAG,mBAAmB,CAC5D,SAAQ,QAAQ;IAChB,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM;QACpC,IAAI,EAAE,IAAI,CAAA;QACV,KAAK,EAAE,KAAK,CAAA;QACZ,QAAQ,EAAE,QAAQ,CAAA;QAClB,UAAU,EAAE,UAAU,CAAA;QACtB,aAAa,EAAE,oBAAoB,GAAG,EAAE,CAAA;KACzC,CAAA;IAED,QAAQ,CAAC,SAAS,MAAA;;IAQlB,QAAQ,KAAK,IAAI,IAAI,IAAI,CAAA;IACzB,QAAQ,KAAK,MAAM,IAAI,CAAC,CAAC,SAAS,CAAA;IAElC,QAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,KAAK;IAChD,QAAQ,CAAC,UAAU,CACjB,IAAI,EAAE,KAAK,EACX,UAAU,EAAE,oBAAoB,GAAG,EAAE,GACpC,QAAQ;CACZ;AAED,KAAK,cAAc,CAAC,UAAU,EAAE,MAAM,IAAI,UAAU,SAAS;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GACG,UAAU,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,UAAU,CAAA;AAEd,KAAK,UAAU,CAAC,IAAI,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAC1C,IAAI,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GACzB,EAAE,SAAS,WAAW,CAAC,CAAC,CAAC,GACvB,CAAC,GACD,gCAAgC,GAClC,KAAK,CAAA;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuF1B,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/video/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|
@@ -0,0 +1,166 @@
|
|
1
|
+
import { z } from 'zod';
|
2
|
+
import { Options, Types } from '../prop-controllers';
|
3
|
+
declare const videoDataSchema: z.ZodObject<{
|
4
|
+
url: z.ZodOptional<z.ZodString>;
|
5
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
6
|
+
playing: z.ZodOptional<z.ZodBoolean>;
|
7
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
8
|
+
controls: z.ZodOptional<z.ZodBoolean>;
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
10
|
+
url?: string | undefined;
|
11
|
+
muted?: boolean | undefined;
|
12
|
+
playing?: boolean | undefined;
|
13
|
+
loop?: boolean | undefined;
|
14
|
+
controls?: boolean | undefined;
|
15
|
+
}, {
|
16
|
+
url?: string | undefined;
|
17
|
+
muted?: boolean | undefined;
|
18
|
+
playing?: boolean | undefined;
|
19
|
+
loop?: boolean | undefined;
|
20
|
+
controls?: boolean | undefined;
|
21
|
+
}>;
|
22
|
+
export type VideoData = z.infer<typeof videoDataSchema>;
|
23
|
+
declare const videoPropControllerDataV0Schema: z.ZodObject<{
|
24
|
+
url: z.ZodOptional<z.ZodString>;
|
25
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
26
|
+
playing: z.ZodOptional<z.ZodBoolean>;
|
27
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
28
|
+
controls: z.ZodOptional<z.ZodBoolean>;
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
30
|
+
url?: string | undefined;
|
31
|
+
muted?: boolean | undefined;
|
32
|
+
playing?: boolean | undefined;
|
33
|
+
loop?: boolean | undefined;
|
34
|
+
controls?: boolean | undefined;
|
35
|
+
}, {
|
36
|
+
url?: string | undefined;
|
37
|
+
muted?: boolean | undefined;
|
38
|
+
playing?: boolean | undefined;
|
39
|
+
loop?: boolean | undefined;
|
40
|
+
controls?: boolean | undefined;
|
41
|
+
}>;
|
42
|
+
export type VideoPropControllerDataV0 = z.infer<typeof videoPropControllerDataV0Schema>;
|
43
|
+
export declare const VideoPropControllerDataV1Type = "prop-controllers::video::v1";
|
44
|
+
declare const videoPropControllerDataV1Schema: z.ZodObject<{
|
45
|
+
"@@makeswift/type": z.ZodLiteral<"prop-controllers::video::v1">;
|
46
|
+
value: z.ZodObject<{
|
47
|
+
url: z.ZodOptional<z.ZodString>;
|
48
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
49
|
+
playing: z.ZodOptional<z.ZodBoolean>;
|
50
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
51
|
+
controls: z.ZodOptional<z.ZodBoolean>;
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
53
|
+
url?: string | undefined;
|
54
|
+
muted?: boolean | undefined;
|
55
|
+
playing?: boolean | undefined;
|
56
|
+
loop?: boolean | undefined;
|
57
|
+
controls?: boolean | undefined;
|
58
|
+
}, {
|
59
|
+
url?: string | undefined;
|
60
|
+
muted?: boolean | undefined;
|
61
|
+
playing?: boolean | undefined;
|
62
|
+
loop?: boolean | undefined;
|
63
|
+
controls?: boolean | undefined;
|
64
|
+
}>;
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
66
|
+
"@@makeswift/type": "prop-controllers::video::v1";
|
67
|
+
value: {
|
68
|
+
url?: string | undefined;
|
69
|
+
muted?: boolean | undefined;
|
70
|
+
playing?: boolean | undefined;
|
71
|
+
loop?: boolean | undefined;
|
72
|
+
controls?: boolean | undefined;
|
73
|
+
};
|
74
|
+
}, {
|
75
|
+
"@@makeswift/type": "prop-controllers::video::v1";
|
76
|
+
value: {
|
77
|
+
url?: string | undefined;
|
78
|
+
muted?: boolean | undefined;
|
79
|
+
playing?: boolean | undefined;
|
80
|
+
loop?: boolean | undefined;
|
81
|
+
controls?: boolean | undefined;
|
82
|
+
};
|
83
|
+
}>;
|
84
|
+
export type VideoPropControllerDataV1 = z.infer<typeof videoPropControllerDataV1Schema>;
|
85
|
+
export declare const videoPropControllerDataSchema: z.ZodUnion<[z.ZodObject<{
|
86
|
+
"@@makeswift/type": z.ZodLiteral<"prop-controllers::video::v1">;
|
87
|
+
value: z.ZodObject<{
|
88
|
+
url: z.ZodOptional<z.ZodString>;
|
89
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
90
|
+
playing: z.ZodOptional<z.ZodBoolean>;
|
91
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
92
|
+
controls: z.ZodOptional<z.ZodBoolean>;
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
94
|
+
url?: string | undefined;
|
95
|
+
muted?: boolean | undefined;
|
96
|
+
playing?: boolean | undefined;
|
97
|
+
loop?: boolean | undefined;
|
98
|
+
controls?: boolean | undefined;
|
99
|
+
}, {
|
100
|
+
url?: string | undefined;
|
101
|
+
muted?: boolean | undefined;
|
102
|
+
playing?: boolean | undefined;
|
103
|
+
loop?: boolean | undefined;
|
104
|
+
controls?: boolean | undefined;
|
105
|
+
}>;
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
107
|
+
"@@makeswift/type": "prop-controllers::video::v1";
|
108
|
+
value: {
|
109
|
+
url?: string | undefined;
|
110
|
+
muted?: boolean | undefined;
|
111
|
+
playing?: boolean | undefined;
|
112
|
+
loop?: boolean | undefined;
|
113
|
+
controls?: boolean | undefined;
|
114
|
+
};
|
115
|
+
}, {
|
116
|
+
"@@makeswift/type": "prop-controllers::video::v1";
|
117
|
+
value: {
|
118
|
+
url?: string | undefined;
|
119
|
+
muted?: boolean | undefined;
|
120
|
+
playing?: boolean | undefined;
|
121
|
+
loop?: boolean | undefined;
|
122
|
+
controls?: boolean | undefined;
|
123
|
+
};
|
124
|
+
}>, z.ZodObject<{
|
125
|
+
url: z.ZodOptional<z.ZodString>;
|
126
|
+
muted: z.ZodOptional<z.ZodBoolean>;
|
127
|
+
playing: z.ZodOptional<z.ZodBoolean>;
|
128
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
129
|
+
controls: z.ZodOptional<z.ZodBoolean>;
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
131
|
+
url?: string | undefined;
|
132
|
+
muted?: boolean | undefined;
|
133
|
+
playing?: boolean | undefined;
|
134
|
+
loop?: boolean | undefined;
|
135
|
+
controls?: boolean | undefined;
|
136
|
+
}, {
|
137
|
+
url?: string | undefined;
|
138
|
+
muted?: boolean | undefined;
|
139
|
+
playing?: boolean | undefined;
|
140
|
+
loop?: boolean | undefined;
|
141
|
+
controls?: boolean | undefined;
|
142
|
+
}>]>;
|
143
|
+
export type VideoPropControllerData = z.infer<typeof videoPropControllerDataSchema>;
|
144
|
+
export type VideoOptions = Options<{
|
145
|
+
preset?: VideoPropControllerData;
|
146
|
+
}>;
|
147
|
+
type VideoDescriptorV0<_T = VideoPropControllerDataV0> = {
|
148
|
+
type: typeof Types.Video;
|
149
|
+
options: VideoOptions;
|
150
|
+
};
|
151
|
+
type VideoDescriptorV1<_T = VideoPropControllerData, U extends VideoOptions = VideoOptions> = {
|
152
|
+
type: typeof Types.Video;
|
153
|
+
version: 1;
|
154
|
+
options: U;
|
155
|
+
};
|
156
|
+
export type VideoDescriptor<_T = VideoPropControllerData> = VideoDescriptorV0 | VideoDescriptorV1;
|
157
|
+
export type ResolveVideoPropControllerValue<T extends VideoDescriptor> = T extends VideoDescriptor ? VideoData | undefined : never;
|
158
|
+
/**
|
159
|
+
* @deprecated Imports from @makeswift/prop-controllers are deprecated. Use
|
160
|
+
* @makeswift/runtime/controls instead.
|
161
|
+
*/
|
162
|
+
export declare function Video(options?: VideoOptions): VideoDescriptorV1;
|
163
|
+
export declare function getVideoPropControllerDataVideoData(data: VideoPropControllerData | undefined): VideoData | undefined;
|
164
|
+
export declare function createVideoPropControllerDataFromVideoData(value: VideoData, definition?: VideoDescriptor): VideoPropControllerData;
|
165
|
+
export {};
|
166
|
+
//# sourceMappingURL=video.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../src/video/video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAsB,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAGxE,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;EAMnB,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAEvD,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;EAAkB,CAAA;AAEvD,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA;AAED,eAAO,MAAM,6BAA6B,gCAAgC,CAAA;AAE1E,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAA;AAEF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAA;AAED,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;IACjC,MAAM,CAAC,EAAE,uBAAuB,CAAA;CACjC,CAAC,CAAA;AAEF,KAAK,iBAAiB,CAAC,EAAE,GAAG,yBAAyB,IAAI;IACvD,IAAI,EAAE,OAAO,KAAK,CAAC,KAAK,CAAA;IACxB,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED,KAAK,iBAAiB,CACpB,EAAE,GAAG,uBAAuB,EAC5B,CAAC,SAAS,YAAY,GAAG,YAAY,IACnC;IACF,IAAI,EAAE,OAAO,KAAK,CAAC,KAAK,CAAA;IACxB,OAAO,EAAE,CAAC,CAAA;IACV,OAAO,EAAE,CAAC,CAAA;CACX,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,EAAE,GAAG,uBAAuB,IACpD,iBAAiB,GACjB,iBAAiB,CAAA;AAErB,MAAM,MAAM,+BAA+B,CAAC,CAAC,SAAS,eAAe,IACnE,CAAC,SAAS,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,CAAA;AAE3D;;;GAGG;AACH,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,iBAAiB,CAEnE;AAED,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,uBAAuB,GAAG,SAAS,GACxC,SAAS,GAAG,SAAS,CAOvB;AAED,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,eAAe,GAC3B,uBAAuB,CAYzB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"video.test.d.ts","sourceRoot":"","sources":["../../../src/video/video.test.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/width/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|