@player-ui/beacon-plugin 1.1.0--canary.866.38904 → 1.1.0-next.1

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.
@@ -7912,8 +7912,8 @@ var BeaconPlugin = function() {
7912
7912
  ref: Symbol("not-started"),
7913
7913
  status: "not-started"
7914
7914
  };
7915
- var PLAYER_VERSION = true ? "1.1.0--canary.866.38904" : "unknown";
7916
- var COMMIT = true ? "4bb0e145f34d37972e689d8f184c53e1692d0cc5" : "unknown";
7915
+ var PLAYER_VERSION = true ? "1.1.0-next.1" : "unknown";
7916
+ var COMMIT = true ? "8d1e44b77769e923785e6218de2d9f99342b9b1a" : "unknown";
7917
7917
  var _Player = /*#__PURE__*/ function() {
7918
7918
  function _Player2(config) {
7919
7919
  var _this = this;
@@ -7935,8 +7935,7 @@ var BeaconPlugin = function() {
7935
7935
  state: new SyncHook(),
7936
7936
  onStart: new SyncHook(),
7937
7937
  onEnd: new SyncHook(),
7938
- resolveFlowContent: new SyncWaterfallHook(),
7939
- transformContent: new SyncBailHook()
7938
+ resolveFlowContent: new SyncWaterfallHook()
7940
7939
  };
7941
7940
  if (config === null || config === void 0 ? void 0 : config.logger) {
7942
7941
  this.logger.addHandler(config.logger);
@@ -7950,9 +7949,6 @@ var BeaconPlugin = function() {
7950
7949
  (_this_config_plugins = this.config.plugins) === null || _this_config_plugins === void 0 ? void 0 : _this_config_plugins.forEach(function(plugin) {
7951
7950
  plugin.apply(_this);
7952
7951
  });
7953
- this.hooks.transformContent.tap("player", function(payload, meta) {
7954
- return meta.format === "player" ? payload : void 0;
7955
- });
7956
7952
  }
7957
7953
  _create_class(_Player2, [
7958
7954
  {
@@ -8259,22 +8255,14 @@ var BeaconPlugin = function() {
8259
8255
  },
8260
8256
  {
8261
8257
  key: "start",
8262
- value: function start(payload, options) {
8258
+ value: function start(payload) {
8263
8259
  return _async_to_generator(function() {
8264
- var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8260
+ var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8265
8261
  return _ts_generator(this, function(_state) {
8266
8262
  switch(_state.label){
8267
8263
  case 0:
8268
8264
  _this = this;
8269
- meta = {
8270
- format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
8271
- version: options === null || options === void 0 ? void 0 : options.version
8272
- };
8273
- flow = this.hooks.transformContent.call(payload, meta);
8274
- if (!flow) {
8275
- throw new Error('Player.start received content with format "'.concat(meta.format, '" that no plugin transformed into a Flow.'));
8276
- }
8277
- ref = Symbol((_flow_id = flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
8265
+ ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
8278
8266
  maybeUpdateState = function(newState) {
8279
8267
  if (_this.state.ref !== ref) {
8280
8268
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -8295,7 +8283,7 @@ var BeaconPlugin = function() {
8295
8283
  ,
8296
8284
  4
8297
8285
  ]);
8298
- _this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
8286
+ _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
8299
8287
  this.setState(_object_spread({
8300
8288
  ref: ref
8301
8289
  }, state));
@@ -8330,7 +8318,7 @@ var BeaconPlugin = function() {
8330
8318
  errorState = {
8331
8319
  status: "error",
8332
8320
  ref: ref,
8333
- flow: flow,
8321
+ flow: payload,
8334
8322
  error: error
8335
8323
  };
8336
8324
  maybeUpdateState(errorState);