@player-ui/markdown-plugin 0.3.1--canary.209.6516 → 0.3.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.
@@ -4101,7 +4101,7 @@ class ValidatedBinding {
4101
4101
  });
4102
4102
  }
4103
4103
  }
4104
- runApplicableValidations(runner, canDismiss) {
4104
+ runApplicableValidations(runner, canDismiss, phase) {
4105
4105
  this.applicableValidations = this.applicableValidations.map((originalValue) => {
4106
4106
  var _a, _b, _c;
4107
4107
  if (originalValue.state === "dismissed") {
@@ -4110,7 +4110,7 @@ class ValidatedBinding {
4110
4110
  const blocking = (_a = originalValue.value.blocking) != null ? _a : originalValue.value.severity === "warning" && "once" || true;
4111
4111
  const obj = Object(timm__WEBPACK_IMPORTED_MODULE_7__["setIn"])(originalValue, ["value", "blocking"], blocking);
4112
4112
  const isBlockingNavigation = blocking === true || blocking === "once" && !canDismiss;
4113
- if (this.currentPhase === "navigation" && obj.state === "active" && obj.value.blocking !== true) {
4113
+ if (phase === "navigation" && obj.state === "active" && obj.value.blocking !== true) {
4114
4114
  if (obj.value.severity === "warning") {
4115
4115
  const warn = obj;
4116
4116
  if (warn.dismissable && warn.response.dismiss && (warn.response.blocking !== "once" || !warn.response.blocking)) {
@@ -4130,7 +4130,7 @@ class ValidatedBinding {
4130
4130
  value: obj.value,
4131
4131
  state: response ? "active" : "none",
4132
4132
  isBlockingNavigation,
4133
- dismissable: obj.value.severity === "warning" && this.currentPhase === "navigation",
4133
+ dismissable: obj.value.severity === "warning" && phase === "navigation",
4134
4134
  response: response ? __spreadProps$2(__spreadValues$3({}, obj.value), {
4135
4135
  message: (_b = response.message) != null ? _b : "Something is broken",
4136
4136
  severity: obj.value.severity,
@@ -4153,7 +4153,7 @@ class ValidatedBinding {
4153
4153
  return;
4154
4154
  }
4155
4155
  if (this.currentPhase === "navigation" || phase === this.currentPhase) {
4156
- this.runApplicableValidations(runner, canDismiss);
4156
+ this.runApplicableValidations(runner, canDismiss, phase);
4157
4157
  return;
4158
4158
  }
4159
4159
  if (phase === "load") {
@@ -4173,12 +4173,12 @@ class ValidatedBinding {
4173
4173
  });
4174
4174
  this.applicableValidations = [
4175
4175
  ...newApplicableValidations,
4176
- ...this.currentPhase === "load" ? this.validationsByState.change : [],
4177
- ...this.validationsByState.navigation
4176
+ ...this.validationsByState.navigation,
4177
+ ...this.currentPhase === "load" ? this.validationsByState.change : []
4178
4178
  ];
4179
4179
  this.currentPhase = "navigation";
4180
4180
  }
4181
- this.runApplicableValidations(runner, canDismiss);
4181
+ this.runApplicableValidations(runner, canDismiss, phase);
4182
4182
  }
4183
4183
  }
4184
4184
  class ValidationController {
@@ -4764,6 +4764,25 @@ class ViewController {
4764
4764
  }
4765
4765
  }
4766
4766
 
4767
+ class ReadOnlyDataController {
4768
+ constructor(controller, logger) {
4769
+ this.controller = controller;
4770
+ this.logger = logger;
4771
+ }
4772
+ get(binding, options) {
4773
+ return this.controller.get(binding, options);
4774
+ }
4775
+ set(transaction, options) {
4776
+ var _a;
4777
+ (_a = this.logger) == null ? void 0 : _a.error("Error: Tried to set in a read only instance of the DataController");
4778
+ return [];
4779
+ }
4780
+ delete(binding, options) {
4781
+ var _a;
4782
+ (_a = this.logger) == null ? void 0 : _a.error("Error: Tried to delete in a read only instance of the DataController");
4783
+ }
4784
+ }
4785
+
4767
4786
  class DataController {
4768
4787
  constructor(model, options) {
4769
4788
  this.hooks = {
@@ -4888,6 +4907,9 @@ class DataController {
4888
4907
  serialize() {
4889
4908
  return this.hooks.serialize.call(this.get(""));
4890
4909
  }
4910
+ makeReadOnly() {
4911
+ return new ReadOnlyDataController(this, this.logger);
4912
+ }
4891
4913
  }
4892
4914
 
4893
4915
  var __defProp$1 = Object.defineProperty;
@@ -5067,8 +5089,8 @@ var __async = (__this, __arguments, generator) => {
5067
5089
  step((generator = generator.apply(__this, __arguments)).next());
5068
5090
  });
5069
5091
  };
5070
- const PLAYER_VERSION = "0.3.1--canary.209.6516";
5071
- const COMMIT = "48e5a26826fe23ea664cb38962cf923cfdb1bd0d";
5092
+ const PLAYER_VERSION = "0.3.1";
5093
+ const COMMIT = "e8392cd5df3c84fb9c68daf149ea88c593ce0428";
5072
5094
  const _Player = class {
5073
5095
  constructor(config) {
5074
5096
  this.logger = new TapableLogger();
@@ -5342,7 +5364,10 @@ const _Player = class {
5342
5364
  const endProps = {
5343
5365
  ref,
5344
5366
  status: "completed",
5345
- flow: state.flow
5367
+ flow: state.flow,
5368
+ controllers: {
5369
+ data: state.controllers.data.makeReadOnly()
5370
+ }
5346
5371
  };
5347
5372
  return maybeUpdateState(__spreadValues(__spreadValues({}, yield state.flowResult), endProps));
5348
5373
  } catch (error) {