mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove RawPropsKey prefix and suffix
Summary: X-link: https://github.com/facebook/react-native/pull/55763 RawPropsKey previously stored three `const char*` fields (prefix, name, suffix) that were concatenated at runtime to form property names. This is pretty niche, used to make a few patterns simpler, but also can lead to confusing conflicts when the same property name can be represented in different ways (e.g. T174300106). Iterator style props parsing also completely avoids it. Lets change the API to a flat name instead. This change is breaking, but could only find a single user (Nitro module) effected, searching through `react-native-libraries`. Changelog: [General][Breaking] - Remove RawPropsKey prefix and suffix Reviewed By: christophpurrer Differential Revision: D94367880 fbshipit-source-id: d865725c7be6f880760b6e8d1a567a1b12ac469a
This commit is contained in:
1 parent
2bbd70a897
commit
67381e157f
23 files changed
+501
-375
No files matched your search
+1
-1
@@ -17,7 +17,7 @@ namespace facebook::react {
|
||||
|
||||
static bool
|
||||
hasValue(const RawProps& rawProps, bool defaultValue, const char* name) {
|
||||
auto rawValue = rawProps.at(name, nullptr, nullptr);
|
||||
auto rawValue = rawProps.at(name);
|
||||
|
||||
// No change to prop - use default
|
||||
if (rawValue == nullptr) {
|
||||
|
||||
+2
-3
@@ -229,9 +229,8 @@ AccessibilityProps::AccessibilityProps(
|
||||
role = sourceProps.role;
|
||||
accessibilityTraits = sourceProps.accessibilityTraits;
|
||||
} else {
|
||||
auto* accessibilityRoleValue =
|
||||
rawProps.at("accessibilityRole", nullptr, nullptr);
|
||||
auto* roleValue = rawProps.at("role", nullptr, nullptr);
|
||||
auto* accessibilityRoleValue = rawProps.at("accessibilityRole");
|
||||
auto* roleValue = rawProps.at("role");
|
||||
|
||||
auto* precedentRoleValue =
|
||||
roleValue != nullptr ? roleValue : accessibilityRoleValue;
|
||||
|
||||
@@ -84,8 +84,20 @@ BaseViewProps::BaseViewProps(
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"border",
|
||||
"Radius",
|
||||
CascadedRectangleCornersNames{
|
||||
.topLeft = "borderTopLeftRadius",
|
||||
.topRight = "borderTopRightRadius",
|
||||
.bottomLeft = "borderBottomLeftRadius",
|
||||
.bottomRight = "borderBottomRightRadius",
|
||||
.topStart = "borderTopStartRadius",
|
||||
.topEnd = "borderTopEndRadius",
|
||||
.bottomStart = "borderBottomStartRadius",
|
||||
.bottomEnd = "borderBottomEndRadius",
|
||||
.endEnd = "borderEndEndRadius",
|
||||
.endStart = "borderEndStartRadius",
|
||||
.startEnd = "borderStartEndRadius",
|
||||
.startStart = "borderStartStartRadius",
|
||||
.all = "borderRadius"},
|
||||
sourceProps.borderRadii,
|
||||
{})),
|
||||
borderColors(
|
||||
@@ -94,8 +106,19 @@ BaseViewProps::BaseViewProps(
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"border",
|
||||
"Color",
|
||||
CascadedRectangleEdgesNames{
|
||||
.left = "borderLeftColor",
|
||||
.right = "borderRightColor",
|
||||
.top = "borderTopColor",
|
||||
.bottom = "borderBottomColor",
|
||||
.start = "borderStartColor",
|
||||
.end = "borderEndColor",
|
||||
.horizontal = "borderHorizontalColor",
|
||||
.vertical = "borderVerticalColor",
|
||||
.block = "borderBlockColor",
|
||||
.blockEnd = "borderBlockEndColor",
|
||||
.blockStart = "borderBlockStartColor",
|
||||
.all = "borderColor"},
|
||||
sourceProps.borderColors,
|
||||
{})),
|
||||
borderCurves(
|
||||
@@ -104,8 +127,20 @@ BaseViewProps::BaseViewProps(
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"border",
|
||||
"Curve",
|
||||
CascadedRectangleCornersNames{
|
||||
.topLeft = "borderTopLeftCurve",
|
||||
.topRight = "borderTopRightCurve",
|
||||
.bottomLeft = "borderBottomLeftCurve",
|
||||
.bottomRight = "borderBottomRightCurve",
|
||||
.topStart = "borderTopStartCurve",
|
||||
.topEnd = "borderTopEndCurve",
|
||||
.bottomStart = "borderBottomStartCurve",
|
||||
.bottomEnd = "borderBottomEndCurve",
|
||||
.endEnd = "borderEndEndCurve",
|
||||
.endStart = "borderEndStartCurve",
|
||||
.startEnd = "borderStartEndCurve",
|
||||
.startStart = "borderStartStartCurve",
|
||||
.all = "borderCurve"},
|
||||
sourceProps.borderCurves,
|
||||
{})),
|
||||
borderStyles(
|
||||
@@ -114,8 +149,19 @@ BaseViewProps::BaseViewProps(
|
||||
: convertRawProp(
|
||||
context,
|
||||
rawProps,
|
||||
"border",
|
||||
"Style",
|
||||
CascadedRectangleEdgesNames{
|
||||
.left = "borderLeftStyle",
|
||||
.right = "borderRightStyle",
|
||||
.top = "borderTopStyle",
|
||||
.bottom = "borderBottomStyle",
|
||||
.start = "borderStartStyle",
|
||||
.end = "borderEndStyle",
|
||||
.horizontal = "borderHorizontalStyle",
|
||||
.vertical = "borderVerticalStyle",
|
||||
.block = "borderBlockStyle",
|
||||
.blockEnd = "borderBlockEndStyle",
|
||||
.blockStart = "borderBlockStartStyle",
|
||||
.all = "borderStyle"},
|
||||
sourceProps.borderStyles,
|
||||
{})),
|
||||
outlineColor(
|
||||
|
||||
+61
-40
@@ -357,7 +357,7 @@ convertRawProp(const PropsParserContext &context, const RawProps &rawProps, cons
|
||||
convertRawProp(context, rawProps, "maxHeight", sourceValue.maxDimension(yoga::Dimension::Height), {}));
|
||||
|
||||
{
|
||||
const auto *rawValue = rawProps.at("aspectRatio", nullptr, nullptr);
|
||||
const auto *rawValue = rawProps.at("aspectRatio");
|
||||
if (rawValue != nullptr) {
|
||||
yogaStyle.setAspectRatio(rawValue->hasValue() ? convertAspectRatio(context, *rawValue) : yogaStyle.aspectRatio());
|
||||
} else {
|
||||
@@ -371,43 +371,67 @@ convertRawProp(const PropsParserContext &context, const RawProps &rawProps, cons
|
||||
return yogaStyle;
|
||||
}
|
||||
|
||||
struct CascadedRectangleCornersNames {
|
||||
const char *topLeft;
|
||||
const char *topRight;
|
||||
const char *bottomLeft;
|
||||
const char *bottomRight;
|
||||
const char *topStart;
|
||||
const char *topEnd;
|
||||
const char *bottomStart;
|
||||
const char *bottomEnd;
|
||||
const char *endEnd;
|
||||
const char *endStart;
|
||||
const char *startEnd;
|
||||
const char *startStart;
|
||||
const char *all;
|
||||
};
|
||||
|
||||
struct CascadedRectangleEdgesNames {
|
||||
const char *left;
|
||||
const char *right;
|
||||
const char *top;
|
||||
const char *bottom;
|
||||
const char *start;
|
||||
const char *end;
|
||||
const char *horizontal;
|
||||
const char *vertical;
|
||||
const char *block;
|
||||
const char *blockEnd;
|
||||
const char *blockStart;
|
||||
const char *all;
|
||||
};
|
||||
|
||||
// This can be deleted when non-iterator ViewProp parsing is deleted
|
||||
template <typename T>
|
||||
static inline CascadedRectangleCorners<T> convertRawProp(
|
||||
const PropsParserContext &context,
|
||||
const RawProps &rawProps,
|
||||
const char *prefix,
|
||||
const char *suffix,
|
||||
const CascadedRectangleCornersNames &names,
|
||||
const CascadedRectangleCorners<T> &sourceValue,
|
||||
const CascadedRectangleCorners<T> &defaultValue)
|
||||
{
|
||||
CascadedRectangleCorners<T> result;
|
||||
|
||||
result.topLeft =
|
||||
convertRawProp(context, rawProps, "TopLeft", sourceValue.topLeft, defaultValue.topLeft, prefix, suffix);
|
||||
result.topRight =
|
||||
convertRawProp(context, rawProps, "TopRight", sourceValue.topRight, defaultValue.topRight, prefix, suffix);
|
||||
result.topLeft = convertRawProp(context, rawProps, names.topLeft, sourceValue.topLeft, defaultValue.topLeft);
|
||||
result.topRight = convertRawProp(context, rawProps, names.topRight, sourceValue.topRight, defaultValue.topRight);
|
||||
result.bottomLeft =
|
||||
convertRawProp(context, rawProps, "BottomLeft", sourceValue.bottomLeft, defaultValue.bottomLeft, prefix, suffix);
|
||||
result.bottomRight = convertRawProp(
|
||||
context, rawProps, "BottomRight", sourceValue.bottomRight, defaultValue.bottomRight, prefix, suffix);
|
||||
convertRawProp(context, rawProps, names.bottomLeft, sourceValue.bottomLeft, defaultValue.bottomLeft);
|
||||
result.bottomRight =
|
||||
convertRawProp(context, rawProps, names.bottomRight, sourceValue.bottomRight, defaultValue.bottomRight);
|
||||
|
||||
result.topStart =
|
||||
convertRawProp(context, rawProps, "TopStart", sourceValue.topStart, defaultValue.topStart, prefix, suffix);
|
||||
result.topEnd = convertRawProp(context, rawProps, "TopEnd", sourceValue.topEnd, defaultValue.topEnd, prefix, suffix);
|
||||
result.bottomStart = convertRawProp(
|
||||
context, rawProps, "BottomStart", sourceValue.bottomStart, defaultValue.bottomStart, prefix, suffix);
|
||||
result.bottomEnd =
|
||||
convertRawProp(context, rawProps, "BottomEnd", sourceValue.bottomEnd, defaultValue.bottomEnd, prefix, suffix);
|
||||
result.endEnd = convertRawProp(context, rawProps, "EndEnd", sourceValue.endEnd, defaultValue.endEnd, prefix, suffix);
|
||||
result.endStart =
|
||||
convertRawProp(context, rawProps, "EndStart", sourceValue.endStart, defaultValue.endStart, prefix, suffix);
|
||||
result.startEnd =
|
||||
convertRawProp(context, rawProps, "StartEnd", sourceValue.startEnd, defaultValue.startEnd, prefix, suffix);
|
||||
result.topStart = convertRawProp(context, rawProps, names.topStart, sourceValue.topStart, defaultValue.topStart);
|
||||
result.topEnd = convertRawProp(context, rawProps, names.topEnd, sourceValue.topEnd, defaultValue.topEnd);
|
||||
result.bottomStart =
|
||||
convertRawProp(context, rawProps, names.bottomStart, sourceValue.bottomStart, defaultValue.bottomStart);
|
||||
result.bottomEnd = convertRawProp(context, rawProps, names.bottomEnd, sourceValue.bottomEnd, defaultValue.bottomEnd);
|
||||
result.endEnd = convertRawProp(context, rawProps, names.endEnd, sourceValue.endEnd, defaultValue.endEnd);
|
||||
result.endStart = convertRawProp(context, rawProps, names.endStart, sourceValue.endStart, defaultValue.endStart);
|
||||
result.startEnd = convertRawProp(context, rawProps, names.startEnd, sourceValue.startEnd, defaultValue.startEnd);
|
||||
result.startStart =
|
||||
convertRawProp(context, rawProps, "StartStart", sourceValue.startStart, defaultValue.startStart, prefix, suffix);
|
||||
convertRawProp(context, rawProps, names.startStart, sourceValue.startStart, defaultValue.startStart);
|
||||
|
||||
result.all = convertRawProp(context, rawProps, "", sourceValue.all, defaultValue.all, prefix, suffix);
|
||||
result.all = convertRawProp(context, rawProps, names.all, sourceValue.all, defaultValue.all);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -416,31 +440,28 @@ template <typename T>
|
||||
static inline CascadedRectangleEdges<T> convertRawProp(
|
||||
const PropsParserContext &context,
|
||||
const RawProps &rawProps,
|
||||
const char *prefix,
|
||||
const char *suffix,
|
||||
const CascadedRectangleEdgesNames &names,
|
||||
const CascadedRectangleEdges<T> &sourceValue,
|
||||
const CascadedRectangleEdges<T> &defaultValue)
|
||||
{
|
||||
CascadedRectangleEdges<T> result;
|
||||
|
||||
result.left = convertRawProp(context, rawProps, "Left", sourceValue.left, defaultValue.left, prefix, suffix);
|
||||
result.right = convertRawProp(context, rawProps, "Right", sourceValue.right, defaultValue.right, prefix, suffix);
|
||||
result.top = convertRawProp(context, rawProps, "Top", sourceValue.top, defaultValue.top, prefix, suffix);
|
||||
result.bottom = convertRawProp(context, rawProps, "Bottom", sourceValue.bottom, defaultValue.bottom, prefix, suffix);
|
||||
result.left = convertRawProp(context, rawProps, names.left, sourceValue.left, defaultValue.left);
|
||||
result.right = convertRawProp(context, rawProps, names.right, sourceValue.right, defaultValue.right);
|
||||
result.top = convertRawProp(context, rawProps, names.top, sourceValue.top, defaultValue.top);
|
||||
result.bottom = convertRawProp(context, rawProps, names.bottom, sourceValue.bottom, defaultValue.bottom);
|
||||
|
||||
result.start = convertRawProp(context, rawProps, "Start", sourceValue.start, defaultValue.start, prefix, suffix);
|
||||
result.end = convertRawProp(context, rawProps, "End", sourceValue.end, defaultValue.end, prefix, suffix);
|
||||
result.start = convertRawProp(context, rawProps, names.start, sourceValue.start, defaultValue.start);
|
||||
result.end = convertRawProp(context, rawProps, names.end, sourceValue.end, defaultValue.end);
|
||||
result.horizontal =
|
||||
convertRawProp(context, rawProps, "Horizontal", sourceValue.horizontal, defaultValue.horizontal, prefix, suffix);
|
||||
result.vertical =
|
||||
convertRawProp(context, rawProps, "Vertical", sourceValue.vertical, defaultValue.vertical, prefix, suffix);
|
||||
result.block = convertRawProp(context, rawProps, "Block", sourceValue.block, defaultValue.block, prefix, suffix);
|
||||
result.blockEnd =
|
||||
convertRawProp(context, rawProps, "BlockEnd", sourceValue.blockEnd, defaultValue.blockEnd, prefix, suffix);
|
||||
convertRawProp(context, rawProps, names.horizontal, sourceValue.horizontal, defaultValue.horizontal);
|
||||
result.vertical = convertRawProp(context, rawProps, names.vertical, sourceValue.vertical, defaultValue.vertical);
|
||||
result.block = convertRawProp(context, rawProps, names.block, sourceValue.block, defaultValue.block);
|
||||
result.blockEnd = convertRawProp(context, rawProps, names.blockEnd, sourceValue.blockEnd, defaultValue.blockEnd);
|
||||
result.blockStart =
|
||||
convertRawProp(context, rawProps, "BlockStart", sourceValue.blockStart, defaultValue.blockStart, prefix, suffix);
|
||||
convertRawProp(context, rawProps, names.blockStart, sourceValue.blockStart, defaultValue.blockStart);
|
||||
|
||||
result.all = convertRawProp(context, rawProps, "", sourceValue.all, defaultValue.all, prefix, suffix);
|
||||
result.all = convertRawProp(context, rawProps, names.all, sourceValue.all, defaultValue.all);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <cxxreact/TraceSection.h>
|
||||
#include <react/debug/react_native_assert.h>
|
||||
#include <react/renderer/core/RawPropsKey.h>
|
||||
#include <react/renderer/core/RawPropsParser.h>
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -110,15 +109,11 @@ bool RawProps::isEmpty() const noexcept {
|
||||
* Returns a const unowning pointer to `RawValue` of a prop with a given name.
|
||||
* Returns `nullptr` if a prop with the given name does not exist.
|
||||
*/
|
||||
const RawValue* RawProps::at(
|
||||
const char* name,
|
||||
const char* prefix,
|
||||
const char* suffix) const noexcept {
|
||||
const RawValue* RawProps::at(const char* name) const noexcept {
|
||||
react_native_assert(
|
||||
parser_ &&
|
||||
"The object is not parsed. `parse` must be called before `at`.");
|
||||
return parser_->at(
|
||||
*this, RawPropsKey{.prefix = prefix, .name = name, .suffix = suffix});
|
||||
return parser_->at(*this, name);
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
@@ -90,7 +90,7 @@ class RawProps final {
|
||||
* Returns a const unowning pointer to `RawValue` of a prop with a given name.
|
||||
* Returns `nullptr` if a prop with the given name does not exist.
|
||||
*/
|
||||
const RawValue *at(const char *name, const char *prefix, const char *suffix) const noexcept;
|
||||
const RawValue *at(const char *name) const noexcept;
|
||||
|
||||
private:
|
||||
friend class RawPropsParser;
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#include "RawPropsKey.h"
|
||||
|
||||
#include <array>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
#include <react/renderer/core/RawPropsPrimitives.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
void RawPropsKey::render(char* buffer, RawPropsPropNameLength* length)
|
||||
const noexcept {
|
||||
*length = 0;
|
||||
|
||||
constexpr size_t maxLength = kPropNameLengthHardCap - 1;
|
||||
|
||||
auto appendSegment = [&](const char* segment) {
|
||||
auto copyLen = std::min(std::strlen(segment), maxLength - *length);
|
||||
std::memcpy(buffer + *length, segment, copyLen);
|
||||
*length += static_cast<RawPropsPropNameLength>(copyLen);
|
||||
};
|
||||
|
||||
if (prefix != nullptr) {
|
||||
appendSegment(prefix);
|
||||
}
|
||||
|
||||
appendSegment(name);
|
||||
|
||||
if (suffix != nullptr) {
|
||||
appendSegment(suffix);
|
||||
}
|
||||
}
|
||||
|
||||
RawPropsKey::operator std::string() const noexcept {
|
||||
auto buffer = std::array<char, kPropNameLengthHardCap>();
|
||||
RawPropsPropNameLength length = 0;
|
||||
render(buffer.data(), &length);
|
||||
return std::string{buffer.data(), length};
|
||||
}
|
||||
|
||||
static bool areFieldsEqual(const char* lhs, const char* rhs) {
|
||||
if (lhs == nullptr || rhs == nullptr) {
|
||||
return lhs == rhs;
|
||||
}
|
||||
return lhs == rhs || strcmp(lhs, rhs) == 0;
|
||||
}
|
||||
|
||||
bool operator==(const RawPropsKey& lhs, const RawPropsKey& rhs) noexcept {
|
||||
// Note: We check the name first.
|
||||
return areFieldsEqual(lhs.name, rhs.name) &&
|
||||
areFieldsEqual(lhs.prefix, rhs.prefix) &&
|
||||
areFieldsEqual(lhs.suffix, rhs.suffix);
|
||||
}
|
||||
|
||||
} // namespace facebook::react
|
||||
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <react/renderer/core/RawPropsPrimitives.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
/*
|
||||
* Represent a prop name stored as three `char const *` fragments.
|
||||
*/
|
||||
class RawPropsKey final {
|
||||
public:
|
||||
const char *prefix{};
|
||||
const char *name{};
|
||||
const char *suffix{};
|
||||
|
||||
/*
|
||||
* Converts to `std::string`.
|
||||
*/
|
||||
explicit operator std::string() const noexcept;
|
||||
|
||||
/*
|
||||
* Renders compound prop name to given buffer and put the resulting length
|
||||
* into `length`.
|
||||
*/
|
||||
void render(char *buffer, RawPropsPropNameLength *length) const noexcept;
|
||||
};
|
||||
|
||||
bool operator==(const RawPropsKey &lhs, const RawPropsKey &rhs) noexcept;
|
||||
|
||||
} // namespace facebook::react
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <react/debug/react_native_assert.h>
|
||||
|
||||
#include <glog/logging.h>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
@@ -33,11 +32,14 @@ bool RawPropsKeyMap::shouldFirstOneBeBeforeSecondOne(
|
||||
}
|
||||
|
||||
void RawPropsKeyMap::insert(
|
||||
const RawPropsKey& key,
|
||||
std::string_view key,
|
||||
RawPropsValueIndex value) noexcept {
|
||||
auto item = Item{};
|
||||
item.value = value;
|
||||
key.render(item.name, &item.length);
|
||||
auto length =
|
||||
std::min(key.size(), static_cast<size_t>(kPropNameLengthHardCap - 1));
|
||||
std::copy_n(key.data(), length, item.name);
|
||||
item.length = static_cast<RawPropsPropNameLength>(length);
|
||||
items_.push_back(item);
|
||||
react_native_assert(
|
||||
items_.size() < std::numeric_limits<RawPropsPropNameLength>::max());
|
||||
@@ -52,26 +54,9 @@ void RawPropsKeyMap::reindex() noexcept {
|
||||
&RawPropsKeyMap::shouldFirstOneBeBeforeSecondOne);
|
||||
|
||||
// Filtering out duplicating keys.
|
||||
// Accessing the same key twice is supported by RawPropsPorser, but the
|
||||
// RawPropsKey used must be identical, and if not, lookup will be
|
||||
// inconsistent.
|
||||
auto it = items_.begin();
|
||||
auto end = items_.end();
|
||||
// Implements std::unique with additional logging
|
||||
if (it != end) {
|
||||
auto result = it;
|
||||
while (++it != end) {
|
||||
if (hasSameName(*result, *it)) {
|
||||
LOG(WARNING)
|
||||
<< "Component property map contains multiple entries for '"
|
||||
<< std::string_view(it->name, it->length)
|
||||
<< "'. Ensure all calls to convertRawProp use a consistent prefix, name and suffix.";
|
||||
} else if (++result != it) {
|
||||
*result = *it;
|
||||
}
|
||||
}
|
||||
items_.erase(++result, items_.end());
|
||||
}
|
||||
items_.erase(
|
||||
std::unique(items_.begin(), items_.end(), &RawPropsKeyMap::hasSameName),
|
||||
items_.end());
|
||||
|
||||
buckets_.resize(kPropNameLengthHardCap);
|
||||
|
||||
@@ -91,9 +76,8 @@ void RawPropsKeyMap::reindex() noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
RawPropsValueIndex RawPropsKeyMap::at(
|
||||
const char* name,
|
||||
RawPropsPropNameLength length) noexcept {
|
||||
RawPropsValueIndex RawPropsKeyMap::at(std::string_view name) noexcept {
|
||||
auto length = static_cast<RawPropsPropNameLength>(name.size());
|
||||
react_native_assert(length > 0);
|
||||
react_native_assert(length < kPropNameLengthHardCap);
|
||||
if (length == 0 || length >= kPropNameLengthHardCap) [[unlikely]] {
|
||||
@@ -107,7 +91,7 @@ RawPropsValueIndex RawPropsKeyMap::at(
|
||||
// 2. Binary search in the bucket.
|
||||
while (lower <= upper) {
|
||||
auto median = (lower + upper) / 2;
|
||||
auto condition = std::memcmp(items_[median].name, name, length);
|
||||
auto condition = std::memcmp(items_[median].name, name.data(), length);
|
||||
if (condition < 0) {
|
||||
lower = median + 1;
|
||||
} else if (condition == 0) {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/renderer/core/RawPropsKey.h>
|
||||
#include <react/renderer/core/RawPropsPrimitives.h>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -25,7 +25,7 @@ class RawPropsKeyMap final {
|
||||
/*
|
||||
* Stores `value` with by given `key`.
|
||||
*/
|
||||
void insert(const RawPropsKey &key, RawPropsValueIndex value) noexcept;
|
||||
void insert(std::string_view key, RawPropsValueIndex value) noexcept;
|
||||
|
||||
/*
|
||||
* Reindexes the stored data.
|
||||
@@ -37,7 +37,7 @@ class RawPropsKeyMap final {
|
||||
* Finds and returns the `value` (some index) by given `key`.
|
||||
* Returns `kRawPropsValueIndexEmpty` if the value wan't found.
|
||||
*/
|
||||
RawPropsValueIndex at(const char *name, RawPropsPropNameLength length) noexcept;
|
||||
RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
|
||||
private:
|
||||
struct Item {
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace facebook::react {
|
||||
// which props are accessed during parsing, and in which order.
|
||||
const RawValue* RawPropsParser::at(
|
||||
const RawProps& rawProps,
|
||||
const RawPropsKey& key) const noexcept {
|
||||
std::string_view key) const noexcept {
|
||||
if (!ready_) [[unlikely]] {
|
||||
// Check against the same key being inserted more than once.
|
||||
// This happens commonly with nested Props structs, where the higher-level
|
||||
@@ -74,7 +74,7 @@ const RawValue* RawPropsParser::at(
|
||||
if (resetLoop) {
|
||||
LOG(ERROR)
|
||||
<< "Looked up property name which was not seen when preparing: "
|
||||
<< (std::string)key;
|
||||
<< key;
|
||||
return nullptr;
|
||||
}
|
||||
resetLoop = true;
|
||||
@@ -126,8 +126,7 @@ void RawPropsParser::preparse(const RawProps& rawProps) const noexcept {
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
auto nameValue = names.getValueAtIndex(runtime, i).getString(runtime);
|
||||
auto name = nameValue.utf8(runtime);
|
||||
auto keyIndex = nameToIndex_.at(
|
||||
name.data(), static_cast<RawPropsPropNameLength>(name.size()));
|
||||
auto keyIndex = nameToIndex_.at(name);
|
||||
|
||||
if (keyIndex == kRawPropsValueIndexEmpty) {
|
||||
continue;
|
||||
@@ -150,8 +149,7 @@ void RawPropsParser::preparse(const RawProps& rawProps) const noexcept {
|
||||
for (const auto& pair : dynamic.items()) {
|
||||
auto name = pair.first.getString();
|
||||
|
||||
auto keyIndex = nameToIndex_.at(
|
||||
name.data(), static_cast<RawPropsPropNameLength>(name.size()));
|
||||
auto keyIndex = nameToIndex_.at(name);
|
||||
|
||||
if (keyIndex == kRawPropsValueIndexEmpty) {
|
||||
continue;
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#include <react/renderer/core/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsKey.h>
|
||||
#include <react/renderer/core/RawPropsKeyMap.h>
|
||||
#include <react/renderer/core/RawPropsPrimitives.h>
|
||||
#include <react/renderer/core/RawValue.h>
|
||||
#include <string_view>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
@@ -70,9 +70,9 @@ class RawPropsParser final {
|
||||
/*
|
||||
* To be used by `RawProps` only.
|
||||
*/
|
||||
const RawValue *at(const RawProps &rawProps, const RawPropsKey &key) const noexcept;
|
||||
const RawValue *at(const RawProps &rawProps, std::string_view key) const noexcept;
|
||||
|
||||
mutable std::vector<RawPropsKey> keys_{};
|
||||
mutable std::vector<std::string_view> keys_{};
|
||||
mutable RawPropsKeyMap nameToIndex_{};
|
||||
mutable bool ready_{false};
|
||||
};
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/RawProps.h>
|
||||
#include <react/renderer/core/RawPropsKey.h>
|
||||
#include <react/renderer/core/graphicsConversions.h>
|
||||
|
||||
namespace facebook::react {
|
||||
@@ -168,11 +167,9 @@ T convertRawProp(
|
||||
const RawProps &rawProps,
|
||||
const char *name,
|
||||
const T &sourceValue,
|
||||
const U &defaultValue,
|
||||
const char *namePrefix = nullptr,
|
||||
const char *nameSuffix = nullptr)
|
||||
const U &defaultValue)
|
||||
{
|
||||
const auto *rawValue = rawProps.at(name, namePrefix, nameSuffix);
|
||||
const auto *rawValue = rawProps.at(name);
|
||||
if (rawValue == nullptr) [[likely]] {
|
||||
return sourceValue;
|
||||
}
|
||||
@@ -189,9 +186,8 @@ T convertRawProp(
|
||||
return result;
|
||||
} catch (const std::exception &e) {
|
||||
// In case of errors, log the error and fall back to the default
|
||||
RawPropsKey key{.prefix = namePrefix, .name = name, .suffix = nameSuffix};
|
||||
// TODO: report this using ErrorUtils so it's more visible to the user
|
||||
LOG(ERROR) << "Error while converting prop '" << static_cast<std::string>(key) << "': " << e.what();
|
||||
LOG(ERROR) << "Error while converting prop '" << name << "': " << e.what();
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ TEST(RawPropsTest, handleRawPropsSingleString) {
|
||||
parser.prepare<Props>();
|
||||
raw.parse(parser);
|
||||
|
||||
std::string value = (std::string)*raw.at("nativeID", nullptr, nullptr);
|
||||
std::string value = (std::string)*raw.at("nativeID");
|
||||
|
||||
EXPECT_STREQ(value.c_str(), "abc");
|
||||
}
|
||||
@@ -189,7 +189,7 @@ TEST(RawPropsTest, handleRawPropsSingleFloat) {
|
||||
parser.prepare<PropsSingleFloat>();
|
||||
raw.parse(parser);
|
||||
|
||||
auto value = (float)*raw.at("floatValue", nullptr, nullptr);
|
||||
auto value = (float)*raw.at("floatValue");
|
||||
|
||||
EXPECT_NEAR(value, 42.42, 0.00001);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ TEST(RawPropsTest, handleRawPropsSingleDouble) {
|
||||
parser.prepare<PropsSingleDouble>();
|
||||
raw.parse(parser);
|
||||
|
||||
auto value = (double)*raw.at("doubleValue", nullptr, nullptr);
|
||||
auto value = (double)*raw.at("doubleValue");
|
||||
|
||||
EXPECT_NEAR(value, 42.42, 0.00001);
|
||||
}
|
||||
@@ -217,7 +217,7 @@ TEST(RawPropsTest, handleRawPropsSingleInt) {
|
||||
parser.prepare<PropsSingleInt>();
|
||||
raw.parse(parser);
|
||||
|
||||
int value = (int)*raw.at("intValue", nullptr, nullptr);
|
||||
int value = (int)*raw.at("intValue");
|
||||
|
||||
EXPECT_EQ(value, 42);
|
||||
}
|
||||
@@ -231,9 +231,9 @@ TEST(RawPropsTest, handleRawPropsSingleIntGetManyTimes) {
|
||||
parser.prepare<PropsSingleInt>();
|
||||
raw.parse(parser);
|
||||
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
}
|
||||
|
||||
TEST(RawPropsTest, handleRawPropsPrimitiveTypes) {
|
||||
@@ -249,13 +249,11 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypes) {
|
||||
parser.prepare<PropsPrimitiveTypes>();
|
||||
raw.parse(parser);
|
||||
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue", nullptr, nullptr), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue", nullptr, nullptr), 66.67, 0.00001);
|
||||
EXPECT_STREQ(
|
||||
((std::string)*raw.at("stringValue", nullptr, nullptr)).c_str(),
|
||||
"helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue", nullptr, nullptr), true);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue"), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue"), 66.67, 0.00001);
|
||||
EXPECT_STREQ(((std::string)*raw.at("stringValue")).c_str(), "helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue"), true);
|
||||
}
|
||||
|
||||
TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetTwice) {
|
||||
@@ -271,21 +269,17 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetTwice) {
|
||||
parser.prepare<PropsPrimitiveTypes>();
|
||||
raw.parse(parser);
|
||||
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue", nullptr, nullptr), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue", nullptr, nullptr), 66.67, 0.00001);
|
||||
EXPECT_STREQ(
|
||||
((std::string)*raw.at("stringValue", nullptr, nullptr)).c_str(),
|
||||
"helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue", nullptr, nullptr), true);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue"), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue"), 66.67, 0.00001);
|
||||
EXPECT_STREQ(((std::string)*raw.at("stringValue")).c_str(), "helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue"), true);
|
||||
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue", nullptr, nullptr), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue", nullptr, nullptr), 66.67, 0.00001);
|
||||
EXPECT_STREQ(
|
||||
((std::string)*raw.at("stringValue", nullptr, nullptr)).c_str(),
|
||||
"helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue", nullptr, nullptr), true);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue"), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue"), 66.67, 0.00001);
|
||||
EXPECT_STREQ(((std::string)*raw.at("stringValue")).c_str(), "helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue"), true);
|
||||
}
|
||||
|
||||
TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetOutOfOrder) {
|
||||
@@ -301,21 +295,17 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypesGetOutOfOrder) {
|
||||
parser.prepare<PropsPrimitiveTypes>();
|
||||
raw.parse(parser);
|
||||
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue", nullptr, nullptr), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue", nullptr, nullptr), 66.67, 0.00001);
|
||||
EXPECT_STREQ(
|
||||
((std::string)*raw.at("stringValue", nullptr, nullptr)).c_str(),
|
||||
"helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue", nullptr, nullptr), true);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue"), 17.42, 0.0001);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue"), 66.67, 0.00001);
|
||||
EXPECT_STREQ(((std::string)*raw.at("stringValue")).c_str(), "helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue"), true);
|
||||
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue", nullptr, nullptr), 17.42, 0.0001);
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue", nullptr, nullptr), 66.67, 0.00001);
|
||||
EXPECT_STREQ(
|
||||
((std::string)*raw.at("stringValue", nullptr, nullptr)).c_str(),
|
||||
"helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue", nullptr, nullptr), true);
|
||||
EXPECT_NEAR((double)*raw.at("doubleValue"), 17.42, 0.0001);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_NEAR((float)*raw.at("floatValue"), 66.67, 0.00001);
|
||||
EXPECT_STREQ(((std::string)*raw.at("stringValue")).c_str(), "helloworld");
|
||||
EXPECT_EQ((bool)*raw.at("boolValue"), true);
|
||||
}
|
||||
|
||||
TEST(RawPropsTest, handleRawPropsPrimitiveTypesIncomplete) {
|
||||
@@ -328,13 +318,13 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypesIncomplete) {
|
||||
parser.prepare<PropsPrimitiveTypes>();
|
||||
raw.parse(parser);
|
||||
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ(raw.at("doubleValue", nullptr, nullptr), nullptr);
|
||||
EXPECT_EQ(raw.at("floatValue", nullptr, nullptr), nullptr);
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ(raw.at("stringValue", nullptr, nullptr), nullptr);
|
||||
EXPECT_EQ(raw.at("boolValue", nullptr, nullptr), nullptr);
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_EQ(raw.at("doubleValue"), nullptr);
|
||||
EXPECT_EQ(raw.at("floatValue"), nullptr);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
EXPECT_EQ(raw.at("stringValue"), nullptr);
|
||||
EXPECT_EQ(raw.at("boolValue"), nullptr);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
}
|
||||
|
||||
#ifdef REACT_NATIVE_DEBUG
|
||||
@@ -351,8 +341,8 @@ TEST(RawPropsTest, handleRawPropsPrimitiveTypesIncorrectLookup) {
|
||||
// Before D18662135, looking up an invalid key would trigger
|
||||
// an infinite loop. This is out of contract, so we should only
|
||||
// test this in debug.
|
||||
EXPECT_EQ(raw.at("flurb", nullptr, nullptr), nullptr);
|
||||
EXPECT_EQ((int)*raw.at("intValue", nullptr, nullptr), 42);
|
||||
EXPECT_EQ(raw.at("flurb"), nullptr);
|
||||
EXPECT_EQ((int)*raw.at("intValue"), 42);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1020,7 +1020,7 @@ facebook::react::ComponentDescriptorProvider facebook::react::concreteComponentD
|
||||
template <typename DestinationTimePointT, typename SourceTimePointT, typename DestnationClockT = typename DestinationTimePointT::clock, typename SourceClockT = typename SourceTimePointT::clock>
|
||||
DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -1165,7 +1165,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator&(facebook::react::ModalHostViewSupportedOrientationsMask const lhs, enum facebook::react::ModalHostViewSupportedOrientations const rhs);
|
||||
@@ -4191,7 +4190,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -4205,17 +4204,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -7120,6 +7111,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::ColorComponents {
|
||||
public facebook::react::ColorSpace colorSpace;
|
||||
public float alpha;
|
||||
|
||||
@@ -1016,7 +1016,7 @@ facebook::react::ComponentDescriptorProvider facebook::react::concreteComponentD
|
||||
template <typename DestinationTimePointT, typename SourceTimePointT, typename DestnationClockT = typename DestinationTimePointT::clock, typename SourceClockT = typename SourceTimePointT::clock>
|
||||
DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -1161,7 +1161,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator&(facebook::react::ModalHostViewSupportedOrientationsMask const lhs, enum facebook::react::ModalHostViewSupportedOrientations const rhs);
|
||||
@@ -4035,7 +4034,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -4049,17 +4048,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -6934,6 +6925,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::ColorComponents {
|
||||
public facebook::react::ColorSpace colorSpace;
|
||||
public float alpha;
|
||||
|
||||
@@ -1020,7 +1020,7 @@ facebook::react::ComponentDescriptorProvider facebook::react::concreteComponentD
|
||||
template <typename DestinationTimePointT, typename SourceTimePointT, typename DestnationClockT = typename DestinationTimePointT::clock, typename SourceClockT = typename SourceTimePointT::clock>
|
||||
DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -1165,7 +1165,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator&(facebook::react::ModalHostViewSupportedOrientationsMask const lhs, enum facebook::react::ModalHostViewSupportedOrientations const rhs);
|
||||
@@ -4188,7 +4187,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -4202,17 +4201,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -7111,6 +7102,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::ColorComponents {
|
||||
public facebook::react::ColorSpace colorSpace;
|
||||
public float alpha;
|
||||
|
||||
@@ -3853,7 +3853,7 @@ DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename P>
|
||||
RCTManagedPointer* facebook::react::managedPointer(P initializer);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -4000,7 +4000,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator&(facebook::react::ModalHostViewSupportedOrientationsMask const lhs, enum facebook::react::ModalHostViewSupportedOrientations const rhs);
|
||||
@@ -6408,7 +6407,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -6422,17 +6421,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -9308,6 +9299,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::Color {
|
||||
public Color();
|
||||
public Color(const facebook::react::ColorComponents& components);
|
||||
|
||||
@@ -3838,7 +3838,7 @@ DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename P>
|
||||
RCTManagedPointer* facebook::react::managedPointer(P initializer);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -3985,7 +3985,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator&(facebook::react::ModalHostViewSupportedOrientationsMask const lhs, enum facebook::react::ModalHostViewSupportedOrientations const rhs);
|
||||
@@ -6280,7 +6279,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -6294,17 +6293,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -9150,6 +9141,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::Color {
|
||||
public Color();
|
||||
public Color(const facebook::react::ColorComponents& components);
|
||||
|
||||
@@ -3853,7 +3853,7 @@ DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename P>
|
||||
RCTManagedPointer* facebook::react::managedPointer(P initializer);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -4000,7 +4000,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator&(facebook::react::ModalHostViewSupportedOrientationsMask const lhs, enum facebook::react::ModalHostViewSupportedOrientations const rhs);
|
||||
@@ -6405,7 +6404,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -6419,17 +6418,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -9299,6 +9290,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::Color {
|
||||
public Color();
|
||||
public Color(const facebook::react::ColorComponents& components);
|
||||
|
||||
@@ -590,7 +590,7 @@ facebook::react::ComponentDescriptorProvider facebook::react::concreteComponentD
|
||||
template <typename DestinationTimePointT, typename SourceTimePointT, typename DestnationClockT = typename DestinationTimePointT::clock, typename SourceClockT = typename SourceTimePointT::clock>
|
||||
DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -724,7 +724,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator==(const facebook::react::AccessibilityState& lhs, const facebook::react::AccessibilityState& rhs);
|
||||
@@ -2773,7 +2772,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -2787,17 +2786,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -5451,6 +5442,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::ColorComponents {
|
||||
public facebook::react::ColorSpace colorSpace;
|
||||
public float alpha;
|
||||
|
||||
@@ -587,7 +587,7 @@ facebook::react::ComponentDescriptorProvider facebook::react::concreteComponentD
|
||||
template <typename DestinationTimePointT, typename SourceTimePointT, typename DestnationClockT = typename DestinationTimePointT::clock, typename SourceClockT = typename SourceTimePointT::clock>
|
||||
DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -721,7 +721,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator==(const facebook::react::AccessibilityState& lhs, const facebook::react::AccessibilityState& rhs);
|
||||
@@ -2657,7 +2656,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -2671,17 +2670,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -5305,6 +5296,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::ColorComponents {
|
||||
public facebook::react::ColorSpace colorSpace;
|
||||
public float alpha;
|
||||
|
||||
@@ -590,7 +590,7 @@ facebook::react::ComponentDescriptorProvider facebook::react::concreteComponentD
|
||||
template <typename DestinationTimePointT, typename SourceTimePointT, typename DestnationClockT = typename DestinationTimePointT::clock, typename SourceClockT = typename SourceTimePointT::clock>
|
||||
DestinationTimePointT facebook::react::clockCast(SourceTimePointT timePoint);
|
||||
template <typename T, typename U = T>
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue, const char* namePrefix = nullptr, const char* nameSuffix = nullptr);
|
||||
T facebook::react::convertRawProp(const facebook::react::PropsParserContext& context, const facebook::react::RawProps& rawProps, const char* name, const T& sourceValue, const U& defaultValue);
|
||||
template <typename T>
|
||||
T facebook::react::get(const facebook::react::AnimatedPropBase& animatedProp);
|
||||
template <typename T>
|
||||
@@ -724,7 +724,6 @@ bool facebook::react::operator==(const facebook::react::LayoutContext& lhs, cons
|
||||
bool facebook::react::operator==(const facebook::react::LineMeasureCacheKey& lhs, const facebook::react::LineMeasureCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PerformanceObserver& lhs, const facebook::react::PerformanceObserver& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::PreparedTextCacheKey& lhs, const facebook::react::PreparedTextCacheKey& rhs);
|
||||
bool facebook::react::operator==(const facebook::react::RawPropsKey& lhs, const facebook::react::RawPropsKey& rhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::Size& rhs, const facebook::react::Size& lhs) noexcept;
|
||||
bool facebook::react::operator==(const facebook::react::TextMeasureCacheKey& lhs, const facebook::react::TextMeasureCacheKey& rhs);
|
||||
constexpr bool facebook::react::operator==(const facebook::react::AccessibilityState& lhs, const facebook::react::AccessibilityState& rhs);
|
||||
@@ -2770,7 +2769,7 @@ class facebook::react::RawProps {
|
||||
public RawProps(facebook::react::RawProps&& other) noexcept = default;
|
||||
public RawProps(folly::dynamic dynamic) noexcept;
|
||||
public bool isEmpty() const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name, const char* prefix, const char* suffix) const noexcept;
|
||||
public const facebook::react::RawValue* at(const char* name) const noexcept;
|
||||
public facebook::react::RawProps& operator=(const facebook::react::RawProps& other) noexcept = delete;
|
||||
public facebook::react::RawProps& operator=(facebook::react::RawProps&& other) noexcept = delete;
|
||||
public folly::dynamic toDynamic(const std::function<bool(const std::string&)>& filterObjectKeys = nullptr) const;
|
||||
@@ -2784,17 +2783,9 @@ enum facebook::react::RawProps::Mode {
|
||||
JSI,
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKey {
|
||||
public const char* name;
|
||||
public const char* prefix;
|
||||
public const char* suffix;
|
||||
public operator std::string() const noexcept;
|
||||
public void render(char* buffer, facebook::react::RawPropsPropNameLength* length) const noexcept;
|
||||
}
|
||||
|
||||
class facebook::react::RawPropsKeyMap {
|
||||
public facebook::react::RawPropsValueIndex at(const char* name, facebook::react::RawPropsPropNameLength length) noexcept;
|
||||
public void insert(const facebook::react::RawPropsKey& key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public facebook::react::RawPropsValueIndex at(std::string_view name) noexcept;
|
||||
public void insert(std::string_view key, facebook::react::RawPropsValueIndex value) noexcept;
|
||||
public void reindex() noexcept;
|
||||
}
|
||||
|
||||
@@ -5442,6 +5433,37 @@ struct facebook::react::CallbackWithId {
|
||||
public facebook::react::CallbackId callbackId;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleCornersNames {
|
||||
public const char* all;
|
||||
public const char* bottomEnd;
|
||||
public const char* bottomLeft;
|
||||
public const char* bottomRight;
|
||||
public const char* bottomStart;
|
||||
public const char* endEnd;
|
||||
public const char* endStart;
|
||||
public const char* startEnd;
|
||||
public const char* startStart;
|
||||
public const char* topEnd;
|
||||
public const char* topLeft;
|
||||
public const char* topRight;
|
||||
public const char* topStart;
|
||||
}
|
||||
|
||||
struct facebook::react::CascadedRectangleEdgesNames {
|
||||
public const char* all;
|
||||
public const char* block;
|
||||
public const char* blockEnd;
|
||||
public const char* blockStart;
|
||||
public const char* bottom;
|
||||
public const char* end;
|
||||
public const char* horizontal;
|
||||
public const char* left;
|
||||
public const char* right;
|
||||
public const char* start;
|
||||
public const char* top;
|
||||
public const char* vertical;
|
||||
}
|
||||
|
||||
struct facebook::react::ColorComponents {
|
||||
public facebook::react::ColorSpace colorSpace;
|
||||
public float alpha;
|
||||
|
||||
Reference in new issue
Block a user