@player-ui/meta-plugin 0.8.0--canary.307.9621 → 0.8.0-next.0

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.
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/meta-plugin/core/src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ MetaPlugin: () => MetaPlugin
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var MetaPlugin = class {
27
+ constructor(plugins = []) {
28
+ this.name = "meta-plugin";
29
+ this.plugins = plugins;
30
+ }
31
+ apply(player) {
32
+ this.plugins.forEach((plugin) => player.registerPlugin(plugin));
33
+ }
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ MetaPlugin
38
+ });
39
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/meta-plugin/core/src/index.ts"],"sourcesContent":["import type { Player, PlayerPlugin } from \"@player-ui/player\";\n\n/**\n * A plugin that can wrap a set of other plugins.\n */\nexport class MetaPlugin implements PlayerPlugin {\n name = \"meta-plugin\";\n\n public readonly plugins: Array<PlayerPlugin>;\n\n constructor(plugins: Array<PlayerPlugin> = []) {\n this.plugins = plugins;\n }\n\n apply(player: Player) {\n this.plugins.forEach((plugin) => player.registerPlugin(plugin));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,aAAN,MAAyC;AAAA,EAK9C,YAAY,UAA+B,CAAC,GAAG;AAJ/C,gBAAO;AAKL,SAAK,UAAU;AAAA,EACjB;AAAA,EAEA,MAAM,QAAgB;AACpB,SAAK,QAAQ,QAAQ,CAAC,WAAW,OAAO,eAAe,MAAM,CAAC;AAAA,EAChE;AACF;","names":[]}
@@ -0,0 +1,14 @@
1
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/meta-plugin/core/src/index.ts
2
+ var MetaPlugin = class {
3
+ constructor(plugins = []) {
4
+ this.name = "meta-plugin";
5
+ this.plugins = plugins;
6
+ }
7
+ apply(player) {
8
+ this.plugins.forEach((plugin) => player.registerPlugin(plugin));
9
+ }
10
+ };
11
+ export {
12
+ MetaPlugin
13
+ };
14
+ //# sourceMappingURL=index.mjs.map
package/dist/index.mjs ADDED
@@ -0,0 +1,14 @@
1
+ // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/meta-plugin/core/src/index.ts
2
+ var MetaPlugin = class {
3
+ constructor(plugins = []) {
4
+ this.name = "meta-plugin";
5
+ this.plugins = plugins;
6
+ }
7
+ apply(player) {
8
+ this.plugins.forEach((plugin) => player.registerPlugin(plugin));
9
+ }
10
+ };
11
+ export {
12
+ MetaPlugin
13
+ };
14
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/meta-plugin/core/src/index.ts"],"sourcesContent":["import type { Player, PlayerPlugin } from \"@player-ui/player\";\n\n/**\n * A plugin that can wrap a set of other plugins.\n */\nexport class MetaPlugin implements PlayerPlugin {\n name = \"meta-plugin\";\n\n public readonly plugins: Array<PlayerPlugin>;\n\n constructor(plugins: Array<PlayerPlugin> = []) {\n this.plugins = plugins;\n }\n\n apply(player: Player) {\n this.plugins.forEach((plugin) => player.registerPlugin(plugin));\n }\n}\n"],"mappings":";AAKO,IAAM,aAAN,MAAyC;AAAA,EAK9C,YAAY,UAA+B,CAAC,GAAG;AAJ/C,gBAAO;AAKL,SAAK,UAAU;AAAA,EACjB;AAAA,EAEA,MAAM,QAAgB;AACpB,SAAK,QAAQ,QAAQ,CAAC,WAAW,OAAO,eAAe,MAAM,CAAC;AAAA,EAChE;AACF;","names":[]}
package/package.json CHANGED
@@ -1,65 +1,28 @@
1
1
  {
2
2
  "name": "@player-ui/meta-plugin",
3
- "version": "0.8.0--canary.307.9621",
4
- "private": false,
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org"
7
- },
3
+ "version": "0.8.0-next.0",
4
+ "main": "dist/cjs/index.cjs",
8
5
  "peerDependencies": {
9
- "@player-ui/player": "0.8.0--canary.307.9621"
10
- },
11
- "dependencies": {
12
- "@babel/runtime": "7.15.4"
6
+ "@player-ui/player": "0.8.0-next.0"
13
7
  },
14
- "main": "dist/index.cjs.js",
15
- "module": "dist/index.esm.js",
16
- "typings": "dist/index.d.ts",
8
+ "module": "dist/index.legacy-esm.js",
9
+ "types": "types/index.d.ts",
17
10
  "sideEffects": false,
18
- "license": "MIT",
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/player-ui/player-ui"
22
- },
23
- "bugs": {
24
- "url": "https://github.com/player-ui/player-ui/issues"
25
- },
26
- "homepage": "https://player-ui.github.io",
27
- "contributors": [
28
- {
29
- "name": "Adam Dierkens",
30
- "url": "https://github.com/adierkens"
31
- },
32
- {
33
- "name": "Spencer Hamm",
34
- "url": "https://github.com/spentacular"
35
- },
36
- {
37
- "name": "Harris Borawski",
38
- "url": "https://github.com/hborawski"
39
- },
40
- {
41
- "name": "Jeremiah Zucker",
42
- "url": "https://github.com/sugarmanz"
43
- },
44
- {
45
- "name": "Ketan Reddy",
46
- "url": "https://github.com/KetanReddy"
47
- },
48
- {
49
- "name": "Brocollie08",
50
- "url": "https://github.com/brocollie08"
51
- },
52
- {
53
- "name": "Kelly Harrop",
54
- "url": "https://github.com/kharrop"
55
- },
56
- {
57
- "name": "Alejandro Fimbres",
58
- "url": "https://github.com/lexfm"
59
- },
60
- {
61
- "name": "Rafael Campos",
62
- "url": "https://github.com/rafbcampos"
11
+ "exports": {
12
+ "./package.json": "./package.json",
13
+ "./dist/index.css": "./dist/index.css",
14
+ ".": {
15
+ "types": "./types/index.d.ts",
16
+ "import": "./dist/index.mjs",
17
+ "default": "./dist/cjs/index.cjs"
63
18
  }
64
- ]
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "src",
23
+ "types"
24
+ ],
25
+ "dependencies": {
26
+ "tslib": "^2.6.2"
27
+ }
65
28
  }
@@ -0,0 +1,13 @@
1
+ import { vitest, test, expect } from "vitest";
2
+ import { Player } from "@player-ui/player";
3
+ import { MetaPlugin } from "..";
4
+
5
+ test("calls apply on each plugin", () => {
6
+ const plugins = [
7
+ { apply: vitest.fn(), name: "1" },
8
+ { apply: vitest.fn(), name: "2" },
9
+ ];
10
+ const player = new Player({ plugins: [new MetaPlugin(plugins)] });
11
+
12
+ plugins.forEach((p) => expect(p.apply).toBeCalledWith(player));
13
+ });
package/src/index.ts CHANGED
@@ -1,10 +1,10 @@
1
- import type { Player, PlayerPlugin } from '@player-ui/player';
1
+ import type { Player, PlayerPlugin } from "@player-ui/player";
2
2
 
3
3
  /**
4
4
  * A plugin that can wrap a set of other plugins.
5
5
  */
6
6
  export class MetaPlugin implements PlayerPlugin {
7
- name = 'meta-plugin';
7
+ name = "meta-plugin";
8
8
 
9
9
  public readonly plugins: Array<PlayerPlugin>;
10
10
 
@@ -1,13 +1,11 @@
1
- import { PlayerPlugin, Player } from '@player-ui/player';
2
-
1
+ import type { Player, PlayerPlugin } from "@player-ui/player";
3
2
  /**
4
3
  * A plugin that can wrap a set of other plugins.
5
4
  */
6
- declare class MetaPlugin implements PlayerPlugin {
5
+ export declare class MetaPlugin implements PlayerPlugin {
7
6
  name: string;
8
7
  readonly plugins: Array<PlayerPlugin>;
9
8
  constructor(plugins?: Array<PlayerPlugin>);
10
9
  apply(player: Player): void;
11
10
  }
12
-
13
- export { MetaPlugin };
11
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.cjs.js DELETED
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- class MetaPlugin {
6
- constructor(plugins = []) {
7
- this.name = "meta-plugin";
8
- this.plugins = plugins;
9
- }
10
- apply(player) {
11
- this.plugins.forEach((plugin) => player.registerPlugin(plugin));
12
- }
13
- }
14
-
15
- exports.MetaPlugin = MetaPlugin;
16
- //# sourceMappingURL=index.cjs.js.map
package/dist/index.esm.js DELETED
@@ -1,12 +0,0 @@
1
- class MetaPlugin {
2
- constructor(plugins = []) {
3
- this.name = "meta-plugin";
4
- this.plugins = plugins;
5
- }
6
- apply(player) {
7
- this.plugins.forEach((plugin) => player.registerPlugin(plugin));
8
- }
9
- }
10
-
11
- export { MetaPlugin };
12
- //# sourceMappingURL=index.esm.js.map