@player-ui/markdown-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.
@@ -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.0.1" : "unknown";
12200
- var COMMIT = true ? "b2d81e4bf7bb035fa6edbe65d21641d79631c53d" : "unknown";
12199
+ var PLAYER_VERSION = true ? "1.1.0--canary.866.38489" : "unknown";
12200
+ var COMMIT = true ? "3da792fb855f66e3747d2b873d0292ae811523a1" : "unknown";
12201
12201
  var _Player = /*#__PURE__*/ function() {
12202
12202
  function _Player2(config) {
12203
12203
  var _this = this;
@@ -12219,7 +12219,8 @@ var MarkdownPlugin = function() {
12219
12219
  state: new SyncHook(),
12220
12220
  onStart: new SyncHook(),
12221
12221
  onEnd: new SyncHook(),
12222
- resolveFlowContent: new SyncWaterfallHook()
12222
+ resolveFlowContent: new SyncWaterfallHook(),
12223
+ transformContent: new SyncWaterfallHook()
12223
12224
  };
12224
12225
  if (config === null || config === void 0 ? void 0 : config.logger) {
12225
12226
  this.logger.addHandler(config.logger);
@@ -12539,14 +12540,19 @@ var MarkdownPlugin = function() {
12539
12540
  },
12540
12541
  {
12541
12542
  key: "start",
12542
- value: function start(payload) {
12543
+ value: function start(payload, options) {
12543
12544
  return _async_to_generator(function() {
12544
- var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
12545
+ var _this, _options_format, meta, flow3, _flow3_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
12545
12546
  return _ts_generator(this, function(_state) {
12546
12547
  switch(_state.label){
12547
12548
  case 0:
12548
12549
  _this = this;
12549
- ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
12550
+ meta = {
12551
+ format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
12552
+ version: options === null || options === void 0 ? void 0 : options.version
12553
+ };
12554
+ 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");
12550
12556
  maybeUpdateState = function(newState) {
12551
12557
  if (_this.state.ref !== ref) {
12552
12558
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -12567,7 +12573,7 @@ var MarkdownPlugin = function() {
12567
12573
  ,
12568
12574
  4
12569
12575
  ]);
12570
- _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
12576
+ _this_setupFlow = this.setupFlow(flow3), state = _this_setupFlow.state, start = _this_setupFlow.start;
12571
12577
  this.setState(_object_spread({
12572
12578
  ref: ref
12573
12579
  }, state));
@@ -12602,7 +12608,7 @@ var MarkdownPlugin = function() {
12602
12608
  errorState = {
12603
12609
  status: "error",
12604
12610
  ref: ref,
12605
- flow: payload,
12611
+ flow: flow3,
12606
12612
  error: error
12607
12613
  };
12608
12614
  maybeUpdateState(errorState);