@player-ui/player 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.
@@ -8495,8 +8495,8 @@ var Player = function() {
8495
8495
  status: "not-started"
8496
8496
  };
8497
8497
  // ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/core/player/src/player.ts
8498
- var PLAYER_VERSION = true ? "1.0.1" : "unknown";
8499
- var COMMIT = true ? "b2d81e4bf7bb035fa6edbe65d21641d79631c53d" : "unknown";
8498
+ var PLAYER_VERSION = true ? "1.1.0--canary.866.38489" : "unknown";
8499
+ var COMMIT = true ? "3da792fb855f66e3747d2b873d0292ae811523a1" : "unknown";
8500
8500
  var _Player = /*#__PURE__*/ function() {
8501
8501
  function _Player(config) {
8502
8502
  var _this = this;
@@ -8518,7 +8518,8 @@ var Player = function() {
8518
8518
  state: new SyncHook(),
8519
8519
  onStart: new SyncHook(),
8520
8520
  onEnd: new SyncHook(),
8521
- resolveFlowContent: new SyncWaterfallHook()
8521
+ resolveFlowContent: new SyncWaterfallHook(),
8522
+ transformContent: new SyncWaterfallHook()
8522
8523
  };
8523
8524
  if (config === null || config === void 0 ? void 0 : config.logger) {
8524
8525
  this.logger.addHandler(config.logger);
@@ -8838,14 +8839,19 @@ var Player = function() {
8838
8839
  },
8839
8840
  {
8840
8841
  key: "start",
8841
- value: function start(payload) {
8842
+ value: function start(payload, options) {
8842
8843
  return _async_to_generator(function() {
8843
- var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8844
+ var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8844
8845
  return _ts_generator(this, function(_state) {
8845
8846
  switch(_state.label){
8846
8847
  case 0:
8847
8848
  _this = this;
8848
- ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
8849
+ meta = {
8850
+ format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
8851
+ version: options === null || options === void 0 ? void 0 : options.version
8852
+ };
8853
+ flow = this.hooks.transformContent.call(payload, meta);
8854
+ ref = Symbol((_flow_id = flow === null || flow === void 0 ? void 0 : flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
8849
8855
  maybeUpdateState = function(newState) {
8850
8856
  if (_this.state.ref !== ref) {
8851
8857
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -8866,7 +8872,7 @@ var Player = function() {
8866
8872
  ,
8867
8873
  4
8868
8874
  ]);
8869
- _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
8875
+ _this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
8870
8876
  this.setState(_object_spread({
8871
8877
  ref: ref
8872
8878
  }, state));
@@ -8901,7 +8907,7 @@ var Player = function() {
8901
8907
  errorState = {
8902
8908
  status: "error",
8903
8909
  ref: ref,
8904
- flow: payload,
8910
+ flow: flow,
8905
8911
  error: error
8906
8912
  };
8907
8913
  maybeUpdateState(errorState);