@player-ui/expression-plugin 0.13.0 → 0.13.1--canary.716.26546

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.
@@ -18,6 +18,10 @@ function _create_class(Constructor, protoProps, staticProps) {
18
18
  if (staticProps) _defineProperties(Constructor, staticProps);
19
19
  return Constructor;
20
20
  }
21
+ function _type_of(obj) {
22
+ "@swc/helpers - typeof";
23
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
24
+ }
21
25
  var ExpressionPlugin = function() {
22
26
  var __defProp = Object.defineProperty;
23
27
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -30,7 +34,7 @@ var ExpressionPlugin = function() {
30
34
  });
31
35
  };
32
36
  var __copyProps = function(to, from, except, desc) {
33
- if (from && typeof from === "object" || typeof from === "function") {
37
+ if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
34
38
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
35
39
  try {
36
40
  var _loop = function() {
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/1887/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,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,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/2567/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"]}
package/package.json CHANGED
@@ -6,10 +6,10 @@
6
6
  "types"
7
7
  ],
8
8
  "name": "@player-ui/expression-plugin",
9
- "version": "0.13.0",
9
+ "version": "0.13.1--canary.716.26546",
10
10
  "main": "dist/cjs/index.cjs",
11
11
  "peerDependencies": {
12
- "@player-ui/player": "0.13.0"
12
+ "@player-ui/player": "0.13.1--canary.716.26546"
13
13
  },
14
14
  "module": "dist/index.legacy-esm.js",
15
15
  "types": "types/index.d.ts",