@player-ui/reference-assets-plugin 0.3.1-next.0 → 0.4.0--canary.85.4368

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
@@ -1,5 +1,5 @@
1
1
  import * as _player_ui_player from '@player-ui/player';
2
- import { Asset, AssetWrapper, Binding, ValidationResponse, Schema, TransformFunction, Expression, BeforeTransformFunction, PlayerPlugin, Player } from '@player-ui/player';
2
+ import { Asset, AssetWrapper, Binding, ValidationResponse, Schema, TransformFunction, Expression, BeforeTransformFunction, PlayerPlugin, ExtendedPlayerPlugin, Player } from '@player-ui/player';
3
3
  import { BeaconDataType } from '@player-ui/beacon-plugin';
4
4
 
5
5
  /**
@@ -126,7 +126,13 @@ interface LinkModifier {
126
126
  /**
127
127
  * A plugin to add transforms for the reference assets
128
128
  */
129
- declare class ReferenceAssetsPlugin implements PlayerPlugin {
129
+ declare class ReferenceAssetsPlugin implements PlayerPlugin, ExtendedPlayerPlugin<[
130
+ InputAsset,
131
+ TextAsset,
132
+ ActionAsset,
133
+ InfoAsset,
134
+ CollectionAsset
135
+ ]> {
130
136
  name: string;
131
137
  apply(player: Player): void;
132
138
  }
@@ -0,0 +1,595 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory();
4
+ else if(typeof define === 'function' && define.amd)
5
+ define([], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["ReferenceAssetsPlugin"] = factory();
8
+ else
9
+ root["ReferenceAssetsPlugin"] = factory();
10
+ })(this, function() {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = "./bazel-out/k8-fastbuild/bin/plugins/reference-assets/core/dist/index.esm.js");
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ({
98
+
99
+ /***/ "./bazel-out/k8-fastbuild/bin/core/partial-match-registry/dist/index.esm.js":
100
+ /*!**********************************************************************************!*\
101
+ !*** ./bazel-out/k8-fastbuild/bin/core/partial-match-registry/dist/index.esm.js ***!
102
+ \**********************************************************************************/
103
+ /*! exports provided: Registry, createObjectMatcher */
104
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
105
+
106
+ "use strict";
107
+ __webpack_require__.r(__webpack_exports__);
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Registry", function() { return Registry; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createObjectMatcher", function() { return createMatcher; });
110
+ /* harmony import */ var sorted_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sorted-array */ "./node_modules/sorted-array/sorted-array.js");
111
+ /* harmony import */ var sorted_array__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sorted_array__WEBPACK_IMPORTED_MODULE_0__);
112
+ /* harmony import */ var dlv__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dlv */ "./node_modules/dlv/dist/dlv.umd.js");
113
+ /* harmony import */ var dlv__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dlv__WEBPACK_IMPORTED_MODULE_1__);
114
+
115
+
116
+
117
+ function traverseObj(object, path = [], pairs = new Map()) {
118
+ for (const key of Object.keys(object)) {
119
+ const val = object[key];
120
+ const nestedPath = [...path, key];
121
+ if (typeof val === "object") {
122
+ traverseObj(val, nestedPath, pairs);
123
+ } else {
124
+ pairs.set(nestedPath, val);
125
+ }
126
+ }
127
+ return pairs;
128
+ }
129
+ function createMatcher(partialObj) {
130
+ const pairs = traverseObj(partialObj);
131
+ const matchFunction = (searchObj) => {
132
+ for (const entry of pairs) {
133
+ const [path, value] = entry;
134
+ if (dlv__WEBPACK_IMPORTED_MODULE_1___default()(searchObj, path) !== value) {
135
+ return false;
136
+ }
137
+ }
138
+ return true;
139
+ };
140
+ matchFunction.count = pairs.size;
141
+ return matchFunction;
142
+ }
143
+
144
+ function createBasicMatcher(seed) {
145
+ const matcher = (match) => seed === match;
146
+ matcher.count = 1;
147
+ return matcher;
148
+ }
149
+ const createSortedArray = () => new sorted_array__WEBPACK_IMPORTED_MODULE_0___default.a([], (c) => c.matcher.count);
150
+ class Registry {
151
+ constructor(initialSet) {
152
+ this.store = createSortedArray();
153
+ initialSet == null ? void 0 : initialSet.forEach(([match, value]) => {
154
+ this.set(match, value);
155
+ });
156
+ }
157
+ set(match, value) {
158
+ const matcher = typeof match === "object" ? createMatcher(match) : createBasicMatcher(match);
159
+ this.store.insert({
160
+ key: match,
161
+ value,
162
+ matcher
163
+ });
164
+ }
165
+ get(query) {
166
+ for (const entry of this.store.array) {
167
+ if (entry.matcher(query)) {
168
+ return entry.value;
169
+ }
170
+ }
171
+ }
172
+ forEach(callbackfn) {
173
+ for (const entry of this.store.array) {
174
+ callbackfn(entry);
175
+ }
176
+ }
177
+ clear() {
178
+ this.store = createSortedArray();
179
+ }
180
+ }
181
+
182
+
183
+ //# sourceMappingURL=index.esm.js.map
184
+
185
+
186
+ /***/ }),
187
+
188
+ /***/ "./bazel-out/k8-fastbuild/bin/plugins/asset-transform/core/dist/index.esm.js":
189
+ /*!***********************************************************************************!*\
190
+ !*** ./bazel-out/k8-fastbuild/bin/plugins/asset-transform/core/dist/index.esm.js ***!
191
+ \***********************************************************************************/
192
+ /*! exports provided: AssetTransformPlugin, compose, composeBefore, propertiesToSkipTransform */
193
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
194
+
195
+ "use strict";
196
+ __webpack_require__.r(__webpack_exports__);
197
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AssetTransformPlugin", function() { return AssetTransformPlugin; });
198
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; });
199
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "composeBefore", function() { return composeBefore; });
200
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "propertiesToSkipTransform", function() { return propertiesToSkipTransform; });
201
+ /* harmony import */ var _player_ui_partial_match_registry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @player-ui/partial-match-registry */ "./bazel-out/k8-fastbuild/bin/core/partial-match-registry/dist/index.esm.js");
202
+
203
+
204
+ function composeTransforms(...args) {
205
+ const [fn, ...fns] = args.reverse();
206
+ return (asset, options, store) => {
207
+ const value = fn(asset, options, store);
208
+ if (!fns.length) {
209
+ return value;
210
+ }
211
+ return fns.reduce((prevValue, current) => {
212
+ return current(prevValue, options, store);
213
+ }, value);
214
+ };
215
+ }
216
+ function composeBefore(...args) {
217
+ return {
218
+ beforeResolve: composeTransforms(...args)
219
+ };
220
+ }
221
+ function compose(...args) {
222
+ const beforeResolveFns = [];
223
+ const resolveFns = [];
224
+ for (const arg of args) {
225
+ if (typeof arg === "function") {
226
+ resolveFns.push(arg);
227
+ } else {
228
+ if (arg == null ? void 0 : arg.resolve) {
229
+ resolveFns.push(arg.resolve);
230
+ }
231
+ if (arg == null ? void 0 : arg.beforeResolve) {
232
+ beforeResolveFns.push(arg.beforeResolve);
233
+ }
234
+ }
235
+ }
236
+ return {
237
+ beforeResolve: beforeResolveFns.length ? composeTransforms(...beforeResolveFns) : void 0,
238
+ resolve: resolveFns.length ? composeTransforms(...resolveFns) : void 0
239
+ };
240
+ }
241
+
242
+ var __defProp = Object.defineProperty;
243
+ var __defProps = Object.defineProperties;
244
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
245
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
246
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
247
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
248
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
249
+ var __spreadValues = (a, b) => {
250
+ for (var prop in b || (b = {}))
251
+ if (__hasOwnProp.call(b, prop))
252
+ __defNormalProp(a, prop, b[prop]);
253
+ if (__getOwnPropSymbols)
254
+ for (var prop of __getOwnPropSymbols(b)) {
255
+ if (__propIsEnum.call(b, prop))
256
+ __defNormalProp(a, prop, b[prop]);
257
+ }
258
+ return a;
259
+ };
260
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
261
+ const propertiesToSkipTransform = (parameters) => {
262
+ return (asset) => {
263
+ var _a, _b, _c, _d;
264
+ const skipArray = (_c = (_b = (_a = asset.plugins) == null ? void 0 : _a.stringResolver) == null ? void 0 : _b.propertiesToSkip) != null ? _c : [];
265
+ const parameterArray = parameters.filter((element) => {
266
+ return element !== "";
267
+ });
268
+ if (parameterArray.length === 0) {
269
+ return asset;
270
+ }
271
+ if (skipArray.length > 0 && skipArray.every((arr) => parameterArray.includes(arr)) && parameterArray.every((arr) => skipArray.includes(arr))) {
272
+ return asset;
273
+ }
274
+ const addParams = new Set([...skipArray, ...parameterArray]);
275
+ return __spreadProps(__spreadValues({}, asset), {
276
+ plugins: __spreadProps(__spreadValues({}, asset.plugins), {
277
+ stringResolver: __spreadProps(__spreadValues({}, (_d = asset == null ? void 0 : asset.plugins) == null ? void 0 : _d.stringResolver), {
278
+ propertiesToSkip: [...addParams]
279
+ })
280
+ })
281
+ });
282
+ };
283
+ };
284
+
285
+ function maybeCompose(maybeFn) {
286
+ if (typeof maybeFn === "object") {
287
+ return maybeFn;
288
+ }
289
+ return compose(maybeFn);
290
+ }
291
+ function cleanupTransformRegistry(maybeRegistry) {
292
+ if (Array.isArray(maybeRegistry)) {
293
+ const wrappedTransforms = maybeRegistry.map(([key, value]) => {
294
+ return [key, maybeCompose(value)];
295
+ });
296
+ return new _player_ui_partial_match_registry__WEBPACK_IMPORTED_MODULE_0__["Registry"](wrappedTransforms);
297
+ }
298
+ const registry = new _player_ui_partial_match_registry__WEBPACK_IMPORTED_MODULE_0__["Registry"]();
299
+ maybeRegistry.forEach(({ key, value }) => {
300
+ registry.set(key, maybeCompose(value));
301
+ });
302
+ return registry;
303
+ }
304
+ class AssetTransformPlugin {
305
+ constructor(transforms) {
306
+ this.name = "asset-transform";
307
+ this.registry = cleanupTransformRegistry(transforms);
308
+ }
309
+ apply(player) {
310
+ player.hooks.viewController.tap(this.name, (vc) => {
311
+ this.registry.forEach(({ key, value }) => vc.transformRegistry.set(key, maybeCompose(value)));
312
+ });
313
+ }
314
+ }
315
+
316
+
317
+ //# sourceMappingURL=index.esm.js.map
318
+
319
+
320
+ /***/ }),
321
+
322
+ /***/ "./bazel-out/k8-fastbuild/bin/plugins/reference-assets/core/dist/index.esm.js":
323
+ /*!************************************************************************************!*\
324
+ !*** ./bazel-out/k8-fastbuild/bin/plugins/reference-assets/core/dist/index.esm.js ***!
325
+ \************************************************************************************/
326
+ /*! exports provided: ReferenceAssetsPlugin, actionTransform, expPropTransform, inputTransform, isBackAction */
327
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
328
+
329
+ "use strict";
330
+ __webpack_require__.r(__webpack_exports__);
331
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReferenceAssetsPlugin", function() { return ReferenceAssetsPlugin; });
332
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "actionTransform", function() { return actionTransform; });
333
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expPropTransform", function() { return expPropTransform; });
334
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inputTransform", function() { return inputTransform; });
335
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBackAction", function() { return isBackAction; });
336
+ /* harmony import */ var _player_ui_asset_transform_plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @player-ui/asset-transform-plugin */ "./bazel-out/k8-fastbuild/bin/plugins/asset-transform/core/dist/index.esm.js");
337
+
338
+
339
+ var __defProp$1 = Object.defineProperty;
340
+ var __defProps$1 = Object.defineProperties;
341
+ var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
342
+ var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
343
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
344
+ var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
345
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
346
+ var __spreadValues$1 = (a, b) => {
347
+ for (var prop in b || (b = {}))
348
+ if (__hasOwnProp$1.call(b, prop))
349
+ __defNormalProp$1(a, prop, b[prop]);
350
+ if (__getOwnPropSymbols$1)
351
+ for (var prop of __getOwnPropSymbols$1(b)) {
352
+ if (__propIsEnum$1.call(b, prop))
353
+ __defNormalProp$1(a, prop, b[prop]);
354
+ }
355
+ return a;
356
+ };
357
+ var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
358
+ const inputTransform = (asset, options) => {
359
+ var _a, _b;
360
+ return __spreadProps$1(__spreadValues$1({}, asset), {
361
+ format(val) {
362
+ if (asset.binding === void 0) {
363
+ return val;
364
+ }
365
+ return options.data.format(asset.binding, val);
366
+ },
367
+ set(val) {
368
+ if (asset.binding === void 0) {
369
+ return;
370
+ }
371
+ return options.data.model.set([[asset.binding, val]], {
372
+ formatted: true
373
+ });
374
+ },
375
+ value: asset.binding === void 0 ? "" : options.data.model.get(asset.binding, {
376
+ includeInvalid: true,
377
+ formatted: true
378
+ }),
379
+ validation: asset.binding === void 0 ? void 0 : (_a = options.validation) == null ? void 0 : _a.get(asset.binding, { track: true }),
380
+ dataType: asset.binding === void 0 ? void 0 : (_b = options.validation) == null ? void 0 : _b.type(asset.binding)
381
+ });
382
+ };
383
+
384
+ var __defProp = Object.defineProperty;
385
+ var __defProps = Object.defineProperties;
386
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
387
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
388
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
389
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
390
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
391
+ var __spreadValues = (a, b) => {
392
+ for (var prop in b || (b = {}))
393
+ if (__hasOwnProp.call(b, prop))
394
+ __defNormalProp(a, prop, b[prop]);
395
+ if (__getOwnPropSymbols)
396
+ for (var prop of __getOwnPropSymbols(b)) {
397
+ if (__propIsEnum.call(b, prop))
398
+ __defNormalProp(a, prop, b[prop]);
399
+ }
400
+ return a;
401
+ };
402
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
403
+ function isBackAction(action) {
404
+ return action.value === "Prev";
405
+ }
406
+ const transform = (action, options) => {
407
+ return __spreadProps(__spreadValues({}, action), {
408
+ run() {
409
+ var _a, _b;
410
+ if (action.exp) {
411
+ options.evaluate(action.exp);
412
+ }
413
+ if (action.value) {
414
+ const skipValidation = (_a = action.metaData) == null ? void 0 : _a.skipValidation;
415
+ (_b = options.transition) == null ? void 0 : _b.call(options, action.value, { force: skipValidation });
416
+ }
417
+ }
418
+ });
419
+ };
420
+ const expPropTransform = (asset) => {
421
+ var _a, _b, _c, _d, _e, _f;
422
+ const skipArray = (_b = (_a = asset.plugins) == null ? void 0 : _a.stringResolver) == null ? void 0 : _b.propertiesToSkip;
423
+ if (skipArray && skipArray.indexOf("exp") > 1) {
424
+ return asset;
425
+ }
426
+ return __spreadProps(__spreadValues({}, asset), {
427
+ plugins: __spreadProps(__spreadValues({}, asset.plugins), {
428
+ stringResolver: __spreadProps(__spreadValues({}, (_c = asset == null ? void 0 : asset.plugins) == null ? void 0 : _c.stringResolver), {
429
+ propertiesToSkip: [
430
+ ...(_f = (_e = (_d = asset.plugins) == null ? void 0 : _d.stringResolver) == null ? void 0 : _e.propertiesToSkip) != null ? _f : [],
431
+ "exp"
432
+ ]
433
+ })
434
+ })
435
+ });
436
+ };
437
+ const actionTransform = Object(_player_ui_asset_transform_plugin__WEBPACK_IMPORTED_MODULE_0__["compose"])(transform, Object(_player_ui_asset_transform_plugin__WEBPACK_IMPORTED_MODULE_0__["composeBefore"])(expPropTransform));
438
+
439
+ class ReferenceAssetsPlugin {
440
+ constructor() {
441
+ this.name = "reference-assets-transforms";
442
+ }
443
+ apply(player) {
444
+ player.registerPlugin(new _player_ui_asset_transform_plugin__WEBPACK_IMPORTED_MODULE_0__["AssetTransformPlugin"]([
445
+ [{ type: "action" }, actionTransform],
446
+ [{ type: "input" }, inputTransform]
447
+ ]));
448
+ }
449
+ }
450
+
451
+
452
+ //# sourceMappingURL=index.esm.js.map
453
+
454
+
455
+ /***/ }),
456
+
457
+ /***/ "./node_modules/dlv/dist/dlv.umd.js":
458
+ /*!******************************************!*\
459
+ !*** ./node_modules/dlv/dist/dlv.umd.js ***!
460
+ \******************************************/
461
+ /*! no static exports found */
462
+ /***/ (function(module, exports, __webpack_require__) {
463
+
464
+ !function(t,n){ true?module.exports=function(t,n,e,i,o){for(n=n.split?n.split("."):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}:undefined}(this);
465
+ //# sourceMappingURL=dlv.umd.js.map
466
+
467
+
468
+ /***/ }),
469
+
470
+ /***/ "./node_modules/sorted-array/sorted-array.js":
471
+ /*!***************************************************!*\
472
+ !*** ./node_modules/sorted-array/sorted-array.js ***!
473
+ \***************************************************/
474
+ /*! no static exports found */
475
+ /***/ (function(module, exports, __webpack_require__) {
476
+
477
+ var __WEBPACK_AMD_DEFINE_RESULT__;var SortedArray = (function () {
478
+ var SortedArray = defclass({
479
+
480
+ constructor: function (array, compare) {
481
+ this.array = [];
482
+ this.compare = compare || compareDefault;
483
+ var length = array.length,
484
+ index = 0;
485
+ while (index < length) this.insert(array[index++]);
486
+ },
487
+ insert: function (element) {
488
+ var array = this.array,
489
+ compare = this.compare,
490
+ high = array.length-1,
491
+ low = 0,
492
+ pos = -1,
493
+ index,
494
+ ordering;
495
+
496
+ // The array is sorted. You must find the position of new element in O(log(n)), not O(n).
497
+ while (high >= low) {
498
+ index = (high + low) / 2 >>> 0;
499
+ ordering = compare(array[index], element);
500
+ if (ordering < 0) low = index + 1;
501
+ else if (ordering > 0) high = index - 1;
502
+ else {
503
+ pos = index;
504
+ break;
505
+ };
506
+ }
507
+
508
+ if (pos === -1) {
509
+ // if element was not found, high < low.
510
+ pos = high;
511
+ }
512
+ // This assures that equal elements inserted after will be in a higher position in array.
513
+ // They can be equal for comparison purposes, but different objects with different data.
514
+ // Respecting the chronological order can be important for many applications.
515
+ pos++;
516
+ high = array.length-1;
517
+ while ((pos < high) && (compare(element, array[pos]) === 0)){
518
+ pos++;
519
+ }
520
+ index = array.length;
521
+ // Just to increase array size.
522
+ array.push(element);
523
+ // Much faster. No need to elements swap.
524
+ while (index > pos) {
525
+ array[index] = array[--index];
526
+ }
527
+ // Set the new element on its correct position.
528
+ array[pos] = element;
529
+
530
+ return this;
531
+ },
532
+ search: function (element) {
533
+ var array = this.array,
534
+ compare = this.compare,
535
+ high = array.length-1,
536
+ low = 0,
537
+ // In most languages, inner variable declaration makes the code slower.
538
+ index,
539
+ ordering;
540
+
541
+ while (high >= low) {
542
+ index = (high + low) / 2 >>> 0;
543
+ ordering = compare(array[index], element);
544
+
545
+ if (ordering < 0) low = index + 1;
546
+ else if (ordering > 0) high = index - 1;
547
+ else return index;
548
+ }
549
+
550
+ return -1;
551
+ },
552
+ remove: function (element) {
553
+ var index = this.search(element);
554
+ if (index >= 0) this.array.splice(index, 1);
555
+ return this;
556
+ }
557
+ });
558
+
559
+ SortedArray.comparing = function (property, array) {
560
+ return new SortedArray(array, function (a, b) {
561
+ // This should be faster than calling functions.
562
+ // Besides, this way it is not needed to create useless function to return property value.
563
+ return compareDefault(a[property], b[property]);
564
+ });
565
+ };
566
+
567
+ return SortedArray;
568
+
569
+ function defclass(prototype) {
570
+ var constructor = prototype.constructor;
571
+ constructor.prototype = prototype;
572
+ return constructor;
573
+ }
574
+
575
+ function compareDefault(a, b) {
576
+ // Equality has a very low chance to happen. It should be the last option.
577
+ if (a < b)
578
+ return -1;
579
+ else if (a > b)
580
+ return 1;
581
+ else
582
+ return 0;
583
+ }
584
+ }());
585
+
586
+ if (true) module.exports = SortedArray;
587
+ if (true)
588
+ !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return SortedArray; }).call(exports, __webpack_require__, exports, module),
589
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
590
+
591
+
592
+ /***/ })
593
+
594
+ /******/ });
595
+ });
@@ -0,0 +1 @@
1
+ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.ReferenceAssetsPlugin=t():e.ReferenceAssetsPlugin=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){var n,o=function(){var e=function(e){var t=e.constructor;return t.prototype=e,t}({constructor:function(e,r){this.array=[],this.compare=r||t;for(var n=e.length,o=0;o<n;)this.insert(e[o++])},insert:function(e){for(var t,r,n=this.array,o=this.compare,i=n.length-1,s=0,u=-1;i>=s;)if((r=o(n[t=(i+s)/2>>>0],e))<0)s=t+1;else{if(!(r>0)){u=t;break}i=t-1}for(-1===u&&(u=i),u++,i=n.length-1;u<i&&0===o(e,n[u]);)u++;for(t=n.length,n.push(e);t>u;)n[t]=n[--t];return n[u]=e,this},search:function(e){for(var t,r,n=this.array,o=this.compare,i=n.length-1,s=0;i>=s;)if((r=o(n[t=(i+s)/2>>>0],e))<0)s=t+1;else{if(!(r>0))return t;i=t-1}return-1},remove:function(e){var t=this.search(e);return t>=0&&this.array.splice(t,1),this}});return e.comparing=function(r,n){return new e(n,(function(e,n){return t(e[r],n[r])}))},e;function t(e,t){return e<t?-1:e>t?1:0}}();e.exports=o,void 0===(n=function(){return o}.call(t,r,t,e))||(e.exports=n)},function(e,t,r){e.exports=function(e,t,r,n,o){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:o;return e===o?r:e}},function(e,t,r){"use strict";r.r(t),r.d(t,"ReferenceAssetsPlugin",(function(){return z})),r.d(t,"actionTransform",(function(){return I})),r.d(t,"expPropTransform",(function(){return D})),r.d(t,"inputTransform",(function(){return P})),r.d(t,"isBackAction",(function(){return M}));var n=r(0),o=r.n(n),i=r(1),s=r.n(i);function u(e,t=[],r=new Map){for(const n of Object.keys(e)){const o=e[n],i=[...t,n];"object"===typeof o?u(o,i,r):r.set(i,o)}return r}function c(e){const t=u(e),r=e=>{for(const r of t){const[t,n]=r;if(s()(e,t)!==n)return!1}return!0};return r.count=t.size,r}const a=()=>new o.a([],(e=>e.matcher.count));class l{constructor(e){this.store=a(),null==e||e.forEach((([e,t])=>{this.set(e,t)}))}set(e,t){const r="object"===typeof e?c(e):function(e){const t=t=>e===t;return t.count=1,t}(e);this.store.insert({key:e,value:t,matcher:r})}get(e){for(const t of this.store.array)if(t.matcher(e))return t.value}forEach(e){for(const t of this.store.array)e(t)}clear(){this.store=a()}}function f(...e){const[t,...r]=e.reverse();return(e,n,o)=>{const i=t(e,n,o);return r.length?r.reduce(((e,t)=>t(e,n,o)),i):i}}function p(...e){const t=[],r=[];for(const n of e)"function"===typeof n?r.push(n):((null==n?void 0:n.resolve)&&r.push(n.resolve),(null==n?void 0:n.beforeResolve)&&t.push(n.beforeResolve));return{beforeResolve:t.length?f(...t):void 0,resolve:r.length?f(...r):void 0}}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function d(e){return"object"===typeof e?e:p(e)}class v{constructor(e){this.name="asset-transform",this.registry=function(e){if(Array.isArray(e)){const t=e.map((([e,t])=>[e,d(t)]));return new l(t)}const t=new l;return e.forEach((({key:e,value:r})=>{t.set(e,d(r))})),t}(e)}apply(e){e.hooks.viewController.tap(this.name,(e=>{this.registry.forEach((({key:t,value:r})=>e.transformRegistry.set(t,d(r))))}))}}var y=Object.defineProperty,b=Object.defineProperties,g=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,j=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const P=(e,t)=>{var r,n,o,i;return o=((e,t)=>{for(var r in t||(t={}))m.call(t,r)&&j(e,r,t[r]);if(h)for(var r of h(t))O.call(t,r)&&j(e,r,t[r]);return e})({},e),i={format:r=>void 0===e.binding?r:t.data.format(e.binding,r),set(r){if(void 0!==e.binding)return t.data.model.set([[e.binding,r]],{formatted:!0})},value:void 0===e.binding?"":t.data.model.get(e.binding,{includeInvalid:!0,formatted:!0}),validation:void 0===e.binding||null==(r=t.validation)?void 0:r.get(e.binding,{track:!0}),dataType:void 0===e.binding||null==(n=t.validation)?void 0:n.type(e.binding)},b(o,g(i))};var w=Object.defineProperty,x=Object.defineProperties,k=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,E=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t||(t={}))S.call(t,r)&&E(e,r,t[r]);if(R)for(var r of R(t))T.call(t,r)&&E(e,r,t[r]);return e},_=(e,t)=>x(e,k(t));function M(e){return"Prev"===e.value}const D=e=>{var t,r,n,o,i,s;const u=null==(r=null==(t=e.plugins)?void 0:t.stringResolver)?void 0:r.propertiesToSkip;return u&&u.indexOf("exp")>1?e:_(A({},e),{plugins:_(A({},e.plugins),{stringResolver:_(A({},null==(n=null==e?void 0:e.plugins)?void 0:n.stringResolver),{propertiesToSkip:[...null!=(s=null==(i=null==(o=e.plugins)?void 0:o.stringResolver)?void 0:i.propertiesToSkip)?s:[],"exp"]})})})},I=p(((e,t)=>_(A({},e),{run(){var r,n;if(e.exp&&t.evaluate(e.exp),e.value){const o=null==(r=e.metaData)?void 0:r.skipValidation;null==(n=t.transition)||n.call(t,e.value,{force:o})}}})),function(...e){return{beforeResolve:f(...e)}}(D));class z{constructor(){this.name="reference-assets-transforms"}apply(e){e.registerPlugin(new v([[{type:"action"},I],[{type:"input"},P]]))}}}])}));
@@ -0,0 +1,118 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/action/types.ts",
3
+ "name": "ActionAsset",
4
+ "type": "object",
5
+ "properties": {
6
+ "value": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "string",
10
+ "title": "ActionAsset.value",
11
+ "description": "The transition value of the action in the state machine"
12
+ }
13
+ },
14
+ "label": {
15
+ "required": false,
16
+ "node": {
17
+ "type": "ref",
18
+ "ref": "AssetWrapper<AnyTextAsset>",
19
+ "genericArguments": [
20
+ {
21
+ "type": "ref",
22
+ "ref": "AnyTextAsset"
23
+ }
24
+ ],
25
+ "title": "ActionAsset.label",
26
+ "description": "A text-like asset for the action's label"
27
+ }
28
+ },
29
+ "exp": {
30
+ "required": false,
31
+ "node": {
32
+ "type": "ref",
33
+ "ref": "Expression",
34
+ "title": "ActionAsset.exp",
35
+ "description": "An optional expression to execute before transitioning"
36
+ }
37
+ },
38
+ "accessibility": {
39
+ "required": false,
40
+ "node": {
41
+ "type": "string",
42
+ "title": "ActionAsset.accessibility",
43
+ "description": "An optional string that describes the action for screen-readers"
44
+ }
45
+ },
46
+ "metaData": {
47
+ "required": false,
48
+ "node": {
49
+ "type": "object",
50
+ "properties": {
51
+ "beacon": {
52
+ "required": false,
53
+ "node": {
54
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/node_modules/@player-ui/beacon-plugin/dist/index.d.ts",
55
+ "name": "BeaconDataType",
56
+ "type": "or",
57
+ "or": [
58
+ {
59
+ "type": "string",
60
+ "title": "BeaconDataType"
61
+ },
62
+ {
63
+ "type": "record",
64
+ "keyType": {
65
+ "type": "string"
66
+ },
67
+ "valueType": {
68
+ "type": "any"
69
+ },
70
+ "title": "BeaconDataType"
71
+ }
72
+ ],
73
+ "title": "ActionAsset.metaData.beacon",
74
+ "description": "Additional data to beacon"
75
+ }
76
+ },
77
+ "skipValidation": {
78
+ "required": false,
79
+ "node": {
80
+ "type": "boolean",
81
+ "title": "ActionAsset.metaData.skipValidation",
82
+ "description": "Force transition to the next view without checking for validation"
83
+ }
84
+ }
85
+ },
86
+ "additionalProperties": false,
87
+ "title": "ActionAsset.metaData",
88
+ "description": "Additional optional data to assist with the action interactions on the page"
89
+ }
90
+ }
91
+ },
92
+ "additionalProperties": false,
93
+ "title": "ActionAsset",
94
+ "description": "User actions can be represented in several places.\nEach view typically has one or more actions that allow the user to navigate away from that view.\nIn addition, several asset types can have actions that apply to that asset only.",
95
+ "genericTokens": [
96
+ {
97
+ "symbol": "AnyTextAsset",
98
+ "constraints": {
99
+ "type": "ref",
100
+ "ref": "Asset"
101
+ },
102
+ "default": {
103
+ "type": "ref",
104
+ "ref": "Asset"
105
+ }
106
+ }
107
+ ],
108
+ "extends": {
109
+ "type": "ref",
110
+ "ref": "Asset<'action'>",
111
+ "genericArguments": [
112
+ {
113
+ "type": "string",
114
+ "const": "action"
115
+ }
116
+ ]
117
+ }
118
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/collection/types.ts",
3
+ "name": "CollectionAsset",
4
+ "type": "object",
5
+ "properties": {
6
+ "label": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "ref",
10
+ "ref": "AssetWrapper",
11
+ "title": "CollectionAsset.label",
12
+ "description": "An optional label to title the collection"
13
+ }
14
+ },
15
+ "values": {
16
+ "required": false,
17
+ "node": {
18
+ "type": "array",
19
+ "elementType": {
20
+ "type": "ref",
21
+ "ref": "AssetWrapper"
22
+ },
23
+ "title": "CollectionAsset.values",
24
+ "description": "The string value to show"
25
+ }
26
+ }
27
+ },
28
+ "additionalProperties": false,
29
+ "title": "CollectionAsset",
30
+ "extends": {
31
+ "type": "ref",
32
+ "ref": "Asset<'collection'>",
33
+ "genericArguments": [
34
+ {
35
+ "type": "string",
36
+ "const": "collection"
37
+ }
38
+ ]
39
+ }
40
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/info/types.ts",
3
+ "name": "InfoAsset",
4
+ "type": "object",
5
+ "properties": {
6
+ "title": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "ref",
10
+ "ref": "AssetWrapper",
11
+ "title": "InfoAsset.title",
12
+ "description": "The string value to show"
13
+ }
14
+ },
15
+ "subTitle": {
16
+ "required": false,
17
+ "node": {
18
+ "type": "ref",
19
+ "ref": "AssetWrapper",
20
+ "title": "InfoAsset.subTitle",
21
+ "description": "subtitle"
22
+ }
23
+ },
24
+ "primaryInfo": {
25
+ "required": false,
26
+ "node": {
27
+ "type": "ref",
28
+ "ref": "AssetWrapper",
29
+ "title": "InfoAsset.primaryInfo",
30
+ "description": "Primary place for info"
31
+ }
32
+ },
33
+ "actions": {
34
+ "required": false,
35
+ "node": {
36
+ "type": "array",
37
+ "elementType": {
38
+ "type": "ref",
39
+ "ref": "AssetWrapper"
40
+ },
41
+ "title": "InfoAsset.actions",
42
+ "description": "List of actions to show at the bottom of the page"
43
+ }
44
+ }
45
+ },
46
+ "additionalProperties": false,
47
+ "title": "InfoAsset",
48
+ "extends": {
49
+ "type": "ref",
50
+ "ref": "Asset<'info'>",
51
+ "genericArguments": [
52
+ {
53
+ "type": "string",
54
+ "const": "info"
55
+ }
56
+ ]
57
+ }
58
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/input/types.ts",
3
+ "name": "InputAsset",
4
+ "type": "object",
5
+ "properties": {
6
+ "label": {
7
+ "required": false,
8
+ "node": {
9
+ "type": "ref",
10
+ "ref": "AssetWrapper<AnyTextAsset>",
11
+ "genericArguments": [
12
+ {
13
+ "type": "ref",
14
+ "ref": "AnyTextAsset"
15
+ }
16
+ ],
17
+ "title": "InputAsset.label",
18
+ "description": "Asset container for a field label."
19
+ }
20
+ },
21
+ "note": {
22
+ "required": false,
23
+ "node": {
24
+ "type": "ref",
25
+ "ref": "AssetWrapper<AnyTextAsset>",
26
+ "genericArguments": [
27
+ {
28
+ "type": "ref",
29
+ "ref": "AnyTextAsset"
30
+ }
31
+ ],
32
+ "title": "InputAsset.note",
33
+ "description": "Asset container for a note."
34
+ }
35
+ },
36
+ "binding": {
37
+ "required": true,
38
+ "node": {
39
+ "type": "ref",
40
+ "ref": "Binding",
41
+ "title": "InputAsset.binding",
42
+ "description": "The location in the data-model to store the data"
43
+ }
44
+ },
45
+ "metaData": {
46
+ "required": false,
47
+ "node": {
48
+ "type": "object",
49
+ "properties": {
50
+ "beacon": {
51
+ "required": false,
52
+ "node": {
53
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/node_modules/@player-ui/beacon-plugin/dist/index.d.ts",
54
+ "name": "BeaconDataType",
55
+ "type": "or",
56
+ "or": [
57
+ {
58
+ "type": "string",
59
+ "title": "BeaconDataType"
60
+ },
61
+ {
62
+ "type": "record",
63
+ "keyType": {
64
+ "type": "string"
65
+ },
66
+ "valueType": {
67
+ "type": "any"
68
+ },
69
+ "title": "BeaconDataType"
70
+ }
71
+ ],
72
+ "title": "InputAsset.metaData.beacon",
73
+ "description": "Additional data to beacon when this input changes"
74
+ }
75
+ }
76
+ },
77
+ "additionalProperties": false,
78
+ "title": "InputAsset.metaData",
79
+ "description": "Optional additional data"
80
+ }
81
+ }
82
+ },
83
+ "additionalProperties": false,
84
+ "title": "InputAsset",
85
+ "description": "This is the most generic way of gathering data. The input is bound to a data model using the 'binding' property.\nPlayers can get field type information from the 'schema' definition, thus to decide the input controls for visual rendering.",
86
+ "genericTokens": [
87
+ {
88
+ "symbol": "AnyTextAsset",
89
+ "constraints": {
90
+ "type": "ref",
91
+ "ref": "Asset"
92
+ },
93
+ "default": {
94
+ "type": "ref",
95
+ "ref": "Asset"
96
+ }
97
+ }
98
+ ],
99
+ "extends": {
100
+ "type": "ref",
101
+ "ref": "Asset<'input'>",
102
+ "genericArguments": [
103
+ {
104
+ "type": "string",
105
+ "const": "input"
106
+ }
107
+ ]
108
+ }
109
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/text/types.ts",
3
+ "name": "TextAsset",
4
+ "type": "object",
5
+ "properties": {
6
+ "value": {
7
+ "required": true,
8
+ "node": {
9
+ "type": "string",
10
+ "title": "TextAsset.value",
11
+ "description": "The text to display"
12
+ }
13
+ },
14
+ "modifiers": {
15
+ "required": false,
16
+ "node": {
17
+ "type": "array",
18
+ "elementType": {
19
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/text/types.ts",
20
+ "name": "TextModifier",
21
+ "type": "or",
22
+ "or": [
23
+ {
24
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/text/types.ts",
25
+ "name": "BasicTextModifier",
26
+ "type": "object",
27
+ "properties": {
28
+ "type": {
29
+ "required": true,
30
+ "node": {
31
+ "type": "string",
32
+ "title": "BasicTextModifier.type",
33
+ "description": "The modifier type"
34
+ }
35
+ },
36
+ "name": {
37
+ "required": false,
38
+ "node": {
39
+ "type": "string",
40
+ "title": "BasicTextModifier.name",
41
+ "description": "Modifiers can be named when used in strings"
42
+ }
43
+ }
44
+ },
45
+ "additionalProperties": {
46
+ "type": "unknown"
47
+ },
48
+ "title": "BasicTextModifier"
49
+ },
50
+ {
51
+ "source": "/home/circleci/.cache/bazel/_bazel_circleci/e8362d362e14c7d23506d1dfa3aea8b8/sandbox/processwrapper-sandbox/2726/execroot/player/plugins/reference-assets/core/src/assets/text/types.ts",
52
+ "name": "LinkModifier",
53
+ "type": "object",
54
+ "properties": {
55
+ "type": {
56
+ "required": true,
57
+ "node": {
58
+ "type": "string",
59
+ "const": "link",
60
+ "title": "LinkModifier.type",
61
+ "description": "The link type denotes this as a link"
62
+ }
63
+ },
64
+ "exp": {
65
+ "required": false,
66
+ "node": {
67
+ "type": "ref",
68
+ "ref": "Expression",
69
+ "title": "LinkModifier.exp",
70
+ "description": "An optional expression to run before the link is opened"
71
+ }
72
+ },
73
+ "metaData": {
74
+ "required": true,
75
+ "node": {
76
+ "type": "object",
77
+ "properties": {
78
+ "ref": {
79
+ "required": true,
80
+ "node": {
81
+ "type": "string",
82
+ "title": "LinkModifier.metaData.ref",
83
+ "description": "The location of the link to load"
84
+ }
85
+ },
86
+ "'mime-type'": {
87
+ "required": false,
88
+ "node": {
89
+ "type": "string",
90
+ "title": "LinkModifier.metaData.'mime-type'",
91
+ "description": "Used to indicate an application specific resolver to use"
92
+ }
93
+ }
94
+ },
95
+ "additionalProperties": false,
96
+ "title": "LinkModifier.metaData",
97
+ "description": "metaData about the link's target"
98
+ }
99
+ }
100
+ },
101
+ "additionalProperties": false,
102
+ "title": "LinkModifier",
103
+ "description": "A modifier to turn the text into a link"
104
+ }
105
+ ],
106
+ "title": "TextModifier"
107
+ },
108
+ "title": "TextAsset.modifiers",
109
+ "description": "Any modifiers on the text"
110
+ }
111
+ }
112
+ },
113
+ "additionalProperties": false,
114
+ "title": "TextAsset",
115
+ "extends": {
116
+ "type": "ref",
117
+ "ref": "Asset<'text'>",
118
+ "genericArguments": [
119
+ {
120
+ "type": "string",
121
+ "const": "text"
122
+ }
123
+ ]
124
+ }
125
+ }
@@ -0,0 +1,12 @@
1
+ const InputAsset = require('./InputAsset.json')
2
+ const TextAsset = require('./TextAsset.json')
3
+ const ActionAsset = require('./ActionAsset.json')
4
+ const InfoAsset = require('./InfoAsset.json')
5
+ const CollectionAsset = require('./CollectionAsset.json')
6
+
7
+ module.exports = {
8
+ "pluginName": "reference-assets-transforms",
9
+ "capabilities": {
10
+ "Assets":[InputAsset,TextAsset,ActionAsset,InfoAsset,CollectionAsset],
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "pluginName": "reference-assets-transforms",
3
+ "capabilities": {
4
+ "Assets": [
5
+ "InputAsset",
6
+ "TextAsset",
7
+ "ActionAsset",
8
+ "InfoAsset",
9
+ "CollectionAsset"
10
+ ]
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@player-ui/reference-assets-plugin",
3
- "version": "0.3.1-next.0",
3
+ "version": "0.4.0--canary.85.4368",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
7
7
  },
8
8
  "peerDependencies": {
9
- "@player-ui/player": "0.3.1-next.0"
9
+ "@player-ui/player": "0.4.0--canary.85.4368"
10
10
  },
11
11
  "dependencies": {
12
- "@player-ui/beacon-plugin": "0.3.1-next.0",
13
- "@player-ui/asset-transform-plugin": "0.3.1-next.0",
12
+ "@player-ui/beacon-plugin": "0.4.0--canary.85.4368",
13
+ "@player-ui/asset-transform-plugin": "0.4.0--canary.85.4368",
14
14
  "@babel/runtime": "7.15.4"
15
15
  },
16
16
  "main": "dist/index.cjs.js",
@@ -55,5 +55,6 @@
55
55
  "name": "Kelly Harrop",
56
56
  "url": "https://github.com/kharrop"
57
57
  }
58
- ]
58
+ ],
59
+ "bundle": "./dist/reference-assets-plugin.prod.js"
59
60
  }
package/src/plugin.ts CHANGED
@@ -1,11 +1,28 @@
1
- import type { Player, PlayerPlugin } from '@player-ui/player';
1
+ import type {
2
+ Player,
3
+ PlayerPlugin,
4
+ ExtendedPlayerPlugin,
5
+ } from '@player-ui/player';
2
6
  import { AssetTransformPlugin } from '@player-ui/asset-transform-plugin';
7
+ import type {
8
+ ActionAsset,
9
+ CollectionAsset,
10
+ InfoAsset,
11
+ InputAsset,
12
+ TextAsset,
13
+ } from './assets';
3
14
  import { inputTransform, actionTransform } from './assets';
4
15
 
5
16
  /**
6
17
  * A plugin to add transforms for the reference assets
7
18
  */
8
- export class ReferenceAssetsPlugin implements PlayerPlugin {
19
+ export class ReferenceAssetsPlugin
20
+ implements
21
+ PlayerPlugin,
22
+ ExtendedPlayerPlugin<
23
+ [InputAsset, TextAsset, ActionAsset, InfoAsset, CollectionAsset]
24
+ >
25
+ {
9
26
  name = 'reference-assets-transforms';
10
27
 
11
28
  apply(player: Player) {