Skip to content

Commit c5baaad

Browse files
committed
refactor: rename StyledResolver to StyleResolver
1 parent 28952e2 commit c5baaad

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

cpp/StyledResolver.cpp renamed to cpp/StyleResolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
// Created on October 19, 2025.
33
//
44

5-
#include "StyledResolver.hpp"
5+
#include "StyleResolver.hpp"
66
#include "StyleFunction.hpp"
77
#include <variant>
88

99
namespace margelo::nitro::cssnitro {
1010

11-
AnyValue StyledResolver::resolveStyle(
11+
AnyValue StyleResolver::resolveStyle(
1212
const AnyValue &value,
1313
const std::string &variableScope,
1414
typename reactnativecss::Effect::GetProxy &get

cpp/StyledResolver.hpp renamed to cpp/StyleResolver.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace margelo::nitro::cssnitro {
1818
using AnyValue = ::margelo::nitro::AnyValue;
1919
using AnyArray = ::margelo::nitro::AnyArray;
2020

21-
class StyledResolver {
21+
class StyleResolver {
2222
public:
2323
/**
2424
* Resolve a style value, checking if it's a function that needs to be resolved.

cpp/StyledComputedFactory.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "Helpers.hpp"
66
#include "StyleFunction.hpp"
77
#include "Specificity.hpp"
8-
#include "StyledResolver.hpp"
8+
#include "StyleResolver.hpp"
99

1010
#include <regex>
1111
#include <variant>
@@ -169,9 +169,9 @@ namespace margelo::nitro::cssnitro {
169169
for (const auto &kv: dStyles->getMap()) {
170170
// Only set if key doesn't already exist
171171
if (targetStyles.count(kv.first) == 0) {
172-
// Use StyledResolver to resolve the style value (handles functions, variables, etc.)
173-
auto resolvedValue = StyledResolver::resolveStyle(kv.second, variableScope,
174-
get);
172+
// Use StyleResolver to resolve the style value (handles functions, variables, etc.)
173+
auto resolvedValue = StyleResolver::resolveStyle(kv.second, variableScope,
174+
get);
175175

176176
// Skip if resolveStyle returns monostate (unresolved)
177177
if (std::holds_alternative<std::monostate>(resolvedValue)) {
@@ -196,10 +196,10 @@ namespace margelo::nitro::cssnitro {
196196
for (const auto &kv: dProps->getMap()) {
197197
// Only set if key doesn't already exist
198198
if (targetProps.count(kv.first) == 0) {
199-
// Use StyledResolver to resolve the prop value (handles functions, variables, etc.)
200-
auto resolvedValue = StyledResolver::resolveStyle(kv.second,
201-
variableScope,
202-
get);
199+
// Use StyleResolver to resolve the prop value (handles functions, variables, etc.)
200+
auto resolvedValue = StyleResolver::resolveStyle(kv.second,
201+
variableScope,
202+
get);
203203

204204
// Skip if resolveStyle returns monostate (unresolved)
205205
if (std::holds_alternative<std::monostate>(resolvedValue)) {

cpp/VariableContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "VariableContext.hpp"
22
#include "Rules.hpp"
3-
#include "StyledResolver.hpp"
3+
#include "StyleResolver.hpp"
44

55
namespace margelo::nitro::cssnitro {
66

@@ -58,7 +58,7 @@ namespace margelo::nitro::cssnitro {
5858
auto varIt = valueMap.find(name);
5959
if (varIt != valueMap.end()) {
6060
AnyValue value = getValue(varIt->second, get);
61-
return StyledResolver::resolveStyle(value, contextKey, get);
61+
return StyleResolver::resolveStyle(value, contextKey, get);
6262
} else {
6363
// Variable doesn't exist in this context
6464
// Check if this is a root or universal context
@@ -70,7 +70,7 @@ namespace margelo::nitro::cssnitro {
7070

7171
// Get the initial value from the computed
7272
AnyValue value = getValue(computed, get);
73-
return StyledResolver::resolveStyle(value, contextKey, get);
73+
return StyleResolver::resolveStyle(value, contextKey, get);
7474
} else {
7575
// For other contexts, create a new Observable with nullptr
7676
auto observable = reactnativecss::Observable<AnyValue>::create(AnyValue());

0 commit comments

Comments
 (0)