@player-ui/markdown-plugin 1.1.0--canary.866.38513 → 1.1.0--canary.866.38904

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.
@@ -12196,8 +12196,8 @@ var MarkdownPlugin = function() {
12196
12196
  ref: Symbol("not-started"),
12197
12197
  status: "not-started"
12198
12198
  };
12199
- var PLAYER_VERSION = true ? "1.1.0--canary.866.38513" : "unknown";
12200
- var COMMIT = true ? "4ebf47a2b8843a4c1f8979f42e0053f2a45e1a9d" : "unknown";
12199
+ var PLAYER_VERSION = true ? "1.1.0--canary.866.38904" : "unknown";
12200
+ var COMMIT = true ? "4bb0e145f34d37972e689d8f184c53e1692d0cc5" : "unknown";
12201
12201
  var _Player = /*#__PURE__*/ function() {
12202
12202
  function _Player2(config) {
12203
12203
  var _this = this;
@@ -12220,7 +12220,7 @@ var MarkdownPlugin = function() {
12220
12220
  onStart: new SyncHook(),
12221
12221
  onEnd: new SyncHook(),
12222
12222
  resolveFlowContent: new SyncWaterfallHook(),
12223
- transformContent: new SyncWaterfallHook()
12223
+ transformContent: new SyncBailHook()
12224
12224
  };
12225
12225
  if (config === null || config === void 0 ? void 0 : config.logger) {
12226
12226
  this.logger.addHandler(config.logger);
@@ -12234,6 +12234,9 @@ var MarkdownPlugin = function() {
12234
12234
  (_this_config_plugins = this.config.plugins) === null || _this_config_plugins === void 0 ? void 0 : _this_config_plugins.forEach(function(plugin) {
12235
12235
  plugin.apply(_this);
12236
12236
  });
12237
+ this.hooks.transformContent.tap("player", function(payload, meta) {
12238
+ return meta.format === "player" ? payload : void 0;
12239
+ });
12237
12240
  }
12238
12241
  _create_class(_Player2, [
12239
12242
  {
@@ -12552,7 +12555,10 @@ var MarkdownPlugin = function() {
12552
12555
  version: options === null || options === void 0 ? void 0 : options.version
12553
12556
  };
12554
12557
  flow3 = this.hooks.transformContent.call(payload, meta);
12555
- ref = Symbol((_flow3_id = flow3 === null || flow3 === void 0 ? void 0 : flow3.id) !== null && _flow3_id !== void 0 ? _flow3_id : "payload");
12558
+ if (!flow3) {
12559
+ throw new Error('Player.start received content with format "'.concat(meta.format, '" that no plugin transformed into a Flow.'));
12560
+ }
12561
+ ref = Symbol((_flow3_id = flow3.id) !== null && _flow3_id !== void 0 ? _flow3_id : "payload");
12556
12562
  maybeUpdateState = function(newState) {
12557
12563
  if (_this.state.ref !== ref) {
12558
12564
  _this.logger.warn("Received update for a flow that's not the current one");