mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add stable API guards to text and textinput components (#57363)
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57363 This diff rolls umbrella guards for `react/renderer/components/text` and `react/renderer/components/textinput`. Initially, we consider `text` component target as `public` and `textinput` as `for frameworks`, so the umbrella is added only to the `text` target. This diff also adds missing `components/text/platform/android/` to the prefab as otherwise the Text umbrella cannot be properly resolved on Android. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D109849283 fbshipit-source-id: 14fcab2a8ee437b94f7d131b8a373afc8b7d4f18
This commit is contained in:
1 parent
72e8874c13
commit
385fa84925
47 files changed
+157
No files matched your search
@@ -195,6 +195,11 @@ val preparePrefab by
|
||||
"../ReactCommon/react/renderer/components/text/",
|
||||
"react/renderer/components/text/",
|
||||
),
|
||||
Pair(
|
||||
"../ReactCommon/react/renderer/components/text/React/",
|
||||
"React/",
|
||||
),
|
||||
Pair("../ReactCommon/react/renderer/components/text/platform/android/", ""),
|
||||
Pair(
|
||||
"../ReactCommon/react/renderer/attributedstring",
|
||||
"react/renderer/attributedstring",
|
||||
|
||||
@@ -60,6 +60,7 @@ Pod::Spec.new do |s|
|
||||
s.dependency "React-logger"
|
||||
s.dependency "React-Core"
|
||||
s.dependency "React-debug"
|
||||
s.dependency "React-cxxstableapi"
|
||||
s.dependency "React-featureflags"
|
||||
s.dependency "React-utils"
|
||||
s.dependency "React-runtimescheduler"
|
||||
@@ -109,6 +110,12 @@ Pod::Spec.new do |s|
|
||||
sss.header_dir = "react/renderer/components/text"
|
||||
end
|
||||
|
||||
ss.subspec "textUmbrella" do |sss|
|
||||
sss.source_files = "react/renderer/components/text/React/*.h"
|
||||
sss.header_dir = "React"
|
||||
sss.header_mappings_dir = "react/renderer/components/text/React"
|
||||
end
|
||||
|
||||
ss.subspec "iostextinput" do |sss|
|
||||
sss.source_files = podspec_sources(["react/renderer/components/textinput/*.{m,mm,cpp,h}",
|
||||
"react/renderer/components/textinput/platform/ios/**/*.{m,mm,cpp,h}"],
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
#include <react/renderer/textlayoutmanager/TextLayoutManager.h>
|
||||
#include <react/utils/ContextContainer.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/TextAttributes.h>
|
||||
#include <react/renderer/core/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/AttributedString.h>
|
||||
#include <react/renderer/attributedstring/TextAttributes.h>
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/BaseParagraphComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/ParagraphShadowNode.h>
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <react/renderer/textlayoutmanager/TextMeasureCache.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/HostPlatformParagraphProps.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/BaseTextShadowNode.h>
|
||||
#include <react/renderer/components/text/ParagraphEventEmitter.h>
|
||||
#include <react/renderer/components/text/ParagraphProps.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/RawTextShadowNode.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <react/renderer/core/Props.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/RawTextProps.h>
|
||||
#include <react/renderer/core/ConcreteShadowNode.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
// =============================================================================
|
||||
// Umbrella header for the `react/renderer/components/text` module - public
|
||||
// entry point.
|
||||
//
|
||||
// #include <React/Text.h>
|
||||
//
|
||||
// Re-exports the module's public interface headers. React Native's own code
|
||||
// should keep using the fine-grained `<react/renderer/components/text/...>`
|
||||
// includes; only outside consumers use this umbrella.
|
||||
// =============================================================================
|
||||
|
||||
// Marks that the following headers are pulled in through the umbrella, so their
|
||||
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them.
|
||||
#define RN_UMBRELLA_CONTEXT
|
||||
|
||||
#include <react/renderer/components/text/BaseParagraphComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/BaseParagraphProps.h>
|
||||
#include <react/renderer/components/text/BaseTextProps.h>
|
||||
#include <react/renderer/components/text/BaseTextShadowNode.h>
|
||||
#include <react/renderer/components/text/HostPlatformParagraphProps.h>
|
||||
#include <react/renderer/components/text/ParagraphComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/ParagraphEventEmitter.h>
|
||||
#include <react/renderer/components/text/ParagraphProps.h>
|
||||
#include <react/renderer/components/text/ParagraphShadowNode.h>
|
||||
#include <react/renderer/components/text/ParagraphState.h>
|
||||
#include <react/renderer/components/text/RawTextComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/RawTextProps.h>
|
||||
#include <react/renderer/components/text/RawTextShadowNode.h>
|
||||
#include <react/renderer/components/text/SelectableParagraphComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/SelectableParagraphShadowNode.h>
|
||||
#include <react/renderer/components/text/TextComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/TextEffectComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/TextEffectProps.h>
|
||||
#include <react/renderer/components/text/TextEffectShadowNode.h>
|
||||
#include <react/renderer/components/text/TextProps.h>
|
||||
#include <react/renderer/components/text/TextShadowNode.h>
|
||||
#include <react/renderer/components/text/stateConversions.h>
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <react/renderer/components/text/conversions.h>
|
||||
#include <react/renderer/components/text/primitives.h>
|
||||
#endif
|
||||
|
||||
#undef RN_UMBRELLA_CONTEXT
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/BaseParagraphComponentDescriptor.h>
|
||||
#include <react/renderer/components/text/SelectableParagraphShadowNode.h>
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/ParagraphShadowNode.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/TextShadowNode.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/TextEffectShadowNode.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <folly/dynamic.h>
|
||||
#include <react/renderer/core/Props.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/TextEffectProps.h>
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
#include <react/renderer/core/ConcreteShadowNode.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/TextAttributes.h>
|
||||
#include <react/renderer/components/text/BaseTextProps.h>
|
||||
#include <react/renderer/core/Props.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <react/renderer/components/text/BaseTextShadowNode.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/debug/react_native_assert.h>
|
||||
#include <react/renderer/attributedstring/AttributedString.h>
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/primitives.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/RawValue.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
enum class DataDetectorType {
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/components/text/BaseParagraphProps.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/debug/react_native_assert.h>
|
||||
#include <react/renderer/attributedstring/AttributedString.h>
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/UmbrellaGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/conversions.h>
|
||||
#include <react/renderer/components/text/ParagraphState.h>
|
||||
#ifdef RN_SERIALIZABLE_STATE
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
#include <react/renderer/components/text/BaseTextProps.h>
|
||||
#include <react/renderer/components/textinput/basePrimitives.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <glog/logging.h>
|
||||
|
||||
#include <react/renderer/attributedstring/AttributedString.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/AttributedString.h>
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/AttributedStringBox.h>
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
#include <react/renderer/textlayoutmanager/TextLayoutManager.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/components/textinput/basePrimitives.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/RawValue.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
enum class SubmitBehavior {
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include "AndroidTextInputShadowNode.h"
|
||||
#include "AndroidTextInputState.h"
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/components/view/ViewEventEmitter.h>
|
||||
|
||||
namespace facebook::react {
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/core/Props.h>
|
||||
#include <react/renderer/graphics/Color.h>
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include "AndroidTextInputEventEmitter.h"
|
||||
#include "AndroidTextInputProps.h"
|
||||
#include "AndroidTextInputState.h"
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/AttributedStringBox.h>
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
#include <react/renderer/textlayoutmanager/TextLayoutManager.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/components/iostextinput/TextInputShadowNode.h>
|
||||
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
#include <react/renderer/attributedstring/TextAttributes.h>
|
||||
#include <react/renderer/components/iostextinput/conversions.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/components/iostextinput/TextInputProps.h>
|
||||
#include <react/renderer/components/textinput/BaseTextInputShadowNode.h>
|
||||
#include <react/renderer/components/textinput/TextInputEventEmitter.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/components/iostextinput/primitives.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
#include <react/renderer/core/propsConversions.h>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/renderer/components/textinput/basePrimitives.h>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
+2
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <react/cxxstableapi/FrameworksGuard.h>
|
||||
|
||||
#include <react/debug/react_native_expect.h>
|
||||
#include <react/renderer/components/iostextinput/primitives.h>
|
||||
#include <react/renderer/core/PropsParserContext.h>
|
||||
|
||||
@@ -358,6 +358,12 @@ const PodspecExceptions /*: {[key: string]: PodSpecConfiguration} */ = {
|
||||
headerDir: 'react/renderer/components/text',
|
||||
},
|
||||
|
||||
{
|
||||
name: 'textUmbrella',
|
||||
headerPatterns: ['react/renderer/components/text/React/*.h'],
|
||||
headerDir: 'React',
|
||||
},
|
||||
|
||||
{
|
||||
name: 'iostextinput',
|
||||
headerPatterns: [
|
||||
|
||||
Reference in new issue
Block a user