@player-ui/reference-assets-plugin 1.0.1 → 1.1.0--canary.866.38489

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.
@@ -8381,8 +8381,8 @@ var ReferenceAssetsPlugin = function() {
8381
8381
  ref: Symbol("not-started"),
8382
8382
  status: "not-started"
8383
8383
  };
8384
- var PLAYER_VERSION = true ? "1.0.1" : "unknown";
8385
- var COMMIT = true ? "b2d81e4bf7bb035fa6edbe65d21641d79631c53d" : "unknown";
8384
+ var PLAYER_VERSION = true ? "1.1.0--canary.866.38489" : "unknown";
8385
+ var COMMIT = true ? "3da792fb855f66e3747d2b873d0292ae811523a1" : "unknown";
8386
8386
  var _Player = /*#__PURE__*/ function() {
8387
8387
  function _Player2(config) {
8388
8388
  var _this = this;
@@ -8404,7 +8404,8 @@ var ReferenceAssetsPlugin = function() {
8404
8404
  state: new SyncHook(),
8405
8405
  onStart: new SyncHook(),
8406
8406
  onEnd: new SyncHook(),
8407
- resolveFlowContent: new SyncWaterfallHook()
8407
+ resolveFlowContent: new SyncWaterfallHook(),
8408
+ transformContent: new SyncWaterfallHook()
8408
8409
  };
8409
8410
  if (config === null || config === void 0 ? void 0 : config.logger) {
8410
8411
  this.logger.addHandler(config.logger);
@@ -8724,14 +8725,19 @@ var ReferenceAssetsPlugin = function() {
8724
8725
  },
8725
8726
  {
8726
8727
  key: "start",
8727
- value: function start(payload) {
8728
+ value: function start(payload, options) {
8728
8729
  return _async_to_generator(function() {
8729
- var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8730
+ var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8730
8731
  return _ts_generator(this, function(_state) {
8731
8732
  switch(_state.label){
8732
8733
  case 0:
8733
8734
  _this = this;
8734
- ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
8735
+ meta = {
8736
+ format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
8737
+ version: options === null || options === void 0 ? void 0 : options.version
8738
+ };
8739
+ flow = this.hooks.transformContent.call(payload, meta);
8740
+ ref = Symbol((_flow_id = flow === null || flow === void 0 ? void 0 : flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
8735
8741
  maybeUpdateState = function(newState) {
8736
8742
  if (_this.state.ref !== ref) {
8737
8743
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -8752,7 +8758,7 @@ var ReferenceAssetsPlugin = function() {
8752
8758
  ,
8753
8759
  4
8754
8760
  ]);
8755
- _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
8761
+ _this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
8756
8762
  this.setState(_object_spread({
8757
8763
  ref: ref
8758
8764
  }, state));
@@ -8787,7 +8793,7 @@ var ReferenceAssetsPlugin = function() {
8787
8793
  errorState = {
8788
8794
  status: "error",
8789
8795
  ref: ref,
8790
- flow: payload,
8796
+ flow: flow,
8791
8797
  error: error
8792
8798
  };
8793
8799
  maybeUpdateState(errorState);