@player-ui/external-state-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.
@@ -7840,8 +7840,8 @@ var ExternalStatePlugin = function() {
7840
7840
  ref: Symbol("not-started"),
7841
7841
  status: "not-started"
7842
7842
  };
7843
- var PLAYER_VERSION = true ? "1.1.0--canary.866.38904" : "unknown";
7844
- var COMMIT = true ? "4bb0e145f34d37972e689d8f184c53e1692d0cc5" : "unknown";
7843
+ var PLAYER_VERSION = true ? "1.1.0-next.1" : "unknown";
7844
+ var COMMIT = true ? "8d1e44b77769e923785e6218de2d9f99342b9b1a" : "unknown";
7845
7845
  var _Player = /*#__PURE__*/ function() {
7846
7846
  function _Player2(config) {
7847
7847
  var _this = this;
@@ -7863,8 +7863,7 @@ var ExternalStatePlugin = function() {
7863
7863
  state: new SyncHook(),
7864
7864
  onStart: new SyncHook(),
7865
7865
  onEnd: new SyncHook(),
7866
- resolveFlowContent: new SyncWaterfallHook(),
7867
- transformContent: new SyncBailHook()
7866
+ resolveFlowContent: new SyncWaterfallHook()
7868
7867
  };
7869
7868
  if (config === null || config === void 0 ? void 0 : config.logger) {
7870
7869
  this.logger.addHandler(config.logger);
@@ -7878,9 +7877,6 @@ var ExternalStatePlugin = function() {
7878
7877
  (_this_config_plugins = this.config.plugins) === null || _this_config_plugins === void 0 ? void 0 : _this_config_plugins.forEach(function(plugin) {
7879
7878
  plugin.apply(_this);
7880
7879
  });
7881
- this.hooks.transformContent.tap("player", function(payload, meta) {
7882
- return meta.format === "player" ? payload : void 0;
7883
- });
7884
7880
  }
7885
7881
  _create_class(_Player2, [
7886
7882
  {
@@ -8187,22 +8183,14 @@ var ExternalStatePlugin = function() {
8187
8183
  },
8188
8184
  {
8189
8185
  key: "start",
8190
- value: function start(payload, options) {
8186
+ value: function start(payload) {
8191
8187
  return _async_to_generator(function() {
8192
- var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8188
+ var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8193
8189
  return _ts_generator(this, function(_state) {
8194
8190
  switch(_state.label){
8195
8191
  case 0:
8196
8192
  _this = this;
8197
- meta = {
8198
- format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
8199
- version: options === null || options === void 0 ? void 0 : options.version
8200
- };
8201
- flow = this.hooks.transformContent.call(payload, meta);
8202
- if (!flow) {
8203
- throw new Error('Player.start received content with format "'.concat(meta.format, '" that no plugin transformed into a Flow.'));
8204
- }
8205
- ref = Symbol((_flow_id = flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
8193
+ ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
8206
8194
  maybeUpdateState = function(newState) {
8207
8195
  if (_this.state.ref !== ref) {
8208
8196
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -8223,7 +8211,7 @@ var ExternalStatePlugin = function() {
8223
8211
  ,
8224
8212
  4
8225
8213
  ]);
8226
- _this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
8214
+ _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
8227
8215
  this.setState(_object_spread({
8228
8216
  ref: ref
8229
8217
  }, state));
@@ -8258,7 +8246,7 @@ var ExternalStatePlugin = function() {
8258
8246
  errorState = {
8259
8247
  status: "error",
8260
8248
  ref: ref,
8261
- flow: flow,
8249
+ flow: payload,
8262
8250
  error: error
8263
8251
  };
8264
8252
  maybeUpdateState(errorState);