@player-ui/expression-plugin 0.15.3-next.0 → 0.15.3-next.2

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.
@@ -27,20 +27,20 @@ var ExpressionPlugin = function() {
27
27
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
28
28
  var __getOwnPropNames = Object.getOwnPropertyNames;
29
29
  var __hasOwnProp = Object.prototype.hasOwnProperty;
30
- var __export = function(target, all) {
30
+ var __export = function __export(target, all) {
31
31
  for(var name in all)__defProp(target, name, {
32
32
  get: all[name],
33
33
  enumerable: true
34
34
  });
35
35
  };
36
- var __copyProps = function(to, from, except, desc) {
36
+ var __copyProps = function __copyProps(to, from, except, desc) {
37
37
  if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
38
38
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
39
39
  try {
40
40
  var _loop = function() {
41
41
  var key = _step.value;
42
42
  if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
43
- get: function() {
43
+ get: function get() {
44
44
  return from[key];
45
45
  },
46
46
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
@@ -64,7 +64,7 @@ var ExpressionPlugin = function() {
64
64
  }
65
65
  return to;
66
66
  };
67
- var __toCommonJS = function(mod) {
67
+ var __toCommonJS = function __toCommonJS(mod) {
68
68
  return __copyProps(__defProp({}, "__esModule", {
69
69
  value: true
70
70
  }), mod);
@@ -72,7 +72,7 @@ var ExpressionPlugin = function() {
72
72
  // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/src/index.ts
73
73
  var src_exports = {};
74
74
  __export(src_exports, {
75
- ExpressionPlugin: function() {
75
+ ExpressionPlugin: function ExpressionPlugin1() {
76
76
  return ExpressionPlugin;
77
77
  }
78
78
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2492/execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/dist/index.global.js","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/src/index.ts"],"names":["ExpressionPlugin","__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","src_exports","expressionMap","expressions","apply","player","hooks","expressionEvaluator","tap","expEvaluator","forEach","handler","addExpressionFunction"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAIA,mBAAmB,AAAC;IACtB,IAAIC,YAAYC,OAAOC,cAAc;IACrC,IAAIC,mBAAmBF,OAAOG,wBAAwB;IACtD,IAAIC,oBAAoBJ,OAAOK,mBAAmB;IAClD,IAAIC,eAAeN,OAAOO,SAAS,CAACC,cAAc;IAClD,IAAIC,WAAW,SAACC,QAAQC;QACtB,IAAK,IAAIC,QAAQD,IACfZ,UAAUW,QAAQE,MAAM;YAAEC,KAAKF,GAAG,CAACC,KAAK;YAAEE,YAAY;QAAK;IAC/D;IACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;QACnC,IAAIF,QAAQ,CAAA,OAAOA,qCAAP,SAAOA,KAAG,MAAM,YAAY,OAAOA,SAAS,YAAY;gBAC7D,kCAAA,2BAAA;;;oBAAA,IAAIG,MAAJ;oBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCnB,UAAUiB,IAAII,KAAK;wBAAEP,KAAK;mCAAMI,IAAI,CAACG,IAAI;;wBAAEN,YAAY,CAAEK,CAAAA,OAAOjB,iBAAiBe,MAAMG,IAAG,KAAMD,KAAKL,UAAU;oBAAC;;gBAFpH,QAAK,YAAWV,kBAAkBa,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;gBAAA;gBAAA;;;yBAAA,6BAAA;wBAAA;;;wBAAA;8BAAA;;;;QAGP;QACA,OAAOD;IACT;IACA,IAAIM,eAAe,SAACC;eAAQR,YAAYhB,UAAU,CAAC,GAAG,cAAc;YAAEyB,OAAO;QAAK,IAAID;;IAEtF,kHAAkH;ICpBpH,IAAAE,cAAA,CAAA;IAAAhB,SAAAgB,aAAA;QAAA3B,kBAAA;mBAAAA;;IAAA;IAcO,IAAMA,iCAAN;iBAAMA,iBAIC4B,aAAA;oCAJD5B;YACX,IAAA,CAAAc,IAAA,GAAO;YAIL,IAAA,CAAKe,WAAA,GAAcD;;;;gBAGrBE,KAAAA;uBAAAA,SAAAA,MAAMC,MAAA;;oBACJA,OAAOC,KAAA,CAAMC,mBAAA,CAAoBC,GAAA,CAAI,IAAA,CAAKpB,IAAA,EAAM,SAACqB;wBAC/C,MAAKN,WAAA,CAAYO,OAAA,CAAQ,SAACC,SAASvB;4BACjCqB,aAAaG,qBAAA,CAAsBxB,MAAMuB;wBAC3C;oBACF;gBACF;;;;;IDUA,OAAOb,aAAaG;AACtB","sourcesContent":["\"use strict\";\nvar ExpressionPlugin = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n ExpressionPlugin: () => ExpressionPlugin\n });\n var ExpressionPlugin = class {\n constructor(expressionMap) {\n this.name = \"ExpressionPlugin\";\n this.expressions = expressionMap;\n }\n apply(player) {\n player.hooks.expressionEvaluator.tap(this.name, (expEvaluator) => {\n this.expressions.forEach((handler, name) => {\n expEvaluator.addExpressionFunction(name, handler);\n });\n });\n }\n };\n return __toCommonJS(src_exports);\n})();\n","import type {\n Player,\n PlayerPlugin,\n ExpressionHandler,\n} from \"@player-ui/player\";\n\nexport type ExpressionMap = Map<string, ExpressionHandler<any[], any>>;\n\n/**\n * The ExpressionPlugin is an easy way to inject custom expression handlers into the running player instance.\n * Simply supply a map of function name to handler, and the expressions will be available inside of the Content.\n *\n * Any subsequent expressions registered with the same name will override previous handlers.\n */\nexport class ExpressionPlugin implements PlayerPlugin {\n name = \"ExpressionPlugin\";\n private expressions: ExpressionMap;\n\n constructor(expressionMap: ExpressionMap) {\n this.expressions = expressionMap;\n }\n\n apply(player: Player) {\n player.hooks.expressionEvaluator.tap(this.name, (expEvaluator) => {\n this.expressions.forEach((handler, name) => {\n expEvaluator.addExpressionFunction(name, handler);\n });\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2484/execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/dist/index.global.js","../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/src/index.ts"],"names":["ExpressionPlugin","__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","src_exports","expressionMap","expressions","apply","player","hooks","expressionEvaluator","tap","expEvaluator","forEach","handler","addExpressionFunction"],"mappings":"AAAA;;;;;;;;;;;;;;;;;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,SAAAA,MAAMC,MAAA;;oBACJA,OAAOC,KAAA,CAAMC,mBAAA,CAAoBC,GAAA,CAAI,IAAA,CAAKpB,IAAA,EAAM,SAACqB;wBAC/C,MAAKN,WAAA,CAAYO,OAAA,CAAQ,SAACC,SAASvB;4BACjCqB,aAAaG,qBAAA,CAAsBxB,MAAMuB;wBAC3C;oBACF;gBACF;;;;;IDUA,OAAOb,aAAaG;AACtB","sourcesContent":["\"use strict\";\nvar ExpressionPlugin = (() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n // ../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/plugins/expression/core/src/index.ts\n var src_exports = {};\n __export(src_exports, {\n ExpressionPlugin: () => ExpressionPlugin\n });\n var ExpressionPlugin = class {\n constructor(expressionMap) {\n this.name = \"ExpressionPlugin\";\n this.expressions = expressionMap;\n }\n apply(player) {\n player.hooks.expressionEvaluator.tap(this.name, (expEvaluator) => {\n this.expressions.forEach((handler, name) => {\n expEvaluator.addExpressionFunction(name, handler);\n });\n });\n }\n };\n return __toCommonJS(src_exports);\n})();\n","import type {\n Player,\n PlayerPlugin,\n ExpressionHandler,\n} from \"@player-ui/player\";\n\nexport type ExpressionMap = Map<string, ExpressionHandler<any[], any>>;\n\n/**\n * The ExpressionPlugin is an easy way to inject custom expression handlers into the running player instance.\n * Simply supply a map of function name to handler, and the expressions will be available inside of the Content.\n *\n * Any subsequent expressions registered with the same name will override previous handlers.\n */\nexport class ExpressionPlugin implements PlayerPlugin {\n name = \"ExpressionPlugin\";\n private expressions: ExpressionMap;\n\n constructor(expressionMap: ExpressionMap) {\n this.expressions = expressionMap;\n }\n\n apply(player: Player) {\n player.hooks.expressionEvaluator.tap(this.name, (expEvaluator) => {\n this.expressions.forEach((handler, name) => {\n expEvaluator.addExpressionFunction(name, handler);\n });\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -6,10 +6,10 @@
6
6
  "types"
7
7
  ],
8
8
  "name": "@player-ui/expression-plugin",
9
- "version": "0.15.3-next.0",
9
+ "version": "0.15.3-next.2",
10
10
  "main": "dist/cjs/index.cjs",
11
11
  "peerDependencies": {
12
- "@player-ui/player": "0.15.3-next.0"
12
+ "@player-ui/player": "0.15.3-next.2"
13
13
  },
14
14
  "module": "dist/index.legacy-esm.js",
15
15
  "types": "types/index.d.ts",