@clockworkdog/cogs-client 0.13.0 → 0.16.1

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/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export { default as CogsConnection } from './CogsConnection';
2
2
  export { default as CogsClientMessage } from './types/CogsClientMessage';
3
3
  export * from './types/valueTypes';
4
4
  export { default as MediaObjectFit } from './types/MediaObjectFit';
5
- export { default as BackgroundOptions } from './types/BackgroundOptions';
6
5
  export { default as CogsAudioPlayer } from './AudioPlayer';
7
6
  export * from './types/AudioState';
8
7
  export { assetUrl } from './helpers/urls';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAElC,qDAAmC;AAGnC,6CAA2D;AAAlD,+HAAA,OAAO,OAAmB;AACnC,qDAAmC;AACnC,uCAA0C;AAAjC,gGAAA,QAAQ,OAAA;AACjB,uCAA4C;AAAnC,kGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAElC,qDAAmC;AAEnC,6CAA2D;AAAlD,+HAAA,OAAO,OAAmB;AACnC,qDAAmC;AACnC,uCAA0C;AAAjC,gGAAA,QAAQ,OAAA;AACjB,uCAA4C;AAAnC,kGAAA,UAAU,OAAA"}
@@ -1,5 +1,12 @@
1
- import BackgroundOptions from './BackgroundOptions';
2
1
  import MediaObjectFit from './MediaObjectFit';
2
+ import { ShowPhase } from './valueTypes';
3
+ interface ShowResetMessage {
4
+ type: 'show_reset';
5
+ }
6
+ interface ShowPhaseMessage {
7
+ type: 'show_phase';
8
+ phase: ShowPhase;
9
+ }
3
10
  interface AdjustableTimerUpdateMessage {
4
11
  type: 'adjustable_timer_update';
5
12
  ticking: boolean;
@@ -17,7 +24,6 @@ interface MediaClientConfigMessage {
17
24
  preload: boolean;
18
25
  };
19
26
  };
20
- background?: BackgroundOptions;
21
27
  }
22
28
  declare type MediaClientMessage = {
23
29
  type: 'audio_play';
@@ -46,14 +52,19 @@ declare type MediaClientMessage = {
46
52
  fit: MediaObjectFit;
47
53
  } | {
48
54
  type: 'video_pause';
49
- file: string;
50
55
  } | {
51
56
  type: 'video_stop';
52
- file?: string;
53
57
  } | {
54
58
  type: 'video_set_volume';
55
- file: string;
56
59
  volume: number;
60
+ } | {
61
+ type: 'image_show';
62
+ file: string;
63
+ fit: MediaObjectFit;
64
+ hideOthers?: boolean;
65
+ } | {
66
+ type: 'image_hide';
67
+ file?: string;
57
68
  };
58
- export declare type CogsClientMessage = AdjustableTimerUpdateMessage | TextHintsUpdateMessage | MediaClientConfigMessage | MediaClientMessage;
69
+ export declare type CogsClientMessage<CustomConfig = {}> = ShowResetMessage | ShowPhaseMessage | AdjustableTimerUpdateMessage | TextHintsUpdateMessage | (MediaClientConfigMessage & CustomConfig) | MediaClientMessage;
59
70
  export default CogsClientMessage;
@@ -1,3 +1,18 @@
1
- export declare type UpdateValue = string | number | boolean;
1
+ export declare type PortValue = string | number | boolean;
2
2
  export declare type ConfigValue = string | number | boolean;
3
3
  export declare type EventValue = string | number | boolean;
4
+ export declare enum ShowPhase {
5
+ Setup = "setup",
6
+ Preshow = "pre-show",
7
+ InProgress = "in progress",
8
+ Finished = "finished"
9
+ }
10
+ export declare type EventKeyValue<TypeMap extends {
11
+ [key: string]: EventValue | null;
12
+ }, Key extends keyof TypeMap = keyof TypeMap> = Key extends string ? TypeMap[Key] extends null ? {
13
+ key: Key;
14
+ value: undefined;
15
+ } : {
16
+ key: Key;
17
+ value: TypeMap[Key];
18
+ } : never;
@@ -1,3 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ShowPhase = void 0;
4
+ var ShowPhase;
5
+ (function (ShowPhase) {
6
+ ShowPhase["Setup"] = "setup";
7
+ ShowPhase["Preshow"] = "pre-show";
8
+ ShowPhase["InProgress"] = "in progress";
9
+ ShowPhase["Finished"] = "finished";
10
+ })(ShowPhase = exports.ShowPhase || (exports.ShowPhase = {}));
3
11
  //# sourceMappingURL=valueTypes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"valueTypes.js","sourceRoot":"","sources":["../../src/types/valueTypes.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"valueTypes.js","sourceRoot":"","sources":["../../src/types/valueTypes.ts"],"names":[],"mappings":";;;AAIA,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,iCAAoB,CAAA;IACpB,uCAA0B,CAAA;IAC1B,kCAAqB,CAAA;AACvB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clockworkdog/cogs-client",
3
- "version": "0.13.0",
3
+ "version": "0.16.1",
4
4
  "main": "dist/index.js",
5
5
  "unpkg": "dist/browser/index.js",
6
6
  "scripts": {
@@ -1,8 +0,0 @@
1
- import MediaObjectFit from './MediaObjectFit';
2
- export default interface BackgroundOptions {
3
- color: string;
4
- image?: {
5
- file: string;
6
- fit: MediaObjectFit;
7
- };
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=BackgroundOptions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BackgroundOptions.js","sourceRoot":"","sources":["../../src/types/BackgroundOptions.ts"],"names":[],"mappings":""}