Skip to content

Commit e801b76

Browse files
Dawid Małeckimeta-codesync[bot]
authored andcommitted
Reclassify renderer CSS as for-frameworks
Summary: Reclassify the renderer CSS headers (`react/renderer/css/*.h`) as framework-tier APIs by switching them from the public umbrella guard to the for-frameworks guard. Framework integrations keep access to the fine-grained headers and acknowledge that usage by defining `RN_ALLOW_FRAMEWORKS`. Remove the `React/CSS.h` umbrella and stop publishing it from Buck, CocoaPods, Android prefab, the iOS prebuild header config, and the iOS prebuild header linking step. Its only consumer, the attributed string conversions header (itself framework-tier), now includes the CSS headers it uses (`CSSFontVariant.h` and `CSSValueParser.h`) directly. Changelog: [Internal] Differential Revision: D119642784
1 parent 44ffdba commit e801b76

34 files changed

Lines changed: 59 additions & 103 deletions

‎packages/react-native/ReactAndroid/build.gradle.kts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ val preparePrefab by
143143
Pair("../ReactCommon/react/renderer/core/React/", "React/"),
144144
// react_renderer_css
145145
Pair("../ReactCommon/react/renderer/css/", "react/renderer/css/"),
146-
Pair("../ReactCommon/react/renderer/css/React/", "React/"),
147146
// react_debug
148147
Pair("../ReactCommon/react/debug/", "react/debug/"),
149148
Pair("../ReactCommon/react/debug/React/", "React/"),

‎packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <react/cxxstableapi/FrameworksGuard.h>
1111

12-
#include <React/CSS.h>
1312
#include <React/Debug.h>
1413
#include <React/RendererCore.h>
1514
#include <React/View.h>
@@ -18,6 +17,8 @@
1817
#include <react/renderer/attributedstring/ParagraphAttributes.h>
1918
#include <react/renderer/attributedstring/TextAttributes.h>
2019
#include <react/renderer/attributedstring/primitives.h>
20+
#include <react/renderer/css/CSSFontVariant.h>
21+
#include <react/renderer/css/CSSValueParser.h>
2122
#include <unordered_map>
2223

2324
#ifdef RN_SERIALIZABLE_STATE

‎packages/react-native/ReactCommon/react/renderer/css/CSSAngle.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <optional>
1313

‎packages/react-native/ReactCommon/react/renderer/css/CSSAngleUnit.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <cmath>
1313
#include <cstdint>

‎packages/react-native/ReactCommon/react/renderer/css/CSSBackgroundImage.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <optional>
1313
#include <variant>

‎packages/react-native/ReactCommon/react/renderer/css/CSSColor.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <optional>
1313

‎packages/react-native/ReactCommon/react/renderer/css/CSSColorFunction.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <algorithm>
1313
#include <cmath>

‎packages/react-native/ReactCommon/react/renderer/css/CSSCompoundDataType.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <react/renderer/css/CSSDataType.h>
1313

‎packages/react-native/ReactCommon/react/renderer/css/CSSDataType.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <any>
1313
#include <concepts>

‎packages/react-native/ReactCommon/react/renderer/css/CSSFilter.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#pragma once
99

10-
#include <react/cxxstableapi/UmbrellaGuard.h>
10+
#include <react/cxxstableapi/FrameworksGuard.h>
1111

1212
#include <array>
1313
#include <optional>

0 commit comments

Comments
 (0)