@player-ui/markdown-plugin 0.7.3 → 0.7.4--canary.348.13748

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.
@@ -450,13 +450,11 @@ const parse$1 = (path) => {
450
450
  const nestedPath = () => {
451
451
  if (ch === OPEN_CURL) {
452
452
  next(OPEN_CURL);
453
- if (ch === OPEN_CURL) {
454
- next(OPEN_CURL);
455
- const modelRef = parsePath();
456
- next(CLOSE_CURL);
457
- next(CLOSE_CURL);
458
- return modelRef;
459
- }
453
+ next(OPEN_CURL);
454
+ const modelRef = parsePath();
455
+ next(CLOSE_CURL);
456
+ next(CLOSE_CURL);
457
+ return modelRef;
460
458
  }
461
459
  };
462
460
  const simpleSegment = () => {
@@ -3939,18 +3937,10 @@ class ValidationBindingTrackerViewPlugin {
3939
3937
  const tracked = new Map();
3940
3938
  const sections = new Map();
3941
3939
  let lastViewUpdateChangeSet;
3942
- const nodeTree = new Map();
3943
- let lastComputedBindingTree = new Map();
3940
+ const lastComputedBindingTree = new Map();
3944
3941
  let currentBindingTree = new Map();
3945
3942
  const lastSectionBindingTree = new Map();
3946
- function addToTree(child, parent) {
3947
- var _a;
3948
- if (nodeTree.has(parent)) {
3949
- (_a = nodeTree.get(parent)) == null ? void 0 : _a.add(child);
3950
- return;
3951
- }
3952
- nodeTree.set(parent, new Set([child]));
3953
- }
3943
+ const resolvedNodeMap = new Map();
3954
3944
  resolver.hooks.beforeUpdate.tap(CONTEXT, (changes) => {
3955
3945
  lastViewUpdateChangeSet = changes;
3956
3946
  });
@@ -4040,24 +4030,37 @@ class ValidationBindingTrackerViewPlugin {
4040
4030
  })
4041
4031
  });
4042
4032
  });
4043
- resolver.hooks.afterNodeUpdate.tap(CONTEXT, (node, parent, update) => {
4044
- var _a, _b;
4045
- if (parent) {
4046
- addToTree(node, parent);
4047
- }
4048
- if (update.updated) {
4049
- const newlyComputed = new Set(tracked.get(node));
4050
- (_a = nodeTree.get(node)) == null ? void 0 : _a.forEach((child) => {
4051
- var _a2;
4052
- (_a2 = currentBindingTree.get(child)) == null ? void 0 : _a2.forEach((b) => newlyComputed.add(b));
4053
- });
4054
- currentBindingTree.set(node, newlyComputed);
4033
+ resolver.hooks.afterNodeUpdate.tap(CONTEXT, (originalNode, parent, update) => {
4034
+ var _a;
4035
+ const { updated, node: resolvedNode } = update;
4036
+ resolvedNodeMap.set(resolvedNode, originalNode);
4037
+ if (updated) {
4038
+ const newlyComputed = new Set(tracked.get(originalNode));
4039
+ if (resolvedNode.type === NodeType.MultiNode) {
4040
+ resolvedNode.values.forEach((value) => {
4041
+ var _a2;
4042
+ return (_a2 = currentBindingTree.get(value)) == null ? void 0 : _a2.forEach((b) => newlyComputed.add(b));
4043
+ });
4044
+ }
4045
+ if ("children" in resolvedNode && resolvedNode.children) {
4046
+ resolvedNode.children.forEach((child) => {
4047
+ var _a2;
4048
+ (_a2 = currentBindingTree.get(child.value)) == null ? void 0 : _a2.forEach((b) => newlyComputed.add(b));
4049
+ });
4050
+ }
4051
+ currentBindingTree.set(resolvedNode, newlyComputed);
4055
4052
  } else {
4056
- currentBindingTree.set(node, (_b = lastComputedBindingTree.get(node)) != null ? _b : new Set());
4053
+ currentBindingTree.set(resolvedNode, (_a = lastComputedBindingTree.get(originalNode)) != null ? _a : new Set());
4057
4054
  }
4058
- if (node === resolver.root) {
4059
- this.trackedBindings = new Set(currentBindingTree.get(node));
4060
- lastComputedBindingTree = currentBindingTree;
4055
+ if (originalNode === resolver.root) {
4056
+ this.trackedBindings = new Set(currentBindingTree.get(resolvedNode));
4057
+ lastComputedBindingTree.clear();
4058
+ currentBindingTree.forEach((value, key) => {
4059
+ const node = resolvedNodeMap.get(key);
4060
+ if (node) {
4061
+ lastComputedBindingTree.set(node, value);
4062
+ }
4063
+ });
4061
4064
  lastSectionBindingTree.clear();
4062
4065
  sections.forEach((nodeSet, sectionNode) => {
4063
4066
  const temp = new Set();
@@ -4067,7 +4070,6 @@ class ValidationBindingTrackerViewPlugin {
4067
4070
  });
4068
4071
  lastSectionBindingTree.set(sectionNode, temp);
4069
4072
  });
4070
- nodeTree.clear();
4071
4073
  tracked.clear();
4072
4074
  sections.clear();
4073
4075
  currentBindingTree = new Map();
@@ -5139,8 +5141,8 @@ var __async = (__this, __arguments, generator) => {
5139
5141
  step((generator = generator.apply(__this, __arguments)).next());
5140
5142
  });
5141
5143
  };
5142
- const PLAYER_VERSION = "0.7.3";
5143
- const COMMIT = "f1c0d8ccf08cb2232ca71ee0004dd3c0f83c8487";
5144
+ const PLAYER_VERSION = "0.7.4--canary.348.13748";
5145
+ const COMMIT = "8f0dcee04d4eb7756e4a7206f0a522f7cd7cc904";
5144
5146
  const _Player = class {
5145
5147
  constructor(config) {
5146
5148
  this.logger = new TapableLogger();