@clockworkdog/cogs-client 1.5.2 → 1.5.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/dist/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export { default as CogsVideoPlayer } from './VideoPlayer';
9
9
  export * from './types/AudioState';
10
10
  export { assetUrl } from './helpers/urls';
11
11
  export { preloadUrl } from './helpers/urls';
12
+ export * from './types/PluginManifestJson';
package/dist/index.js CHANGED
@@ -29,3 +29,4 @@ var urls_1 = require("./helpers/urls");
29
29
  Object.defineProperty(exports, "assetUrl", { enumerable: true, get: function () { return urls_1.assetUrl; } });
30
30
  var urls_2 = require("./helpers/urls");
31
31
  Object.defineProperty(exports, "preloadUrl", { enumerable: true, get: function () { return urls_2.preloadUrl; } });
32
+ __exportStar(require("./types/PluginManifestJson"), exports);
@@ -0,0 +1,116 @@
1
+ export declare type FontAwesomeIconId = string;
2
+ export interface CogsValueTypeBase<Id extends string> {
3
+ type: Id;
4
+ }
5
+ export declare type CogsValueTypeString = CogsValueTypeBase<'string'>;
6
+ export interface CogsValueTypeNumber extends CogsValueTypeBase<'number'> {
7
+ integer?: true;
8
+ min?: number;
9
+ max?: number;
10
+ }
11
+ export declare type CogsValueTypeBoolean = CogsValueTypeBase<'boolean'>;
12
+ export interface CogsValueTypeOption<Options extends string[]> extends CogsValueTypeBase<'option'> {
13
+ options: Options;
14
+ }
15
+ export declare type CogsValueType = CogsValueTypeString | CogsValueTypeNumber | CogsValueTypeBoolean | CogsValueTypeOption<string[]>;
16
+ export declare type CogsValueTypeStringWithDefault = CogsValueTypeString & {
17
+ default: string;
18
+ };
19
+ export declare type CogsValueTypeNumberWithDefault = CogsValueTypeNumber & {
20
+ default: number;
21
+ };
22
+ export declare type CogsValueTypeBooleanWithDefault = CogsValueTypeBoolean & {
23
+ default: boolean;
24
+ };
25
+ export declare type CogsValueTypeOptionWithDefault = CogsValueTypeOption<string[]> & {
26
+ default: string;
27
+ };
28
+ export declare type CogsValueTypeWithDefault = CogsValueTypeStringWithDefault | CogsValueTypeNumberWithDefault | CogsValueTypeBooleanWithDefault | CogsValueTypeOptionWithDefault;
29
+ export declare type PluginManifestConfigJson = {
30
+ name: string;
31
+ value: CogsValueType | CogsValueTypeWithDefault;
32
+ };
33
+ export declare type PluginManifestEventJson = {
34
+ name: string;
35
+ value?: CogsValueType;
36
+ };
37
+ export declare type PluginManifestStateJson = {
38
+ name: string;
39
+ value: CogsValueTypeWithDefault;
40
+ writableFromCogs?: true;
41
+ writableFromClient?: true;
42
+ };
43
+ /**
44
+ * `cogs-plugin-manifest.json` is a JSON manifest file describing the content of a COGS plugin or COGS Media Master custom content.
45
+ *
46
+ *
47
+ * It should be saved in the root of a folder in the `plugins` or `client_content` folder in your COGS project
48
+ *
49
+ * The [COGS plugins directory](/plugins) contains a number of plugins you can use out of the box
50
+ */
51
+ export interface PluginManifestJson {
52
+ /**
53
+ * e.g. `1.0.0`
54
+ */
55
+ version: `${number}` | `${number}.${number}` | `${number}.${number}.${number}`;
56
+ /**
57
+ * A short human-readable name
58
+ */
59
+ name: string;
60
+ /**
61
+ * The minimum COGS version required
62
+ *
63
+ * Follows semantic versioning with `semver`
64
+ * e.g. `4.12.0
65
+ */
66
+ minCogsVersion?: `${number}.${number}.${number}`;
67
+ /**
68
+ * A description that appears alongside `name` in the list of plugins, and in the [COGS plugins directory](/plugins)
69
+ */
70
+ description?: string;
71
+ /**
72
+ * A FontAwesome 5.X icon shown alongside `name`, in the COGS navigation bar, and in the [COGS plugins directory](/plugins)
73
+ */
74
+ icon?: FontAwesomeIconId;
75
+ /**
76
+ * The HTML entrypoint for the plugin
77
+ *
78
+ * Defaults to `/` which includes `/index.html`
79
+ */
80
+ indexPath?: string;
81
+ /**
82
+ * If set, shows a popup window to the user where you can show the HTML content of your plugin
83
+ *
84
+ * By default a window is not shown to the user
85
+ * The window can later be opened/closed from the Javascript running in the plugin
86
+ * Only valid for plugins, not for Media Master custom content
87
+ */
88
+ window?: {
89
+ width: number;
90
+ height: number;
91
+ /**
92
+ * Whether the window is initially visible
93
+ */
94
+ visible?: boolean;
95
+ };
96
+ config?: PluginManifestConfigJson[];
97
+ /**
98
+ * Events that trigger COGS behaviors or can trigger actions in this plugin
99
+ */
100
+ events?: {
101
+ fromCogs?: PluginManifestEventJson[];
102
+ toCogs?: PluginManifestEventJson[];
103
+ };
104
+ /**
105
+ * State that can be set by COGS behaviors
106
+ */
107
+ state?: PluginManifestStateJson[];
108
+ /**
109
+ * The types of COGS media actions supported
110
+ */
111
+ media?: {
112
+ audio?: true;
113
+ video?: true;
114
+ images?: true;
115
+ };
116
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clockworkdog/cogs-client",
3
- "version": "v1.5.2",
3
+ "version": "v1.5.5",
4
4
  "main": "dist/index.js",
5
5
  "unpkg": "dist/browser/index.js",
6
6
  "scripts": {