@cntrl-site/sdk 1.19.3 → 1.19.5

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/Icon/r ADDED
File without changes
Binary file
@@ -29,11 +29,6 @@ const FXParams = zod_1.z.object({
29
29
  url: zod_1.z.string().min(1),
30
30
  hasGLEffect: zod_1.z.boolean().optional(),
31
31
  fragmentShader: zod_1.z.string().nullable(),
32
- FXCursor: zod_1.z.object({
33
- type: zod_1.z.enum(['mouse', 'manual']),
34
- x: zod_1.z.number(),
35
- y: zod_1.z.number()
36
- }).nullable(),
37
32
  FXControls: zod_1.z.array(exports.FXControlSchema).optional()
38
33
  });
39
34
  const ImageItemSchema = ItemBase_schema_1.ItemBaseSchema.extend({
@@ -16,5 +16,10 @@ exports.SectionSchema = zod_1.z.object({
16
16
  height: zod_1.z.record(exports.SectionHeightSchema),
17
17
  position: zod_1.z.record(zod_1.z.number()),
18
18
  hidden: zod_1.z.record(zod_1.z.boolean()),
19
- color: zod_1.z.record(zod_1.z.nullable(zod_1.z.string()))
19
+ color: zod_1.z.record(zod_1.z.nullable(zod_1.z.string())),
20
+ media: zod_1.z.record((zod_1.z.object({
21
+ url: zod_1.z.string(),
22
+ size: zod_1.z.string(),
23
+ position: zod_1.z.string(),
24
+ }))).optional()
20
25
  });
@@ -95,6 +95,10 @@ const WordSpacingKeyframeSchema = KeyframesBaseSchema.extend({
95
95
  wordSpacing: zod_1.z.number()
96
96
  })
97
97
  });
98
+ const FXParamsKeyframeSchema = KeyframesBaseSchema.extend({
99
+ type: zod_1.z.literal(Keyframe_1.KeyframeType.FXParams),
100
+ value: zod_1.z.record(zod_1.z.string(), zod_1.z.number())
101
+ });
98
102
  exports.KeyframeSchema = zod_1.z.discriminatedUnion('type', [
99
103
  DimensionsKeyframeSchema,
100
104
  PositionKeyframeSchema,
@@ -109,6 +113,7 @@ exports.KeyframeSchema = zod_1.z.discriminatedUnion('type', [
109
113
  BackdropBlurKeyframeSchema,
110
114
  TextColorKeyframeSchema,
111
115
  LetterSpacingKeyframeSchema,
112
- WordSpacingKeyframeSchema
116
+ WordSpacingKeyframeSchema,
117
+ FXParamsKeyframeSchema
113
118
  ]);
114
119
  exports.KeyframesSchema = zod_1.z.array(exports.KeyframeSchema);
@@ -17,4 +17,5 @@ var KeyframeType;
17
17
  KeyframeType["WordSpacing"] = "word-spacing";
18
18
  KeyframeType["Blur"] = "blur";
19
19
  KeyframeType["BackdropBlur"] = "backdrop-blur";
20
+ KeyframeType["FXParams"] = "fx-params";
20
21
  })(KeyframeType || (exports.KeyframeType = KeyframeType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntrl-site/sdk",
3
- "version": "1.19.3",
3
+ "version": "1.19.5",
4
4
  "description": "Generic SDK for use in public websites.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/index.ts",
@@ -46,11 +46,6 @@ const FXParams = z.object({
46
46
  url: z.string().min(1),
47
47
  hasGLEffect: z.boolean().optional(),
48
48
  fragmentShader: z.string().nullable(),
49
- FXCursor: z.object({
50
- type: z.enum(['mouse', 'manual']),
51
- x: z.number(),
52
- y: z.number()
53
- }).nullable(),
54
49
  FXControls: z.array(FXControlSchema).optional()
55
50
  });
56
51
 
@@ -15,5 +15,10 @@ export const SectionSchema = z.object({
15
15
  height: z.record(SectionHeightSchema),
16
16
  position: z.record(z.number()),
17
17
  hidden: z.record(z.boolean()),
18
- color: z.record(z.nullable(z.string()))
18
+ color: z.record(z.nullable(z.string())),
19
+ media: z.record((z.object({
20
+ url: z.string(),
21
+ size: z.string(),
22
+ position: z.string(),
23
+ }))).optional()
19
24
  });
@@ -108,6 +108,11 @@ const WordSpacingKeyframeSchema = KeyframesBaseSchema.extend({
108
108
  })
109
109
  });
110
110
 
111
+ const FXParamsKeyframeSchema = KeyframesBaseSchema.extend({
112
+ type: z.literal(KeyframeType.FXParams),
113
+ value: z.record(z.string(), z.number())
114
+ });
115
+
111
116
  export const KeyframeSchema = z.discriminatedUnion('type', [
112
117
  DimensionsKeyframeSchema,
113
118
  PositionKeyframeSchema,
@@ -122,7 +127,8 @@ export const KeyframeSchema = z.discriminatedUnion('type', [
122
127
  BackdropBlurKeyframeSchema,
123
128
  TextColorKeyframeSchema,
124
129
  LetterSpacingKeyframeSchema,
125
- WordSpacingKeyframeSchema
130
+ WordSpacingKeyframeSchema,
131
+ FXParamsKeyframeSchema
126
132
  ]);
127
133
 
128
134
  export const KeyframesSchema = z.array(KeyframeSchema);
@@ -55,7 +55,6 @@ interface MediaCommonParams extends CommonParamsBase {
55
55
  url: string;
56
56
  hasGLEffect?: boolean;
57
57
  fragmentShader: string | null;
58
- FXCursor: FXCursor | null;
59
58
  FXControls?: FXControlAny[];
60
59
  }
61
60
 
@@ -19,4 +19,9 @@ export interface Section {
19
19
  items: ItemAny[];
20
20
  position: Record<string, number>;
21
21
  color: Record<string, string | null>;
22
+ media?: Record<string, {
23
+ url: string;
24
+ size: string;
25
+ position: string;
26
+ }>;
22
27
  }
@@ -23,7 +23,8 @@ export enum KeyframeType {
23
23
  LetterSpacing = 'letter-spacing',
24
24
  WordSpacing = 'word-spacing',
25
25
  Blur = 'blur',
26
- BackdropBlur = 'backdrop-blur'
26
+ BackdropBlur = 'backdrop-blur',
27
+ FXParams = 'fx-params'
27
28
  }
28
29
 
29
30
  export interface KeyframeValueMap {
@@ -41,6 +42,7 @@ export interface KeyframeValueMap {
41
42
  [KeyframeType.TextColor]: TextColorValue;
42
43
  [KeyframeType.LetterSpacing]: LetterSpacingValue;
43
44
  [KeyframeType.WordSpacing]: WordSpacingValue;
45
+ [KeyframeType.FXParams]: FXParamsValue;
44
46
  }
45
47
 
46
48
  interface DimensionsValue {
@@ -100,3 +102,5 @@ interface LetterSpacingValue {
100
102
  interface WordSpacingValue {
101
103
  wordSpacing: number;
102
104
  }
105
+
106
+ type FXParamsValue = Record<string, number>;