react-native-tvos 0.88.0-0rc2 → 0.88.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/Libraries/Animated/components/AnimatedScrollView.js +2 -2
  2. package/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +26 -1
  3. package/Libraries/AppDelegate/RCTUIConfiguratorProtocol.h +1 -1
  4. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +8 -5
  5. package/Libraries/Components/Button.js +4 -2
  6. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -4
  7. package/Libraries/Components/Pressable/Pressable.js +4 -2
  8. package/Libraries/Components/TextInput/InputAccessoryView.js +8 -6
  9. package/Libraries/Components/TextInput/TextInput.js +5 -5
  10. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +85 -84
  11. package/Libraries/Components/View/ViewAccessibility.js +8 -4
  12. package/Libraries/Core/ReactNativeVersion.js +2 -2
  13. package/Libraries/Image/ImageProps.js +38 -18
  14. package/Libraries/LogBox/LogBoxNotificationContainer.js +7 -1
  15. package/Libraries/LogBox/UI/LogBoxNotificationDismissButton.js +3 -3
  16. package/Libraries/Modal/Modal.js +4 -2
  17. package/Libraries/StyleSheet/StyleSheet.js +3 -9
  18. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -9
  19. package/Libraries/StyleSheet/StyleSheetTypes.js +12 -9
  20. package/Libraries/StyleSheet/splitLayoutProps.js +6 -6
  21. package/Libraries/Text/Text.js +6 -6
  22. package/React/Base/RCTStatusBarAppearance.h +30 -0
  23. package/React/Base/RCTStatusBarAppearance.mm +66 -0
  24. package/React/Base/RCTVersion.m +2 -2
  25. package/React/CoreModules/RCTStatusBarManager.mm +34 -9
  26. package/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +13 -5
  27. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.mm +30 -2
  28. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +9 -0
  29. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +8 -1
  30. package/ReactAndroid/gradle.properties +1 -1
  31. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
  32. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +16 -2
  33. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt +4 -0
  34. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextDecorationStyle.kt +32 -4
  35. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +4 -0
  36. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +17 -12
  37. package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +3 -0
  38. package/ReactApple/RCTSwiftUI/RCTSwiftUIContainerView.swift +4 -0
  39. package/ReactCommon/cxxreact/ReactNativeVersion.h +3 -3
  40. package/ReactCommon/jsi/jsi/decorator.h +64 -0
  41. package/ReactCommon/jsi/jsi/jsi.cpp +2 -4
  42. package/ReactCommon/jsi/jsi/test/testlib.cpp +285 -8
  43. package/ReactCommon/jsi/jsi/test/testlib.h +1 -0
  44. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +2 -1
  45. package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +6 -2
  46. package/ReactCommon/yoga/yoga/algorithm/PixelGrid.cpp +49 -19
  47. package/package.json +8 -8
  48. package/scripts/cocoapods/utils.rb +51 -0
  49. package/scripts/codegen/templates/Package.swift.spm-template +13 -2
  50. package/scripts/react_native_pods.rb +1 -0
  51. package/scripts/setup-apple-spm.js +10 -5
  52. package/scripts/spm/autolinking-plugins.js +2 -1
  53. package/scripts/spm/flavored-frameworks.js +1 -0
  54. package/scripts/spm/generate-spm-autolinking.js +34 -96
  55. package/scripts/spm/generate-spm-xcodeproj.js +798 -285
  56. package/scripts/spm/ios-deployment-target.js +16 -63
  57. package/scripts/spm/spm-pbxproj.js +8 -3
  58. package/scripts/spm/spm-types.js +2 -15
  59. package/scripts/spm/sync-spm-autolinking.js +57 -23
  60. package/scripts/spm/xcconfig-files.js +149 -0
  61. package/sdks/.hermesv1version +1 -1
  62. package/sdks/hermes-engine/version.properties +1 -1
  63. package/types_DEPRECATED/index.d.ts +1 -0
  64. package/types_DEPRECATED/src/private/assets/AssetRegistry.d.ts +44 -0
  65. package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +7 -6
  66. package/types_generated/Libraries/Components/Button.d.ts +30 -29
  67. package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +8 -7
  68. package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +6 -5
  69. package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +7 -6
  70. package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +26 -25
  71. package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +23 -22
  72. package/types_generated/Libraries/Image/ImageProps.d.ts +39 -36
  73. package/types_generated/Libraries/Modal/Modal.d.ts +4 -3
  74. package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +5 -8
  75. package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +10 -10
@@ -23,9 +23,12 @@ const {
23
23
  findField,
24
24
  findObjectByUuid,
25
25
  findProjectObject,
26
- forEachObjectInSection,
27
- uuidsInArray,
28
26
  } = require('./spm-pbxproj');
27
+ const {
28
+ readXcconfig,
29
+ xcconfigIncludePath,
30
+ xcconfigReferencePaths,
31
+ } = require('./xcconfig-files');
29
32
  const fs = require('node:fs');
30
33
  const path = require('node:path');
31
34
 
@@ -87,14 +90,6 @@ function sanitizeIosDeploymentTarget(raw /*: ?string */) /*: string */ {
87
90
  : MIN_IOS_VERSION_SUPPORTED;
88
91
  }
89
92
 
90
- function defaultReadFile(absPath /*: string */) /*: ?string */ {
91
- try {
92
- return fs.readFileSync(absPath, 'utf8');
93
- } catch {
94
- return null;
95
- }
96
- }
97
-
98
93
  /**
99
94
  * `IPHONEOS_DEPLOYMENT_TARGET` as an xcconfig defines it, following `#include`
100
95
  * lines in place so a later assignment in the includer wins. Null when the file
@@ -116,10 +111,10 @@ function parseXcconfigSetting(
116
111
  let value /*: ?string */ = null;
117
112
  for (const rawLine of content.split('\n')) {
118
113
  const line = rawLine.replace(/\/\/.*$/, '').trim();
119
- const include = line.match(/^#include\??\s+"([^"]+)"/);
120
- if (include != null) {
114
+ const includePath = xcconfigIncludePath(absPath, line);
115
+ if (includePath != null) {
121
116
  const included = readXcconfigSetting(
122
- path.resolve(path.dirname(absPath), include[1]),
117
+ includePath,
123
118
  readFile,
124
119
  visited,
125
120
  depth + 1,
@@ -154,41 +149,6 @@ function readXcconfigSetting(
154
149
  : null;
155
150
  }
156
151
 
157
- /**
158
- * Directory components of the PBXGroup chain holding `uuid`, outermost first —
159
- * how a `"<group>"` file reference's path is anchored to the project dir.
160
- */
161
- function groupPathPrefix(
162
- text /*: string */,
163
- uuid /*: string */,
164
- ) /*: Array<string> */ {
165
- const groups /*: Array<{uuid: string, path: ?string, children: Set<string>}> */ =
166
- [];
167
- forEachObjectInSection(text, 'PBXGroup', ({uuid: groupUuid, ...body}) => {
168
- const children = findField(text, body, 'children');
169
- const groupPath = findField(text, body, 'path');
170
- groups.push({
171
- uuid: groupUuid,
172
- path: groupPath != null ? unquote(groupPath.value) : null,
173
- children: children != null ? uuidsInArray(children.value) : new Set(),
174
- });
175
- });
176
-
177
- const parts /*: Array<string> */ = [];
178
- let current = uuid;
179
- for (let i = 0; i < groups.length; i++) {
180
- const parent = groups.find(group => group.children.has(current));
181
- if (parent == null) {
182
- break;
183
- }
184
- if (parent.path != null) {
185
- parts.unshift(parent.path);
186
- }
187
- current = parent.uuid;
188
- }
189
- return parts;
190
- }
191
-
192
152
  /**
193
153
  * Absolute paths to try for the xcconfig a configuration is based on, in order:
194
154
  * the reference's own anchoring first, then plain `<srcRoot>/<path>`.
@@ -211,23 +171,16 @@ function xcconfigCandidates(
211
171
  if (pathField == null) {
212
172
  return [];
213
173
  }
214
- const refPath = unquote(pathField.value);
215
- if (path.isAbsolute(refPath)) {
216
- return [refPath];
217
- }
218
174
  const sourceTreeField = findField(text, ref, 'sourceTree');
219
- const sourceTree =
220
- sourceTreeField != null ? unquote(sourceTreeField.value) : '';
221
- const fallback = path.join(srcRoot, refPath);
222
- if (sourceTree !== '<group>') {
223
- return [fallback];
224
- }
225
- const anchored = path.join(
175
+ return xcconfigReferencePaths(
176
+ text,
177
+ {
178
+ uuid: refUuid,
179
+ path: unquote(pathField.value),
180
+ sourceTree: sourceTreeField != null ? unquote(sourceTreeField.value) : '',
181
+ },
226
182
  srcRoot,
227
- ...groupPathPrefix(text, refUuid),
228
- refPath,
229
183
  );
230
- return anchored === fallback ? [fallback] : [anchored, fallback];
231
184
  }
232
185
 
233
186
  function configName(
@@ -300,7 +253,7 @@ function readIosDeploymentTargetFromPbxproj(
300
253
  ) /*: ?string */ {
301
254
  const ctx /*: XcconfigContext */ = {
302
255
  srcRoot: opts?.srcRoot,
303
- readFile: opts?.readFile ?? defaultReadFile,
256
+ readFile: opts?.readFile ?? readXcconfig,
304
257
  };
305
258
  const targetUuid = opts?.targetUuid;
306
259
  const marked = targetUuid != null ? findObjectByUuid(text, targetUuid) : null;
@@ -530,21 +530,26 @@ function addArrayStringValues(
530
530
  }
531
531
 
532
532
  /**
533
- * Add a scalar field after the object's `{` only when ABSENT (never clobbers a
534
- * value the user already set). Returns text unchanged if the key exists.
533
+ * Add a scalar field only when ABSENT (never clobbers a value the user already
534
+ * set). Returns text unchanged if the key exists. Lands right after the field
535
+ * named `after` when the object has one, else after the object's `{`.
535
536
  */
536
537
  function ensureScalarField(
537
538
  text /*: string */,
538
539
  obj /*: BodyRange */,
539
540
  key /*: string */,
540
541
  value /*: string */,
542
+ options /*: {after?: string} */ = {},
541
543
  ) /*: string */ {
542
544
  if (findField(text, obj, key) != null) {
543
545
  return text;
544
546
  }
545
547
  const fieldIndent = detectFieldIndent(text, obj);
546
548
  const block = `\n${fieldIndent}${key} = ${value};`;
547
- return text.slice(0, obj.bodyOpen + 1) + block + text.slice(obj.bodyOpen + 1);
549
+ const anchor =
550
+ options.after != null ? findField(text, obj, options.after) : null;
551
+ const at = anchor != null ? anchor.tokenEnd + 1 : obj.bodyOpen + 1;
552
+ return text.slice(0, at) + block + text.slice(at);
548
553
  }
549
554
 
550
555
  /**
@@ -87,13 +87,6 @@ export type SpmTarget = {
87
87
  // .js/.podspec/.md siblings, etc. can never sneak in. Null/empty means
88
88
  // fall back to SPM's default scan of target.path.
89
89
  sources?: ?Array<string>,
90
- // Header search paths declared by the dep's podspec
91
- // (pod_target_xcconfig HEADER_SEARCH_PATHS), already substituted relative
92
- // to the dep's source dir. Path-style includes like
93
- // `<react/renderer/components/safeareacontext/X.h>` resolve through these.
94
- // Emitted as `.headerSearchPath(...)` directives in the target's
95
- // cSettings / cxxSettings.
96
- headerSearchPaths?: ?Array<string>,
97
90
  };
98
91
 
99
92
  // Routing metadata kept alongside an SpmTarget in main(). Lives in a wrapper
@@ -324,7 +317,8 @@ export type PluginResult = {
324
317
  flavoredFrameworks: Array<PluginFlavoredFramework>,
325
318
  // Absolute paths (dirs or files) the Xcode auto-sync build phase should watch
326
319
  // for staleness, e.g. the plugin dep's own `Package.swift` and per-module
327
- // manifests. Folded into `.spm-sync-watch-paths` by main().
320
+ // manifests. Folded into `.spm-sync-watch-paths` (or `.spm-sync-watch-absent`
321
+ // while missing) by main().
328
322
  watchPaths: Array<string>,
329
323
  // Build-time shell phases for the app target, recorded to
330
324
  // `.spm-plugin-script-phases.json` by main() and injected by `spm add`/
@@ -373,13 +367,6 @@ export type SynthPackageSpec = {
373
367
  // supply absolute paths (tests). Production uses siblingSynthAbsolutePaths.
374
368
  siblingPackageBaseRelative?: string,
375
369
  siblingSynthAbsolutePaths?: {[swiftName: string]: string},
376
- // Header search paths from the dep's podspec `pod_target_xcconfig`
377
- // HEADER_SEARCH_PATHS, with `$(PODS_TARGET_SRCROOT)` substituted and the
378
- // synth wrapper's `root/` prefix applied. Emitted as `.headerSearchPath()`
379
- // directives on cSettings / cxxSettings so path-style includes like
380
- // `<react/renderer/components/safeareacontext/X.h>` resolve through the
381
- // dep's own `common/cpp/` subtree.
382
- headerSearchPaths?: ?Array<string>,
383
370
  iosDeploymentTarget?: ?string,
384
371
  };
385
372
 
@@ -31,14 +31,24 @@
31
31
  * call site)
32
32
  * 2. Calls generate-spm-autolinking.js → build/generated/autolinking/Package.swift
33
33
  * 3. Rebuilds the generated-headers farm
34
- * 4. Writes build/generated/autolinking/.spm-sync-stamp
34
+ * 4. Fails when the Xcode project does not link exactly the precompiled
35
+ * frameworks autolinking plugins provide, and records the errors in
36
+ * build/generated/autolinking/.spm-plugin-mismatch for later builds
37
+ * 5. Writes build/generated/autolinking/.spm-sync-stamp
35
38
  *
36
39
  * Runtime frameworks are deliberately not downloaded or regenerated from an
37
40
  * Xcode build. `spm add` / `spm update` own the immutable dual-flavor slots and
38
41
  * the app target's linker/embed configuration.
39
42
  */
40
43
 
41
- const {main: generateAutolinking} = require('./generate-spm-autolinking');
44
+ const {
45
+ MissingManifestError,
46
+ main: generateAutolinking,
47
+ } = require('./generate-spm-autolinking');
48
+ const {
49
+ PluginFrameworkMismatchError,
50
+ assertPluginFrameworksLinked,
51
+ } = require('./generate-spm-xcodeproj');
42
52
  const {
43
53
  RemoteVersionError,
44
54
  buildPerAppHeaderTree,
@@ -62,6 +72,7 @@ const defaultDeps = {
62
72
  generateAutolinking,
63
73
  installSpmCodegenTemplate,
64
74
  buildPerAppHeaderTree,
75
+ assertPluginFrameworksLinked,
65
76
  findProjectRoot,
66
77
  };
67
78
 
@@ -130,6 +141,27 @@ async function main(
130
141
  autolinkingArgv.push('--ios-deployment-target', iosDeploymentTarget);
131
142
  }
132
143
  deps.generateAutolinking(autolinkingArgv);
144
+ const autolinkingDir = path.join(
145
+ appRoot,
146
+ 'build',
147
+ 'generated',
148
+ 'autolinking',
149
+ );
150
+ const stampPath = path.join(autolinkingDir, '.spm-sync-stamp');
151
+ const mismatchPath = path.join(autolinkingDir, '.spm-plugin-mismatch');
152
+ try {
153
+ deps.assertPluginFrameworksLinked(appRoot);
154
+ } catch (e) {
155
+ if (e instanceof PluginFrameworkMismatchError) {
156
+ // The build phase prints the recorded errors and fails until an input
157
+ // changes, so these inputs count as synced.
158
+ fs.mkdirSync(autolinkingDir, {recursive: true});
159
+ fs.writeFileSync(mismatchPath, e.problems.join('\n') + '\n', 'utf8');
160
+ writeStamp(stampPath);
161
+ }
162
+ throw e;
163
+ }
164
+ fs.rmSync(mismatchPath, {force: true});
133
165
 
134
166
  // Rebuild the per-app generated-headers farm (vended as the ReactAppHeaders
135
167
  // SPM target inside the codegen package). React core headers need no trees
@@ -139,31 +171,33 @@ async function main(
139
171
  // so no path-locator JSON is written.
140
172
  deps.buildPerAppHeaderTree(appRoot, {log});
141
173
 
142
- const stampPath = path.join(
143
- appRoot,
144
- 'build',
145
- 'generated',
146
- 'autolinking',
147
- '.spm-sync-stamp',
148
- );
174
+ writeStamp(stampPath);
175
+ log('SPM autolinking sync complete.');
176
+ }
177
+
178
+ function writeStamp(stampPath /*: string */) /*: void */ {
149
179
  fs.mkdirSync(path.dirname(stampPath), {recursive: true});
150
180
  fs.writeFileSync(stampPath, new Date().toISOString() + '\n', 'utf8');
151
- log('SPM autolinking sync complete.');
181
+ }
182
+
183
+ function reportFailure(e /*: unknown */) /*: void */ {
184
+ if (
185
+ e instanceof RemoteVersionError ||
186
+ e instanceof MissingManifestError ||
187
+ e instanceof PluginFrameworkMismatchError
188
+ ) {
189
+ // Clean message + exit 2 (the build phase hard-fails on it) instead of a
190
+ // stack trace, matching how setup-apple-spm.js surfaces these errors.
191
+ log(e.message);
192
+ process.exitCode = 2;
193
+ return;
194
+ }
195
+ console.error(e);
196
+ process.exitCode = 1;
152
197
  }
153
198
 
154
199
  if (require.main === module) {
155
- main().catch(e => {
156
- if (e instanceof RemoteVersionError) {
157
- // Clean message + exit 2 (the build phase hard-fails on it) instead of a
158
- // stack trace, matching how setup-apple-spm.js surfaces remote-mode
159
- // version errors.
160
- log(e.message);
161
- process.exitCode = 2;
162
- return;
163
- }
164
- console.error(e);
165
- process.exitCode = 1;
166
- });
200
+ main().catch(reportFailure);
167
201
  }
168
202
 
169
- module.exports = {main};
203
+ module.exports = {main, reportFailure};
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ /**
14
+ * Where the xcconfig file a project references lives on disk, and the files it
15
+ * pulls in through `#include` — resolved the way Xcode resolves them.
16
+ */
17
+
18
+ const {
19
+ findField,
20
+ forEachObjectInSection,
21
+ uuidsInArray,
22
+ } = require('./spm-pbxproj');
23
+ const fs = require('node:fs');
24
+ const path = require('node:path');
25
+
26
+ function unquote(value /*: string */) /*: string */ {
27
+ return value.replace(/^"|"$/g, '');
28
+ }
29
+
30
+ function readXcconfig(absPath /*: string */) /*: ?string */ {
31
+ try {
32
+ return fs.readFileSync(absPath, 'utf8');
33
+ } catch {
34
+ return null;
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Directory components of the PBXGroup chain holding `uuid`, outermost first —
40
+ * how a `"<group>"` file reference's path is anchored to the project dir.
41
+ */
42
+ function groupPathPrefix(
43
+ text /*: string */,
44
+ uuid /*: string */,
45
+ ) /*: Array<string> */ {
46
+ const groups /*: Array<{uuid: string, path: ?string, children: Set<string>}> */ =
47
+ [];
48
+ forEachObjectInSection(text, 'PBXGroup', ({uuid: groupUuid, ...body}) => {
49
+ const children = findField(text, body, 'children');
50
+ const groupPath = findField(text, body, 'path');
51
+ groups.push({
52
+ uuid: groupUuid,
53
+ path: groupPath != null ? unquote(groupPath.value) : null,
54
+ children: children != null ? uuidsInArray(children.value) : new Set(),
55
+ });
56
+ });
57
+
58
+ const parts /*: Array<string> */ = [];
59
+ let current = uuid;
60
+ for (let i = 0; i < groups.length; i++) {
61
+ const parent = groups.find(group => group.children.has(current));
62
+ if (parent == null) {
63
+ break;
64
+ }
65
+ if (parent.path != null) {
66
+ parts.unshift(parent.path);
67
+ }
68
+ current = parent.uuid;
69
+ }
70
+ return parts;
71
+ }
72
+
73
+ /**
74
+ * Absolute paths to try for the file a PBXFileReference names, in order: the
75
+ * reference's own anchoring first, then plain `<srcRoot>/<path>`. `ref.path`
76
+ * and `ref.sourceTree` are unquoted.
77
+ */
78
+ function xcconfigReferencePaths(
79
+ text /*: string */,
80
+ ref /*: {uuid: string, path: string, sourceTree: string} */,
81
+ srcRoot /*: string */,
82
+ ) /*: Array<string> */ {
83
+ if (path.isAbsolute(ref.path)) {
84
+ return [ref.path];
85
+ }
86
+ const fallback = path.join(srcRoot, ref.path);
87
+ if (ref.sourceTree !== '<group>') {
88
+ return [fallback];
89
+ }
90
+ const anchored = path.join(
91
+ srcRoot,
92
+ ...groupPathPrefix(text, ref.uuid),
93
+ ref.path,
94
+ );
95
+ return anchored === fallback ? [fallback] : [anchored, fallback];
96
+ }
97
+
98
+ /**
99
+ * The absolute path an `#include "…"` or `#include? "…"` line of the xcconfig
100
+ * at `absPath` names, or null for any other line. Xcode resolves it from the
101
+ * folder of the file holding the line.
102
+ */
103
+ function xcconfigIncludePath(
104
+ absPath /*: string */,
105
+ line /*: string */,
106
+ ) /*: ?string */ {
107
+ const include = line
108
+ .replace(/\/\/.*$/, '')
109
+ .trim()
110
+ .match(/^#include\??\s+"([^"]+)"/);
111
+ return include != null
112
+ ? path.resolve(path.dirname(absPath), include[1])
113
+ : null;
114
+ }
115
+
116
+ /**
117
+ * Whether the xcconfig at `absPath` (holding `content`) pulls in `targetPath`
118
+ * through its `#include` chain. An included file that cannot be read ends its
119
+ * branch of the chain.
120
+ */
121
+ function xcconfigIncludes(
122
+ absPath /*: string */,
123
+ content /*: string */,
124
+ targetPath /*: string */,
125
+ visited /*: Set<string> */ = new Set(),
126
+ ) /*: boolean */ {
127
+ visited.add(absPath);
128
+ for (const line of content.split('\n')) {
129
+ const included = xcconfigIncludePath(absPath, line);
130
+ if (included == null || visited.has(included)) {
131
+ continue;
132
+ }
133
+ if (included === path.resolve(targetPath)) {
134
+ return true;
135
+ }
136
+ const next = readXcconfig(included);
137
+ if (next != null && xcconfigIncludes(included, next, targetPath, visited)) {
138
+ return true;
139
+ }
140
+ }
141
+ return false;
142
+ }
143
+
144
+ module.exports = {
145
+ readXcconfig,
146
+ xcconfigIncludePath,
147
+ xcconfigIncludes,
148
+ xcconfigReferencePaths,
149
+ };
@@ -1 +1 @@
1
- hermes-v260318099.0.2
1
+ hermes-v260318099.0.5
@@ -1 +1 @@
1
- HERMES_VERSION_NAME=260318099.0.4
1
+ HERMES_VERSION_NAME=260318099.0.5
@@ -144,6 +144,7 @@ export * as CodegenTypes from './Libraries/Types/CodegenTypesNamespace';
144
144
  export * from './Libraries/Types/CoreEventTypes';
145
145
  export * from './Libraries/Utilities/Appearance';
146
146
  export * from './Libraries/Utilities/BackHandler';
147
+ export * from './src/private/assets/AssetRegistry';
147
148
  export * from './src/private/devsupport/devmenu/DevMenu';
148
149
  export * from './Libraries/Utilities/DevSettings';
149
150
  export * from './Libraries/Utilities/Dimensions';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ */
9
+
10
+ export type AssetDestPathResolver = 'android' | 'generic';
11
+
12
+ export interface PackagerAsset {
13
+ readonly __packager_asset: boolean;
14
+ readonly fileSystemLocation: string;
15
+ readonly httpServerLocation: string;
16
+ readonly width: number | null | undefined;
17
+ readonly height: number | null | undefined;
18
+ readonly scales: number[];
19
+ readonly hash: string;
20
+ readonly name: string;
21
+ readonly type: string;
22
+ readonly resolver?: AssetDestPathResolver | undefined;
23
+ }
24
+
25
+ /**
26
+ * Runtime registry that maps asset IDs generated in a Metro bundle to asset
27
+ * metadata. It backs `<Image>`, `Image.resolveAssetSource()`, and any code
28
+ * that resolves `require('./img.png')` on native.
29
+ *
30
+ * Most apps do not use this directly — assets are handled through `<Image>`.
31
+ */
32
+ export interface AssetRegistry {
33
+ /**
34
+ * Register an asset. Returns the asset ID.
35
+ */
36
+ registerAsset(asset: PackagerAsset): number;
37
+
38
+ /**
39
+ * Retrieve a registered asset by ID.
40
+ */
41
+ getAssetByID(assetId: number): PackagerAsset;
42
+ }
43
+
44
+ export declare const AssetRegistry: AssetRegistry;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<fa869dbe2676b53162a1002160695f4b>>
7
+ * @generated SignedSource<<da0efc5527249ef2db97b8f22dcf8101>>
8
8
  *
9
9
  * This file was translated from Flow by scripts/js-api/build-types/index.js.
10
10
  * Original file: packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js
@@ -24,18 +24,18 @@ type ActivityIndicatorIOSProps = Readonly<{
24
24
  */
25
25
  hidesWhenStopped?: boolean | undefined;
26
26
  }>;
27
- export interface ActivityIndicatorProps extends Readonly<Omit<ViewProps, keyof ActivityIndicatorIOSProps | "animating" | "color" | "size"> & Omit<ActivityIndicatorIOSProps, "animating" | "color" | "size">> {
27
+ type ActivityIndicatorPropsCore = Readonly<{
28
28
  /**
29
29
  * Whether to show the indicator (`true`) or hide it (`false`).
30
30
  */
31
- readonly animating?: boolean | undefined;
31
+ animating?: boolean | undefined;
32
32
  /**
33
33
  * The foreground color of the spinner.
34
34
  *
35
35
  * @default {@platform android} `null` (system accent default color)
36
36
  * @default {@platform ios} '#999999'
37
37
  */
38
- readonly color?: ColorValue | undefined;
38
+ color?: ColorValue | undefined;
39
39
  /**
40
40
  * Size of the indicator.
41
41
  *
@@ -44,8 +44,9 @@ export interface ActivityIndicatorProps extends Readonly<Omit<ViewProps, keyof A
44
44
  * @type enum(`'small'`, `'large'`)
45
45
  * @type {@platform android} number
46
46
  */
47
- readonly size?: IndicatorSize | undefined;
48
- }
47
+ size?: IndicatorSize | undefined;
48
+ }>;
49
+ export interface ActivityIndicatorProps extends Readonly<Omit<ViewProps, keyof ActivityIndicatorIOSProps | keyof ActivityIndicatorPropsCore | keyof {}> & Omit<ActivityIndicatorIOSProps, keyof ActivityIndicatorPropsCore | keyof {}> & Omit<ActivityIndicatorPropsCore, keyof {}>> {}
49
50
  declare const ActivityIndicator: (props: Omit<ActivityIndicatorProps, "ref"> & {
50
51
  ref?: React.Ref<ActivityIndicatorInstance> | undefined;
51
52
  }) => React.ReactNode;