@clockworkdog/cogs-client 3.0.0-alpha.2 → 3.0.0-alpha.4

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.
@@ -7,6 +7,7 @@ declare const TemporalProperties: z.ZodObject<{
7
7
  export type VisualProperties = z.infer<typeof VisualProperties>;
8
8
  declare const VisualProperties: z.ZodObject<{
9
9
  opacity: z.ZodNumber;
10
+ zIndex: z.ZodNumber;
10
11
  }, z.core.$strip>;
11
12
  export type AudialProperties = z.infer<typeof AudialProperties>;
12
13
  declare const AudialProperties: z.ZodObject<{
@@ -40,6 +41,7 @@ export type InitialImageKeyframe = z.infer<typeof InitialImageKeyframe>;
40
41
  declare const InitialImageKeyframe: z.ZodTuple<[z.ZodNumber, z.ZodObject<{
41
42
  set: z.ZodOptional<z.ZodObject<{
42
43
  opacity: z.ZodOptional<z.ZodNumber>;
44
+ zIndex: z.ZodOptional<z.ZodNumber>;
43
45
  }, z.core.$strip>>;
44
46
  }, z.core.$strip>], null>;
45
47
  /**
@@ -49,9 +51,11 @@ export type ImageKeyframe = z.infer<typeof ImageKeyframe>;
49
51
  declare const ImageKeyframe: z.ZodTuple<[z.ZodNumber, z.ZodObject<{
50
52
  set: z.ZodOptional<z.ZodObject<{
51
53
  opacity: z.ZodOptional<z.ZodNumber>;
54
+ zIndex: z.ZodOptional<z.ZodNumber>;
52
55
  }, z.core.$strip>>;
53
56
  lerp: z.ZodOptional<z.ZodObject<{
54
57
  opacity: z.ZodOptional<z.ZodNumber>;
58
+ zIndex: z.ZodOptional<z.ZodNumber>;
55
59
  }, z.core.$strip>>;
56
60
  }, z.core.$strip>], null>;
57
61
  /**
@@ -86,6 +90,7 @@ export type InitialVideoKeyframe = z.infer<typeof InitialVideoKeyframe>;
86
90
  declare const InitialVideoKeyframe: z.ZodTuple<[z.ZodNumber, z.ZodObject<{
87
91
  set: z.ZodOptional<z.ZodObject<{
88
92
  opacity: z.ZodOptional<z.ZodNumber>;
93
+ zIndex: z.ZodOptional<z.ZodNumber>;
89
94
  volume: z.ZodOptional<z.ZodNumber>;
90
95
  t: z.ZodOptional<z.ZodNumber>;
91
96
  rate: z.ZodOptional<z.ZodNumber>;
@@ -98,12 +103,14 @@ export type VideoKeyframe = z.infer<typeof VideoKeyframe>;
98
103
  declare const VideoKeyframe: z.ZodTuple<[z.ZodNumber, z.ZodObject<{
99
104
  set: z.ZodOptional<z.ZodObject<{
100
105
  opacity: z.ZodOptional<z.ZodNumber>;
106
+ zIndex: z.ZodOptional<z.ZodNumber>;
101
107
  volume: z.ZodOptional<z.ZodNumber>;
102
108
  t: z.ZodOptional<z.ZodNumber>;
103
109
  rate: z.ZodOptional<z.ZodNumber>;
104
110
  }, z.core.$strip>>;
105
111
  lerp: z.ZodOptional<z.ZodObject<{
106
112
  opacity: z.ZodOptional<z.ZodNumber>;
113
+ zIndex: z.ZodOptional<z.ZodNumber>;
107
114
  volume: z.ZodOptional<z.ZodNumber>;
108
115
  }, z.core.$strip>>;
109
116
  }, z.core.$strip>], null>;
@@ -111,13 +118,16 @@ export declare const MediaSurfaceStateSchema: z.ZodRecord<z.ZodString, z.ZodUnio
111
118
  keyframes: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodObject<{
112
119
  set: z.ZodOptional<z.ZodObject<{
113
120
  opacity: z.ZodOptional<z.ZodNumber>;
121
+ zIndex: z.ZodOptional<z.ZodNumber>;
114
122
  }, z.core.$strip>>;
115
123
  lerp: z.ZodOptional<z.ZodObject<{
116
124
  opacity: z.ZodOptional<z.ZodNumber>;
125
+ zIndex: z.ZodOptional<z.ZodNumber>;
117
126
  }, z.core.$strip>>;
118
127
  }, z.core.$strip>], null>], z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodObject<{
119
128
  set: z.ZodOptional<z.ZodObject<{
120
129
  opacity: z.ZodOptional<z.ZodNumber>;
130
+ zIndex: z.ZodOptional<z.ZodNumber>;
121
131
  }, z.core.$strip>>;
122
132
  }, z.core.$strip>], null>, z.ZodTuple<[z.ZodNumber, z.ZodNull], null>]>>;
123
133
  type: z.ZodLiteral<"image">;
@@ -147,17 +157,20 @@ export declare const MediaSurfaceStateSchema: z.ZodRecord<z.ZodString, z.ZodUnio
147
157
  keyframes: z.ZodTuple<[z.ZodTuple<[z.ZodNumber, z.ZodObject<{
148
158
  set: z.ZodOptional<z.ZodObject<{
149
159
  opacity: z.ZodOptional<z.ZodNumber>;
160
+ zIndex: z.ZodOptional<z.ZodNumber>;
150
161
  volume: z.ZodOptional<z.ZodNumber>;
151
162
  t: z.ZodOptional<z.ZodNumber>;
152
163
  rate: z.ZodOptional<z.ZodNumber>;
153
164
  }, z.core.$strip>>;
154
165
  lerp: z.ZodOptional<z.ZodObject<{
155
166
  opacity: z.ZodOptional<z.ZodNumber>;
167
+ zIndex: z.ZodOptional<z.ZodNumber>;
156
168
  volume: z.ZodOptional<z.ZodNumber>;
157
169
  }, z.core.$strip>>;
158
170
  }, z.core.$strip>], null>], z.ZodUnion<readonly [z.ZodTuple<[z.ZodNumber, z.ZodObject<{
159
171
  set: z.ZodOptional<z.ZodObject<{
160
172
  opacity: z.ZodOptional<z.ZodNumber>;
173
+ zIndex: z.ZodOptional<z.ZodNumber>;
161
174
  volume: z.ZodOptional<z.ZodNumber>;
162
175
  t: z.ZodOptional<z.ZodNumber>;
163
176
  rate: z.ZodOptional<z.ZodNumber>;
@@ -5,6 +5,7 @@ const TemporalProperties = z.object({
5
5
  });
6
6
  const VisualProperties = z.object({
7
7
  opacity: z.number().gte(0).lte(1),
8
+ zIndex: z.number(),
8
9
  });
9
10
  const AudialProperties = z.object({
10
11
  volume: z.number().gte(0).lte(1),
@@ -139,6 +140,7 @@ true;
139
140
  true;
140
141
  export const defaultImageOptions = {
141
142
  opacity: 1,
143
+ zIndex: 0,
142
144
  };
143
145
  export const defaultAudioOptions = {
144
146
  t: 0,
@@ -150,4 +152,5 @@ export const defaultVideoOptions = {
150
152
  rate: 1,
151
153
  volume: 1,
152
154
  opacity: 1,
155
+ zIndex: 0,
153
156
  };
@@ -0,0 +1,26 @@
1
+ import { MediaObjectFit } from '..';
2
+ export declare enum ActiveVideoClipState {
3
+ Paused = "paused",
4
+ Playing = "playing"
5
+ }
6
+ export interface VideoClip {
7
+ config: {
8
+ preload: 'auto' | 'metadata' | 'none';
9
+ ephemeral: boolean;
10
+ fit: MediaObjectFit;
11
+ };
12
+ }
13
+ export interface ActiveClip {
14
+ path: string;
15
+ state: ActiveVideoClipState;
16
+ loop: boolean;
17
+ volume: number;
18
+ }
19
+ export interface VideoState {
20
+ isPlaying: boolean;
21
+ globalVolume: number;
22
+ clips: {
23
+ [path: string]: VideoClip;
24
+ };
25
+ activeClip?: ActiveClip;
26
+ }
@@ -0,0 +1,5 @@
1
+ export var ActiveVideoClipState;
2
+ (function (ActiveVideoClipState) {
3
+ ActiveVideoClipState["Paused"] = "paused";
4
+ ActiveVideoClipState["Playing"] = "playing";
5
+ })(ActiveVideoClipState || (ActiveVideoClipState = {}));
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Connect to COGS to build a custom Media Master",
4
4
  "author": "Clockwork Dog <info@clockwork.dog>",
5
5
  "homepage": "https://github.com/clockwork-dog/cogs-sdk/tree/main/packages/javascript",
6
- "version": "3.0.0-alpha.2",
6
+ "version": "3.0.0-alpha.4",
7
7
  "keywords": [],
8
8
  "license": "MIT",
9
9
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "prerelease": "yarn npm publish --access public --tag=next"
35
35
  },
36
36
  "dependencies": {
37
- "@clockworkdog/timesync": "^3.0.0-alpha.2",
37
+ "@clockworkdog/timesync": "^3.0.0-alpha.4",
38
38
  "howler": "clockwork-dog/howler.js#fix-looping-clips",
39
39
  "reconnecting-websocket": "^4.4.0",
40
40
  "zod": "^4.1.13"