@player-ui/expression-plugin 0.14.1-next.3 → 0.14.1-next.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/
|
|
1
|
+
{"version":3,"sources":["/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2583/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.14.1-next.
|
|
9
|
+
"version": "0.14.1-next.5",
|
|
10
10
|
"main": "dist/cjs/index.cjs",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@player-ui/player": "0.14.1-next.
|
|
12
|
+
"@player-ui/player": "0.14.1-next.5"
|
|
13
13
|
},
|
|
14
14
|
"module": "dist/index.legacy-esm.js",
|
|
15
15
|
"types": "types/index.d.ts",
|