react-native-unistyles 3.0.0-experimental-2025051401 → 3.0.0-experimental-2025051402
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.
@@ -8,7 +8,7 @@ using AffectedNodes = std::unordered_map<const ShadowNodeFamily*, std::unordered
|
|
8
8
|
|
9
9
|
void shadow::ShadowTreeManager::updateShadowTree(const ShadowTreeRegistry& shadowTreeRegistry) {
|
10
10
|
auto& registry = core::UnistylesRegistry::get();
|
11
|
-
|
11
|
+
|
12
12
|
registry.trafficController.withLock([&](){
|
13
13
|
auto updates = registry.trafficController.getUpdates();
|
14
14
|
|
@@ -22,7 +22,7 @@ void shadow::ShadowTreeManager::updateShadowTree(const ShadowTreeRegistry& shado
|
|
22
22
|
// so let's mutate Shadow Tree in single transaction
|
23
23
|
auto transaction = [&updates](const RootShadowNode& oldRootShadowNode) {
|
24
24
|
auto affectedNodes = shadow::ShadowTreeManager::findAffectedNodes(oldRootShadowNode, updates);
|
25
|
-
|
25
|
+
|
26
26
|
return std::static_pointer_cast<RootShadowNode>(shadow::ShadowTreeManager::cloneShadowTree(
|
27
27
|
oldRootShadowNode,
|
28
28
|
updates,
|
@@ -72,7 +72,7 @@ AffectedNodes shadow::ShadowTreeManager::findAffectedNodes(const RootShadowNode&
|
|
72
72
|
const auto& [parentNode, index] = *it;
|
73
73
|
const auto parentFamily = &parentNode.get().getFamily();
|
74
74
|
auto [setIt, inserted] = affectedNodes.try_emplace(parentFamily, std::unordered_set<int>{});
|
75
|
-
|
75
|
+
|
76
76
|
setIt->second.insert(index);
|
77
77
|
}
|
78
78
|
}
|
@@ -93,11 +93,11 @@ ShadowNode::Unshared shadow::ShadowTreeManager::cloneShadowTree(const ShadowNode
|
|
93
93
|
|
94
94
|
if (childrenIt != affectedNodes.end()) {
|
95
95
|
auto children = originalChildren;
|
96
|
-
|
96
|
+
|
97
97
|
for (const auto index : childrenIt->second) {
|
98
98
|
children[index] = cloneShadowTree(*children[index], updates, affectedNodes);
|
99
99
|
}
|
100
|
-
|
100
|
+
|
101
101
|
childrenPtr = std::make_shared<ShadowNode::ListOfShared>(std::move(children));
|
102
102
|
} else {
|
103
103
|
childrenPtr = std::make_shared<ShadowNode::ListOfShared>(originalChildren);
|
@@ -107,6 +107,7 @@ ShadowNode::Unshared shadow::ShadowTreeManager::cloneShadowTree(const ShadowNode
|
|
107
107
|
|
108
108
|
if (rawPropsIt != updates.end()) {
|
109
109
|
const auto& componentDescriptor = shadowNode.getComponentDescriptor();
|
110
|
+
const auto& props = shadowNode.getProps();
|
110
111
|
|
111
112
|
PropsParserContext propsParserContext{
|
112
113
|
shadowNode.getSurfaceId(),
|
@@ -125,7 +126,7 @@ ShadowNode::Unshared shadow::ShadowTreeManager::cloneShadowTree(const ShadowNode
|
|
125
126
|
|
126
127
|
updatedProps = componentDescriptor.cloneProps(
|
127
128
|
propsParserContext,
|
128
|
-
|
129
|
+
props,
|
129
130
|
RawProps(newProps)
|
130
131
|
);
|
131
132
|
}
|
package/package.json
CHANGED