@player-ui/markdown-plugin 0.7.4-next.3 → 0.7.4-next.4

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.
@@ -3937,18 +3937,10 @@ class ValidationBindingTrackerViewPlugin {
3937
3937
  const tracked = new Map();
3938
3938
  const sections = new Map();
3939
3939
  let lastViewUpdateChangeSet;
3940
- const nodeTree = new Map();
3941
- let lastComputedBindingTree = new Map();
3940
+ const lastComputedBindingTree = new Map();
3942
3941
  let currentBindingTree = new Map();
3943
3942
  const lastSectionBindingTree = new Map();
3944
- function addToTree(child, parent) {
3945
- var _a;
3946
- if (nodeTree.has(parent)) {
3947
- (_a = nodeTree.get(parent)) == null ? void 0 : _a.add(child);
3948
- return;
3949
- }
3950
- nodeTree.set(parent, new Set([child]));
3951
- }
3943
+ const resolvedNodeMap = new Map();
3952
3944
  resolver.hooks.beforeUpdate.tap(CONTEXT, (changes) => {
3953
3945
  lastViewUpdateChangeSet = changes;
3954
3946
  });
@@ -4038,24 +4030,37 @@ class ValidationBindingTrackerViewPlugin {
4038
4030
  })
4039
4031
  });
4040
4032
  });
4041
- resolver.hooks.afterNodeUpdate.tap(CONTEXT, (node, parent, update) => {
4042
- var _a, _b;
4043
- if (parent) {
4044
- addToTree(node, parent);
4045
- }
4046
- if (update.updated) {
4047
- const newlyComputed = new Set(tracked.get(node));
4048
- (_a = nodeTree.get(node)) == null ? void 0 : _a.forEach((child) => {
4049
- var _a2;
4050
- (_a2 = currentBindingTree.get(child)) == null ? void 0 : _a2.forEach((b) => newlyComputed.add(b));
4051
- });
4052
- 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);
4053
4052
  } else {
4054
- currentBindingTree.set(node, (_b = lastComputedBindingTree.get(node)) != null ? _b : new Set());
4053
+ currentBindingTree.set(resolvedNode, (_a = lastComputedBindingTree.get(originalNode)) != null ? _a : new Set());
4055
4054
  }
4056
- if (node === resolver.root) {
4057
- this.trackedBindings = new Set(currentBindingTree.get(node));
4058
- 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
+ });
4059
4064
  lastSectionBindingTree.clear();
4060
4065
  sections.forEach((nodeSet, sectionNode) => {
4061
4066
  const temp = new Set();
@@ -4065,7 +4070,6 @@ class ValidationBindingTrackerViewPlugin {
4065
4070
  });
4066
4071
  lastSectionBindingTree.set(sectionNode, temp);
4067
4072
  });
4068
- nodeTree.clear();
4069
4073
  tracked.clear();
4070
4074
  sections.clear();
4071
4075
  currentBindingTree = new Map();
@@ -5137,8 +5141,8 @@ var __async = (__this, __arguments, generator) => {
5137
5141
  step((generator = generator.apply(__this, __arguments)).next());
5138
5142
  });
5139
5143
  };
5140
- const PLAYER_VERSION = "0.7.4-next.3";
5141
- const COMMIT = "947d3bb0b3acb587041fa72b0990bab2ec1be633";
5144
+ const PLAYER_VERSION = "0.7.4-next.4";
5145
+ const COMMIT = "498d9be0ba0bbbe6839b7d227d3900eabbd24cdd";
5142
5146
  const _Player = class {
5143
5147
  constructor(config) {
5144
5148
  this.logger = new TapableLogger();