|
12 | 12 |
|
13 | 13 | namespace margelo::nitro::cssnitro { |
14 | 14 |
|
15 | | - class StyledComputedFactory; |
| 15 | + class StyledComputedFactory { |
| 16 | + public: |
| 17 | + /** |
| 18 | + * Convert an unordered_map to AnyMap with optional transform property handling. |
| 19 | + * @param mergedMap The source map to convert |
| 20 | + * @param applyTransformMapping If true, applies special handling for transform properties |
| 21 | + * @return The converted AnyMap |
| 22 | + */ |
| 23 | + static std::shared_ptr<margelo::nitro::AnyMap> convertToAnyMap( |
| 24 | + const std::unordered_map<std::string, margelo::nitro::AnyValue> &mergedMap, |
| 25 | + bool applyTransformMapping); |
16 | 26 |
|
17 | | -// Build a Computed<Styled> that resolves styles from classNames against the styleRuleMap |
| 27 | + /** |
| 28 | + * Process declarations from a style rule and merge them into target maps. |
| 29 | + * @param declarations The variant containing style/prop declarations |
| 30 | + * @param targetStyles The map to store style declarations |
| 31 | + * @param targetProps The map to store prop declarations |
| 32 | + * @param get The Effect GetProxy for resolving reactive values |
| 33 | + * @param variableScope The scope for variable resolution |
| 34 | + */ |
| 35 | + static void processDeclarations( |
| 36 | + const auto &declarations, |
| 37 | + std::unordered_map<std::string, margelo::nitro::AnyValue> &targetStyles, |
| 38 | + std::unordered_map<std::string, margelo::nitro::AnyValue> &targetProps, |
| 39 | + reactnativecss::Effect::GetProxy &get, |
| 40 | + const std::string &variableScope); |
| 41 | + }; |
| 42 | + |
| 43 | +// Build a Computed<Styled*> that resolves styles from classNames against the styleRuleMap |
18 | 44 | // and notifies ShadowTreeUpdateManager with the value of next.style for the given componentId. |
19 | | - std::shared_ptr<reactnativecss::Computed<Styled>> makeStyledComputed( |
| 45 | + std::shared_ptr<reactnativecss::Computed<Styled *>> makeStyledComputed( |
20 | 46 | const std::unordered_map<std::string, std::shared_ptr<reactnativecss::Observable<std::vector<HybridStyleRule>>>> &styleRuleMap, |
21 | 47 | const std::string &classNames, |
22 | 48 | const std::string &componentId, |
|
0 commit comments