This commit is contained in:
Yamozha
2021-04-02 02:24:13 +03:00
parent c23950b545
commit 7256d79e2c
31493 changed files with 3036630 additions and 0 deletions

View File

@ -0,0 +1,19 @@
/*
* Copyright (c) Facebook, Inc. and its 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 <react/components/text/TextShadowNode.h>
#include <react/core/ConcreteComponentDescriptor.h>
namespace facebook {
namespace react {
using TextComponentDescriptor = ConcreteComponentDescriptor<TextShadowNode>;
} // namespace react
} // namespace facebook

View File

@ -0,0 +1,26 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "TextProps.h"
namespace facebook {
namespace react {
TextProps::TextProps(const TextProps &sourceProps, const RawProps &rawProps)
: Props(sourceProps, rawProps),
BaseTextProps::BaseTextProps(sourceProps, rawProps){};
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList TextProps::getDebugProps() const {
return BaseTextProps::getDebugProps();
}
#endif
} // namespace react
} // namespace facebook

View File

@ -0,0 +1,32 @@
/*
* Copyright (c) Facebook, Inc. and its 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 <react/attributedstring/TextAttributes.h>
#include <react/components/text/BaseTextProps.h>
#include <react/core/Props.h>
#include <react/graphics/Color.h>
#include <react/graphics/Geometry.h>
namespace facebook {
namespace react {
class TextProps : public Props, public BaseTextProps {
public:
TextProps() = default;
TextProps(const TextProps &sourceProps, const RawProps &rawProps);
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList getDebugProps() const override;
#endif
};
} // namespace react
} // namespace facebook

View File

@ -0,0 +1,16 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "TextShadowNode.h"
namespace facebook {
namespace react {
extern const char TextComponentName[] = "Text";
} // namespace react
} // namespace facebook

View File

@ -0,0 +1,61 @@
/*
* Copyright (c) Facebook, Inc. and its 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 <limits>
#include <react/components/text/BaseTextShadowNode.h>
#include <react/components/text/TextProps.h>
#include <react/components/view/ViewEventEmitter.h>
#include <react/core/ConcreteShadowNode.h>
namespace facebook {
namespace react {
extern const char TextComponentName[];
using TextEventEmitter = TouchEventEmitter;
class TextShadowNode : public ConcreteShadowNode<
TextComponentName,
ShadowNode,
TextProps,
TextEventEmitter>,
public BaseTextShadowNode {
public:
static ShadowNodeTraits BaseTraits() {
auto traits = ConcreteShadowNode::BaseTraits();
#ifdef ANDROID
traits.set(ShadowNodeTraits::Trait::FormsView);
#endif
return traits;
}
using ConcreteShadowNode::ConcreteShadowNode;
#ifdef ANDROID
using BaseShadowNode = ConcreteShadowNode<
TextComponentName,
ShadowNode,
TextProps,
TextEventEmitter>;
TextShadowNode(
ShadowNodeFragment const &fragment,
ShadowNodeFamily::Shared const &family,
ShadowNodeTraits traits)
: BaseShadowNode(fragment, family, traits), BaseTextShadowNode() {
orderIndex_ = std::numeric_limits<decltype(orderIndex_)>::max();
}
#endif
};
} // namespace react
} // namespace facebook